Jump to content

Recommended Posts

Posted

I am using the item handler capability to create a custom furnace but although I have it implemented correctly (I think), the container reference to it returns null. Here's the code:

 

Tile Entity

package harry.mods.tutorialmod.blocks.tileentity;

import harry.mods.tutorialmod.blocks.BlockElectricSinteringFurnace;
import harry.mods.tutorialmod.blocks.recipes.SinteringFurnaceRecipes;
import harry.mods.tutorialmod.energy.CustomEnergyStorage;
import harry.mods.tutorialmod.handlers.NBTHandler;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ITickable;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.util.text.TextComponentTranslation;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.CapabilityInject;
import net.minecraftforge.energy.CapabilityEnergy;
import net.minecraftforge.energy.IEnergyStorage;
import net.minecraftforge.items.CapabilityItemHandler;
import net.minecraftforge.items.IItemHandler;
import net.minecraftforge.items.ItemStackHandler;

public class TileEntityElectricSinteringFurnace extends TileEntity implements ITickable
{	
	public CustomEnergyStorage storage;
	public ItemStackHandler handler;
	public int smeltingTime = 0, itemSmeltTime = 100;
	private ItemStack smelting;
	private String customName;
	
	public TileEntityElectricSinteringFurnace() 
	{
		this.storage = new CustomEnergyStorage(75000);
		this.handler = new ItemStackHandler(3);
	}
	
	@Override
	public ITextComponent getDisplayName() 
	{
		return hasCustomName() ? new TextComponentString(customName) : new TextComponentTranslation("container.electric_sintering_furnace");
	}
	
	public boolean hasCustomName()
	{
		return !this.customName.isEmpty() && this.customName != null;
	}
	
	
	private EnumFacing getFacing()
	{
		return world.getBlockState(pos).getValue(BlockElectricSinteringFurnace.FACING);
	}
	
	@Override
	public boolean hasCapability(Capability<?> capability, EnumFacing facing) 
	{
		if(capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) return true;
		if(capability == CapabilityEnergy.ENERGY) return true;
		return super.hasCapability(capability, facing);
	}
	
	@Override
	public <T> T getCapability(Capability<T> capability, EnumFacing facing) 
	{
		if(capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) return (T)this.handler;
		if(capability == CapabilityEnergy.ENERGY) return (T)this.storage;
		return super.getCapability(capability, facing);
	}
	
	@Override
	public void readFromNBT(NBTTagCompound compound)
	{
		compound.getInteger("smeltingTime");
		this.handler.deserializeNBT(compound.getCompoundTag("handler"));
		this.storage.readFromNBT(compound);
		smelting = NBTHandler.stackFromNBT((NBTTagCompound) compound.getTag("smelting"));
		super.readFromNBT(compound);
	}
	
	@Override
	public NBTTagCompound writeToNBT(NBTTagCompound compound) 
	{
		compound.setTag("handler", this.handler.serializeNBT());
		compound.setTag("smelting", NBTHandler.stackToNBT(smelting));
		compound.setInteger("smeltingTime", smeltingTime);
		this.storage.writeToNBT(compound);
		super.writeToNBT(compound);
		return compound;
	}
	
	@Override
	public void update()
	{
		ItemStack input1 = handler.getStackInSlot(0);
		ItemStack input2 = handler.getStackInSlot(1);
		
		if(world.isBlockPowered(pos)) storage.receiveEnergy(100, false);
		
		if(storage.getEnergyStored() >= 20)
		{
			if(smeltingTime > 0)
			{
				storage.extractEnergy(20, false);
				smeltingTime++;
				
				if(smeltingTime == itemSmeltTime)
				{
					handler.insertItem(2, smelting, false);
					smelting = null;
					smeltingTime = 0;
					return;
				}
			}
			else
			{
				if(!input1.isEmpty() && !input2.isEmpty())
				{
					SinteringFurnaceRecipes recipes = SinteringFurnaceRecipes.getInstance();
					ItemStack output = recipes.getSinteringResult(input1, input2);
					
					if(!output.isEmpty())
					{
						smelting = output;
						smeltingTime ++;
						input1.shrink(1);
						input2.shrink(1);
						handler.setStackInSlot(0, input1);
						handler.setStackInSlot(1, input2);
						storage.extractEnergy(20, false);
					}
				}
			}
		}	
	}
	
