Jump to content

Davidthemodder

Members
  • Posts

    46
  • Joined

  • Last visited

Recent Profile Visitors

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

Davidthemodder's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I GOT IT TO WORK!!! I registered the ModPacketHandler in my main class and it workend. (In the private void setup)
  2. This is about the registering of the ModPacketHandler
  3. I think the problem is that the default dist is client and it never gets registered on the server.
  4. Wait. Is this Right? @Mod.EventBusSubscriber(modid = UltimateSheepMod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE)
  5. Can I post a zip file of the mod?
  6. So I should make my mod a git project? Like the Folder or the folder where the mod folder is?
  7. It crashed. crash-2021-05-23_20.00.52-client.txt latest.log
  8. Can I just do it twice? EDIT: Like on Server and on the Client in the two classes?
  9. @Mod.EventBusSubscriber(modid = UltimateSheepMod.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE, value = Dist.CLIENT) public class ModClientEvent { @SubscribeEvent public static void lightning(AttackEntityEvent event){ if(event.getEntityLiving().getHeldItemMainhand().getItem() == ModItems.LIGHTNING_HAMMER.get()){ LightningBoltEntity lightning = new LightningBoltEntity(EntityType.LIGHTNING_BOLT,event.getEntity().world); lightning.setPosition(event.getTarget().getPosX(), event.getTarget().getPosY(), event.getTarget().getPosZ()); event.getPlayer().world.addEntity(lightning); } } @SubscribeEvent public static void onCrafting(GuiOpenEvent event){ if (event.isCancelable()){ if (event.getGui() instanceof CraftingScreen){ if (event.getResult().equals(Items.APPLE)){ event.setCanceled(true); } } } } @SubscribeEvent public static void fly(TickEvent.ClientTickEvent event){ if(event.phase == TickEvent.Phase.START){ if(UltimateSheepMod.KEY.isKeyDown()){ ModPacketHandler.simpleChannel.sendToServer(new FlyActivateMessage()); } } } @SubscribeEvent public static void doClientSetup(FMLClientSetupEvent event){ ClientRegistry.registerKeyBinding(UltimateSheepMod.KEY); } @SubscribeEvent public static void doCommonSetup(FMLCommonSetupEvent event){ ModPacketHandler.init(); }
  10. Here the Crash report. crash-2021-05-23_19.08.29-client.txt
×
×
  • Create New...

Important Information

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