Remove unused imports, re-add invtweaks, update to new mcp mappings
This commit is contained in:
parent
3f69b703cd
commit
82c2dcc995
|
@ -12,6 +12,9 @@ import java.lang.annotation.Target;
|
|||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
public @interface ChestContainer {
|
||||
// Set to true if the Inventory Tweaks sorting buttons should be shown for this container.
|
||||
boolean showButtons() default true;
|
||||
|
||||
// Size of a chest row
|
||||
int rowSize() default 9;
|
||||
|
||||
|
@ -25,4 +28,11 @@ public @interface ChestContainer {
|
|||
@Target(ElementType.METHOD)
|
||||
public @interface RowSizeCallback {
|
||||
}
|
||||
|
||||
// Annotation for method to get size of a chest row if it is not a fixed size for this container class
|
||||
// Signature int func()
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.METHOD)
|
||||
public @interface IsLargeCallback {
|
||||
}
|
||||
}
|
|
@ -10,6 +10,7 @@
|
|||
******************************************************************************/
|
||||
package cpw.mods.ironchest;
|
||||
|
||||
import invtweaks.api.container.ChestContainer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
|
@ -17,7 +18,7 @@ import net.minecraft.inventory.IInventory;
|
|||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
//@ChestContainer(isLargeChest = true)
|
||||
@ChestContainer(isLargeChest = true)
|
||||
public class ContainerIronChest extends Container {
|
||||
private IronChestType type;
|
||||
private EntityPlayer player;
|
||||
|
@ -117,7 +118,7 @@ public class ContainerIronChest extends Container {
|
|||
return player;
|
||||
}
|
||||
|
||||
//@ChestContainer.RowSizeCallback
|
||||
@ChestContainer.RowSizeCallback
|
||||
public int getNumColumns() {
|
||||
return type.getRowLength();
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ public class IronChest
|
|||
ironChestBlock = new BlockIronChest();
|
||||
RegistryHelper.registerBlock(ironChestBlock, ItemIronChest.class, "BlockIronChest");
|
||||
|
||||
if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getModelManager().getBlockModelShapes().func_178123_a(ironChestBlock);
|
||||
if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getModelManager().getBlockModelShapes().registerBuiltInBlocks(ironChestBlock);
|
||||
|
||||
for (IronChestType typ : IronChestType.values())
|
||||
{
|
||||
|
|
|
@ -12,7 +12,6 @@ package cpw.mods.ironchest;
|
|||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
|
|
@ -10,9 +10,7 @@
|
|||
******************************************************************************/
|
||||
package cpw.mods.ironchest.client;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityItemStackRenderer;
|
||||
import net.minecraft.client.resources.IReloadableResourceManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
|
|
|
@ -136,7 +136,7 @@ public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer
|
|||
GlStateManager.popMatrix();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
if (type.isTransparent() && tile.getDistanceSq(this.rendererDispatcher.field_147560_j, this.rendererDispatcher.field_147561_k, this.rendererDispatcher.field_147558_l) < 128d) {
|
||||
if (type.isTransparent() && tile.getDistanceSq(this.rendererDispatcher.entityX, this.rendererDispatcher.entityY, this.rendererDispatcher.entityZ) < 128d) {
|
||||
random.setSeed(254L);
|
||||
float shiftX;
|
||||
float shiftY;
|
||||
|
|
Loading…
Reference in New Issue