	public boolean isUsableByPlayer(EntityPlayer player) 
	{
		return this.world.getTileEntity(this.pos) != this ? false : player.getDistanceSq((double)this.pos.getX() + 0.5D, (double)this.pos.getY() + 0.5D, (double)this.pos.getZ() + 0.5D) <= 64.0D;
	}
}

 

Container

public class ContainerElectricSinteringFurnace extends Container
{
	private final TileEntityElectricSinteringFurnace tileentity;
	
	public ContainerElectricSinteringFurnace(InventoryPlayer player, TileEntityElectricSinteringFurnace tileentity) 
	{
		this.tileentity = tileentity;
		IItemHandler handler = tileentity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);
		
		this.addSlotToContainer(new SlotItemHandler(handler, 0, 26, 11));
		this.addSlotToContainer(new SlotItemHandler(handler, 1, 26, 59));
		this.addSlotToContainer(new SlotElectricSinteringFurnaceOutput(handler, 3, 81, 36));
		
		for(int y = 0; y < 3; y++)
		{
			for(int x = 0; x < 9; x++)
			{
				this.addSlotToContainer(new Slot(player, x + y*9 + 9, 8 + x*18, 84 + y*18));
			}
		}
		
		for(int x = 0; x < 9; x++)
		{
			this.addSlotToContainer(new Slot(player, x, 8 + x * 18, 142));
		}
	}

 

Error log

Caused by: java.lang.NullPointerException
	at harry.mods.tutorialmod.blocks.container.ContainerElectricSinteringFurnace.<init>(ContainerElectricSinteringFurnace.java:26) ~[ContainerElectricSinteringFurnace.class:?]
	at harry.mods.tutorialmod.handlers.GuiHandler.getServerGuiElement(GuiHandler.java:25) ~[GuiHandler.class:?]
	at net.minecraftforge.fml.common.network.NetworkRegistry.getRemoteGuiContainer(NetworkRegistry.java:253) ~[NetworkRegistry.class:?]
	at net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:88) ~[FMLNetworkHandler.class:?]
	at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2809) ~[EntityPlayer.class:?]
	at harry.mods.tutorialmod.blocks.BlockElectricSinteringFurnace.onBlockActivated(BlockElectricSinteringFurnace.java:58) ~[BlockElectricSinteringFurnace.class:?]
	at net.minecraft.server.management.PlayerInteractionManager.processRightClickBlock(PlayerInteractionManager.java:472) ~[PlayerInteractionManager.class:?]
	at net.minecraft.network.NetHandlerPlayServer.processTryUseItemOnBlock(NetHandlerPlayServer.java:767) ~[NetHandlerPlayServer.class:?]
	at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:68) ~[CPacketPlayerTryUseItemOnBlock.class:?]
	at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:13) ~[CPacketPlayerTryUseItemOnBlock.class:?]
	at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:21) ~[PacketThreadUtil$1.class:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) ~[?:1.8.0_172]
	at java.util.concurrent.FutureTask.run(Unknown Source) ~[?:1.8.0_172]
	at net.minecraft.util.Util.runTask(Util.java:53) ~[Util.class:?]
	... 5 more

 

If you have any idea why this may return null, I would love to know. Thanks!

Posted (edited)
  On 8/16/2018 at 3:49 PM, diesieben07 said:

From the code it is more likely that you are passing in null for the tileentity parameter of ContainerElectricSinteringFurnace.

Expand  

Oh my god ffs. You were right, I was using the local te instead of the global te variable. So frustrating. Thanks

Still doesn't work

Edited by HarryTechReviews
I hate my life
Posted
  On 8/16/2018 at 4:35 PM, HarryTechReviews said:

global te variable

Expand  

What.

Why do you have a global variable?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
  On 8/16/2018 at 5:18 PM, HarryTechReviews said:

Might be wrong phrasing I don't know. Didnt work anyway

Expand  

Well post updated code, the new error report and which line it is crashing on.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted

 

  On 8/16/2018 at 4:35 PM, HarryTechReviews said:
  On 8/16/2018 at 3:49 PM, diesieben07 said:

From the code it is more likely that you are passing in null for the tileentity parameter of ContainerElectricSinteringFurnace.

Expand  

Oh my god ffs. You were right, I was using the local te instead of the global te variable. So frustrating. Thanks

Expand  

You realize the thing you did doesn't fucking matter because you passed null to the constructor, right?

  On 8/16/2018 at 2:58 PM, HarryTechReviews said:

this.tileentity = tileentity;

IItemHandler handler = tileentity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);

Expand  

