- 2,955
- 12
Покажи как ты регаешь прокси и их контент.
package last2424.mods.mandastrialcraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import cpw.mods.fml.common.network.IGuiHandler;
public class CommonProxy implements IGuiHandler
{
@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
TileEntity tileEntity = world.getTileEntity(x, y, z);
if (tileEntity != null)
{
switch(ID)
{
case 100:
return new TheBookOfAllGui(player);
}
}
return null;
}
@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
TileEntity tileEntity = world.getTileEntity(x, y, z);
if(tileEntity != null)
{
switch(ID)
{
case 100:
return new TheBookOfAllGui(player);
}
}
return null;
}
}
Переменная прокси куда подевалась?last24242 написал(а):Код:@SidedProxy(clientSide = "last2424.mods.mandastrialcraft.ClientProxy", serverSide = "last2424.mods.mandastrialcraft.CommonProxy")
package last2424.mods.mandastrialcraft;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import cpw.mods.fml.common.network.IGuiHandler;
public class CommonProxy implements IGuiHandler
{
@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
TileEntity tileEntity = world.getTileEntity(x, y, z);
if (tileEntity != null)
{
switch(ID)
{
case 100:
return new TheBookOfAllGui(player);
}
}
return null;
}
@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
{
TileEntity tileEntity = world.getTileEntity(x, y, z);
if(tileEntity != null)
{
switch(ID)
{
case 100:
return new TheBookOfAllGui(player);
}
}
return null;
}
}
Эм, ну любой ItemStack.last24242 написал(а):Я смог открыть свой гуи, теперь есть вопрос, чем можно возвращать onItemRightClick кроме itemstack?