![]() ![]() Do not remove the cauldron, as it'll be placed back anyway in the next step Īdd more custom code snippets with these lines: tBlockState(pos, blockState.withProperty(BlockCauldron. Now you can add your procedure blocks: apply an effect to the entity, spawn particles, remove items from your inventory etc. Stores the water level of the cauldron as an integer variable (which is why you can't use "waterLevel" as a procedure local variable)Ĭhecks if the water level is greater than 0 (that is, if there's water in the cauldron) Stores the cauldron and its blockstate as an IBlockState variable Stores the X Y Z as a BlockPos variable (to make the code cleaner) You should use a block for each line, to make the code more readable. On "custom code snippet" blocks (found in Advanced). Int waterLevel = blockState.getValue(BlockCauldron.LEVEL) IBlockState blockState = world.getBlockState(pos) All the next blocks will go inside this if statement. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |