Created
August 31, 2022 07:52
-
-
Save Lothrazar/8e2feb95b390cf0bb2a63ebb16dc9f25 to your computer and use it in GitHub Desktop.
CauldronInteraction water recipe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void setup(final FMLCommonSetupEvent event) { | |
event.enqueueWork(() -> { | |
CauldronInteraction WASH_PEEL = (state, level, pos, player, hand, stack) -> { | |
if (stack.is(Items.POTATO)) { | |
//replace all the item, be generous. we could instead stack.shrink and drop just one | |
player.setItemInHand(hand, new ItemStack(PotatoModRegistry.PEELED.get(), stack.getCount())); | |
LayeredCauldronBlock.lowerFillLevel(state, level, pos); | |
return InteractionResult.sidedSuccess(level.isClientSide); | |
} | |
return InteractionResult.PASS; | |
}; | |
CauldronInteraction.WATER.put(Items.POTATO, WASH_PEEL); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment