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

epicMinecrafter666Xx

Members
  • Content Count

    7
  • Joined

  • Last visited

Community Reputation

0 Neutral

About epicMinecrafter666Xx

  • Rank
    Tree Puncher
  1. i want something that returns true only on the press action, seems that KeyBinding.isPressed() returns true on press, sets a timer of like 10 ticks and when that timer reach 0 it starts behaving like KeyBinding.isKeyDown()
  2. I tried this and its the same outcome: @SubscribeEvent public static void keyEvent(TickEvent.ClientTickEvent event) { PlayerEntity player = Minecraft.getInstance().player; GameSettings settings = Minecraft.getInstance().gameSettings; if (event.phase.equals(TickEvent.Phase.END) && Minecraft.getInstance().isGameFocused() && isWearingAntiqueArmor(player)) { while(settings.keyBindForward.isPressed()) { NetworkUtil.notifyAntiqueArmor(0); } while(settings.keyBindBack.isPressed()) {
  3. hi, i tried this but i keep getting the same outcome @Mod.EventBusSubscriber(modid = DannysExpansion.MOD_ID, value = Dist.CLIENT) public class ModKeybinds { @SubscribeEvent(priority = EventPriority.LOW) public static void keyEvent(InputEvent.KeyInputEvent event) { PlayerEntity player = Minecraft.getInstance().player; GameSettings settings = Minecraft.getInstance().gameSettings; if (Minecraft.getInstance().isGameFocused() && isWearingAntiqueArmor(player)) { if (settings.keyBindForward.isPressed()) { NetworkUtil.notify
  4. help, .isPressed() is not working right for me, it fires every tick, like if it was .isKeyDown() heres my code: @Mod.EventBusSubscriber(modid = DannysExpansion.MOD_ID, value = Dist.CLIENT) public class ModKeybinds { @SubscribeEvent public static void keyEvent(TickEvent.ClientTickEvent event) { PlayerEntity player = Minecraft.getInstance().player; GameSettings settings = Minecraft.getInstance().gameSettings; if (player != null) { if(event.phase.equals(TickEvent.Phase.END) && Minecraft.getInstance().isGameFocused()) {
  5. RegistryEvents is where i register the blocks, items and biomes @Mod.EventBusSubscriber( bus = Bus.MOD ) public class RegistryEvents { public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, MoreContent.MOD_ID); public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, MoreContent.MOD_ID); public static final DeferredRegister<Biome> BIOMES = DeferredRegister.create(ForgeRegistries.BIOMES, MoreContent.MOD_ID); @SubscribeEvent public static void onEntit
  6. Updates I noticed that i had to register them in the FMLCommonSetupEvent but now when i send a packet i get a crash along with this message [19:51:22] [Server thread/ERROR] [ne.mi.fm.ne.NetworkRegistry/NETREGISTRY]: Attempted to register channel morecontent:main even though registry phase is over "[19:51:22] [Server thread/ERROR] [minecraft/MinecraftServer]: Encountered an unexpected exception java.lang.ExceptionInInitializerError: null
  7. I keep getting this message "[19:05:18] [Render thread/WARN] [minecraft/ClientPlayNetHandler]: Unknown custom packet identifier: morecontent:main" when i send a packet instead of doing whatever that packet should do. here are the classes PacketHandler and the packet public class PacketHandler { private static final String PROTOCOL_VERSION = "1"; public static final SimpleChannel INSTANCE = NetworkRegistry.newSimpleChannel( new ResourceLocation(MoreContent.MOD_ID, "main"), () -> PROTOCOL_VERSION, PROTOCO
×
×
  • Create New...

Important Information

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