Prefabs bypass protected blocks.
ProsperCraft opened this issue ยท 20 comments
-
What version of Minecraft, Forge and Mod are you running?
- Minecraft Version: 1.12.2
- Forge Version: forge-1.12.2-14.23.2.2628-universal
- Mod Version:prefab-1.3.0.17
-
What type of issue is this? Choose one of the following:
- Bug (Something doesn't work the way you expect or the game crashes/has an issue)
-
If this is a bug, please provide as much detail as possible for the issue that you are running into. If possible post a log file to PasteBin or another similar site.
https://minecraft.curseforge.com/projects/futurepack
Futurepack adds dungeons that are protected and you can't bypass the dungeon by digging blocks, not even in creative. The mineshaft from the prefab houses and the bulldozer don't' check against this protection, and break all of the blocks and allow players to cheat the dungeon which bypasses a ton of obstacles they are supposed to do before they get the rewards.
What mod specifically adds these dungeons?
I already have code to check for protected spaces which I know the bulldozer checks for.
The code it uses can be found here:
I don't think the mineshaft checks properly for this, if you're on a server in the mean-time you can turn the mineshaft option off. It's in the starter house configuration.
The mod I linked above - Futurepack.
it's the bulldozer that poses the greatest problem.
@mcenderdragon, yes all of my structure items send this event for every block in the space it will clear out before building the structure. This is done server-side.
Below is the trace of where the method is called.
This looks like it should work fine. The structures are they build while generating the world of afterwards by players ?
@ProsperCraft have the players checked if they could break the dungeon from hand ? Or are they unable to break the dungeon but the bulldozer is able to do so ?
From the pictures above the Bulldozer is a moving blockbreaking structure right? is it possible it can move into an dungeon an breaks it ? For the protection is am listening to the BlockBreakEvent. Also @ProsperCraft you are using sponge right ?
It's not really a structure, it just clears 16x16 area by setting all of the blocks to air. Of course this still occurs after I verify that there are no protected blocks in range. BlockBreakEvents are not called except for the initial check.
Something I noticed in ProspercCraft picture is that it looks like it sheared off the roof of the dungeon. After work I will see if i am not going down far enough for this check.
this means your are not allowed to build blocks in the area where previously the dungeon was ?
I just created a test world in my development area and I was not able to duplicate this. I have not changed how this process works on my end. This was in single player mode and dedicated server mode using default configuration settings for FuturePack.
I found an above ground structure which I could not break by hand and properly got he message from Prefab saying that the building could not be placed due to protected areas/blocks.
The interesting thing I did notice is that the block itself it not protected. In creative I can place a Purple Colored Metal Block and break it by hand. But if I try to do this for the structure it is immediately replaced. Maybe there is an issue with this particular structure's protection detection?
I just double checked the situation where the bulldozer was used on a block was at the same level as protected blocks. It worked properly and did not destroy protected blocks. I also went 1 block down from the top of a structure and tried to clear and I got my message about protected blocks.
I looked even closer at @ProsperCraft screen shot above and it appears as though the structure is half built. There is a wall missing in addition to the roof. Did the player remove that too? That's not something the bulldozer could have done.
Is Sponge Hacking into the forge Event Bus ? If so it would explain why we cant reporoduce this.
@ProsperCraft Do you have sponge on your server? If you do, does this issue still come up if you remove sponge?
Since there has been no response to the request for more information for this issue in 2 weeks, I am closing this issue.
This issue can be re-opened if there is more information provided.
Sponge-enabled servers are not supported with this mod. Sponge has caused issues in the past with Prefab and specifically around this issue of bypassing the block protections.
See issue #20 for an example.