LinuxMinecrafter
-
Posts
13 -
Joined
-
Last visited
Posts posted by LinuxMinecrafter
-
-
-
-
Debian Linux
-
here is the code I have so far. I am trying to make a spawn egg.
@SubscribeEvent public static void onClickEgg(PlayerInteractEvent event) { if (event.getEntityLiving().getHeldItemMainhand().getItem() == ModItems.SPAWN_MUDDY_PIG.get()) { PlayerEntity player = event.getPlayer(); } }
-
1 minute ago, vemerion said:
if (Minecraft.getInstance().world != null)
If you are struggling with these concepts, I gently suggest taking some time to learn java before starting modding Minecraft. There are dozens java tutorials only a google search away!
oh ok tysm
-
Just now, vemerion said:
You are trying to play a sound in the world before it exists. Make sure that the world is not null before playing the sound.
sorry if I'm being an idiot, but how do I do that?
-
2 minutes ago, Draco18s said:
Use the debugger and figure out what's null when.
But my guess would be that you start the game and when you go to open the gui to select a world to play, it crashes.
I'll give you one hint
It crashes before the game even finishes loading though.
-
tell me if you need more info, but here is my event code:
@SubscribeEvent public static void onOpenGui(GuiOpenEvent event) { Minecraft.getInstance().world.playSound(null, 0, 0, 0, SoundEvents.UI_BUTTON_CLICK, SoundCategory.NEUTRAL, 0.3F, 0.0F); Test.LOGGER.info("Sound played!"); }
-
-
Thanks anyway!
-
-
-
Hi, so I want to mod Minecraft 1.12.2. I use to do that and stopped using Forge. I loaded up the latest Minecraft Forge, and my OS completely locks up. I have to use the button on the tower to reboot.
Mod list:
Mrcrayfish's Furniture Mod
Mrcrayfish's Vehicle Mod
Astrotech Droid Mod
Portal Gun Mod
OS: Debian 10
I have tried a lot of Forge versions.
Help greatly appreciated!
WHY
in Off-topic
Posted
Well...