Jump to content

Container Problem


Kloonder

Recommended Posts

I'm sitting here now for hours, and I do'nt know why this isn't working, I have some problem with my Container and GuiContainer:

 

PS: I'm definetly not new to java, but maybe sometimes a experienced person gets some mistakes :P

 

 

public class GuiHandler implements IGuiHandler{

@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
	TileEntity tileEntity = world.getTileEntity(new BlockPos(x, y, z));
	if(tileEntity instanceof TileEntityArmorModifier){
		return new ContainerArmorModifier(player.inventory, (TileEntityArmorModifier) tileEntity);
	}
	return null;
}

@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
	TileEntity tileEntity = world.getTileEntity(new BlockPos(x, y, z));
	if(tileEntity instanceof TileEntityArmorModifier){
		return new GuiArmorModifier(player.inventory, (TileEntityArmorModifier) tileEntity);
	}

	return null;
}

}

 

public class ContainerArmorModifier extends Container{

protected TileEntity tileEntity;

public ContainerArmorModifier(InventoryPlayer invPlayer, TileEntityArmorModifier te) {

	tileEntity = te;


}

}

 

An there is my Error

 

public class GuiArmorModifier extends GuiContainer{

public GuiArmorModifier(InventoryPlayer inventory, TileEntityArmorModifier tileEntity) {
	super(new ContainerArmorModifier(inventory, tileEntity)); //this doesn't work here, I get an error here, But I cant understand why
}

@Override
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {

}

}

Creator of Extra Shoes

 

Watch out, I'm total jerk, and I'll troll anybody if it feels like its necessary. Pls report me then

Link to comment
Share on other sites

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



×
×
  • Create New...

Important Information

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