Jump to content

FunAverage57

Members
  • Posts

    10
  • Joined

  • Last visited

FunAverage57's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Using LASTEST FORGE VERSION AS OF 8/10/19 Minecraft 1.14.4 Forge 28.0.45 PlayerDestroyItemEvent doesn't work, with specific situation for when an item breaks. From what I tested in the video the event trigger from the following situation when an item breaks: - Block Breaking - Shield Breaks From what I tested in the video the event doesn't trigger from the following situation when an item breaks: - Hitting an Entity - Using a Hoe on Grass - Using a Bow - Using Flint and Steel Here is the video showing what I say above. Thanks in advance for reading my post. Hope you guys fix the issue.
  2. @Draco18s I appreciate your suggestions for my code, but rn that not the issue; I get my code isn’t the most efficient, but there are a million ways to do one thing in coding. Originally this post was made to report a bug with Minecraft Forge where the PlayerDestoryItemEvent wasn’t working properly, what I mean was that the event should trigger when an item get destroyed whether it by breaking a block, hitting an entity or using it on a block, if the item gets destroyed it should trigger the event. Right now if I destroy an item by breaking a block, the event triggers. If I destroy an item by attack an entity however, the event doesn’t trigger.
  3. Everything in the mod works fine, again if something happen because of my code, i will update to make sure it works, but please right now can you see if the PlayerDamageItemEvent is working properly. As that is the reason I'm contacting forge support, since I believe there is a bug with the event.
  4. @DaemonUmbra i dont believe it my code, i believe the event isn't triggering correctly which is why i reported it as a bug; again the event trigger when I break an item by breaking a block but not by hitting an entity
  5. @DaemonUmbra for setup and main class I watch HarryTalks, but the event class is my own research and most of the weapon classes are me
  6. @DaemonUmbra Here is the github https://github.com/FunAverage57/CustomWeaponsMod/
  7. @DaemonUmbra I did change it to, checking if the item is the same, and it work like it did before, but when I hit an entity to break the item, the event still doesn't trigger
  8. @DaemonUmbra No reason at all, just didn't the thing I was more comfortable with, but the event still doesn't trigger when I hit an entity, so is that a bug, or I'm not understanding the event properly
  9. In the video I show what I believe is the bug with the PlayerDestroyItemEvent, where it doesn't trigger when you hit an entity. Video Explanation @SubscribeEvent public void blueRoseSwordBreak(PlayerDestroyItemEvent event){ PlayerEntity player = event.getEntityPlayer(); ItemStack sword = event.getOriginal(); ItemStack broken = new ItemStack(ItemList.broken_blue_rose_sword); System.out.println(player.inventory.getSlotFor(broken)); if(sword.toString().equals("1 blue_rose_sword")){ System.out.println("EQUALS"); System.out.println(player.inventory.getCurrentItem().toString()); System.out.println(player.inventory.addItemStackToInventory(broken)); player.replaceItemInInventory(player.inventory.getSlotFor(sword), broken); } }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.