Hot Summer Deals are Here!
Celebrate with up to 99% off on 17,300 resources
02
Days
21
Hours
53
Mins
08
Secs

Help implementing pearling through OPEN fencegates

Status
This thread has been locked.

Nykorrin

i-
Premium
Feedback score
6
Posts
812
Reactions
299
Resources
0
Hello mcm users, being that I am not a very experiences nor knowledgeable Java developer and I only recently started "learning" Java, I wanted to make my current 1.8 spigot (RageSpigot) have features from HCF such as pearling through fencegates, with some insane help, I was able to implement pearling through fencegates, however, when testing it out, I realized that I did not set it to only allow pearlthru if the fencegates were open, I tried to do that but it still didn't work, I get no errors compiling the spigot or running it.

This is the "stuff" I am using to try to check if the fencegate is open before allowing the pearl the travel through:

If you can help me, my Discord is Nykorrin#3018, thank you. :)
 
PebbleHost
High performance, consistent uptime and fast support. Minecraft hosting that just works.

FireFlower

Feedback score
6
Posts
228
Reactions
48
Resources
0
If I read your post correctly, in your codes current state people are able to pearl through closed fence gates.

Looking through your code, Fence Gates are assumed to be open, and open is set to false after a gate is found closed. Or in other words there's probably something wrong with your code which detects if fence gates are closed. Or maybe with the block iterator.

Edit: Just reread your code, you return if the block is a fence gate without checking if it's open on your first line.
 
Last edited:

Nykorrin

i-
Premium
Feedback score
6
Posts
812
Reactions
299
Resources
0
If I read your post correctly, in your codes current state people are able to pearl through closed fence gates.

Looking through your code, Fence Gates are assumed to be open, and open is set to false after a gate is found closed. Or in other words there's probably something wrong with your code which detects if fence gates are closed. Or maybe with the block iterator.

Edit: Just reread your code, you return if the block is a fence gate without checking if it's open on your first line.
Thanks, will fix thos when available, I looked at the 1.7 paperspigot patches for this and must've not have noticed. <3[DOUBLEPOST=1544561530][/DOUBLEPOST]
If I read your post correctly, in your codes current state people are able to pearl through closed fence gates.

Looking through your code, Fence Gates are assumed to be open, and open is set to false after a gate is found closed. Or in other words there's probably something wrong with your code which detects if fence gates are closed. Or maybe with the block iterator.

Edit: Just reread your code, you return if the block is a fence gate without checking if it's open on your first line.


I tried doing what you said, however, after changing boolean open = true; to boolean open = false; and open = false; to open = true;

Peals still travel through fencegates and with that current pastebin above, I get errors compiling...
 
Last edited:
Status
This thread has been locked.
Top