Jump to content

LichtHund

Members
  • Posts

    10
  • Joined

  • Last visited

LichtHund's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Appologies I didn't know, however I just tried it on 1.15.2 and same thing is happening so I'll update the title.
  2. Hello! When I run the client with the runClient generated by the genIntellijRuns task, it does not get the correct information from mcmod.info, when I click on mod list it says "No mod information found, Ask your mod author to provide a mod mcmod.info file" Which causes textures/etc to not load correctly (I'm assuming due to the modid). But when I build the jar and run it with the normal client, it works fine.
  3. I managed to fix it, apparently I had to use Pixelmon's EVENT_BUS instead of the MinecraftForge one to register it.
  4. I was wondering how I can listen to another mod's event. I registered the listener on my preInit with `MinecraftForge.EVENT_BUS.register(new PixelmonListener());` For a simple test I checked for `EntityItemPickupEvent `which worked perfectly, but when I try to listen to another mod's event it doesn't seem to work. The one I am trying is @SubscribeEvent public void onSendOut(PixelmonSendOutEvent event) { System.out.println("Sent out!"); } But I get nothing. I have Pixelmon imported in my gradle, I get no errors but seems like it is never fired. Does something else need to be done to listen from another mod or maybe the event itself is never being fired from the actual mod? Cheers.
  5. Hello, I made a very simple side mod for pixelmon for my server. But I have no idea how to build it, always say that can't find the pixelmon items, could anyone help me? It's the first mod I've ever made. Cheers.
  6. Hello, is there a way to check a player's position every X seconds? Like a class that would be called every few seconds or ticks.
  7. I've been trying a lot but I don't seem to be able to get it to work, would it be okay if you showed me an example of a container that would work with my case?
  8. Isn't container needed only if the GUI has inventory?
  9. Thank you! Got it to work i think, though it's not really working how I wanted, would you mind taking a look at my code? GuiHandler.java: public class GuiHandler implements IGuiHandler { public static final int GUI_ID_ASK = 0; public static final int GUI_ID_WAITING = 1; @Override public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { return null; } @Override public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { if (ID == GUI_ID_ASK) { return new GuiAsk(); } if (ID == GUI_ID_WAITING) { return new GuiWaiting(); } return null; } } EventsHandler.java @SubscribeEvent public void onRingUsage(EntityInteract event) { if (event.getTarget() instanceof EntityPlayer) { if (event.getEntityPlayer().isSneaking()) { if (event.getEntityPlayer().getHeldItemMainhand() != null) { if(event.getEntityPlayer().getHeldItemMainhand().getItem() == ModItems.ring) { if (event.getWorld().isRemote) { EntityPlayer player = event.getWorld().getPlayerEntityByUUID(event.getTarget().getUniqueID()); player.openGui(Marriage.instance, 0, event.getWorld(), (int) player.posX, (int) player.posY, (int) player.posZ); event.getEntityPlayer().openGui(Marriage.instance, 1, event.getWorld(), (int) event.getEntityPlayer().posX, (int) event.getEntityPlayer().posY, (int) event.getEntityPlayer().posZ); } } } } } } With this, only one GUI opens, always on the clicking player.
  10. Hello, I am new to modding so I got a bit confused on how GUI works, watched a few tutorials but all of them are for specific blocks GUI, my idea is a bit different. My idea is to open a GUI when ever a player interacts with another, on the player that interacts it would open a GUI saying "Waiting..." and on the other player it would open a GUI with two buttons saying "Yes" or "No". My code to get the interaction working is the following: @SubscribeEvent public void onRingUsage(EntityInteract event) { if (event.getTarget() instanceof EntityPlayer) { if (event.getEntityPlayer().isSneaking()) { if (event.getEntityPlayer().getHeldItemMainhand() != null) { if(event.getEntityPlayer().getHeldItemMainhand().getItem() == ModItems.ring) { //Opens different GUI on both players here } } } } } I really don't know how to open the GUIs for both players, can someone help me? Cheers.
×
×
  • Create New...

Important Information

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