both this.tileentity and tileentity are null. Changing tileentity to this.tileentity on the second line doesn't change that fact.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
  On 8/16/2018 at 2:58 PM, HarryTechReviews said:

IItemHandler handler = tileentity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);

Expand  

The only thing that could be causing a null pointer crash here would be "tileentity" you have to be passing null to the constructor.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
  On 8/16/2018 at 5:35 PM, Animefan8888 said:

The only thing that could be causing a null pointer crash here would be "tileentity" you have to be passing null to the constructor.

Expand  

I'm not, here it is in gui handler.

        if(ID == Reference.GUI_ELECTRIC_SINTERING_FURNACE) return new ContainerElectricSinteringFurnace(player.inventory, (TileEntityElectricSinteringFurnace)world.getTileEntity(new BlockPos(x,y,z)));
 

		if(ID == Reference.GUI_ELECTRIC_SINTERING_FURNACE) return new ContainerElectricSinteringFurnace(player.inventory, (TileEntityElectricSinteringFurnace)world.getTileEntity(new BlockPos(x,y,z)));

 

Posted
  On 8/16/2018 at 5:41 PM, HarryTechReviews said:

world.getTileEntity(new BlockPos(x,y,z)

Expand  

This can return null.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
  On 8/16/2018 at 5:44 PM, HarryTechReviews said:

Same code for the other two gui and containers and they dont return null

Expand  

Is the TileEntity actually being placed down where the block is? Is the TileEntity registered?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
  On 8/16/2018 at 6:44 PM, HarryTechReviews said:

Yep, all other tile entities are the same but this one doesn't work 

Expand  

Could you post your Block class and parent classes.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted
  On 8/16/2018 at 6:59 PM, Animefan8888 said:

Could you post your Block class and parent classes.

Expand  

 

Block Class

package harry.mods.tutorialmod.blocks;

import java.util.Random;

import harry.mods.tutorialmod.Main;
import harry.mods.tutorialmod.Reference;
import harry.mods.tutorialmod.blocks.tileentity.TileEntitySinteringFurnace;
import harry.mods.tutorialmod.init.BlockInit;
import net.minecraft.block.BlockHorizontal;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyBool;
import net.minecraft.block.properties.PropertyDirection;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumBlockRenderType;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;

public class BlockElectricSinteringFurnace extends BlockBase 
{
	public static final PropertyDirection FACING = BlockHorizontal.FACING;
	public static final PropertyBool BURNING = PropertyBool.create("burning");
	
	public BlockElectricSinteringFurnace(String name) 
	{
		super(name, Material.IRON, Main.TUTORIAL);
		this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(BURNING, false));
	}
	
	@Override
	public Item getItemDropped(IBlockState state, Random rand, int fortune) 
	{
		return Item.getItemFromBlock(BlockInit.ELECTRIC_SINTERING_FURNACE);
	}
	
	@Override
	public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state)
	{
		return new ItemStack(BlockInit.ELECTRIC_SINTERING_FURNACE);
	}
	
	@Override
	public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) 
	{
		if(!worldIn.isRemote)
		{
			playerIn.openGui(Main.instance, Reference.GUI_ELECTRIC_SINTERING_FURNACE, worldIn, pos.getX(), pos.getY(), pos.getZ());
		}
		
		return true;
	}
	
	@Override
	public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) 
	{
		if (!worldIn.isRemote) 
        {
            IBlockState north = worldIn.getBlockState(pos.north());
            IBlockState south = worldIn.getBlockState(pos.south());
            IBlockState west = worldIn.getBlockState(pos.west());
            IBlockState east = worldIn.getBlockState(pos.east());
            EnumFacing face = (EnumFacing)state.getValue(FACING);

            if (face == EnumFacing.NORTH && north.isFullBlock() && !south.isFullBlock()) face = EnumFacing.SOUTH;
            else if (face == EnumFacing.SOUTH && south.isFullBlock() && !north.isFullBlock()) face = EnumFacing.NORTH;
            else if (face == EnumFacing.WEST && west.isFullBlock() && !east.isFullBlock()) face = EnumFacing.EAST;
            else if (face == EnumFacing.EAST && east.isFullBlock() && !west.isFullBlock()) face = EnumFacing.WEST;
            worldIn.setBlockState(pos, state.withProperty(FACING, face), 2);
        }
	}
	
	public static void setState(boolean active, World worldIn, BlockPos pos) 
	{
		IBlockState state = worldIn.getBlockState(pos);
		TileEntity tileentity = worldIn.getTileEntity(pos);
		
		if(active) worldIn.setBlockState(pos, BlockInit.ELECTRIC_SINTERING_FURNACE.getDefaultState().withProperty(FACING, state.getValue(FACING)).withProperty(BURNING, true), 3);
		else worldIn.setBlockState(pos, BlockInit.ELECTRIC_SINTERING_FURNACE.getDefaultState().withProperty(FACING, state.getValue(FACING)).withProperty(BURNING, false), 3);
		
		if(tileentity != null) 
		{
			tileentity.validate();
			worldIn.setTileEntity(pos, tileentity);
		}
	}
	
	@Override
	public boolean hasTileEntity() 
	{
		return true;
	}
	
	@Override
	public TileEntity createTileEntity(World world, IBlockState state)
	{
		return new TileEntityElectricSinteringFurnace();
	}
	
	@Override
	public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer, EnumHand hand) 
	{
		return this.getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite());
	}
	
	@Override
	public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) 
	{
		worldIn.setBlockState(pos, this.getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite()), 2);
	}
	
	@Override
	public void breakBlock(World worldIn, BlockPos pos, IBlockState state) 
	{
		TileEntitySinteringFurnace tileentity = (TileEntitySinteringFurnace)worldIn.getTileEntity(pos);
		worldIn.spawnEntity(new EntityItem(worldIn, pos.getX(), pos.getY(), pos.getZ(), tileentity.getStackInSlot(0)));
		worldIn.spawnEntity(new EntityItem(worldIn, pos.getX(), pos.getY(), pos.getZ(), tileentity.getStackInSlot(1)));
		worldIn.spawnEntity(new EntityItem(worldIn, pos.getX(), pos.getY(), pos.getZ(), tileentity.getStackInSlot(2)));
		worldIn.spawnEntity(new EntityItem(worldIn, pos.getX(), pos.getY(), pos.getZ(), tileentity.getStackInSlot(3)));
		super.breakBlock(worldIn, pos, state);
	}
	
	@Override
	public EnumBlockRenderType getRenderType(IBlockState state) 
	{
		return EnumBlockRenderType.MODEL;
	}
	
	@Override
	public IBlockState withRotation(IBlockState state, Rotation rot)
	{
		return state.withProperty(FACING, rot.rotate((EnumFacing)state.getValue(FACING)));
	}
	
	@Override
	public IBlockState withMirror(IBlockState state, Mirror mirrorIn) 
	{
		return state.withRotation(mirrorIn.toRotation((EnumFacing)state.getValue(FACING)));
	}
	
	@Override
	protected BlockStateContainer createBlockState() 
	{
		return new BlockStateContainer(this, new IProperty[] {BURNING,FACING});
	}
	
	@Override
	public IBlockState getStateFromMeta(int meta) 
	{
		EnumFacing facing = EnumFacing.getFront(meta);
		if(facing.getAxis() == EnumFacing.Axis.Y) facing = EnumFacing.NORTH;
		return this.getDefaultState().withProperty(FACING, facing);
	}
	
	@Override
	public int getMetaFromState(IBlockState state) 
	{
		return ((EnumFacing)state.getValue(FACING)).getIndex();
	}	
}

 

