Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

You're not calling this method anywhere. The tile wasn't even registered, also you should probably update forge since that GameRegistry#registerTileEntity method was deprecated... you should use the one with ResourceLocation parameter instead of string... or just make the string be like this "modid:tilename"

  • Author
[00:46:31] [main/FATAL]: Error executing task
java.util.concurrent.ExecutionException: java.lang.NullPointerException
    at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_171]
    at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_171]
    at net.minecraft.util.Util.runTask(Util.java:54) [Util.class:?]
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1176) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:441) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_171]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_171]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_171]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_171]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_171]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_171]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_171]
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?]
    at GradleStart.main(GradleStart.java:25) [start/:?]
Caused by: java.lang.NullPointerException
    at team.mystic4phoenix.witchery.client.gui.GuiWitchOven.<init>(GuiWitchOven.java:23) ~[GuiWitchOven.class:?]
    at team.mystic4phoenix.witchery.client.gui.GuiHandler.getClientGuiElement(GuiHandler.java:48) ~[GuiHandler.class:?]
    at net.minecraftforge.fml.common.network.NetworkRegistry.getLocalGuiContainer(NetworkRegistry.java:279) ~[NetworkRegistry.class:?]
    at net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:111) ~[FMLNetworkHandler.class:?]
    at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2809) ~[EntityPlayer.class:?]
    at net.minecraftforge.fml.common.network.internal.OpenGuiHandler.process(OpenGuiHandler.java:50) ~[OpenGuiHandler.class:?]
    at net.minecraftforge.fml.common.network.internal.OpenGuiHandler.lambda$channelRead0$0(OpenGuiHandler.java:43) ~[OpenGuiHandler.class:?]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_171]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_171]
    at net.minecraft.util.Util.runTask(Util.java:53) ~[Util.class:?]
    ... 15 more

this is one of the errors that keep pop up

I would need more info you mean register them as a single you do it in your preInit

		NetworkRegistry.INSTANCE.registerGuiHandler(Main.instance, new GuiHandler());

Of course, you would need a GUIHandler

package com.mrf.infinityweapons.util.handlers;

import com.mrf.infinityweapons.container.Container_Lava_Compressor;
import com.mrf.infinityweapons.gui.GUI_Lava_Compressor;
import com.mrf.infinityweapons.tileentitys.TileEntity_Lava_Compressor;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.common.network.IGuiHandler;

public class GuiHandler implements IGuiHandler {

    public static final int GUINAMEHERE = 0;
    
    @Override
    public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
        if (ID == GUINAMEHERE) {
            return new CONTAINERCLASSHERE(player.inventory, (YourTileEntityHere) world.getTileEntity(new BlockPos(x, y, z)));
        }
        return null;
    }

    @Override
    public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
        if (ID == GUINAMEHERE) {
            return new GUICLASSHERE(player.inventory, (YourTileEntityHere) world.getTileEntity(new BlockPos(x, y, z)));
        }
        return null;
    }
    
}

Just fill in the blanks 

Hope this helped!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.