UM3 F0R TH3 W1N
Members-
Posts
69 -
Joined
-
Last visited
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
UM3 F0R TH3 W1N's Achievements
Stone Miner (3/8)
0
Reputation
-
Hey guys, I was wondering if there is a list of events that I can use for 1.12.2 rather than scouring the mc source for events(and rarely finding any that I need). so I have to resort to asking you guys, but if there is a list somewhere that would be extremely beneficial to me and loads of other people probably. if this could be done that would be great and I probably wouldn't turn up here so often, thanks in advance if you guys can help here.
-
Hey guys, I am making this post because a friend of mine asked me how to make his item give the player a potion effect if it is in the player's inventory, however neither of us knew how to do this, so for this reason I have come here for some insight on how to do this. I am assuming it will involve an event but I could be wrong. If it does use an event, I am clueless of which one. Thanks for the help in advance!
-
Game Crash from Apple Drop - 1.12.2
UM3 F0R TH3 W1N replied to UM3 F0R TH3 W1N's topic in Modder Support
he explained how to do the event but not the check for what block, I know how to check for a block without meta but not for a block with meta -
Game Crash from Apple Drop - 1.12.2
UM3 F0R TH3 W1N replied to UM3 F0R TH3 W1N's topic in Modder Support
im currently testing this code here: if(event.getState().getBlock() == Blocks.LEAVES.getDefaultState().withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.OAK)) { event.getDrops().add(new ItemStack(ItemInit.GREEN_APPLE)); event.setDropChance(0.05f); } else if(event.getState().getBlock() == Blocks.LEAVES2.getDefaultState().withProperty(BlockNewLeaf.VARIANT, BlockPlanks.EnumType.DARK_OAK)) { event.getDrops().add(new ItemStack(ItemInit.GREEN_APPLE)); event.setDropChance(0.05f); } -
Game Crash from Apple Drop - 1.12.2
UM3 F0R TH3 W1N replied to UM3 F0R TH3 W1N's topic in Modder Support
I may be wrong however I believe it has something to do with: if(event.getState().getValue(BlockOldLeaf.VARIANT) == EnumType.OAK) and else if(event.getState().getValue(BlockOldLeaf.VARIANT) == EnumType.DARK_OAK) -
I have recently been working on having my custom apple drop from oak trees and dark oak trees, however as I was testing it the game crashed, here's the crash log: https://hastebin.com/xifabokeci.sql. Here's ApplesFromLeavesEvent.java: https://hastebin.com/alipepoqok.java. If you need any other classes tell me. Thanks for the help in advance!
-
so for the grass it would be like this: @SubscribeEvent public void getSeedsFromGrass(HarvestDropsEvent event) { if(event.getState() == Blocks.GRASS) { event.getDrops().add(new ItemStack(ItemInit.TOMATO_SEEDS)); event.getDrops().add(new ItemStack(ItemInit.LEMON_SEEDS)); event.setDropChance(0.07f); } else if(event.getState() == Blocks.TALLGRASS) { event.getDrops().add(new ItemStack(ItemInit.TOMATO_SEEDS)); event.getDrops().add(new ItemStack(ItemInit.LEMON_SEEDS)); event.setDropChance(0.14f); } } ? but im still confused on the leaf part