GUI Class

package harry.mods.tutorialmod.blocks.gui;

import harry.mods.tutorialmod.Reference;
import harry.mods.tutorialmod.blocks.TileEntityElectricSinteringFurnace;
import harry.mods.tutorialmod.blocks.container.ContainerElectricSinteringFurnace;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.util.ResourceLocation;

public class GuiElectricSinteringFurnace extends GuiContainer
{
	private static final ResourceLocation TEXTURES = new ResourceLocation(Reference.MODID + ":textures/gui/electric_sintering_furnace.png");
	private final InventoryPlayer player;
	private final TileEntityElectricSinteringFurnace tileentity;
	
	public GuiElectricSinteringFurnace(InventoryPlayer player, TileEntityElectricSinteringFurnace tileentity) 
	{
		super(new ContainerElectricSinteringFurnace(player, tileentity));
		this.player = player;
		this.tileentity = tileentity;
	}
	
	@Override
	protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) 
	{
		String tileName = this.tileentity.getDisplayName().getUnformattedText();
		this.fontRenderer.drawString(tileName, (this.xSize / 2 - this.fontRenderer.getStringWidth(tileName) / 2) -5, 6, 4210752);
		this.fontRenderer.drawString(this.player.getDisplayName().getUnformattedText(), 7, this.ySize - 96 + 2, 4210752);
		this.fontRenderer.drawString(Integer.toString(this.tileentity.getEnergyStored()), 125, 72, 4210752);
	}
	
	@Override
	protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY)
	{
		GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
		this.mc.getTextureManager().bindTexture(TEXTURES);
		this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
		
		int l = this.getCookProgressScaled(24);
		this.drawTexturedModalRect(this.guiLeft + 44, this.guiTop + 36, 176, 14, l + 1, 16);
		
		int k = this.getEnergyStoredScaled(75);
		this.drawTexturedModalRect(this.guiLeft + 152, this.guiTop + 7, 176, 32, 16, 75 - k);
	}
	
	private int getCookProgressScaled(int pixels)
	{
		int i = this.tileentity.cookTime;
		return i != 0 ? i * pixels / 100 : 0;
	}
	
	private int getEnergyStoredScaled(int pixels)
	{
		int i = this.tileentity.getEnergyStored();
		int j = this.tileentity.getMaxEnergyStored();
		return i != 0 && j != 0 ? i * pixels / j : 0; 
	}
}

 

