Work on the 1.11 update more, some is still buggy but nearly complete.
This commit is contained in:
parent
a43c7259c3
commit
9fe6c6912a
|
@ -43,7 +43,7 @@ archivesBaseName = "ironchest"
|
||||||
|
|
||||||
// Setup the forge minecraft plugin data. Specify the preferred forge/minecraft version here
|
// Setup the forge minecraft plugin data. Specify the preferred forge/minecraft version here
|
||||||
minecraft {
|
minecraft {
|
||||||
version = "1.11-13.19.0.2130"
|
version = "1.11-13.19.0.2148"
|
||||||
mappings = "snapshot_20161111"
|
mappings = "snapshot_20161111"
|
||||||
runDir = "run"
|
runDir = "run"
|
||||||
}
|
}
|
||||||
|
|
0
src/api/java/invtweaks/api/container/ChestContainer.java → src/main/api/java/invtweaks/api/container/ChestContainer.java
Executable file → Normal file
0
src/api/java/invtweaks/api/container/ChestContainer.java → src/main/api/java/invtweaks/api/container/ChestContainer.java
Executable file → Normal file
|
@ -10,8 +10,6 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package cpw.mods.ironchest;
|
package cpw.mods.ironchest;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.properties.PropertyEnum;
|
import net.minecraft.block.properties.PropertyEnum;
|
||||||
|
@ -30,6 +28,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.EnumBlockRenderType;
|
import net.minecraft.util.EnumBlockRenderType;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
|
import net.minecraft.util.NonNullList;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.math.AxisAlignedBB;
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
@ -42,6 +41,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
public class BlockIronChest extends Block
|
public class BlockIronChest extends Block
|
||||||
{
|
{
|
||||||
public static final PropertyEnum<IronChestType> VARIANT_PROP = PropertyEnum.create("variant", IronChestType.class);
|
public static final PropertyEnum<IronChestType> VARIANT_PROP = PropertyEnum.create("variant", IronChestType.class);
|
||||||
|
|
||||||
protected static final AxisAlignedBB IRON_CHEST_AABB = new AxisAlignedBB(0.0625D, 0.0D, 0.0625D, 0.9375D, 0.875D, 0.9375D);
|
protected static final AxisAlignedBB IRON_CHEST_AABB = new AxisAlignedBB(0.0625D, 0.0D, 0.0625D, 0.9375D, 0.875D, 0.9375D);
|
||||||
|
|
||||||
public BlockIronChest()
|
public BlockIronChest()
|
||||||
|
@ -82,27 +82,28 @@ public class BlockIronChest extends Block
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//@formatter:off
|
//@formatter:off
|
||||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState blockState, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing direction, float hitX, float hitY, float hitZ)
|
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing heldItem, float side, float hitX, float hitY)
|
||||||
|
//public boolean onBlockActivated(World world, BlockPos pos, IBlockState blockState, EntityPlayer player, EnumHand hand, ItemStack heldItem, EnumFacing direction, float hitX, float hitY, float hitZ)
|
||||||
//@formatter:on
|
//@formatter:on
|
||||||
{
|
{
|
||||||
TileEntity te = world.getTileEntity(pos);
|
TileEntity te = worldIn.getTileEntity(pos);
|
||||||
|
|
||||||
if (te == null || !(te instanceof TileEntityIronChest))
|
if (te == null || !(te instanceof TileEntityIronChest))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (world.isSideSolid(pos.add(0, 1, 0), EnumFacing.DOWN))
|
if (worldIn.isSideSolid(pos.add(0, 1, 0), EnumFacing.DOWN))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (world.isRemote)
|
if (worldIn.isRemote)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
player.openGui(IronChest.instance, ((TileEntityIronChest) te).getType().ordinal(), world, pos.getX(), pos.getY(), pos.getZ());
|
playerIn.openGui(IronChest.instance, ((TileEntityIronChest) te).getType().ordinal(), worldIn, pos.getX(), pos.getY(), pos.getZ());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -120,7 +121,8 @@ public class BlockIronChest extends Block
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getSubBlocks(Item itemIn, CreativeTabs tab, List<ItemStack> list)
|
//public void getSubBlocks(Item itemIn, CreativeTabs tab, List<ItemStack> list)
|
||||||
|
public void getSubBlocks(Item itemIn, CreativeTabs tab, NonNullList<ItemStack> list)
|
||||||
{
|
{
|
||||||
for (IronChestType type : IronChestType.VALUES)
|
for (IronChestType type : IronChestType.VALUES)
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package cpw.mods.ironchest;
|
package cpw.mods.ironchest;
|
||||||
|
|
||||||
import invtweaks.api.container.ChestContainer;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.inventory.Container;
|
import net.minecraft.inventory.Container;
|
||||||
|
@ -18,11 +17,13 @@ import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.inventory.Slot;
|
import net.minecraft.inventory.Slot;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
@ChestContainer(isLargeChest = true)
|
//@ChestContainer(isLargeChest = true)
|
||||||
public class ContainerIronChest extends Container
|
public class ContainerIronChest extends Container
|
||||||
{
|
{
|
||||||
private IronChestType type;
|
private IronChestType type;
|
||||||
|
|
||||||
private EntityPlayer player;
|
private EntityPlayer player;
|
||||||
|
|
||||||
private IInventory chest;
|
private IInventory chest;
|
||||||
|
|
||||||
public ContainerIronChest(IInventory playerInventory, IInventory chestInventory, IronChestType type, int xSize, int ySize)
|
public ContainerIronChest(IInventory playerInventory, IInventory chestInventory, IronChestType type, int xSize, int ySize)
|
||||||
|
@ -43,7 +44,7 @@ public class ContainerIronChest extends Container
|
||||||
@Override
|
@Override
|
||||||
public ItemStack transferStackInSlot(EntityPlayer p, int i)
|
public ItemStack transferStackInSlot(EntityPlayer p, int i)
|
||||||
{
|
{
|
||||||
ItemStack itemstack = null;
|
ItemStack itemstack = ItemStack.field_190927_a;
|
||||||
Slot slot = this.inventorySlots.get(i);
|
Slot slot = this.inventorySlots.get(i);
|
||||||
if (slot != null && slot.getHasStack())
|
if (slot != null && slot.getHasStack())
|
||||||
{
|
{
|
||||||
|
@ -53,20 +54,20 @@ public class ContainerIronChest extends Container
|
||||||
{
|
{
|
||||||
if (!this.mergeItemStack(itemstack1, this.type.size, this.inventorySlots.size(), true))
|
if (!this.mergeItemStack(itemstack1, this.type.size, this.inventorySlots.size(), true))
|
||||||
{
|
{
|
||||||
return null;
|
return ItemStack.field_190927_a;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (!this.type.acceptsStack(itemstack1))
|
else if (!this.type.acceptsStack(itemstack1))
|
||||||
{
|
{
|
||||||
return null;
|
return ItemStack.field_190927_a;
|
||||||
}
|
}
|
||||||
else if (!this.mergeItemStack(itemstack1, 0, this.type.size, false))
|
else if (!this.mergeItemStack(itemstack1, 0, this.type.size, false))
|
||||||
{
|
{
|
||||||
return null;
|
return ItemStack.field_190927_a;
|
||||||
}
|
}
|
||||||
if (itemstack1.func_190916_E() == 0)
|
if (itemstack1.func_190916_E() == 0)
|
||||||
{
|
{
|
||||||
slot.putStack(null);
|
slot.putStack(ItemStack.field_190927_a);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -122,9 +123,9 @@ public class ContainerIronChest extends Container
|
||||||
return this.player;
|
return this.player;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ChestContainer.RowSizeCallback
|
//@ChestContainer.RowSizeCallback
|
||||||
public int getNumColumns()
|
//public int getNumColumns()
|
||||||
{
|
//{
|
||||||
return this.type.rowLength;
|
// return this.type.rowLength;
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||||
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
||||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||||
|
|
||||||
@Mod(modid = IronChest.MOD_ID, name = "Iron Chests", dependencies = "required-after:Forge@[12.17.0.1909,)", acceptedMinecraftVersions = "[1.11, 1.12)")
|
@Mod(modid = IronChest.MOD_ID, name = "Iron Chests", /*dependencies = "required-after:Forge@[12.17.0.1909,)",*/ acceptedMinecraftVersions = "[1.11, 1.12)")
|
||||||
public class IronChest
|
public class IronChest
|
||||||
{
|
{
|
||||||
public static final String MOD_ID = "ironchest";
|
public static final String MOD_ID = "ironchest";
|
||||||
|
@ -33,6 +33,7 @@ public class IronChest
|
||||||
public static CommonProxy proxy;
|
public static CommonProxy proxy;
|
||||||
|
|
||||||
public static BlockIronChest ironChestBlock;
|
public static BlockIronChest ironChestBlock;
|
||||||
|
|
||||||
public static ItemIronChest ironChestItemBlock;
|
public static ItemIronChest ironChestItemBlock;
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
@ -56,7 +57,8 @@ public class IronChest
|
||||||
|
|
||||||
for (IronChestType typ : IronChestType.VALUES)
|
for (IronChestType typ : IronChestType.VALUES)
|
||||||
{
|
{
|
||||||
GameRegistry.registerTileEntity(typ.clazz, "IronChest." + typ.name());
|
if (typ.clazz != null)
|
||||||
|
GameRegistry.registerTileEntity(typ.clazz, "IronChest." + typ.name());
|
||||||
}
|
}
|
||||||
|
|
||||||
IronChestType.registerBlocksAndRecipes(ironChestBlock);
|
IronChestType.registerBlocksAndRecipes(ironChestBlock);
|
||||||
|
|
|
@ -42,15 +42,25 @@ public enum IronChestType implements IStringSerializable
|
||||||
public static final IronChestType VALUES[] = values();
|
public static final IronChestType VALUES[] = values();
|
||||||
|
|
||||||
public final String name;
|
public final String name;
|
||||||
|
|
||||||
public final int size;
|
public final int size;
|
||||||
|
|
||||||
public final int rowLength;
|
public final int rowLength;
|
||||||
|
|
||||||
public final boolean tieredChest;
|
public final boolean tieredChest;
|
||||||
|
|
||||||
public final ResourceLocation modelTexture;
|
public final ResourceLocation modelTexture;
|
||||||
|
|
||||||
private String breakTexture;
|
private String breakTexture;
|
||||||
|
|
||||||
public final Class<? extends TileEntityIronChest> clazz;
|
public final Class<? extends TileEntityIronChest> clazz;
|
||||||
|
|
||||||
public final Collection<String> recipes;
|
public final Collection<String> recipes;
|
||||||
|
|
||||||
public final Collection<String> matList;
|
public final Collection<String> matList;
|
||||||
|
|
||||||
public final int xSize;
|
public final int xSize;
|
||||||
|
|
||||||
public final int ySize;
|
public final int ySize;
|
||||||
|
|
||||||
//@formatter:off
|
//@formatter:off
|
||||||
|
@ -192,7 +202,7 @@ public enum IronChestType implements IStringSerializable
|
||||||
{
|
{
|
||||||
if (this == DIRTCHEST9000)
|
if (this == DIRTCHEST9000)
|
||||||
{
|
{
|
||||||
return itemstack == null || itemstack.getItem() == DIRT_ITEM;
|
return itemstack == ItemStack.field_190927_a || itemstack.getItem() == DIRT_ITEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -230,4 +240,4 @@ public enum IronChestType implements IStringSerializable
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@ import net.minecraft.tileentity.TileEntityChest;
|
||||||
import net.minecraft.util.EnumActionResult;
|
import net.minecraft.util.EnumActionResult;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
|
import net.minecraft.util.NonNullList;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
@ -38,17 +39,18 @@ public class ItemChestChanger extends Item
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
//@formatter:off
|
//@formatter:off
|
||||||
public EnumActionResult onItemUseFirst(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, EnumHand hand)
|
public EnumActionResult onItemUseFirst(EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, EnumHand hand)
|
||||||
|
//public EnumActionResult onItemUseFirst(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, EnumHand hand)
|
||||||
//@formatter:on
|
//@formatter:on
|
||||||
{
|
{
|
||||||
if (worldIn.isRemote)
|
if (world.isRemote)
|
||||||
{
|
{
|
||||||
return EnumActionResult.PASS;
|
return EnumActionResult.PASS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.type.canUpgrade(IronChestType.WOOD))
|
if (this.type.canUpgrade(IronChestType.WOOD))
|
||||||
{
|
{
|
||||||
if (!(worldIn.getBlockState(pos).getBlock() instanceof BlockChest))
|
if (!(world.getBlockState(pos).getBlock() instanceof BlockChest))
|
||||||
{
|
{
|
||||||
return EnumActionResult.PASS;
|
return EnumActionResult.PASS;
|
||||||
}
|
}
|
||||||
|
@ -56,23 +58,23 @@ public class ItemChestChanger extends Item
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//@formatter:off
|
//@formatter:off
|
||||||
if (worldIn.getBlockState(pos) != IronChest.ironChestBlock.getStateFromMeta(IronChestType.valueOf(this.type.source.getName().toUpperCase()).ordinal()))
|
if (world.getBlockState(pos) != IronChest.ironChestBlock.getStateFromMeta(IronChestType.valueOf(this.type.source.getName().toUpperCase()).ordinal()))
|
||||||
//@formatter:on
|
//@formatter:on
|
||||||
{
|
{
|
||||||
return EnumActionResult.PASS;
|
return EnumActionResult.PASS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TileEntity te = worldIn.getTileEntity(pos);
|
TileEntity te = world.getTileEntity(pos);
|
||||||
TileEntityIronChest newchest = new TileEntityIronChest();
|
TileEntityIronChest newchest = new TileEntityIronChest();
|
||||||
ItemStack[] chestContents = new ItemStack[27];
|
NonNullList<ItemStack> chestContents = NonNullList.<ItemStack> func_191197_a(27, ItemStack.field_190927_a);
|
||||||
EnumFacing chestFacing = EnumFacing.DOWN;
|
EnumFacing chestFacing = EnumFacing.DOWN;
|
||||||
|
|
||||||
if (te != null)
|
if (te != null)
|
||||||
{
|
{
|
||||||
if (te instanceof TileEntityIronChest)
|
if (te instanceof TileEntityIronChest)
|
||||||
{
|
{
|
||||||
chestContents = ((TileEntityIronChest) te).chestContents;
|
chestContents = ((TileEntityIronChest) te).func_190576_q();
|
||||||
chestFacing = ((TileEntityIronChest) te).getFacing();
|
chestFacing = ((TileEntityIronChest) te).getFacing();
|
||||||
newchest = this.type.target.makeEntity();
|
newchest = this.type.target.makeEntity();
|
||||||
if (newchest == null)
|
if (newchest == null)
|
||||||
|
@ -82,7 +84,7 @@ public class ItemChestChanger extends Item
|
||||||
}
|
}
|
||||||
else if (te instanceof TileEntityChest)
|
else if (te instanceof TileEntityChest)
|
||||||
{
|
{
|
||||||
IBlockState chestState = worldIn.getBlockState(pos);
|
IBlockState chestState = world.getBlockState(pos);
|
||||||
chestFacing = chestState.getValue(BlockChest.FACING);
|
chestFacing = chestState.getValue(BlockChest.FACING);
|
||||||
TileEntityChest chest = (TileEntityChest) te;
|
TileEntityChest chest = (TileEntityChest) te;
|
||||||
|
|
||||||
|
@ -94,10 +96,10 @@ public class ItemChestChanger extends Item
|
||||||
{
|
{
|
||||||
return EnumActionResult.PASS;
|
return EnumActionResult.PASS;
|
||||||
}
|
}
|
||||||
chestContents = new ItemStack[chest.getSizeInventory()];
|
chestContents = NonNullList.<ItemStack> func_191197_a(chest.getSizeInventory(), ItemStack.field_190927_a);//new ItemStack[chest.getSizeInventory()];
|
||||||
for (int i = 0; i < chestContents.length; i++)
|
for (int i = 0; i < chestContents.size(); i++)
|
||||||
{
|
{
|
||||||
chestContents[i] = chest.getStackInSlot(i);
|
chestContents.set(i, chest.getStackInSlot(i));
|
||||||
}
|
}
|
||||||
newchest = this.type.target.makeEntity();
|
newchest = this.type.target.makeEntity();
|
||||||
}
|
}
|
||||||
|
@ -110,17 +112,17 @@ public class ItemChestChanger extends Item
|
||||||
((TileEntityChest) te).checkForAdjacentChests();
|
((TileEntityChest) te).checkForAdjacentChests();
|
||||||
}
|
}
|
||||||
|
|
||||||
worldIn.removeTileEntity(pos);
|
world.removeTileEntity(pos);
|
||||||
worldIn.setBlockToAir(pos);
|
world.setBlockToAir(pos);
|
||||||
|
|
||||||
IBlockState iblockstate = IronChest.ironChestBlock.getDefaultState().withProperty(BlockIronChest.VARIANT_PROP, this.type.target);
|
IBlockState iblockstate = IronChest.ironChestBlock.getDefaultState().withProperty(BlockIronChest.VARIANT_PROP, this.type.target);
|
||||||
|
|
||||||
worldIn.setTileEntity(pos, newchest);
|
world.setTileEntity(pos, newchest);
|
||||||
worldIn.setBlockState(pos, iblockstate, 3);
|
world.setBlockState(pos, iblockstate, 3);
|
||||||
|
|
||||||
worldIn.notifyBlockUpdate(pos, iblockstate, iblockstate, 3);
|
world.notifyBlockUpdate(pos, iblockstate, iblockstate, 3);
|
||||||
|
|
||||||
TileEntity te2 = worldIn.getTileEntity(pos);
|
TileEntity te2 = world.getTileEntity(pos);
|
||||||
|
|
||||||
if (te2 instanceof TileEntityIronChest)
|
if (te2 instanceof TileEntityIronChest)
|
||||||
{
|
{
|
||||||
|
@ -128,7 +130,9 @@ public class ItemChestChanger extends Item
|
||||||
((TileEntityIronChest) te2).setFacing(chestFacing);
|
((TileEntityIronChest) te2).setFacing(chestFacing);
|
||||||
}
|
}
|
||||||
|
|
||||||
stack.func_190920_e(playerIn.capabilities.isCreativeMode ? stack.func_190916_E() : stack.func_190916_E() - 1);
|
ItemStack stack = player.getHeldItem(hand);
|
||||||
|
|
||||||
|
stack.func_190920_e(player.capabilities.isCreativeMode ? stack.func_190916_E() : stack.func_190916_E() - 1);
|
||||||
|
|
||||||
return EnumActionResult.SUCCESS;
|
return EnumActionResult.SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,9 +42,9 @@ public class TileEntityDirtChest extends TileEntityIronChest
|
||||||
@Override
|
@Override
|
||||||
public void removeAdornments()
|
public void removeAdornments()
|
||||||
{
|
{
|
||||||
if (this.chestContents[0] != null && this.chestContents[0].isItemEqual(dirtChest9000GuideBook))
|
if (this.func_190576_q().get(0) != ItemStack.field_190927_a && this.func_190576_q().get(0).isItemEqual(dirtChest9000GuideBook))
|
||||||
{
|
{
|
||||||
this.chestContents[0] = null;
|
this.func_190576_q().set(0, ItemStack.field_190927_a);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,56 +16,68 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.init.SoundEvents;
|
import net.minecraft.init.SoundEvents;
|
||||||
import net.minecraft.inventory.Container;
|
import net.minecraft.inventory.Container;
|
||||||
import net.minecraft.inventory.IInventory;
|
|
||||||
import net.minecraft.inventory.ItemStackHelper;
|
import net.minecraft.inventory.ItemStackHelper;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.nbt.NBTTagList;
|
|
||||||
import net.minecraft.network.NetworkManager;
|
import net.minecraft.network.NetworkManager;
|
||||||
import net.minecraft.network.play.server.SPacketUpdateTileEntity;
|
import net.minecraft.network.play.server.SPacketUpdateTileEntity;
|
||||||
import net.minecraft.tileentity.TileEntityLockableLoot;
|
import net.minecraft.tileentity.TileEntityLockableLoot;
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
import net.minecraft.util.ITickable;
|
import net.minecraft.util.ITickable;
|
||||||
|
import net.minecraft.util.NonNullList;
|
||||||
import net.minecraft.util.SoundCategory;
|
import net.minecraft.util.SoundCategory;
|
||||||
import net.minecraft.util.math.AxisAlignedBB;
|
import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraftforge.common.util.Constants;
|
import net.minecraftforge.common.util.Constants;
|
||||||
|
|
||||||
import java.util.Arrays;
|
public class TileEntityIronChest extends TileEntityLockableLoot implements ITickable//, IInventory
|
||||||
import java.util.Comparator;
|
{
|
||||||
|
/** The current angle of the lid (between 0 and 1) */
|
||||||
import javax.annotation.Nullable;
|
|
||||||
|
|
||||||
public class TileEntityIronChest extends TileEntityLockableLoot implements ITickable, IInventory {
|
|
||||||
public float prevLidAngle;
|
|
||||||
public float lidAngle;
|
public float lidAngle;
|
||||||
public ItemStack[] chestContents;
|
|
||||||
|
/** The angle of the lid last tick */
|
||||||
|
public float prevLidAngle;
|
||||||
|
|
||||||
|
private NonNullList<ItemStack> chestContents;
|
||||||
|
|
||||||
private int ticksSinceSync = -1;
|
private int ticksSinceSync = -1;
|
||||||
|
|
||||||
private int numPlayersUsing;
|
private int numPlayersUsing;
|
||||||
private ItemStack[] topStacks;
|
|
||||||
|
//private ItemStack[] topStacks;
|
||||||
|
|
||||||
private EnumFacing facing;
|
private EnumFacing facing;
|
||||||
|
|
||||||
private boolean inventoryTouched;
|
private boolean inventoryTouched;
|
||||||
|
|
||||||
private boolean hadStuff;
|
private boolean hadStuff;
|
||||||
|
|
||||||
private String customName;
|
private String customName;
|
||||||
|
|
||||||
private IronChestType chestType;
|
private IronChestType chestType;
|
||||||
|
|
||||||
public TileEntityIronChest () {
|
public TileEntityIronChest()
|
||||||
|
{
|
||||||
this(IronChestType.IRON);
|
this(IronChestType.IRON);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected TileEntityIronChest (IronChestType type) {
|
protected TileEntityIronChest(IronChestType type)
|
||||||
|
{
|
||||||
super();
|
super();
|
||||||
this.chestType = type;
|
this.chestType = type;
|
||||||
this.chestContents = new ItemStack[type.size];
|
this.chestContents = NonNullList.<ItemStack> func_191197_a(type.size, ItemStack.field_190927_a);
|
||||||
this.topStacks = new ItemStack[8];
|
//this.topStacks = new ItemStack[8];
|
||||||
this.facing = EnumFacing.NORTH;
|
this.facing = EnumFacing.NORTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setContents (ItemStack[] contents) {
|
public void setContents(NonNullList<ItemStack> contents)
|
||||||
this.chestContents = new ItemStack[this.getType().size];
|
{
|
||||||
|
this.chestContents = NonNullList.<ItemStack> func_191197_a(this.getType().size, ItemStack.field_190927_a);
|
||||||
|
|
||||||
for (int i = 0; i < contents.length; i++) {
|
for (int i = 0; i < contents.size(); i++)
|
||||||
if (i < this.chestContents.length) {
|
{
|
||||||
this.chestContents[i] = contents[i];
|
if (i < this.chestContents.size())
|
||||||
|
{
|
||||||
|
this.chestContents.set(i, contents.get(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,25 +85,31 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getSizeInventory () {
|
public int getSizeInventory()
|
||||||
return this.chestContents.length;
|
{
|
||||||
|
return this.chestContents.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
public EnumFacing getFacing () {
|
public EnumFacing getFacing()
|
||||||
|
{
|
||||||
return this.facing;
|
return this.facing;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setFacing (EnumFacing facing) {
|
public void setFacing(EnumFacing facing)
|
||||||
|
{
|
||||||
this.facing = facing;
|
this.facing = facing;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IronChestType getType () {
|
public IronChestType getType()
|
||||||
|
{
|
||||||
IronChestType type = IronChestType.IRON;
|
IronChestType type = IronChestType.IRON;
|
||||||
|
|
||||||
if (this.hasWorldObj()) {
|
if (this.hasWorldObj())
|
||||||
|
{
|
||||||
IBlockState state = this.worldObj.getBlockState(this.pos);
|
IBlockState state = this.worldObj.getBlockState(this.pos);
|
||||||
|
|
||||||
if (state.getBlock() == IronChest.ironChestBlock) {
|
if (state.getBlock() == IronChest.ironChestBlock)
|
||||||
|
{
|
||||||
type = state.getValue(BlockIronChest.VARIANT_PROP);
|
type = state.getValue(BlockIronChest.VARIANT_PROP);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -100,37 +118,45 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack getStackInSlot (int index) {
|
public ItemStack getStackInSlot(int index)
|
||||||
|
{
|
||||||
this.fillWithLoot((EntityPlayer) null);
|
this.fillWithLoot((EntityPlayer) null);
|
||||||
|
|
||||||
this.inventoryTouched = true;
|
this.inventoryTouched = true;
|
||||||
|
|
||||||
return this.chestContents[index];
|
return this.func_190576_q().get(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void markDirty () {
|
public void markDirty()
|
||||||
|
{
|
||||||
super.markDirty();
|
super.markDirty();
|
||||||
|
|
||||||
this.sortTopStacks();
|
//this.sortTopStacks();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void sortTopStacks () {
|
/*protected void sortTopStacks()
|
||||||
if (!this.getType().isTransparent() || (this.worldObj != null && this.worldObj.isRemote)) {
|
{
|
||||||
|
if (!this.getType().isTransparent() || (this.worldObj != null && this.worldObj.isRemote))
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ItemStack[] tempCopy = new ItemStack[this.getSizeInventory()];
|
ItemStack[] tempCopy = new ItemStack[this.getSizeInventory()];
|
||||||
|
|
||||||
boolean hasStuff = false;
|
boolean hasStuff = false;
|
||||||
|
|
||||||
int compressedIdx = 0;
|
int compressedIdx = 0;
|
||||||
|
|
||||||
mainLoop:
|
mainLoop:
|
||||||
for (int i = 0; i < this.getSizeInventory(); i++) {
|
for (int i = 0; i < this.getSizeInventory(); i++)
|
||||||
if (this.chestContents[i] != null) {
|
{
|
||||||
for (int j = 0; j < compressedIdx; j++) {
|
if (this.chestContents[i] != null)
|
||||||
if (tempCopy[j].isItemEqual(this.chestContents[i])) {
|
{
|
||||||
|
for (int j = 0; j < compressedIdx; j++)
|
||||||
|
{
|
||||||
|
if (tempCopy[j].isItemEqual(this.chestContents[i]))
|
||||||
|
{
|
||||||
tempCopy[j].func_190920_e(tempCopy[j].func_190916_E() + this.chestContents[i].func_190916_E());
|
tempCopy[j].func_190920_e(tempCopy[j].func_190916_E() + this.chestContents[i].func_190916_E());
|
||||||
continue mainLoop;
|
continue mainLoop;
|
||||||
}
|
}
|
||||||
|
@ -139,155 +165,128 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
|
||||||
hasStuff = true;
|
hasStuff = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!hasStuff && this.hadStuff) {
|
if (!hasStuff && this.hadStuff)
|
||||||
|
{
|
||||||
this.hadStuff = false;
|
this.hadStuff = false;
|
||||||
|
|
||||||
for (int i = 0; i < this.topStacks.length; i++) {
|
for (int i = 0; i < this.topStacks.length; i++)
|
||||||
|
{
|
||||||
this.topStacks[i] = null;
|
this.topStacks[i] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.worldObj != null) {
|
if (this.worldObj != null)
|
||||||
|
{
|
||||||
IBlockState iblockstate = this.worldObj.getBlockState(this.pos);
|
IBlockState iblockstate = this.worldObj.getBlockState(this.pos);
|
||||||
this.worldObj.notifyBlockUpdate(this.pos, iblockstate, iblockstate, 3);
|
this.worldObj.notifyBlockUpdate(this.pos, iblockstate, iblockstate, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.hadStuff = true;
|
this.hadStuff = true;
|
||||||
|
|
||||||
Arrays.sort(tempCopy, new Comparator<ItemStack>() {
|
Arrays.sort(tempCopy, new Comparator<ItemStack>()
|
||||||
|
{
|
||||||
@Override
|
@Override
|
||||||
public int compare (ItemStack o1, ItemStack o2) {
|
public int compare(ItemStack o1, ItemStack o2)
|
||||||
if (o1 == null) {
|
{
|
||||||
|
if (o1 == null)
|
||||||
|
{
|
||||||
return 1;
|
return 1;
|
||||||
} else if (o2 == null) {
|
}
|
||||||
|
else if (o2 == null)
|
||||||
|
{
|
||||||
return -1;
|
return -1;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
return o2.func_190916_E() - o1.func_190916_E();
|
return o2.func_190916_E() - o1.func_190916_E();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
int p = 0;
|
int p = 0;
|
||||||
|
|
||||||
for (ItemStack element : tempCopy) {
|
for (ItemStack element : tempCopy)
|
||||||
if (element != ItemStack.field_190927_a && element.func_190916_E() > 0) {
|
{
|
||||||
|
if (element != ItemStack.field_190927_a && element.func_190916_E() > 0)
|
||||||
|
{
|
||||||
this.topStacks[p++] = element;
|
this.topStacks[p++] = element;
|
||||||
|
|
||||||
if (p == this.topStacks.length) {
|
if (p == this.topStacks.length)
|
||||||
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = p; i < this.topStacks.length; i++) {
|
for (int i = p; i < this.topStacks.length; i++)
|
||||||
|
{
|
||||||
this.topStacks[i] = null;
|
this.topStacks[i] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.worldObj != null) {
|
if (this.worldObj != null)
|
||||||
|
{
|
||||||
IBlockState iblockstate = this.worldObj.getBlockState(this.pos);
|
IBlockState iblockstate = this.worldObj.getBlockState(this.pos);
|
||||||
|
|
||||||
this.worldObj.notifyBlockUpdate(this.pos, iblockstate, iblockstate, 3);
|
this.worldObj.notifyBlockUpdate(this.pos, iblockstate, iblockstate, 3);
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
public String getName()
|
||||||
public ItemStack decrStackSize (int index, int count) {
|
{
|
||||||
this.fillWithLoot((EntityPlayer) null);
|
|
||||||
|
|
||||||
ItemStack itemstack = ItemStackHelper.getAndSplit(this.chestContents, index, count);
|
|
||||||
|
|
||||||
if (itemstack != null) {
|
|
||||||
this.markDirty();
|
|
||||||
}
|
|
||||||
|
|
||||||
return itemstack;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setInventorySlotContents (int index, @Nullable ItemStack stack) {
|
|
||||||
this.fillWithLoot((EntityPlayer) null);
|
|
||||||
|
|
||||||
this.chestContents[index] = stack;
|
|
||||||
|
|
||||||
if (stack != null && stack.func_190916_E() > this.getInventoryStackLimit()) {
|
|
||||||
stack.func_190920_e(this.getInventoryStackLimit());
|
|
||||||
}
|
|
||||||
|
|
||||||
this.markDirty();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getName () {
|
|
||||||
return this.hasCustomName() ? this.customName : this.getType().name();
|
return this.hasCustomName() ? this.customName : this.getType().name();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasCustomName () {
|
public boolean hasCustomName()
|
||||||
|
{
|
||||||
return this.customName != null && this.customName.length() > 0;
|
return this.customName != null && this.customName.length() > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCustomName (String name) {
|
public void setCustomName(String name)
|
||||||
|
{
|
||||||
this.customName = name;
|
this.customName = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readFromNBT (NBTTagCompound compound) {
|
public void readFromNBT(NBTTagCompound compound)
|
||||||
|
{
|
||||||
super.readFromNBT(compound);
|
super.readFromNBT(compound);
|
||||||
|
|
||||||
this.chestContents = new ItemStack[this.getSizeInventory()];
|
this.chestContents = NonNullList.<ItemStack> func_191197_a(this.getSizeInventory(), ItemStack.field_190927_a);
|
||||||
|
|
||||||
if (compound.hasKey("CustomName", Constants.NBT.TAG_STRING)) {
|
if (compound.hasKey("CustomName", Constants.NBT.TAG_STRING))
|
||||||
|
{
|
||||||
this.customName = compound.getString("CustomName");
|
this.customName = compound.getString("CustomName");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.checkLootAndRead(compound)) {
|
if (!this.checkLootAndRead(compound))
|
||||||
NBTTagList itemList = compound.getTagList("Items", Constants.NBT.TAG_COMPOUND);
|
{
|
||||||
|
ItemStackHelper.func_191283_b(compound, this.chestContents);
|
||||||
for (int itemNumber = 0; itemNumber < itemList.tagCount(); ++itemNumber) {
|
|
||||||
NBTTagCompound item = itemList.getCompoundTagAt(itemNumber);
|
|
||||||
|
|
||||||
int slot = item.getByte("Slot") & 255;
|
|
||||||
|
|
||||||
if (slot >= 0 && slot < this.chestContents.length) {
|
|
||||||
this.chestContents[slot] = ItemStack.loadItemStackFromNBT(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.facing = EnumFacing.VALUES[compound.getByte("facing")];
|
this.facing = EnumFacing.VALUES[compound.getByte("facing")];
|
||||||
|
|
||||||
this.sortTopStacks();
|
//this.sortTopStacks();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public NBTTagCompound writeToNBT (NBTTagCompound compound) {
|
public NBTTagCompound writeToNBT(NBTTagCompound compound)
|
||||||
|
{
|
||||||
super.writeToNBT(compound);
|
super.writeToNBT(compound);
|
||||||
|
|
||||||
if (!this.checkLootAndWrite(compound)) {
|
if (!this.checkLootAndWrite(compound))
|
||||||
NBTTagList itemList = new NBTTagList();
|
{
|
||||||
|
ItemStackHelper.func_191282_a(compound, this.chestContents);
|
||||||
for (int slot = 0; slot < this.chestContents.length; ++slot) {
|
|
||||||
if (this.chestContents[slot] != null) {
|
|
||||||
NBTTagCompound tag = new NBTTagCompound();
|
|
||||||
|
|
||||||
tag.setByte("Slot", (byte) slot);
|
|
||||||
|
|
||||||
this.chestContents[slot].writeToNBT(tag);
|
|
||||||
|
|
||||||
itemList.appendTag(tag);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
compound.setTag("Items", itemList);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
compound.setByte("facing", (byte) this.facing.ordinal());
|
compound.setByte("facing", (byte) this.facing.ordinal());
|
||||||
|
|
||||||
if (this.hasCustomName()) {
|
if (this.hasCustomName())
|
||||||
|
{
|
||||||
compound.setString("CustomName", this.customName);
|
compound.setString("CustomName", this.customName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -295,17 +294,21 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getInventoryStackLimit () {
|
public int getInventoryStackLimit()
|
||||||
|
{
|
||||||
return 64;
|
return 64;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isUseableByPlayer (EntityPlayer player) {
|
public boolean isUseableByPlayer(EntityPlayer player)
|
||||||
if (this.worldObj == null) {
|
{
|
||||||
|
if (this.worldObj == null)
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.worldObj.getTileEntity(this.pos) != this) {
|
if (this.worldObj.getTileEntity(this.pos) != this)
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -313,7 +316,8 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void update () {
|
public void update()
|
||||||
|
{
|
||||||
// Resynchronizes clients with the server state
|
// Resynchronizes clients with the server state
|
||||||
//@formatter:off
|
//@formatter:off
|
||||||
if (this.worldObj != null && !this.worldObj.isRemote && this.numPlayersUsing != 0 && (this.ticksSinceSync + this.pos.getX() + this.pos.getY() + this.pos.getZ()) % 200 == 0)
|
if (this.worldObj != null && !this.worldObj.isRemote && this.numPlayersUsing != 0 && (this.ticksSinceSync + this.pos.getX() + this.pos.getY() + this.pos.getZ()) % 200 == 0)
|
||||||
|
@ -328,20 +332,23 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
|
||||||
new AxisAlignedBB(this.pos.getX() - f, this.pos.getY() - f, this.pos.getZ() - f, this.pos.getX() + 1 + f, this.pos.getY() + 1 + f, this.pos.getZ() + 1 + f)))
|
new AxisAlignedBB(this.pos.getX() - f, this.pos.getY() - f, this.pos.getZ() - f, this.pos.getX() + 1 + f, this.pos.getY() + 1 + f, this.pos.getZ() + 1 + f)))
|
||||||
//@formatter:on
|
//@formatter:on
|
||||||
{
|
{
|
||||||
if (player.openContainer instanceof ContainerIronChest) {
|
if (player.openContainer instanceof ContainerIronChest)
|
||||||
|
{
|
||||||
++this.numPlayersUsing;
|
++this.numPlayersUsing;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.worldObj != null && !this.worldObj.isRemote && this.ticksSinceSync < 0) {
|
if (this.worldObj != null && !this.worldObj.isRemote && this.ticksSinceSync < 0)
|
||||||
|
{
|
||||||
this.worldObj.addBlockEvent(this.pos, IronChest.ironChestBlock, 3, ((this.numPlayersUsing << 3) & 0xF8) | (this.facing.ordinal() & 0x7));
|
this.worldObj.addBlockEvent(this.pos, IronChest.ironChestBlock, 3, ((this.numPlayersUsing << 3) & 0xF8) | (this.facing.ordinal() & 0x7));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.worldObj.isRemote && this.inventoryTouched) {
|
if (!this.worldObj.isRemote && this.inventoryTouched)
|
||||||
|
{
|
||||||
this.inventoryTouched = false;
|
this.inventoryTouched = false;
|
||||||
|
|
||||||
this.sortTopStacks();
|
//this.sortTopStacks();
|
||||||
}
|
}
|
||||||
|
|
||||||
this.ticksSinceSync++;
|
this.ticksSinceSync++;
|
||||||
|
@ -350,7 +357,8 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
|
||||||
|
|
||||||
float angle = 0.1F;
|
float angle = 0.1F;
|
||||||
|
|
||||||
if (this.numPlayersUsing > 0 && this.lidAngle == 0.0F) {
|
if (this.numPlayersUsing > 0 && this.lidAngle == 0.0F)
|
||||||
|
{
|
||||||
double x = this.pos.getX() + 0.5D;
|
double x = this.pos.getX() + 0.5D;
|
||||||
double y = this.pos.getY() + 0.5D;
|
double y = this.pos.getY() + 0.5D;
|
||||||
double z = this.pos.getZ() + 0.5D;
|
double z = this.pos.getZ() + 0.5D;
|
||||||
|
@ -360,22 +368,28 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
|
||||||
//@formatter:on
|
//@formatter:on
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.numPlayersUsing == 0 && this.lidAngle > 0.0F || this.numPlayersUsing > 0 && this.lidAngle < 1.0F) {
|
if (this.numPlayersUsing == 0 && this.lidAngle > 0.0F || this.numPlayersUsing > 0 && this.lidAngle < 1.0F)
|
||||||
|
{
|
||||||
float currentAngle = this.lidAngle;
|
float currentAngle = this.lidAngle;
|
||||||
|
|
||||||
if (this.numPlayersUsing > 0) {
|
if (this.numPlayersUsing > 0)
|
||||||
|
{
|
||||||
this.lidAngle += angle;
|
this.lidAngle += angle;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
this.lidAngle -= angle;
|
this.lidAngle -= angle;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.lidAngle > 1.0F) {
|
if (this.lidAngle > 1.0F)
|
||||||
|
{
|
||||||
this.lidAngle = 1.0F;
|
this.lidAngle = 1.0F;
|
||||||
}
|
}
|
||||||
|
|
||||||
float maxAngle = 0.5F;
|
float maxAngle = 0.5F;
|
||||||
|
|
||||||
if (this.lidAngle < maxAngle && currentAngle >= maxAngle) {
|
if (this.lidAngle < maxAngle && currentAngle >= maxAngle)
|
||||||
|
{
|
||||||
double x = this.pos.getX() + 0.5D;
|
double x = this.pos.getX() + 0.5D;
|
||||||
double y = this.pos.getY() + 0.5D;
|
double y = this.pos.getY() + 0.5D;
|
||||||
double z = this.pos.getZ() + 0.5D;
|
double z = this.pos.getZ() + 0.5D;
|
||||||
|
@ -385,19 +399,26 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
|
||||||
//@formatter:on
|
//@formatter:on
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.lidAngle < 0.0F) {
|
if (this.lidAngle < 0.0F)
|
||||||
|
{
|
||||||
this.lidAngle = 0.0F;
|
this.lidAngle = 0.0F;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean receiveClientEvent (int id, int type) {
|
public boolean receiveClientEvent(int id, int type)
|
||||||
if (id == 1) {
|
{
|
||||||
|
if (id == 1)
|
||||||
|
{
|
||||||
this.numPlayersUsing = type;
|
this.numPlayersUsing = type;
|
||||||
} else if (id == 2) {
|
}
|
||||||
|
else if (id == 2)
|
||||||
|
{
|
||||||
this.facing = EnumFacing.VALUES[type];
|
this.facing = EnumFacing.VALUES[type];
|
||||||
} else if (id == 3) {
|
}
|
||||||
|
else if (id == 3)
|
||||||
|
{
|
||||||
this.facing = EnumFacing.VALUES[type & 0x7];
|
this.facing = EnumFacing.VALUES[type & 0x7];
|
||||||
this.numPlayersUsing = (type & 0xF8) >> 3;
|
this.numPlayersUsing = (type & 0xF8) >> 3;
|
||||||
}
|
}
|
||||||
|
@ -406,196 +427,220 @@ public class TileEntityIronChest extends TileEntityLockableLoot implements ITick
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void openInventory (EntityPlayer player) {
|
public void openInventory(EntityPlayer player)
|
||||||
if (!player.isSpectator()) {
|
{
|
||||||
if (this.worldObj == null) {
|
if (!player.isSpectator())
|
||||||
|
{
|
||||||
|
if (this.worldObj == null)
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.numPlayersUsing < 0) {
|
if (this.numPlayersUsing < 0)
|
||||||
|
{
|
||||||
this.numPlayersUsing = 0;
|
this.numPlayersUsing = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
++this.numPlayersUsing;
|
++this.numPlayersUsing;
|
||||||
|
|
||||||
this.worldObj.addBlockEvent(this.pos, IronChest.ironChestBlock, 1, this.numPlayersUsing);
|
this.worldObj.addBlockEvent(this.pos, IronChest.ironChestBlock, 1, this.numPlayersUsing);
|
||||||
this.worldObj.notifyNeighborsOfStateChange(this.pos, IronChest.ironChestBlock);
|
this.worldObj.notifyNeighborsOfStateChange(this.pos, IronChest.ironChestBlock, false);
|
||||||
this.worldObj.notifyNeighborsOfStateChange(this.pos.down(), IronChest.ironChestBlock);
|
this.worldObj.notifyNeighborsOfStateChange(this.pos.down(), IronChest.ironChestBlock, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void closeInventory (EntityPlayer player) {
|
public void closeInventory(EntityPlayer player)
|
||||||
if (!player.isSpectator()) {
|
{
|
||||||
if (this.worldObj == null) {
|
if (!player.isSpectator())
|
||||||
|
{
|
||||||
|
if (this.worldObj == null)
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
--this.numPlayersUsing;
|
--this.numPlayersUsing;
|
||||||
|
|
||||||
this.worldObj.addBlockEvent(this.pos, IronChest.ironChestBlock, 1, this.numPlayersUsing);
|
this.worldObj.addBlockEvent(this.pos, IronChest.ironChestBlock, 1, this.numPlayersUsing);
|
||||||
this.worldObj.notifyNeighborsOfStateChange(this.pos, IronChest.ironChestBlock);
|
this.worldObj.notifyNeighborsOfStateChange(this.pos, IronChest.ironChestBlock, false);
|
||||||
this.worldObj.notifyNeighborsOfStateChange(this.pos.down(), IronChest.ironChestBlock);
|
this.worldObj.notifyNeighborsOfStateChange(this.pos.down(), IronChest.ironChestBlock, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack[] getTopItemStacks () {
|
//public ItemStack[] getTopItemStacks()
|
||||||
return this.topStacks;
|
//{
|
||||||
}
|
// return this.topStacks;
|
||||||
|
//}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SPacketUpdateTileEntity getUpdatePacket () {
|
public SPacketUpdateTileEntity getUpdatePacket()
|
||||||
|
{
|
||||||
NBTTagCompound compound = new NBTTagCompound();
|
NBTTagCompound compound = new NBTTagCompound();
|
||||||
|
|
||||||
compound.setByte("facing", (byte) this.facing.ordinal());
|
compound.setByte("facing", (byte) this.facing.ordinal());
|
||||||
|
|
||||||
ItemStack[] stacks = this.buildItemStackDataList();
|
/*ItemStack[] stacks = this.buildItemStackDataList();
|
||||||
|
|
||||||
if (stacks != null) {
|
if (stacks != null)
|
||||||
|
{
|
||||||
NBTTagList itemList = new NBTTagList();
|
NBTTagList itemList = new NBTTagList();
|
||||||
|
|
||||||
for (int slot = 0; slot < stacks.length; slot++) {
|
for (int slot = 0; slot < stacks.length; slot++)
|
||||||
if (stacks[slot] != null) {
|
{
|
||||||
|
if (stacks[slot] != null)
|
||||||
|
{
|
||||||
NBTTagCompound item = new NBTTagCompound();
|
NBTTagCompound item = new NBTTagCompound();
|
||||||
|
|
||||||
item.setByte("Slot", (byte) slot);
|
item.setByte("Slot", (byte) slot);
|
||||||
|
|
||||||
stacks[slot].writeToNBT(item);
|
stacks[slot].writeToNBT(item);
|
||||||
|
|
||||||
itemList.appendTag(item);
|
itemList.appendTag(item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
compound.setTag("stacks", itemList);
|
compound.setTag("stacks", itemList);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
return new SPacketUpdateTileEntity(this.pos, 0, compound);
|
return new SPacketUpdateTileEntity(this.pos, 0, compound);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDataPacket (NetworkManager net, SPacketUpdateTileEntity pkt) {
|
public void onDataPacket(NetworkManager net, SPacketUpdateTileEntity pkt)
|
||||||
if (pkt.getTileEntityType() == 0) {
|
{
|
||||||
|
if (pkt.getTileEntityType() == 0)
|
||||||
|
{
|
||||||
NBTTagCompound compound = pkt.getNbtCompound();
|
NBTTagCompound compound = pkt.getNbtCompound();
|
||||||
|
|
||||||
this.facing = EnumFacing.VALUES[compound.getByte("facing")];
|
this.facing = EnumFacing.VALUES[compound.getByte("facing")];
|
||||||
|
|
||||||
NBTTagList itemList = compound.getTagList("stacks", Constants.NBT.TAG_COMPOUND);
|
/*NBTTagList itemList = compound.getTagList("stacks", Constants.NBT.TAG_COMPOUND);
|
||||||
|
|
||||||
ItemStack[] stacks = new ItemStack[this.topStacks.length];
|
ItemStack[] stacks = new ItemStack[this.topStacks.length];
|
||||||
|
|
||||||
for (int item = 0; item < stacks.length; item++) {
|
for (int item = 0; item < stacks.length; item++)
|
||||||
|
{
|
||||||
NBTTagCompound itemStack = itemList.getCompoundTagAt(item);
|
NBTTagCompound itemStack = itemList.getCompoundTagAt(item);
|
||||||
|
|
||||||
int slot = itemStack.getByte("Slot") & 255;
|
int slot = itemStack.getByte("Slot") & 255;
|
||||||
|
|
||||||
if (slot >= 0 && slot < stacks.length) {
|
if (slot >= 0 && slot < stacks.length)
|
||||||
|
{
|
||||||
stacks[slot] = ItemStack.loadItemStackFromNBT(itemStack);
|
stacks[slot] = ItemStack.loadItemStackFromNBT(itemStack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.getType().isTransparent() && stacks != null) {
|
if (this.getType().isTransparent() && stacks != null)
|
||||||
|
{
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
|
|
||||||
for (int i = 0; i < this.topStacks.length; i++) {
|
for (int i = 0; i < this.topStacks.length; i++)
|
||||||
if (stacks[pos] != null) {
|
{
|
||||||
|
if (stacks[pos] != null)
|
||||||
|
{
|
||||||
this.topStacks[i] = stacks[pos];
|
this.topStacks[i] = stacks[pos];
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
this.topStacks[i] = null;
|
this.topStacks[i] = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
pos++;
|
pos++;
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack[] buildItemStackDataList () {
|
/*public ItemStack[] buildItemStackDataList()
|
||||||
if (this.getType().isTransparent()) {
|
{
|
||||||
|
if (this.getType().isTransparent())
|
||||||
|
{
|
||||||
ItemStack[] sortList = new ItemStack[this.topStacks.length];
|
ItemStack[] sortList = new ItemStack[this.topStacks.length];
|
||||||
|
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
|
|
||||||
for (ItemStack is : this.topStacks) {
|
for (ItemStack is : this.topStacks)
|
||||||
if (is != null) {
|
{
|
||||||
|
if (is != null)
|
||||||
|
{
|
||||||
sortList[pos++] = is;
|
sortList[pos++] = is;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
sortList[pos++] = null;
|
sortList[pos++] = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return sortList;
|
return sortList;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Nullable
|
public boolean isItemValidForSlot(int index, ItemStack stack)
|
||||||
public ItemStack removeStackFromSlot (int index) {
|
{
|
||||||
this.fillWithLoot((EntityPlayer) null);
|
|
||||||
|
|
||||||
return ItemStackHelper.getAndRemove(this.chestContents, index);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isItemValidForSlot (int index, ItemStack stack) {
|
|
||||||
return this.getType().acceptsStack(stack);
|
return this.getType().acceptsStack(stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void rotateAround () {
|
public void rotateAround()
|
||||||
|
{
|
||||||
this.setFacing(this.facing.rotateY());
|
this.setFacing(this.facing.rotateY());
|
||||||
|
|
||||||
this.worldObj.addBlockEvent(this.pos, IronChest.ironChestBlock, 2, this.facing.ordinal());
|
this.worldObj.addBlockEvent(this.pos, IronChest.ironChestBlock, 2, this.facing.ordinal());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void wasPlaced (EntityLivingBase entityliving, ItemStack stack) {
|
public void wasPlaced(EntityLivingBase entityliving, ItemStack stack)
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removeAdornments () {
|
public void removeAdornments()
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getField (int id) {
|
public Container createContainer(InventoryPlayer playerInventory, EntityPlayer playerIn)
|
||||||
return 0;
|
{
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setField (int id, int value) {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getFieldCount () {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void clear () {
|
|
||||||
this.fillWithLoot((EntityPlayer) null);
|
|
||||||
|
|
||||||
for (int slot = 0; slot < this.chestContents.length; ++slot) {
|
|
||||||
this.chestContents[slot] = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Container createContainer (InventoryPlayer playerInventory, EntityPlayer playerIn) {
|
|
||||||
this.fillWithLoot((EntityPlayer) null);
|
this.fillWithLoot((EntityPlayer) null);
|
||||||
|
|
||||||
return new ContainerIronChest(playerInventory, this, this.chestType, this.chestType.xSize, this.chestType.ySize);
|
return new ContainerIronChest(playerInventory, this, this.chestType, this.chestType.xSize, this.chestType.ySize);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getGuiID () {
|
public String getGuiID()
|
||||||
|
{
|
||||||
return "IronChest:" + this.getType().name();
|
return "IronChest:" + this.getType().name();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canRenderBreaking () {
|
public boolean canRenderBreaking()
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public NBTTagCompound getUpdateTag () {
|
public NBTTagCompound getUpdateTag()
|
||||||
|
{
|
||||||
return this.writeToNBT(new NBTTagCompound());
|
return this.writeToNBT(new NBTTagCompound());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected NonNullList<ItemStack> func_190576_q()
|
||||||
|
{
|
||||||
|
return this.chestContents;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean func_191420_l()
|
||||||
|
{
|
||||||
|
for (ItemStack itemstack : this.chestContents)
|
||||||
|
{
|
||||||
|
if (!itemstack.func_190926_b())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,31 +12,31 @@ package cpw.mods.ironchest.client;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import com.google.common.primitives.SignedBytes;
|
|
||||||
|
|
||||||
import cpw.mods.ironchest.BlockIronChest;
|
import cpw.mods.ironchest.BlockIronChest;
|
||||||
import cpw.mods.ironchest.IronChest;
|
import cpw.mods.ironchest.IronChest;
|
||||||
import cpw.mods.ironchest.IronChestType;
|
import cpw.mods.ironchest.IronChestType;
|
||||||
import cpw.mods.ironchest.TileEntityIronChest;
|
import cpw.mods.ironchest.TileEntityIronChest;
|
||||||
import net.minecraft.block.state.IBlockState;
|
import net.minecraft.block.state.IBlockState;
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.client.model.ModelChest;
|
import net.minecraft.client.model.ModelChest;
|
||||||
import net.minecraft.client.renderer.GlStateManager;
|
import net.minecraft.client.renderer.GlStateManager;
|
||||||
import net.minecraft.client.renderer.entity.RenderEntityItem;
|
import net.minecraft.client.renderer.entity.RenderEntityItem;
|
||||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||||
import net.minecraft.entity.item.EntityItem;
|
import net.minecraft.entity.item.EntityItem;
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.util.EnumFacing;
|
import net.minecraft.util.EnumFacing;
|
||||||
|
|
||||||
public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer<TileEntityIronChest>
|
public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer<TileEntityIronChest>
|
||||||
{
|
{
|
||||||
private Random random;
|
private Random random;
|
||||||
|
|
||||||
private RenderEntityItem itemRenderer;
|
private RenderEntityItem itemRenderer;
|
||||||
|
|
||||||
private ModelChest model;
|
private ModelChest model;
|
||||||
|
|
||||||
private static float[][] shifts = { { 0.3F, 0.45F, 0.3F }, { 0.7F, 0.45F, 0.3F }, { 0.3F, 0.45F, 0.7F }, { 0.7F, 0.45F, 0.7F }, { 0.3F, 0.1F, 0.3F },
|
private static float[][] shifts = { { 0.3F, 0.45F, 0.3F }, { 0.7F, 0.45F, 0.3F }, { 0.3F, 0.45F, 0.7F }, { 0.7F, 0.45F, 0.7F }, { 0.3F, 0.1F, 0.3F },
|
||||||
{ 0.7F, 0.1F, 0.3F }, { 0.3F, 0.1F, 0.7F }, { 0.7F, 0.1F, 0.7F }, { 0.5F, 0.32F, 0.5F }, };
|
{ 0.7F, 0.1F, 0.3F }, { 0.3F, 0.1F, 0.7F }, { 0.7F, 0.1F, 0.7F }, { 0.5F, 0.32F, 0.5F }, };
|
||||||
|
|
||||||
private static EntityItem customitem = new EntityItem(null);
|
private static EntityItem customitem = new EntityItem(null);
|
||||||
|
|
||||||
private static float halfPI = (float) (Math.PI / 2D);
|
private static float halfPI = (float) (Math.PI / 2D);
|
||||||
|
|
||||||
public TileEntityIronChestRenderer()
|
public TileEntityIronChestRenderer()
|
||||||
|
@ -141,7 +141,7 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer<TileE
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
GlStateManager.color(1F, 1F, 1F, 1F);
|
GlStateManager.color(1F, 1F, 1F, 1F);
|
||||||
|
|
||||||
if (type.isTransparent()
|
/*if (type.isTransparent()
|
||||||
&& tile.getDistanceSq(this.rendererDispatcher.entityX, this.rendererDispatcher.entityY, this.rendererDispatcher.entityZ) < 128d)
|
&& tile.getDistanceSq(this.rendererDispatcher.entityX, this.rendererDispatcher.entityY, this.rendererDispatcher.entityZ) < 128d)
|
||||||
{
|
{
|
||||||
this.random.setSeed(254L);
|
this.random.setSeed(254L);
|
||||||
|
@ -158,7 +158,7 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer<TileE
|
||||||
}
|
}
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
GlStateManager.translate((float) x, (float) y, (float) z);
|
GlStateManager.translate((float) x, (float) y, (float) z);
|
||||||
|
|
||||||
customitem.setWorld(this.getWorld());
|
customitem.setWorld(this.getWorld());
|
||||||
customitem.hoverStart = 0F;
|
customitem.hoverStart = 0F;
|
||||||
for (ItemStack item : tile.getTopItemStacks())
|
for (ItemStack item : tile.getTopItemStacks())
|
||||||
|
@ -181,7 +181,7 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer<TileE
|
||||||
GlStateManager.rotate(timeD, 0F, 1F, 0F);
|
GlStateManager.rotate(timeD, 0F, 1F, 0F);
|
||||||
GlStateManager.scale(blockScale, blockScale, blockScale);
|
GlStateManager.scale(blockScale, blockScale, blockScale);
|
||||||
customitem.setEntityItemStack(item);
|
customitem.setEntityItemStack(item);
|
||||||
|
|
||||||
if (this.itemRenderer == null)
|
if (this.itemRenderer == null)
|
||||||
{
|
{
|
||||||
this.itemRenderer = new RenderEntityItem(Minecraft.getMinecraft().getRenderManager(), Minecraft.getMinecraft().getRenderItem()) {
|
this.itemRenderer = new RenderEntityItem(Minecraft.getMinecraft().getRenderManager(), Minecraft.getMinecraft().getRenderItem()) {
|
||||||
|
@ -190,13 +190,13 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer<TileE
|
||||||
{
|
{
|
||||||
return SignedBytes.saturatedCast(Math.min(stack.func_190916_E() / 32, 15) + 1);
|
return SignedBytes.saturatedCast(Math.min(stack.func_190916_E() / 32, 15) + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean shouldBob()
|
public boolean shouldBob()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean shouldSpreadItems()
|
public boolean shouldSpreadItems()
|
||||||
{
|
{
|
||||||
|
@ -204,13 +204,13 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer<TileE
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
this.itemRenderer.doRender(customitem, 0D, 0D, 0D, 0F, partialTick);
|
this.itemRenderer.doRender(customitem, 0D, 0D, 0D, 0F, partialTick);
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
}
|
}*/
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,10 +10,8 @@
|
||||||
"authorList": ["cpw"],
|
"authorList": ["cpw"],
|
||||||
"credits": "By cpw, based on an original idea by Lishid",
|
"credits": "By cpw, based on an original idea by Lishid",
|
||||||
"logoFile": "",
|
"logoFile": "",
|
||||||
"screenshots": [
|
"screenshots": [],
|
||||||
],
|
|
||||||
"parent":"",
|
"parent":"",
|
||||||
"dependencies": [
|
"dependencies": []
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in New Issue