Jump to content

[NoOneButNo]

Members
  • Posts

    89
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by [NoOneButNo]

  1. Explanation: Items that can take more than 65536 damage (let's say a custom shield with 240000 durability) will 'break' when reaching that damage. By break, it means that it will simply vanish without playing the item sound break or whatever. To replicate this 'issue', simple create an item (no need for a code because this basically works with items that can be damaged. This can be easily replicated. armor or shield would be the best as they can easily be damaged or use override the hitEntity of an ItemSword and damage it by more than 65536) that has a durability of more than 65536 damage and damage it until the damage of the item reaches 65536. After 'reaching' it, it will disappear like a thin air.
  2. Apparently, I tested this event in the latest forge vs the recommended and somehow, this bug didn't trigger. Try using the recommended one. It is working in the latest forge for some reason...
  3. But what's more interesting is that whatever value you put it will always yield 1 as if nothing is changed. The only way it changes is if you have a looting enchantment on the item you used to kill a particular entity.
  4. There is no clamp. You can get looting 1000 enchantment and probably crash the game. I've read it in the event's code itself. Also, I've read its call hierarchy.
  5. Like I said, it is properly registered and thus, system.out.println works. Otherwise it won't.
  6. Code: Really, it is just a basic: @SubscribeEvent(priority = EventPriority.NORMAL) public void HandleEnchant(LootingLevelEvent fEvent) { int levelLooting = 10 //Testing fEvent.setLootingLevel(fEvent.getLootingLevel() + 3 + ((levelLooting - 1) * 2)); System.out.println(fEvent.getLootingLevel()); } The way it "doesn't work" is that if you put any value in the setLootingLevel, it still returns 1 (1 refers to default looting value which is added by 1 per looting level). However. if you have a looting enchantment, it changes (e.g. 2, 3, 4, and etc.).
  7. Simple as the title suggests. My event is subscribed properly and system.out.println works but the setLootingLevel thingy does not work.
  8. The damage source that I've created in 1.7.10 and 1.8.9 doesn't work anymore in 1.11.2. Is there other necessary code that I need to add? because it works if used with attackEntityfrom method but the damage itself is not armor piercing.
  9. Ok then I will try.
  10. Specifically what event do I need to use because I am very used to 1.7.10 that I don't know how to deal with this problem. Thank you for responding btw,
  11. So I direct port my mod from 1.7.10 to 1.11.2. This code that I will be posting came from 1.7.10 but edited a little bit. The problem is that the enchantment doesn't seem to work so I started to look in the minecraft codes. When looking at the EnchantmentDamage.class, I don't understand why it gives extra damage because it just put senseless code this is an example of the enchantmentdamage in 1.11.2 as you read it, you can't find the original damage of an item (for example a sword, then added by 1.0f per level) all you see is a float that get multiplies by each level without it adding in the original damage. Help me and this is the directed 1.7.10 code. Can someone help me fix it or tell me what the hell is wrong with this code because it worked backed in 1.7.10 (This code was changed a little bit to be registered in 1.11.2) and don't mind about that witch part. There is some bug about it in 1.7.10.
  12. Uhm Last Question how do I get to put 2 or more arguements that work properly without any errors. Regardless of the method how can it be done?
  13. With this code in eclipse from one of my private mods: I get this crash
×
×
  • Create New...

Important Information

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