Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/15/23 in all areas

  1. That worked! i used multi mc and it ran fine! Thank you!
    1 point
  2. Hi, is there an event for client-side when a player joins an integrated or dedicated server for 1.17+?
    1 point
  3. https://github.com/MinecraftForge/MinecraftForge/blob/1.16.x/src/main/java/net/minecraftforge/client/event/ClientPlayerNetworkEvent.java#L57
    1 point
  4. How could I create a client side command in 1.16? My idea for this was so I could add commands like /day or /night to set the client side time. Thanks. EDIT: Also, I would like to say that I am new to forge and just set it up today. I have had past experiences with spigot, but I see that it is nothing like forge.
    1 point
  5. Hey! I wanted to know if it is possible to detect client side when an entity dies. It works with LivingDeathEvent server side, but not client side. Thanks!
    1 point
  6. I'm wondering if there is anyway to trigger an action when the client kills another player? The LivingDeathEvent seems to be only server side. Is there an equivalent client side event which is triggered on a player death and allows me to check whether the damage source is from the client? Or is there maybe a packet that is sent upon a players death? Thanks.
    1 point
  7. Hello, How could I make a client-side command in 1.14? There is no such thing as CommandBase now. Thanks
    1 point
  8. So I'm trying to make a command for specifically the client but I've run into a problem where I'm unable to find the command manager for the client. I found one for the integrated server but I was unable to cast that to a ClientCommandHandler. Here's my code: @EventHandler public void serverStarting(FMLServerStartingEvent event) { ClientCommandHandler ch = new ClientCommandHandler(); ch.registerCommand(new ListTargetsCommand(new ArrayList<>(Arrays.asList("listtargets", "lt")))); } I had the ClientCommandHandler assigned to (ClientCommandHandler)Minecraft.getMinecraft().getIntegratedServer.commandManager but I changed it because it kept making me crash upon start up
    1 point
  9. Im making a mod so when u kill a player it will spawn particles and i wont it to work on servers like hypixel but so far i cant get it working this is my code package scorpyon04.bloodeffect; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @Mod(modid = Reference.MOD_ID, name = Reference.MOD_NAME, version = Reference.MOD_NAME) public class BloodEffect { public static void preInit(FMLPreInitializationEvent event) { MinecraftForge.EVENT_BUS.register(new DeathEventHandler()); } public static void Init(FMLInitializationEvent event) { System.out.println("Blood Effect Init"); } public static void postInit(FMLPostInitializationEvent event) { } } And This is my event handler package scorpyon04.bloodeffect; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraftforge.event.entity.living.LivingDeathEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; public class DeathEventHandler { @SubscribeEvent public void onLivingDeath(LivingDeathEvent event){ Entity e = event.entity; if (e instanceof EntityPlayer) { EntityPlayer killedplr = (EntityPlayer) e; if (event.source.getSourceOfDamage() instanceof EntityPlayer) { EntityPlayer plr = (EntityPlayer) event.source.getEntity(); plr.playSound("dig.stone", 1000.0f, 1.0f); } } } }
    1 point
  10. Is there a way to make it on client side
    1 point
×
×
  • Create New...

Important Information

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