Everything posted by UM3 F0R TH3 W1N
-
Is there a list of all the 1.12.2 events? [Solved]
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.
-
Item giving potion effect while in the player's inventory! - 1.12.2
I figured it out while you were typing this, sorry, I have been working a lot with lua and python lately and not much on java at all so I was getting confused lmao. but thx for the help.
-
Item giving potion effect while in the player's inventory! - 1.12.2
sort of but also not really
-
Item giving potion effect while in the player's inventory! - 1.12.2
however Item#onUpdateuses Entity not EntityLivingBase so there is no getActivePotionEffect.
-
Item giving potion effect while in the player's inventory! - 1.12.2
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!
-
How to make my item have a knockback effect? -1.12.2
Hey guys, I am trying to see how I can have my item do extra knockback when I hit an entity with it! How can I do this? If this can be done without applying an enchantment, that would be great but I'd prefer to not have an enchant on the item! Thanks in advance!
-
Game Crash from Apple Drop - 1.12.2
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
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
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)
-
Game Crash from Apple Drop - 1.12.2
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!
-
How to get my item to be dropped from leaves as well as apples? - 1.12.2
hmmm ok
-
How to get my item to be dropped from leaves as well as apples? - 1.12.2
is it a bad idea to use this: event.getDrops().clear(); like, will it mess up anything to do with like other mod compatability
-
How to get my item to be dropped from leaves as well as apples? - 1.12.2
incorrect, as I tested it with the chance being 1.0f and I got my custom seeds every time however vanilla seeds had the same rarity/chances as they usually do
-
How to get my item to be dropped from leaves as well as apples? - 1.12.2
ok that doesn't work either
-
How to get my item to be dropped from leaves as well as apples? - 1.12.2
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
-
How to get my item to be dropped from leaves as well as apples? - 1.12.2
how can I check for the block tho
-
How to get my item to be dropped from leaves as well as apples? - 1.12.2
also, I kinda knew that the code I sent before didn't work and that's why I deleted it, because I remembered that subscribe events only allow for 1 param, otherwise it would crash the game
-
How to get my item to be dropped from leaves as well as apples? - 1.12.2
ok, well what you shown me last time didn't actually work, so... I needed it to work for grass however it worked for any harvestable block, how am I meant to check for the block if I cant put 2 params in, theres no way for me to check what block has been broken if I cant put `Block block` in the parameters
-
How to get my item to be dropped from leaves as well as apples? - 1.12.2
ok, so I have got something here and im rly not sure it will work
-
How to get my item to be dropped from leaves as well as apples? - 1.12.2
Hello fellow modders, I have recently worked out how to do custom item drops for grass and I wondered if I could do the same for leaves, I have been looking through the code for a while now and I can't find anything which I would be able to utilize/subscribe to. Can anyone tell me/lead me in the right direction to either where I should be looking/if it's even possible/ how to do it if it is possible. Thanks in advance! Edit: I just realised that this does not make too much sense. What I mean is: Can anyone help me with making Oak Leaves drop an item from my mod with the same rarity/chances that apples drop with. I do NOT want to override the default apples dropping, I just want to add to the apples dropping!
-
Minecraft Forge GAME CRASH (Unsupported Version)
and that too ^
-
Minecraft Forge GAME CRASH (Unsupported Version)
whats ctm
-
How to get my item to be dropped from grass? - 1.12.2
ok thx so much, however it says that HarvestDropsEvent#getDropChance() is a float value not integer
-
How to get my item to be dropped from grass? - 1.12.2
ok, it works but they drop every single time, is there a way I can change it to be the exact same as normal seeds?
-
How to get my item to be dropped from grass? - 1.12.2
so this would work right: SeedsFromGrassEvent seedEvent = new SeedsFromGrassEvent(); MinecraftForge.EVENT_BUS.register(seedEvent);
IPS spam blocked by CleanTalk.