Jump to content

I am not AI

Members
  • Posts

    1
  • Joined

  • Last visited

I am not AI's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. @Animefan8888, thanks a lot! I spent 8 hours trying to get this to work. Removing this worked: bus = Mod.EventBusSubscriber.Bus.MOD So this works: package com.test.mod; import net.minecraftforge.event.TickEvent.PlayerTickEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @Mod.EventBusSubscriber(modid = Main.ID) public class Registry { @SubscribeEvent public static void onPlayerTick(PlayerTickEvent event) { System.out.println("Complete"); } } Whew. I can move on with my day. Thanks again!
  2. How do I get the blocks surrounding the player on client side during every player tick? I tried subscribing to the PlayerTickEvent, but it doesn't fire. package com.test.mod import net.minecraftforge.event.TickEvent.PlayerTickEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD, modid = Main.ID) public class Registry { @SubscribeEvent public static void onPlayerTick(PlayerTickEvent event) { System.out.println("Complete"); } } I also considered extending the PlayerEntity class, then overriding the Tick method, but I don't know how to register classes that extend PlayerEntity. Is it the same as registering other entities?
×
×
  • Create New...

Important Information

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