Updated createNewTileEntity method

This commit is contained in:
drcrazy 2019-02-21 00:19:11 +03:00
parent df8c2cd34b
commit 6be1fbc4e9
60 changed files with 129 additions and 74 deletions

View file

@ -42,6 +42,7 @@ import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.ToolManager;
import reborncore.client.models.ModelCompound;
@ -146,7 +147,7 @@ public class BlockAlarm extends BaseTileBlock {
@Nullable
@Override
public TileEntity createNewTileEntity(World worldIn, int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileAlarm();
}

View file

@ -38,6 +38,7 @@ import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@ -62,7 +63,7 @@ public class BlockFlare extends BlockContainer {
}
@Override
public TileEntity createNewTileEntity(World worldIn, int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
if (worldIn.isRemote) { //Only needed on the client
return new TileEntityFlare();
}

View file

@ -28,6 +28,7 @@ import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.common.multiblock.BlockMultiblockBase;
import techreborn.tiles.TileMachineCasing;
@ -52,7 +53,7 @@ public class BlockMachineCasing extends BlockMultiblockBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileMachineCasing();
}

View file

@ -41,6 +41,7 @@ import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.ChunkCache;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import net.minecraft.world.chunk.Chunk;
import net.minecraftforge.energy.CapabilityEnergy;
@ -126,7 +127,7 @@ public class BlockCable extends BlockContainer {
@Nullable
@Override
public TileEntity createNewTileEntity(World worldIn, int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileCable();
}

View file

@ -24,7 +24,9 @@
package techreborn.blocks.generator;
import net.minecraft.client.renderer.color.IBlockColor;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -45,7 +47,7 @@ public class BlockDieselGenerator extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileDieselGenerator();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.generator;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -41,7 +42,7 @@ public class BlockDragonEggSyphon extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileDragonEggSyphon();
}

View file

@ -32,6 +32,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -99,7 +100,7 @@ public class BlockFusionControlComputer extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileFusionControlComputer();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.generator;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockGasTurbine extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileGasTurbine();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.generator;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -41,7 +42,7 @@ public class BlockLightningRod extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileLightningRod();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.generator;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -45,7 +46,7 @@ public class BlockPlasmaGenerator extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TilePlasmaGenerator();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.generator;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockSemiFluidGenerator extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileSemiFluidGenerator();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.generator;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -48,7 +49,7 @@ public class BlockSolarPanel extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileSolarPanel();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.generator;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockSolidFuelGenerator extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileSolidFuelGenerator();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.generator;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockThermalGenerator extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileThermalGenerator();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.generator;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -44,7 +45,7 @@ public class BlockWaterMill extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(World worldIn, int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileWaterMill();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.generator;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -44,7 +45,7 @@ public class BlockWindMill extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(World worldIn, int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileWindMill();
}

View file

@ -40,6 +40,7 @@ import net.minecraft.util.EnumHand;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.ToolManager;
import reborncore.client.models.ModelCompound;
@ -108,7 +109,7 @@ public class BlockLamp extends BaseTileBlock {
// BaseTileBlock
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileLamp();
}

View file

@ -30,6 +30,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.common.RebornCoreConfig;
import techreborn.client.EGui;
@ -43,7 +44,7 @@ public class BlockAdjustableSU extends BlockEnergyStorage {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileAdjustableSU();
}

View file

@ -29,7 +29,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.common.RebornCoreConfig;
import techreborn.client.EGui;
@ -46,12 +46,12 @@ public class BlockHighVoltageSU extends BlockEnergyStorage {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileHighVoltageSU();
}
@Override
public void getDrops(NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
public void getDrops(NonNullList<ItemStack> drops, IBlockReader world, BlockPos pos, IBlockState state, int fortune) {
if (RebornCoreConfig.wrenchRequired) {
drops.add(new ItemStack(TRContent.MachineBlocks.ADVANCED.getFrame()));
} else {

View file

@ -32,6 +32,7 @@ import net.minecraft.util.EnumFacing;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.common.RebornCoreConfig;
import techreborn.client.EGui;
@ -45,7 +46,7 @@ public class BlockInterdimensionalSU extends BlockEnergyStorage {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileInterdimensionalSU();
}

View file

@ -36,6 +36,7 @@ import net.minecraft.util.EnumHand;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.ToolManager;
import reborncore.client.models.ModelCompound;
@ -72,7 +73,7 @@ public class BlockLSUStorage extends BaseTileBlock {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileLSUStorage();
}

View file

@ -30,6 +30,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.common.RebornCoreConfig;
import techreborn.client.EGui;
@ -43,7 +44,7 @@ public class BlockLapotronicSU extends BlockEnergyStorage {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileLapotronicSU();
}

View file

@ -25,7 +25,7 @@
package techreborn.blocks.storage;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraft.world.IBlockReader;
import techreborn.client.EGui;
import techreborn.tiles.storage.TileLowVoltageSU;
@ -39,7 +39,7 @@ public class BlockLowVoltageSU extends BlockEnergyStorage {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileLowVoltageSU();
}
}

View file

@ -30,6 +30,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.common.RebornCoreConfig;
import techreborn.client.EGui;
@ -46,7 +47,7 @@ public class BlockMediumVoltageSU extends BlockEnergyStorage {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileMediumVoltageSU();
}

View file

@ -29,6 +29,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -48,7 +49,7 @@ public class BlockIronAlloyFurnace extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileIronAlloyFurnace();
}

View file

@ -31,6 +31,7 @@ import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@ -89,7 +90,7 @@ public class BlockIronFurnace extends BlockMachineBase {
// BlockMachineBase
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileIronFurnace();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.tier1;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockAlloySmelter extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileAlloySmelter();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.tier1;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockAssemblingMachine extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileAssemblingMachine();
}

View file

@ -27,6 +27,7 @@ package techreborn.blocks.tier1;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -59,7 +60,7 @@ public class BlockAutoCraftingTable extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileAutoCraftingTable();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.tier1;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockCompressor extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileCompressor();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.tier1;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockElectricFurnace extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileElectricFurnace();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.tier1;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockExtractor extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileExtractor();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.tier1;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockGrinder extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileGrinder();
}

View file

@ -43,6 +43,7 @@ import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
@ -78,7 +79,7 @@ public class BlockPlayerDetector extends BlockMachineBase {
// BlockMachineBase
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TilePlayerDectector();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.tier1;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockRecycler extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileRecycler();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.tier1;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockRollingMachine extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileRollingMachine();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.tier1;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockScrapboxinator extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileScrapboxinator();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.tier2;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockChargeOMat extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileChargeOMat();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.tier2;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockChemicalReactor extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileChemicalReactor();
}

View file

@ -28,6 +28,7 @@ import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -48,7 +49,7 @@ public class BlockDigitalChest extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileDigitalChest();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.tier2;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockDistillationTower extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileDistillationTower();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.tier2;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockImplosionCompressor extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileImplosionCompressor();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.tier2;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockIndustrialBlastFurnace extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileIndustrialBlastFurnace();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.tier2;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockIndustrialCentrifuge extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileIndustrialCentrifuge();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.tier2;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockIndustrialElectrolyzer extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileIndustrialElectrolyzer();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.tier2;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockIndustrialGrinder extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileIndustrialGrinder();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.tier2;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockIndustrialSawmill extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileIndustrialSawmill();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.tier2;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockVacuumFreezer extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileVacuumFreezer();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.tier3;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockChunkLoader extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileChunkLoader();
}

View file

@ -27,6 +27,7 @@ package techreborn.blocks.tier3;
import net.minecraft.block.state.IBlockState;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
@ -45,7 +46,7 @@ public class BlockCreativeQuantumChest extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileCreativeQuantumChest();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.tier3;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockCreativeQuantumTank extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileCreativeQuantumTank();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.tier3;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockFluidReplicator extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileFluidReplicator();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.tier3;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockMatterFabricator extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileMatterFabricator();
}