GUIHandler

package harry.mods.tutorialmod.handlers;

import harry.mods.tutorialmod.Reference;
import harry.mods.tutorialmod.blocks.TileEntityElectricSinteringFurnace;
import harry.mods.tutorialmod.blocks.container.ContainerCopperChest;
import harry.mods.tutorialmod.blocks.container.ContainerElectricSinteringFurnace;
import harry.mods.tutorialmod.blocks.container.ContainerSinteringFurnace;
import harry.mods.tutorialmod.blocks.gui.GuiCopperChest;
import harry.mods.tutorialmod.blocks.gui.GuiElectricSinteringFurnace;
import harry.mods.tutorialmod.blocks.gui.GuiSinteringFurnace;
import harry.mods.tutorialmod.blocks.tileentity.TileEntityCopperChest;
import harry.mods.tutorialmod.blocks.tileentity.TileEntitySinteringFurnace;
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
{
	@Override
	public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) 
	{
		if(ID == Reference.GUI_SINTERING_FURNACE) return new ContainerSinteringFurnace(player.inventory, (TileEntitySinteringFurnace)world.getTileEntity(new BlockPos(x,y,z)));
		if(ID == Reference.GUI_COPPER_CHEST) return new ContainerCopperChest(player.inventory, (TileEntityCopperChest)world.getTileEntity(new BlockPos(x,y,z)), player);
		if(ID == Reference.GUI_ELECTRIC_SINTERING_FURNACE) return new ContainerElectricSinteringFurnace(player.inventory, (TileEntityElectricSinteringFurnace)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 == Reference.GUI_SINTERING_FURNACE) return new GuiSinteringFurnace(player.inventory, (TileEntitySinteringFurnace)world.getTileEntity(new BlockPos(x,y,z)));
		if(ID == Reference.GUI_COPPER_CHEST) return new GuiCopperChest(player.inventory, (TileEntityCopperChest)world.getTileEntity(new BlockPos(x,y,z)), player);
		if(ID == Reference.GUI_ELECTRIC_SINTERING_FURNACE) return new GuiElectricSinteringFurnace(player.inventory, (TileEntityElectricSinteringFurnace)world.getTileEntity(new BlockPos(x,y,z)));
		return null;
	}
}

 

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Unlock Massive Savings with  Temu Coupon Codes: Save Big with $100 OFF and More!  Temu is a revolutionary online marketplace that offers a huge collection of trending items at unbeatable prices. Whether you're looking for gadgets, home décor, fashion, or beauty products,  Temu has something for everyone. By using the  Temu coupon code $100 OFF → [acu639380] for existing customers, you can unlock incredible discounts, save up to 90%, and even enjoy free shipping to over 67 countries. In this blog, we will explore the latest  Temu coupon code offerings, including $100 off for new and existing users, a special 40% discount on select items, and the incredible  Temu coupon bundle. Read on to discover how you can make the most of these discounts and enjoy amazing deals with  Temu this June! What is  Temu and Why Should You Shop There?  Temu is a one-stop online shopping destination that offers a vast selection of products at prices that are hard to beat. Whether you're purchasing for yourself or looking for gifts,  Temu delivers a wide variety of high-quality products across different categories. From clothing to electronics, home essentials, beauty products, and much more,  Temu has something for everyone. With its fast delivery, free shipping in over 67 countries, and discounts of up to 90% off, it’s no wonder why shoppers worldwide love this platform. Not only does  Temu offer competitive prices, but their frequent promotions and coupon codes make shopping even more affordable. In this blog, we’ll focus on how you can save even more with  Temu coupon codes, including the highly sought-after $100 OFF and 40% OFF codes. The Power of  Temu Coupon Code $100 OFF → [acu639380] for Existing Customers If you're a  Temu existing customer, you can unlock a fantastic $100 OFF by using the code [acu639380]. This coupon code provides a generous discount, allowing you to save big on your next purchase, whether it’s electronics, fashion, or home décor. Here’s why you should take advantage of this offer: Flat $100 off: This code gives you a flat $100 discount on your order. Available for Existing Users: If you've shopped with  Temu before, this coupon code is for you! Unbeatable Deals: Use this coupon in combination with other ongoing sales for even bigger savings. Huge Selection: Apply the code across  Temu’s massive inventory, from tech gadgets to everyday essentials.  Temu Coupon Code $100 OFF → [acu639380] for New Users Are you new to  Temu? You’re in luck!  Temu has a special $100 off coupon code just for you. By using [acu639380], new users can enjoy a $100 discount on their first purchase. This is an excellent way to try out the platform without breaking the bank. Here’s how to make the most of your  Temu coupon code as a new user: $100 Off Your First Order: If you’ve never shopped with  Temu before, the [acu639380] code gets you $100 off your first purchase. Great for First-Time Shoppers: Explore  Temu's range of trending items while saving money right from the start. Free Gifts: As a new user, you June also receive a special gift with your order as part of the ongoing promotions.  Temu Coupon Code 40% Off → [acu639380] for Extra Savings Looking for even more savings? The 40% off coupon is an amazing deal that’s available for a limited time. By using the code [acu639380], you can enjoy an extra 40% off on selected items. Whether you're shopping for electronics, home goods, or fashion, this coupon code allows you to grab even better deals on top of existing discounts. 40% Extra Off: This discount can be applied to select categories and items, giving you incredible savings. Stack with Other Offers: Combine it with other promotions for unbeatable prices. Popular Items: Use the 40% off code to save on some of  Temu’s hottest items of the season.  Temu Coupon Bundle: Unlock Even More Savings When you use the  Temu coupon bundle, you get even more benefits.  Temu offers a $100 coupon bundle, which allows both new and existing users to save even more on a variety of products. Whether you're shopping for yourself or buying gifts for others, this bundle can help you save big. $100 Coupon Bundle: The  Temu coupon bundle lets you apply multiple discounts at once, ensuring maximum savings. Available to All Users: Whether you’re a first-time shopper or a returning customer, the bundle is available for you to enjoy. Stacked Savings: When combined with other codes like the 40% off or the $100 off, you can save up to 90%.  Temu Coupon Code June 2025: New Offers and Promotions If you're shopping in June 2025, you're in for a treat!  Temu is offering a range of new offers and discount codes for the month. Whether you're shopping for electronics, clothing, or home décor, you’ll find discounts that will help you save a ton. Don’t miss out on the  Temu promo code and  Temu discount code that are available only for a limited time this month.  Temu New User Coupon: New users can save up to $100 off their first order with the [acu639380] code.  Temu Existing User Coupon: Existing users can unlock $100 off using the [acu639380] code.  Temu Coupon Code for June 2025: Get discounts on select items with up to 40% off this June.  Temu Coupon Code for Different Countries No matter where you live,  Temu has something special for you! You can use  Temu coupon codes tailored to your country to unlock great savings. Here’s a breakdown of how you can apply the [acu639380] coupon code in different regions:  Temu Coupon Code $100 Off for USA: Use the [acu639380] code in the USA to save $100 off your order.  Temu Coupon Code $100 Off for Canada: Canadians can enjoy $100 off using the [acu639380] code.  Temu Coupon Code $100 Off for UK: British shoppers can save $100 with the [acu639380] code.  Temu Coupon Code $100 Off for Japan: If you’re in Japan, apply the [acu639380] code to get $100 off.  Temu Coupon Code 40% Off for Mexico: Mexican shoppers can get 40% off with the [acu639380] code.  Temu Coupon Code 40% Off for Brazil: Brazil residents can save 40% by using the [acu639380] code. Why Shop with  Temu?  Temu isn’t just about the discounts; it’s about providing you with an exceptional shopping experience. Here’s why you should choose  Temu for your next shopping spree: Huge Selection of Trending Items: From the latest tech gadgets to fashion and home essentials,  Temu offers everything you need at amazing prices. Unbeatable Prices: With  Temu, you can shop for quality items at prices that are hard to match elsewhere. Fast Delivery: Enjoy fast and reliable delivery on all your orders. Free Shipping in Over 67 Countries: No matter where you are,  Temu ensures you get your products without any extra shipping fees. Up to 90% Off: Take advantage of massive discounts on selected products, so you can get more for less. Conclusion: Maximize Your Savings with  Temu Coupon Codes If you're looking for incredible deals, there’s no better time to shop at  Temu. With  Temu coupon code $100 OFF for existing and new users, an extra 40% off, and amazing coupon bundles, there are plenty of ways to save big. Don’t forget to check out the  Temu promo code for June 2025 and other exciting offers throughout the month. By using [acu639380], you can make the most of your shopping experience and enjoy unbeatable prices on all your favorite products. So, what are you waiting for? Start shopping with  Temu today, and enjoy massive savings with the $100 off and 40% off coupon codes. Happy shopping!  Temu Coupon Code Summary:  Temu Coupon Code $100 Off → [acu639380]: Save $100 on your purchase.  Temu Coupon Code $100 Off for New Users → [acu639380]: New users can get $100 off.  Temu Coupon Code $100 Off for Existing Users → [acu639380]: Existing users can save $100.  Temu Coupon Code 40% Off → [acu639380]: Enjoy 40% off select items.  Temu Coupon Bundle: Access a $100 coupon bundle for even more savings.  Temu Promo Code for June 2025: Latest deals for June 2025.  
    • it didnt make any different his game still crashes (https://www.mediafire.com/file/qmuanorha0d87b5/LOGSBURAK.zip/file) the crash log after without shield expansion mod
    • I am using Linux, I did Java --version and it shows I have Java 8 installed
    • Temu Coupon Code $100 Off [acu639380] For The USA This Month  Temu has become a go-to platform for online shopping in recent years, offering a vast selection of trendy items at unbeatable prices. With amazing discounts like the  Temu coupon code (acu639380) offering up to $100 Off for new users and exclusive offers for existing customers,  Temu is quickly cementing itself as a favorite among online shoppers. Whether you're looking for stylish fashion pieces, home essentials, or the latest gadgets, using  Temu 's promotional codes can help you save big on your purchases. In this blog, we’ll dive into all the incredible savings available this month, including details on the  Temu coupon codes (acu639380), which provide discounts like $100 Off for new and existing users, an additional 40% off, and even free gifts for first-time users. No matter where you’re located—whether in the United States, Canada, the UK, or beyond— Temu offers something for everyone. If you're looking to save money on your next shopping spree, keep reading to learn about all the best deals, discounts, and coupon codes you can use in June 2025. What is  Temu ? Before we dive into the details of the amazing  Temu coupon codes (acu639380), let’s first explore what  Temu is all about.  Temu is an online shopping platform that offers a massive range of products, from fashion and beauty items to home goods and electronics. With unbeatable prices, fast delivery, and free shipping to over 67 countries,  Temu is revolutionizing the way we shop online.  Temu is known for offering up to 90% off on certain items, which makes it an attractive option for budget-conscious shoppers. Whether you’re in the mood for trendy apparel, kitchen gadgets, or tech accessories,  Temu has something that fits your style and budget. Plus, with its regular sales events and exclusive coupon codes, there’s always an opportunity to save more. One of the biggest perks is the ability to combine discounts with promo codes like the  Temu coupon code (acu639380), which gives you a $100 discount for new users and additional savings for existing customers. Benefits of Using  Temu Coupon Codes  Temu coupon codes can offer significant discounts, and knowing how to take full advantage of these offers can lead to huge savings. The  Temu coupon code (acu639380) comes with a variety of benefits, such as: $100 Off for new users: This is a great way for new customers to enjoy  Temu ’s products at a fraction of the price. $100 Off for existing users: Loyal customers can still get a fantastic discount. 40% off: This discount code provides a solid extra savings on selected items. $100 coupon bundle: This is an exclusive offer for both new and existing users that lets you save on multiple purchases. Free gifts for new users: A welcome treat for first-time customers.  Temu Coupon Codes for June 2025 Now, let’s look at the  Temu coupon codes for June 2025 and how you can maximize your savings. These codes are designed to provide discounts based on your user status and location. Make sure to apply the  Temu coupon code (acu639380) when you check out to get the best deal possible! Here’s a breakdown of the  Temu coupon codes (acu639380) available:  Temu Coupon Code (acu639380) $100 Off for New Users Enjoy an instant $100 discount when you sign up for  Temu as a new user.  Temu Coupon Code (acu639380) $100 Off for Existing Users Loyal customers can also use this code to score a $100 discount on their next purchase.  Temu Coupon Code (acu639380) 40% Off Get up to 40% off on select items and categories—perfect for budget-savvy shoppers.  Temu $100 Coupon Bundle This bundle lets you apply a $100 discount on your shopping cart for both new and returning users.  Temu First Time User Coupon First-time buyers get an exclusive gift with this coupon code, alongside additional savings.  Temu Promo Code (acu639380) for June 2025 Use this code to unlock all of the June offers, including huge discounts on a wide variety of items. How  Temu Coupon Codes Help You Save More By using the  Temu coupon code (acu639380), you can access not only great discounts but also enjoy perks like free shipping and exclusive offers. The platform’s unbeatable prices, combined with these additional promo codes, create a shopping experience like no other. Let’s take a closer look at how each of these discounts can benefit you. $100 Off for new users: As a new user, you can score $100 Off on your first order with the  Temu coupon code (acu639380) for June 2025. This means you can shop for high-quality products like electronics, fashion, and home goods while spending less. $100 Off for existing users: Existing users also benefit from this promo code, which means even long-time shoppers can save big. The  Temu coupon code (acu639380) ensures that both new and loyal customers get an opportunity to save. 40% extra off: Certain categories are eligible for up to 40% off with this code. Whether you’re eyeing the latest tech gadget or refreshing your wardrobe, this extra discount can make a real difference to your total. Free gifts for new users: If you’re signing up for the first time,  Temu wants to welcome you with extra surprises. Use the  Temu first-time user coupon code to receive free gifts that’ll make your shopping experience even more enjoyable. $100 coupon bundle:  Temu has also created a special bundle that gives users—new and existing—a $100 discount on their orders. This bundle is perfect for those who love shopping in bulk and want to get the most value from their purchases. Where to Use  Temu Coupon Codes (acu639380)  Temu ships to over 67 countries, so no matter where you are, there’s a great deal waiting for you. Here’s a country-specific breakdown of how you can use the  Temu coupon code (acu639380) and enjoy incredible savings:  Temu Coupon Code $100 Off for USA: Residents of the United States can enjoy $100 Off their purchase using the  Temu coupon code (acu639380), which works for both new and existing users.  Temu Coupon Code $100 Off for Canada: Shoppers in Canada can save $100 on their orders when they apply the  Temu coupon code (acu639380), making it an excellent option for our neighbors to the north.  Temu Coupon Code $100 Off for UK: UK shoppers can also benefit from this amazing coupon code, ensuring they get $100 Off their next  Temu order.  Temu Coupon Code 40% Off for Mexico: Mexico-based shoppers can enjoy up to 40% off select items by using the  Temu coupon code (acu639380), which is ideal for those looking for exclusive savings.  Temu Coupon Code 40% Off for Brazil: Brazilian shoppers will be thrilled to know that they can apply the  Temu coupon code (acu639380) for up to 40% off on select items from the website.  Temu Coupon Code $100 Off for Japan: Shoppers in Japan can also take advantage of the  Temu coupon code (acu639380) and get $100 Off their purchases, which works for a wide range of products. Tips to Maximize Your Savings Stack Coupon Codes:  Temu allows users to stack certain discounts, so be sure to combine the  Temu coupon code (acu639380) with other promotional offers to get the best deal possible. Shop During Sales Events: Take advantage of major sales events like Black Friday, Cyber Monday, and holiday sales, when you can use  Temu coupon codes for even bigger discounts. Sign Up for Alerts: By signing up for  Temu ’s newsletter, you’ll be the first to know about new coupon codes, flash sales, and other special offers. Follow  Temu on Social Media:  Temu often shares exclusive discounts and codes on its social media platforms. Follow them to stay updated on the latest deals. Conclusion Whether you’re a first-time shopper or a loyal  Temu customer, using the  Temu coupon code (acu639380) is a smart way to save money on your favorite items. With discounts like $100 Off, up to 40% off, and exclusive coupon bundles,  Temu ensures that you never have to pay full price. With free shipping to over 67 countries, it’s easier than ever to shop for high-quality, affordable products that fit your budget. Don’t miss out on these amazing savings—apply the  Temu coupon code (acu639380) today and enjoy huge discounts on your next purchase.  
    • Make tests with different builds of these mods
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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