mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-22 05:02:34 +00:00
Generics for everyone \o/
This commit is contained in:
1 parent
ac9344cbda
commit
23ed2dcaea
55 files changed
+164
-163
No files matched your search
@@ -70,7 +70,7 @@ public class ExtraTrees extends AbstractMod {
|
||||
public void postInit(final FMLPostInitializationEvent evt) {
|
||||
this.postInit();
|
||||
}
|
||||
|
||||
|
||||
@Nullable
|
||||
private static ModuleBlocks blocks;
|
||||
@Nullable
|
||||
@@ -83,7 +83,7 @@ public class ExtraTrees extends AbstractMod {
|
||||
private static ModuleMachine machine;
|
||||
@Nullable
|
||||
private static ModuleKitchen kitchen;
|
||||
|
||||
|
||||
public static ModuleItems items() {
|
||||
Preconditions.checkState(items != null);
|
||||
return items;
|
||||
@@ -93,18 +93,18 @@ public class ExtraTrees extends AbstractMod {
|
||||
Preconditions.checkState(blocks != null);
|
||||
return blocks;
|
||||
}
|
||||
|
||||
|
||||
public static ModuleAlcohol alcohol() {
|
||||
Preconditions.checkState(alcohol != null);
|
||||
return alcohol;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static ModuleCarpentry carpentry() {
|
||||
Preconditions.checkState(carpentry != null);
|
||||
return carpentry;
|
||||
}
|
||||
|
||||
|
||||
public static ModuleMachine machine() {
|
||||
Preconditions.checkState(machine != null);
|
||||
return machine;
|
||||
@@ -133,7 +133,7 @@ public class ExtraTrees extends AbstractMod {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class[] getConfigs() {
|
||||
public Class<?>[] getConfigs() {
|
||||
return new Class[]{ConfigurationMain.class};
|
||||
}
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ public class ItemDrink extends ItemFood implements IFluidContainerItem {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(final Item par1, final CreativeTabs par2CreativeTabs, final List par3List) {
|
||||
public void getSubItems(final Item par1, final CreativeTabs par2CreativeTabs, final List<ItemStack> par3List) {
|
||||
for (final Glassware glassware : Glassware.values()) {
|
||||
par3List.add(this.getStack(glassware, null));
|
||||
}
|
||||
|
||||
@@ -56,12 +56,12 @@ public class ModuleBlocks implements IInitializable {
|
||||
public List<BlockETSlab> slabsDouble;
|
||||
public List<BlockETSlab> slabsFireproof;
|
||||
public List<BlockETSlab> slabsDoubleFireproof;
|
||||
public List<BlockForestryStairs> stairs;
|
||||
public List<BlockForestryStairs> stairsFireproof;
|
||||
public List<BlockForestryStairs<EnumETLog>> stairs;
|
||||
public List<BlockForestryStairs<EnumETLog>> stairsFireproof;
|
||||
public List<BlockETFence> fences;
|
||||
public List<BlockETFence> fencesFireproof;
|
||||
public List<BlockForestryFenceGate> fenceGates;
|
||||
public List<BlockForestryFenceGate> fenceGatesFireproof;
|
||||
public List<BlockForestryFenceGate<EnumETLog>> fenceGates;
|
||||
public List<BlockForestryFenceGate<EnumETLog>> fenceGatesFireproof;
|
||||
public List<BlockETDecorativeLeaves> leavesDecorative;
|
||||
public Map<String, ItemStack> speciesToLeavesDecorative;
|
||||
public Block blockDoor;
|
||||
@@ -69,21 +69,21 @@ public class ModuleBlocks implements IInitializable {
|
||||
public BlockHedge blockHedge;
|
||||
//????
|
||||
public Block blockBranch;
|
||||
|
||||
|
||||
@Override
|
||||
public void preInit() {
|
||||
PlankType.setup();
|
||||
|
||||
|
||||
//TODO: clean up
|
||||
logs = BlockETLog.create(false);
|
||||
for (BlockETLog block : logs) {
|
||||
ExtraTrees.proxy.registerBlock(block, new ItemBlockETWood(block));
|
||||
ExtraTrees.proxy.registerBlock(block, new ItemBlockETWood<>(block));
|
||||
registerOreDictWildcard(OreDictUtil.LOG_WOOD, block);
|
||||
}
|
||||
|
||||
logsFireproof = BlockETLog.create(true);
|
||||
for (BlockETLog block : logsFireproof) {
|
||||
ExtraTrees.proxy.registerBlock(block, new ItemBlockETWood(block));
|
||||
ExtraTrees.proxy.registerBlock(block, new ItemBlockETWood<>(block));
|
||||
registerOreDictWildcard(OreDictUtil.LOG_WOOD, block);
|
||||
}
|
||||
|
||||
@@ -91,22 +91,22 @@ public class ModuleBlocks implements IInitializable {
|
||||
|
||||
woodAccess.registerLogs(logs);
|
||||
woodAccess.registerLogs(logsFireproof);
|
||||
|
||||
|
||||
planks = BlockETPlank.create(false);
|
||||
for (BlockETPlank block : planks) {
|
||||
ExtraTrees.proxy.registerBlock(block, new ItemBlockETWood(block));
|
||||
ExtraTrees.proxy.registerBlock(block, new ItemBlockETWood<>(block));
|
||||
registerOreDictWildcard(OreDictUtil.PLANK_WOOD, block);
|
||||
}
|
||||
|
||||
planksFireproof = BlockETPlank.create(true);
|
||||
for (BlockETPlank block : planksFireproof) {
|
||||
ExtraTrees.proxy.registerBlock(block, new ItemBlockETWood(block));
|
||||
ExtraTrees.proxy.registerBlock(block, new ItemBlockETWood<>(block));
|
||||
registerOreDictWildcard(OreDictUtil.PLANK_WOOD, block);
|
||||
}
|
||||
|
||||
woodAccess.registerPlanks(planks);
|
||||
woodAccess.registerPlanks(planksFireproof);
|
||||
|
||||
|
||||
slabs = BlockETSlab.create(false, false);
|
||||
slabsDouble = BlockETSlab.create(false, true);
|
||||
for (int i = 0; i < slabs.size(); i++) {
|
||||
@@ -128,18 +128,18 @@ public class ModuleBlocks implements IInitializable {
|
||||
}
|
||||
woodAccess.registerSlabs(slabs);
|
||||
woodAccess.registerSlabs(slabsFireproof);
|
||||
|
||||
|
||||
stairs = new ArrayList<>();
|
||||
for (BlockETPlank plank : planks) {
|
||||
for (IBlockState blockState : plank.getBlockState().getValidStates()) {
|
||||
int meta = plank.getMetaFromState(blockState);
|
||||
EnumETLog woodType = plank.getWoodType(meta);
|
||||
|
||||
BlockForestryStairs stair = new BlockForestryStairs(false, blockState, woodType);
|
||||
BlockForestryStairs<EnumETLog> stair = new BlockForestryStairs<>(false, blockState, woodType);
|
||||
String name = "stairs." + woodType;
|
||||
stair.setRegistryName(new ResourceLocation(Constants.EXTRA_TREES_MOD_ID, name));
|
||||
stair.setUnlocalizedName(name);
|
||||
ExtraTrees.proxy.registerBlock(stair, new ItemBlockETWood(stair));
|
||||
ExtraTrees.proxy.registerBlock(stair, new ItemBlockETWood<>(stair));
|
||||
stairs.add(stair);
|
||||
registerOreDictWildcard(OreDictUtil.STAIR_WOOD, stair);
|
||||
}
|
||||
@@ -151,61 +151,62 @@ public class ModuleBlocks implements IInitializable {
|
||||
int meta = plank.getMetaFromState(blockState);
|
||||
EnumETLog woodType = plank.getWoodType(meta);
|
||||
|
||||
BlockForestryStairs stair = new BlockForestryStairs(true, blockState, woodType);
|
||||
BlockForestryStairs<EnumETLog> stair = new BlockForestryStairs<>(true, blockState, woodType);
|
||||
String name = "stairs.fireproof." + woodType;
|
||||
stair.setRegistryName(new ResourceLocation(Constants.EXTRA_TREES_MOD_ID, name));
|
||||
stair.setUnlocalizedName(name);
|
||||
ExtraTrees.proxy.registerBlock(stair, new ItemBlockETWood(stair));
|
||||
ExtraTrees.proxy.registerBlock(stair, new ItemBlockETWood<>(stair));
|
||||
stairsFireproof.add(stair);
|
||||
registerOreDictWildcard(OreDictUtil.STAIR_WOOD, stair);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
woodAccess.registerStairs(stairs);
|
||||
woodAccess.registerStairs(stairsFireproof);
|
||||
|
||||
|
||||
fences = BlockETFence.create(false);
|
||||
for (BlockETFence block : fences) {
|
||||
ExtraTrees.proxy.registerBlock(block, new ItemBlockETWood(block));
|
||||
ExtraTrees.proxy.registerBlock(block, new ItemBlockETWood<>(block));
|
||||
registerOreDictWildcard(OreDictUtil.FENCE_WOOD, block);
|
||||
FMLInterModComms.sendMessage("forestry", "add-fence-block", block.getRegistryName().toString());
|
||||
}
|
||||
|
||||
fencesFireproof = BlockETFence.create(true);
|
||||
for (BlockETFence block : fencesFireproof) {
|
||||
ExtraTrees.proxy.registerBlock(block, new ItemBlockETWood(block));
|
||||
ExtraTrees.proxy.registerBlock(block, new ItemBlockETWood<>(block));
|
||||
registerOreDictWildcard(OreDictUtil.FENCE_WOOD, block);
|
||||
FMLInterModComms.sendMessage("forestry", "add-fence-block", block.getRegistryName().toString());
|
||||
}
|
||||
|
||||
|
||||
woodAccess.registerFences(fences);
|
||||
woodAccess.registerFences(fencesFireproof);
|
||||
|
||||
|
||||
fenceGates = new ArrayList<>();
|
||||
fenceGatesFireproof = new ArrayList<>();
|
||||
for (PlankType.ExtraTreePlanks plankType : PlankType.ExtraTreePlanks.VALUES) {
|
||||
EnumETLog woodType = plankType.getWoodType();
|
||||
BlockForestryFenceGate fenceGate = new BlockForestryFenceGate(false, woodType);
|
||||
BlockForestryFenceGate<EnumETLog> fenceGate = new BlockForestryFenceGate<>(false, woodType);
|
||||
String name = "fence.gates." + woodType;
|
||||
fenceGate.setRegistryName(new ResourceLocation(Constants.EXTRA_TREES_MOD_ID, name));
|
||||
fenceGate.setUnlocalizedName(name);
|
||||
ExtraTrees.proxy.registerBlock(fenceGate, new ItemBlockETWood(fenceGate));
|
||||
ExtraTrees.proxy.registerBlock(fenceGate, new ItemBlockETWood<>(fenceGate));
|
||||
registerOreDictWildcard(OreDictUtil.FENCE_GATE_WOOD, fenceGate);
|
||||
fenceGates.add(fenceGate);
|
||||
FMLInterModComms.sendMessage("forestry", "add-fence-block", fenceGate.getRegistryName().toString());
|
||||
|
||||
BlockForestryFenceGate fenceGateFireproof = new BlockForestryFenceGate(true, woodType);
|
||||
BlockForestryFenceGate<EnumETLog> fenceGateFireproof = new BlockForestryFenceGate<>(true, woodType);
|
||||
String nameFireproof = "fence.gates.fireproof." + woodType;
|
||||
fenceGateFireproof.setRegistryName(new ResourceLocation(Constants.EXTRA_TREES_MOD_ID, nameFireproof));
|
||||
fenceGateFireproof.setUnlocalizedName(nameFireproof);
|
||||
ExtraTrees.proxy.registerBlock(fenceGateFireproof, new ItemBlockETWood(fenceGateFireproof));
|
||||
ExtraTrees.proxy.registerBlock(fenceGateFireproof, new ItemBlockETWood<>(fenceGateFireproof));
|
||||
registerOreDictWildcard(OreDictUtil.FENCE_GATE_WOOD, fenceGateFireproof);
|
||||
fenceGatesFireproof.add(fenceGateFireproof);
|
||||
FMLInterModComms.sendMessage("forestry", "add-fence-block", fenceGateFireproof.getRegistryName().toString());
|
||||
}
|
||||
|
||||
woodAccess.registerFenceGates(fenceGates);
|
||||
woodAccess.registerFenceGates(fenceGatesFireproof);
|
||||
|
||||
//Forestry's API doesn't allow typed lists to be registered, but making a new one allows us to get away with it
|
||||
woodAccess.registerFenceGates(new ArrayList<>(fenceGates));
|
||||
woodAccess.registerFenceGates(new ArrayList<>(fenceGatesFireproof));
|
||||
|
||||
blockMultiFence = new BlockMultiFence();
|
||||
GameRegistry.register(blockMultiFence);
|
||||
@@ -304,16 +305,16 @@ public class ModuleBlocks implements IInitializable {
|
||||
public void addSqueezer(final IWoodType log, final ILiquidType liquid, final int amount) {
|
||||
this.addSqueezer(log, liquid, amount, 0.5f);
|
||||
}
|
||||
|
||||
|
||||
private static void addRecipeAtPosition(int position, IRecipe recipe){
|
||||
CraftingManager manager = CraftingManager.getInstance();
|
||||
manager.getRecipeList().add(position, recipe);
|
||||
}
|
||||
|
||||
|
||||
private static void registerOreDictWildcard(String oreDictName, Block block) {
|
||||
OreDictionary.registerOre(oreDictName, new ItemStack(block, 1, OreDictionary.WILDCARD_VALUE));
|
||||
}
|
||||
|
||||
|
||||
public static ItemStack getDecorativeLeaves(String speciesUid) {
|
||||
ItemStack itemStack = ExtraTrees.blocks().speciesToLeavesDecorative.get(speciesUid);
|
||||
if (itemStack == null) {
|
||||
|
||||
@@ -69,7 +69,7 @@ public class BlockHedge extends Block implements IBlockFence, IColoredBlock {
|
||||
}
|
||||
addCollisionBoxToList(pos, entityBox, collidingBoxes, new AxisAlignedBB(f, 0.0f, f3, f2, 1.0f, f4));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess world, BlockPos pos) {
|
||||
final boolean connectNegZ = this.canConnectFenceTo(world, pos.north());
|
||||
@@ -94,17 +94,17 @@ public class BlockHedge extends Block implements IBlockFence, IColoredBlock {
|
||||
}
|
||||
return new AxisAlignedBB(f, 0.0f, f3, f2, 1.0f, f4);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube(IBlockState state) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isFullCube(IBlockState state) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isPassable(IBlockAccess worldIn, BlockPos pos) {
|
||||
return false;
|
||||
@@ -120,7 +120,7 @@ public class BlockHedge extends Block implements IBlockFence, IColoredBlock {
|
||||
Block block = state.getBlock();
|
||||
return block == this || canConnectTo(world, pos) || block.isLeaves(state, world, pos) || (state.getMaterial().isOpaque() && state.isFullCube() && state.getMaterial() != Material.GOURD);
|
||||
}
|
||||
|
||||
|
||||
private boolean canConnectTo(IBlockAccess worldIn, BlockPos pos) {
|
||||
IBlockState state = worldIn.getBlockState(pos);
|
||||
Block block = state.getBlock();
|
||||
@@ -129,7 +129,7 @@ public class BlockHedge extends Block implements IBlockFence, IColoredBlock {
|
||||
}
|
||||
|
||||
if (block != Blocks.BARRIER) {
|
||||
Material blockMaterial = block.getMaterial(state);
|
||||
Material blockMaterial = state.getMaterial();
|
||||
if (block instanceof BlockFence || block instanceof BlockFenceGate || block instanceof IBlockFence) {
|
||||
return blockMaterial == this.blockMaterial;
|
||||
}
|
||||
@@ -163,7 +163,7 @@ public class BlockHedge extends Block implements IBlockFence, IColoredBlock {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(final Item item, final CreativeTabs tab, final List list) {
|
||||
public void getSubBlocks(final Item item, final CreativeTabs tab, final List<ItemStack> list) {
|
||||
for (int i = 0; i < 6; ++i) {
|
||||
for (int f = 0; f < 2; ++f) {
|
||||
list.add(new ItemStack(item, 1, i + f * 8));
|
||||
|
||||
@@ -110,12 +110,12 @@ public abstract class BlockDesign extends BlockMetadata implements IMultipassBlo
|
||||
public DesignBlock getCarpentryBlock(final IBlockAccess world, final BlockPos pos) {
|
||||
return ModuleCarpentry.getDesignBlock(this.getDesignSystem(), TileEntityMetadata.getTileMetadata(world, pos));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canRenderInLayer(BlockRenderLayer layer) {
|
||||
return layer == BlockRenderLayer.CUTOUT_MIPPED;
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public int colorMultiplier(IBlockState state, IBlockAccess world, BlockPos pos, int tintIndex) {
|
||||
@@ -128,7 +128,7 @@ public abstract class BlockDesign extends BlockMetadata implements IMultipassBlo
|
||||
}
|
||||
return block.getPrimaryColour();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced) {
|
||||
DesignBlock block = ModuleCarpentry.getDesignBlock(this.getDesignSystem(), TileEntityMetadata.getItemDamage(stack));
|
||||
@@ -162,13 +162,13 @@ public abstract class BlockDesign extends BlockMetadata implements IMultipassBlo
|
||||
final DesignBlock block = ModuleCarpentry.getDesignBlock(this.getDesignSystem(), tileMetadata);
|
||||
return block.getItemMetadata(this.getDesignSystem());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public EnumBlockRenderType getRenderType(IBlockState state){
|
||||
return EnumBlockRenderType.MODEL;
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerStateMapper() {
|
||||
@@ -177,34 +177,34 @@ public abstract class BlockDesign extends BlockMetadata implements IMultipassBlo
|
||||
ModelManager.registerCustomBlockModel(new BlockModelEntry(
|
||||
new ModelResourceLocation(registryName, "normal"),
|
||||
new ModelResourceLocation(registryName, "inventory"),
|
||||
new ModelMutlipass(BlockDesign.class), this));
|
||||
new ModelMutlipass<>(BlockDesign.class), this));
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerModel(Item item, IModelManager manager) {
|
||||
manager.registerItemModel(item, new DesignMeshDefinition());
|
||||
}
|
||||
|
||||
|
||||
private class DesignMeshDefinition implements ItemMeshDefinition{
|
||||
|
||||
@Override
|
||||
public ModelResourceLocation getModelLocation(ItemStack stack) {
|
||||
return new ModelResourceLocation(getRegistryName(), "inventory");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState() {
|
||||
return new ExtendedBlockState(this, new IProperty[0], new IUnlistedProperty[]{UnlistedBlockPos.POS, UnlistedBlockAccess.BLOCKACCESS});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos) {
|
||||
return ((IExtendedBlockState)state).withProperty(UnlistedBlockPos.POS, pos).withProperty(UnlistedBlockAccess.BLOCKACCESS, world);
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public int getRenderPasses() {
|
||||
@@ -234,7 +234,7 @@ public abstract class BlockDesign extends BlockMetadata implements IMultipassBlo
|
||||
if(facing == null){
|
||||
return block.getPrimarySprite(getDesignSystem(), BlockDesign.RENDER_DIRECTIONS[0]);
|
||||
}
|
||||
|
||||
|
||||
if(pass > 0){
|
||||
return block.getSecondarySprite(getDesignSystem(), BlockDesign.RENDER_DIRECTIONS[facing.ordinal()]);
|
||||
}
|
||||
|
||||
+2
-3
@@ -10,10 +10,9 @@ import mezz.jei.api.gui.IGuiItemStackGroup;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
import mezz.jei.api.ingredients.IIngredients;
|
||||
import mezz.jei.api.recipe.BlankRecipeCategory;
|
||||
import mezz.jei.api.recipe.IRecipeWrapper;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
public class FruitPressRecipeCategory extends BlankRecipeCategory {
|
||||
public class FruitPressRecipeCategory extends BlankRecipeCategory<FruitPressRecipeWrapper> {
|
||||
private final IDrawableAnimated arrowAnimated;
|
||||
|
||||
public FruitPressRecipeCategory() {
|
||||
@@ -49,7 +48,7 @@ public class FruitPressRecipeCategory extends BlankRecipeCategory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRecipe(IRecipeLayout recipeLayout, IRecipeWrapper recipeWrapper, IIngredients ingredients) {
|
||||
public void setRecipe(IRecipeLayout recipeLayout, FruitPressRecipeWrapper recipeWrapper, IIngredients ingredients) {
|
||||
IDrawable tankOverlay = ExtraTreesJeiPlugin.drawables.getTankOverlay();
|
||||
IGuiFluidStackGroup fluidStacks = recipeLayout.getFluidStacks();
|
||||
fluidStacks.init(FruitPressMachine.TANK_OUTPUT, false, 55, 1, 16, 58, 1000, false, tankOverlay);
|
||||
|
||||
@@ -36,7 +36,7 @@ public enum ExtraTreeItems implements IItemMiscProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(final List par3List) {
|
||||
public void addInformation(final List<String> par3List) {
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -77,7 +77,7 @@ public enum Food implements IItemMiscProvider {
|
||||
CANDLENUT(0);
|
||||
|
||||
public static Food[] VALUES = values();
|
||||
|
||||
|
||||
int hunger;
|
||||
private List<String> ores;
|
||||
|
||||
@@ -119,7 +119,7 @@ public enum Food implements IItemMiscProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(final List par3List) {
|
||||
public void addInformation(final List<String> par3List) {
|
||||
}
|
||||
|
||||
public void addJuice(final Juice juice, final int time, final int amount, final int mulch) {
|
||||
|
||||
@@ -27,7 +27,7 @@ public class ItemArboristDatabase extends Item implements IItemModelRegister {
|
||||
this.setMaxStackSize(1);
|
||||
setRegistryName("databaseTree");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced) {
|
||||
@@ -39,7 +39,7 @@ public class ItemArboristDatabase extends Item implements IItemModelRegister {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(final Item par1, final CreativeTabs par2CreativeTabs, final List par3List) {
|
||||
public void getSubItems(final Item par1, final CreativeTabs par2CreativeTabs, final List<ItemStack> par3List) {
|
||||
super.getSubItems(par1, par2CreativeTabs, par3List);
|
||||
par3List.add(new ItemStack(par1, 1, 1));
|
||||
}
|
||||
|
||||
@@ -20,14 +20,14 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import java.util.List;
|
||||
|
||||
public class ItemMothDatabase extends Item implements IItemModelRegister {
|
||||
|
||||
|
||||
public ItemMothDatabase() {
|
||||
this.setCreativeTab(Tabs.tabLepidopterology);
|
||||
this.setUnlocalizedName("databaseMoth");
|
||||
this.setMaxStackSize(1);
|
||||
setRegistryName("databaseMoth");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerModel(Item item, IModelManager manager) {
|
||||
@@ -46,7 +46,7 @@ public class ItemMothDatabase extends Item implements IItemModelRegister {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(final Item par1, final CreativeTabs par2CreativeTabs, final List par3List) {
|
||||
public void getSubItems(final Item par1, final CreativeTabs par2CreativeTabs, final List<ItemStack> par3List) {
|
||||
super.getSubItems(par1, par2CreativeTabs, par3List);
|
||||
par3List.add(new ItemStack(par1, 1, 1));
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ public class MachineRendererForestry {
|
||||
|
||||
private static void loadMethod(final String file, final boolean waterTank, final boolean productTank) {
|
||||
try {
|
||||
final Class clss = Class.forName("forestry.core.render.RenderMachine");
|
||||
final Class<?> clss = Class.forName("forestry.core.render.RenderMachine");
|
||||
final Object instance = clss.getConstructor(String.class).newInstance(file);
|
||||
//MachineRendererForestry.renderMethod = clss.getDeclaredMethod("render", TankRenderInfo.class, TankRenderInfo.class, ForgeDirection.class, Double.TYPE, Double.TYPE, Double.TYPE);
|
||||
MachineRendererForestry.renderMethod.setAccessible(true);
|
||||
|
||||
Reference in new issue
Block a user