Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

urabaros's Achievements

Stone Miner

Stone Miner (3/8)



  1. THANK YOU SO MUCH I WOULD NEVER NOTICED IT MYSELF!!! 😭😭😭 Thank you that you invested so much time to help me! It works perfectly! I hope you'll have a nice day! Thank you so much!
  2. I was getting aan error, but now I've fixed it!!! My git repo: https://github.com/daekgorsel/ArmorPlusGit
  3. Sorry, I can't do that. My project is not loading to git repo. Can I just provide a screenshot or something?
  4. @SubscribeEvent public static void onLivingAttackEvent(LivingAttackEvent event) { LavaArmor.LOGGER.info("event is here"); . . . } Only this way! I've put Logger into this method and let a zombie hit me. Logger didn't show up.
  5. Sorry. I've deleted this stuff you mantioned: But it still doesn't work. I'm registering it only once in main class and I don't have @OnlyIn thingy. I can't even imagine why it doesn't work
  6. No, I'm not using them. My EventHandler and Main class sools exactly as I mentioned before. I've dropped gist to show other classes.
  7. I register it in the main class: @Mod(LavaArmor.MODID) public class LavaArmor { public static final String MODID = "lavaarmor"; public LavaArmor() { IEventBus bus = FMLJavaModLoadingContext.get().getModEventBus(); bus.addListener(this::setup); ItemInit.ITEMS.register(bus); MinecraftForge.EVENT_BUS.register(this); MinecraftForge.EVENT_BUS.register(EventHandler.class); } @SuppressWarnings("deprecation") private void setup(final FMLCommonSetupEvent event) { } } Whole code: https://gist.github.com/daekgorsel/c903cff212bb5e8ecdad20bf2dd13c9a
  8. Yes, Logger is silent. @SubscribeEvent public static void onLivingAttackEvent(LivingAttackEvent event) { LavaArmor.LOGGER.info("event is here"); . . . } It doesn't appear. Why? I'm so confused because the exact same thing works in another project
  9. I'm not sure about you question, but when Entity attacks my, nothing appears on Console. So I think it's not called... am I right?
  10. Yes, I've already delete it, my EventHandler looks like this: public class EventHandler { @SubscribeEvent public static void onLivingAttackEvent(LivingAttackEvent event) { if (event.getEntityLiving().getItemStackFromSlot(EquipmentSlotType.HEAD).getItem() == ItemInit.LAVA_HELMET.get() && event.getEntityLiving().getItemStackFromSlot(EquipmentSlotType.CHEST).getItem() == ItemInit.LAVA_CHEST.get() && event.getEntityLiving().getItemStackFromSlot(EquipmentSlotType.LEGS).getItem() == ItemInit.LAVA_LEGGINGS.get() && event.getEntityLiving().getItemStackFromSlot(EquipmentSlotType.FEET).getItem() == ItemInit.LAVA_BOOTS.get()) { //event.getSource().getTrueSource().getEntity().onKillCommand(); if (event.getSource().getTrueSource().getEntity() instanceof MobEntity) { event.getSource().getTrueSource().getEntity().onKillCommand(); } } } }
  11. My goal is to kill every enemy that attack player that wears armor. But it just wasn't working for some reason. It's really strange, because I copied every single line from my previous project, where everything works fine. So game was loading, but entities just don't die. Whole code: https://gist.github.com/daekgorsel/c903cff212bb5e8ecdad20bf2dd13c9a
  12. Ye! I have been using this in my main class: MinecraftForge.EVENT_BUS.register(EventHandler.class); But it wasn't registering in the game.
  13. 😨 and what should I do..?
  14. Exception message: java.lang.IllegalArgumentException: Method public static void lavaarmor.EventHandler.onLivingAttackEvent(net.minecraftforge.event.entity.living.LivingAttackEvent) has @SubscribeEvent annotation, but takes an argument that is not a subtype of the base type interface net.minecraftforge.fml.event.lifecycle.IModBusEvent: class net.minecraftforge.event.entity.living.LivingAttackEvent
  15. I register it like in a tutorial you mentioned: public class MyStaticForgeEventHandler { @SubscribeEvent public static void arrowNocked(ArrowNockEvent event) { System.out.println("Arrow nocked!"); } } In the EventHandler And this in the main class: MinecraftForge.EVENT_BUS.register(MyStaticForgeEventHandler.class) When I delete this from the main class and add @Mod.EventBusSubscriber(modid = LavaArmor.MODID, bus = Bus.MOD, value = Dist.CLIENT) to the EventHandler class, my game doesn't work.
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.