Posted April 15, 20214 yr Hi everybody ! I want to create a sticky block in Minecraft 1.16.5, but after exploring the source code of Honey Block and Slime Block, I still don't know how to add sticky property to a block... Can somebody help me ? Thanks you ! Edited April 16, 20214 yr by vKorantin Solved
April 15, 20214 yr 29 minutes ago, vKorantin said: Hi everybody ! I want to create a sticky block in Minecraft 1.16.5, but after exploring the source code of Honey Block and Slime Block, I still don't know how to add sticky property to a block... Can somebody help me ? Thanks you ! The honey block class in net.minecraft.block.HoneyBlock has multiple functions that makes it sticky, Though i am not sure how you would implement them into a block,
April 15, 20214 yr Author Thanks for your answer, but I tried to create a CustomStickyBlock class that extends HoneyBlock (I also tried with SlimeBlock), and all of the HoneyBlock's properties works on my custom block, but not the sticky property...
April 15, 20214 yr Override isStickyBlock in your custom block class Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
April 15, 20214 yr Author Where did the isStickyBlock method come from ? There is an error when I try tooverride this method.
April 15, 20214 yr It comes from IForgeBlock. Show your code Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
April 15, 20214 yr Author Okay, so I have made my class implements IForgeBlock and I have override isStickyBlock, and now it works ! Thanks you for your help !!!
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.