perromercenary00 Posted July 22, 2022 Share Posted July 22, 2022 good days im redoing mi horizontal door using as base DoorBlock class and im trying to make the door to close both sides at same time https://i.postimg.cc/FKtZS9dr/door-Update.gif[/img] and i have troubles whit it i cannot manage to make the complementary side to close open whit the door i put some system.outs to see what of the code was actually runing and when right click the door the "public void setOpen()" gets trigered it founds the door and the companion door then change the value of block attribute open and updateShape() method gets trigered two times setting back the state of the companion door soo it close back the companion door [12:05:33] [Server thread/INFO] [STDOUT/]: [baseMmod.block.base_door:setOpen:149]: setOpen(true)basemmod:puerta_mesh [12:05:33] [Server thread/INFO] [STDOUT/]: [baseMmod.block.base_door:updateShape:238]: updateShape (left) basemmod:puerta_mesh [12:05:33] [Server thread/INFO] [STDOUT/]: [baseMmod.block.base_door:updateShape:238]: updateShape (right) basemmod:puerta_mesh [12:05:34] [Server thread/INFO] [STDOUT/]: [baseMmod.block.base_door:setOpen:149]: setOpen(false)basemmod:puerta_mesh [12:05:34] [Server thread/INFO] [STDOUT/]: [baseMmod.block.base_door:updateShape:238]: updateShape (right) basemmod:puerta_mesh [12:05:34] [Server thread/INFO] [STDOUT/]: [baseMmod.block.base_door:updateShape:238]: updateShape (left) basemmod:puerta_mesh i see the minecraft code it writes the block states back to world using level.setBlock(companion_pos, companion_blkstate, 10); i dont know what the int in the 3 attribute means but seems to do nothing here in 1.12 zero breaks the block and drops one does something i dont remenber and two breaks the block witout droping nuthing ¿ soo is there a equivalent of level.setBlock(BlockPos, BlockState, "just apply but Dont trigger Block internal methods") ? //################################################################################################# the second thing is to make the door compatible whit villagers in 1.12 just extending DoorBlock and overrriding setOpen() was enought for villagers to acknowledge the door and interact opening close it in but here they seem to see the door walk to it but then they are incapable of opening the door i dotn even know what to ask for is some subclass in another place or a thing you have to suscribe to some bus soo the door soo villagers can use this custome made doors ? Thanks for your attention Quote Link to comment Share on other sites More sharing options...
warjort Posted July 22, 2022 Share Posted July 22, 2022 Here's an old forge class which used to hold the values for the flags in Block updates. WARNING: This class was removed so some the values may be out-of-date? You will need to check the actual minecraft code if it doesn't do what it says there. https://github.com/Wyn-Price/MinecraftForge/blob/4f3b02c2df17119538c5cd91a8eb8302cf187454/src/main/java/net/minecraftforge/common/util/Constants.java I would guess the Villager's ignoring the change is due to the BLOCK_UPDATE bit not being set? Since this is commented as "updates all pathfinders". I can't comment on the double doors updates. I have never looked at the code. Quote Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post. Link to comment Share on other sites More sharing options...
Luis_ST Posted July 22, 2022 Share Posted July 22, 2022 47 minutes ago, warjort said: Here's an old forge class which used to hold the values for the flags in Block updates. WARNING: This class was removed so some the values may be out-of-date? You will need to check the actual minecraft code if it doesn't do what it says there. they're not. the reason why the class was removed is there are the vanilla constas which should be used instead the replacements are Block.UPDATE_CLIENTS or Block.UPDATE_ALL Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.