View file

@ -28,6 +28,7 @@ import net.minecraft.block.state.IBlockState;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -48,7 +49,7 @@ public class BlockQuantumChest extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileQuantumChest();
}

View file

@ -25,6 +25,7 @@
package techreborn.blocks.tier3;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.api.tile.IMachineGuiHandler;
import reborncore.client.models.ModelCompound;
@ -42,7 +43,7 @@ public class BlockQuantumTank extends BlockMachineBase {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileQuantumTank();
}

View file

@ -30,6 +30,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.common.RebornCoreConfig;
import techreborn.init.TRContent;
@ -45,7 +46,7 @@ public class BlockHVTransformer extends BlockTransformer {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileHVTransformer();
}

View file

@ -25,7 +25,7 @@
package techreborn.blocks.transformers;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraft.world.IBlockReader;
import techreborn.tiles.transformers.TileLVTransformer;
/**
@ -38,7 +38,7 @@ public class BlockLVTransformer extends BlockTransformer {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileLVTransformer();
}
}

View file

@ -30,6 +30,7 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.NonNullList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World;
import reborncore.common.RebornCoreConfig;
import techreborn.init.TRContent;
@ -45,7 +46,7 @@ public class BlockMVTransformer extends BlockTransformer {
}
@Override
public TileEntity createNewTileEntity(final World world, final int meta) {
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileMVTransformer();
}

View file

@ -30,6 +30,7 @@ import net.minecraft.item.ItemStack;
import reborncore.api.recipe.RecipeHandler;
import techreborn.api.Reference;
import techreborn.api.recipe.machines.CentrifugeRecipe;
import techreborn.init.TRContent;
import techreborn.items.DynamicCell;
import java.security.InvalidParameterException;
@ -44,10 +45,9 @@ public class IndustrialCentrifugeRecipes extends RecipeMethods {
register(getStack(Blocks.GRASS, 16), 2500, getStack(Blocks.SAND, 8), getStack(Items.CLAY_BALL), getStack(Blocks.GRAVEL, 2), getStack(Items.WHEAT_SEEDS, 4));
register(getStack(Blocks.MYCELIUM, 8), 1640, getStack(Blocks.SAND, 4), getStack(Items.CLAY_BALL), getStack(Blocks.BROWN_MUSHROOM, 2), getStack(Blocks.RED_MUSHROOM, 2));
register(getStack(Items.GOLDEN_APPLE), 5000, getStack(Items.GOLD_INGOT, 6), getMaterial("methane", Type.CELL));
register(getStack(Items.GOLDEN_APPLE, 1, 1), 5000, getStack(Items.GOLD_INGOT, 64), getMaterial("methane", Type.CELL));
// TODO: Fix recipe
// register(getStack(Items.GOLDEN_CARROT), 5000, getStack(Items.GOLD_NUGGET, 6), getMaterial("methane", Type.CELL));
// register(getStack(Items.SPECKLED_MELON, 8), 5000, getStack(Items.GOLD_NUGGET, 6), getMaterial("methane", Type.CELL));
register(getStack(Items.ENCHANTED_GOLDEN_APPLE), 5000, getStack(Items.GOLD_INGOT, 64), getMaterial("methane", Type.CELL));
register(getStack(Items.GOLDEN_CARROT), 5000, getStack(Items.GOLD_NUGGET, 6), getMaterial("methane", Type.CELL));
register(getStack(Items.GLISTERING_MELON_SLICE, 8), 5000, getStack(Items.GOLD_NUGGET, 6), getMaterial("methane", Type.CELL));
register(getStack(Items.APPLE, 32), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.MUSHROOM_STEW, 16), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.BREAD, 64), 5000, getMaterial("methane", Type.CELL));
@ -61,9 +61,11 @@ public class IndustrialCentrifugeRecipes extends RecipeMethods {
register(getStack(Items.COOKED_MUTTON, 16), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.RABBIT, 12), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.COOKED_RABBIT, 16), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.FISH, 12), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.COOKED_FISH, 16), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.MELON, 64), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.COD, 12), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.COOKED_COD, 16), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.SALMON, 12), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.COOKED_SALMON, 16), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.MELON_SLICE, 64), 5000, getMaterial("methane", Type.CELL));
register(getStack(Blocks.PUMPKIN, 16), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.ROTTEN_FLESH, 16), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.SPIDER_EYE, 32), 5000, getMaterial("methane", Type.CELL));
@ -78,6 +80,7 @@ public class IndustrialCentrifugeRecipes extends RecipeMethods {
register(getStack(Blocks.BROWN_MUSHROOM, 32), 5000, getMaterial("methane", Type.CELL));
register(getStack(Blocks.RED_MUSHROOM, 32), 5000, getMaterial("methane", Type.CELL));
register(getStack(Items.NETHER_WART, 32), 5000, getMaterial("methane", Type.CELL));
//TODO: Fixme
// register(getMaterial("sap", 4, Type.PART), 1300, getMaterial("rubber", 14, Type.PART));
// register(getStack(ModBlocks.RUBBER_LOG, 16), 5000, false, getMaterial("sap", 8, Type.PART), getMaterial("methane", Type.CELL), getMaterial("carbon", 4, Type.CELL));
// register(getStack(Blocks.SOUL_SAND, 16), 2500, getStack(Blocks.SAND, 10), getMaterial("saltpeter", 4, Type.DUST), getMaterial("coal", Type.DUST), getMaterial("oil", Type.CELL));

View file

@ -132,7 +132,7 @@ public abstract class RecipeMethods {
}
public static ItemStack getStack(Item item, int count) {
return getStack(item, count, 0);
return new ItemStack(item, count);
}
public static ItemStack getStack(Item item, boolean wildcard) {
@ -143,10 +143,6 @@ public abstract class RecipeMethods {
return getStack(item, count, wildcard ? OreDictionary.WILDCARD_VALUE : 0);
}
public static ItemStack getStack(Item item, int count, int metadata) {
return new ItemStack(item, count, metadata);
}
public static ItemStack getStack(Block block) {
return getStack(block, 1);
}