Moved power system to RC and spawn trees in groups
This commit is contained in:
parent
891d2cce32
commit
71c2bfee7f
115 changed files with 296 additions and 1630 deletions
|
@ -4,16 +4,20 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileChunkLoader;
|
||||
|
||||
public class BlockChunkLoader extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
||||
|
||||
public BlockChunkLoader(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.chunkloader");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,15 +3,19 @@ package techreborn.blocks;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
|
||||
public class BlockComputerCube extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
||||
|
||||
public BlockComputerCube(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.computercube");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -4,15 +4,19 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileDigitalChest;
|
||||
|
||||
public class BlockDigitalChest extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
||||
public BlockDigitalChest() {
|
||||
super(Material.rock);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.digitalChest");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,14 +1,18 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
|
||||
|
||||
public class BlockElectricCraftingTable extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
||||
|
||||
public BlockElectricCraftingTable(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.electriccraftingtable");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
private final String prefix = "techreborn:blocks/machine/";
|
||||
|
|
|
@ -3,13 +3,16 @@ package techreborn.blocks;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
|
||||
public class BlockFusionCoil extends BlockMachineBase {
|
||||
|
||||
|
||||
public BlockFusionCoil(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.fusioncoil");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -5,8 +5,11 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.fusionReactor.TileEntityFusionController;
|
||||
|
||||
public class BlockFusionControlComputer extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
@ -14,8 +17,9 @@ public class BlockFusionControlComputer extends BlockMachineBase implements IAdv
|
|||
|
||||
|
||||
public BlockFusionControlComputer(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.fusioncontrolcomputer");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,12 +3,15 @@ package techreborn.blocks;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
|
||||
public class BlockHighlyAdvancedMachine extends BlockMachineBase {
|
||||
|
||||
public BlockHighlyAdvancedMachine(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.highlyAdvancedMachine");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
private final String prefix = "techreborn:blocks/machine/";
|
||||
|
|
|
@ -1,422 +0,0 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import me.modmuss50.jsonDestroyer.api.ITexturedBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockDynamicLiquid;
|
||||
import net.minecraft.block.BlockStaticLiquid;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyBool;
|
||||
import net.minecraft.block.properties.PropertyDirection;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.*;
|
||||
import reborncore.common.BaseTileBlock;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.tiles.TileMachineBase;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
public abstract class BlockMachineBase extends BaseTileBlock implements ITexturedBlock {
|
||||
|
||||
public static PropertyDirection FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);
|
||||
public static PropertyBool ACTIVE = PropertyBool.create("active");
|
||||
|
||||
public BlockMachineBase(Material material) {
|
||||
super(Material.rock);
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
setHardness(2f);
|
||||
setStepSound(soundTypeMetal);
|
||||
this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVE, false));
|
||||
}
|
||||
|
||||
protected BlockState createBlockState() {
|
||||
|
||||
FACING = PropertyDirection.create("facing", EnumFacing.Plane.HORIZONTAL);
|
||||
ACTIVE = PropertyBool.create("active");
|
||||
return new BlockState(this, FACING, ACTIVE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||
return new TileMachineBase();
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void onBlockAdded(World world, int x, int y, int z) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) {
|
||||
super.onBlockAdded(worldIn, pos, state);
|
||||
onBlockAdded(worldIn, pos.getX(), pos.getY(), pos.getZ());
|
||||
this.setDefaultFacing(worldIn, pos, state);
|
||||
}
|
||||
|
||||
private void setDefaultFacing(World worldIn, BlockPos pos, IBlockState state)
|
||||
{
|
||||
if (!worldIn.isRemote)
|
||||
{
|
||||
Block block = worldIn.getBlockState(pos.north()).getBlock();
|
||||
Block block1 = worldIn.getBlockState(pos.south()).getBlock();
|
||||
Block block2 = worldIn.getBlockState(pos.west()).getBlock();
|
||||
Block block3 = worldIn.getBlockState(pos.east()).getBlock();
|
||||
EnumFacing enumfacing = (EnumFacing)state.getValue(FACING);
|
||||
|
||||
if (enumfacing == EnumFacing.NORTH && block.isFullBlock() && !block1.isFullBlock())
|
||||
{
|
||||
enumfacing = EnumFacing.SOUTH;
|
||||
}
|
||||
else if (enumfacing == EnumFacing.SOUTH && block1.isFullBlock() && !block.isFullBlock())
|
||||
{
|
||||
enumfacing = EnumFacing.NORTH;
|
||||
}
|
||||
else if (enumfacing == EnumFacing.WEST && block2.isFullBlock() && !block3.isFullBlock())
|
||||
{
|
||||
enumfacing = EnumFacing.EAST;
|
||||
}
|
||||
else if (enumfacing == EnumFacing.EAST && block3.isFullBlock() && !block2.isFullBlock())
|
||||
{
|
||||
enumfacing = EnumFacing.WEST;
|
||||
}
|
||||
|
||||
worldIn.setBlockState(pos, state.withProperty(FACING, enumfacing), 2);
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z,
|
||||
EntityLivingBase player, ItemStack itemstack) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
|
||||
super.onBlockPlacedBy(worldIn, pos, state, placer, stack);
|
||||
onBlockPlacedBy(worldIn, pos.getX(), pos.getY(), pos.getZ(), placer, stack);
|
||||
setFacing(placer.getHorizontalFacing().getOpposite(), worldIn, pos);
|
||||
}
|
||||
|
||||
public boolean canCreatureSpawn(EnumCreatureType type, World world, int x,
|
||||
int y, int z) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World worldIn, BlockPos pos, IBlockState state) {
|
||||
super.breakBlock(worldIn, pos, state);
|
||||
breakBlock(worldIn, pos.getX(), pos.getY(), pos.getZ(), state.getBlock(), 0);
|
||||
dropInventory(worldIn, pos);
|
||||
}
|
||||
|
||||
protected void dropInventory(World world, BlockPos pos) {
|
||||
TileEntity tileEntity = world.getTileEntity(pos);
|
||||
|
||||
if (!(tileEntity instanceof IInventory)) {
|
||||
return;
|
||||
}
|
||||
|
||||
IInventory inventory = (IInventory) tileEntity;
|
||||
|
||||
for (int i = 0; i < inventory.getSizeInventory(); i++) {
|
||||
ItemStack itemStack = inventory.getStackInSlot(i);
|
||||
|
||||
if (itemStack != null && itemStack.stackSize > 0) {
|
||||
if (itemStack.getItem() instanceof ItemBlock) {
|
||||
if (((ItemBlock) itemStack.getItem()).block instanceof BlockFluidBase || ((ItemBlock) itemStack.getItem()).block instanceof BlockStaticLiquid || ((ItemBlock) itemStack.getItem()).block instanceof BlockDynamicLiquid) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
Random rand = new Random();
|
||||
|
||||
float dX = rand.nextFloat() * 0.8F + 0.1F;
|
||||
float dY = rand.nextFloat() * 0.8F + 0.1F;
|
||||
float dZ = rand.nextFloat() * 0.8F + 0.1F;
|
||||
|
||||
EntityItem entityItem = new EntityItem(world, pos.getX() + dX, pos.getY() + dY, pos.getZ() + dZ, itemStack.copy());
|
||||
|
||||
if (itemStack.hasTagCompound()) {
|
||||
entityItem.getEntityItem().setTagCompound((NBTTagCompound) itemStack.getTagCompound().copy());
|
||||
}
|
||||
|
||||
float factor = 0.05F;
|
||||
entityItem.motionX = rand.nextGaussian() * factor;
|
||||
entityItem.motionY = rand.nextGaussian() * factor + 0.2F;
|
||||
entityItem.motionZ = rand.nextGaussian() * factor;
|
||||
world.spawnEntityInWorld(entityItem);
|
||||
itemStack.stackSize = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
|
||||
ArrayList<ItemStack> items = new ArrayList<ItemStack>();
|
||||
// if (Loader.isModLoaded("IC2")) {
|
||||
// ItemStack stack = IC2Items.getItem(isAdvanced() ? "advancedMachine" : "machine").copy();
|
||||
// stack.stackSize = 1;
|
||||
// items.add(stack);
|
||||
// } //TODO ic2
|
||||
items.add(isAdvanced() ? new ItemStack(Item.getItemFromBlock(ModBlocks.MachineCasing), 1, 2) : new ItemStack(Item.getItemFromBlock(ModBlocks.MachineCasing), 1, 0));
|
||||
return items;
|
||||
}
|
||||
|
||||
public boolean isAdvanced() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean rotateBlock(World world, BlockPos pos, EnumFacing axis) {
|
||||
if (axis == null) {
|
||||
return false;
|
||||
} else {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
if (tile != null && tile instanceof TileMachineBase) {
|
||||
TileMachineBase machineBase = (TileMachineBase) tile;
|
||||
//TODO fix
|
||||
// world.setBlockState(pos, world.getBlockState(pos).withProperty(FACING, EnumFacing.getFront(world.getBlockState(pos).getValue(FACING)).getOpposite()));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ) {
|
||||
if(fillBlockWithFluid(worldIn, pos, playerIn)){
|
||||
return true;
|
||||
}
|
||||
if(onBlockActivated(worldIn, pos.getX(), pos.getY(), pos.getZ(), playerIn, side.getIndex(), hitX, hitY, hitZ)){
|
||||
return true;
|
||||
}
|
||||
return super.onBlockActivated(worldIn, pos, state, playerIn, side, hitX, hitY, hitZ);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityplayer, int side, float hitX, float hitY, float hitZ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean fillBlockWithFluid(World world, BlockPos pos, EntityPlayer entityplayer) {
|
||||
ItemStack current = entityplayer.inventory.getCurrentItem();
|
||||
|
||||
if (current != null) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
|
||||
if (tile instanceof IFluidHandler) {
|
||||
IFluidHandler tank = (IFluidHandler) tile;
|
||||
// Handle FluidContainerRegistry
|
||||
if (FluidContainerRegistry.isContainer(current)) {
|
||||
FluidStack liquid = FluidContainerRegistry.getFluidForFilledItem(current);
|
||||
// Handle filled containers
|
||||
if (liquid != null) {
|
||||
int qty = tank.fill(null, liquid, true);
|
||||
|
||||
if (qty != 0 && !entityplayer.capabilities.isCreativeMode) {
|
||||
if (current.stackSize > 1) {
|
||||
if (!entityplayer.inventory.addItemStackToInventory(FluidContainerRegistry.drainFluidContainer(current))) {
|
||||
entityplayer.dropPlayerItemWithRandomChoice(FluidContainerRegistry.drainFluidContainer(current), false);
|
||||
}
|
||||
|
||||
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, consumeItem(current));
|
||||
} else {
|
||||
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, FluidContainerRegistry.drainFluidContainer(current));
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
// Handle empty containers
|
||||
} else {
|
||||
FluidStack available = tank.getTankInfo(null)[0].fluid;
|
||||
|
||||
if (available != null) {
|
||||
ItemStack filled = FluidContainerRegistry.fillFluidContainer(available, current);
|
||||
|
||||
liquid = FluidContainerRegistry.getFluidForFilledItem(filled);
|
||||
|
||||
if (liquid != null) {
|
||||
if (!entityplayer.capabilities.isCreativeMode) {
|
||||
if (current.stackSize > 1) {
|
||||
if (!entityplayer.inventory.addItemStackToInventory(filled)) {
|
||||
return false;
|
||||
} else {
|
||||
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, consumeItem(current));
|
||||
}
|
||||
} else {
|
||||
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, consumeItem(current));
|
||||
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, filled);
|
||||
}
|
||||
}
|
||||
|
||||
tank.drain(null, liquid.amount, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (current.getItem() instanceof IFluidContainerItem) {
|
||||
if (current.stackSize != 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!world.isRemote) {
|
||||
IFluidContainerItem container = (IFluidContainerItem) current.getItem();
|
||||
FluidStack liquid = container.getFluid(current);
|
||||
FluidStack tankLiquid = tank.getTankInfo(null)[0].fluid;
|
||||
boolean mustDrain = liquid == null || liquid.amount == 0;
|
||||
boolean mustFill = tankLiquid == null || tankLiquid.amount == 0;
|
||||
if (mustDrain && mustFill) {
|
||||
// Both are empty, do nothing
|
||||
} else if (mustDrain || !entityplayer.isSneaking()) {
|
||||
liquid = tank.drain(null, 1000, false);
|
||||
int qtyToFill = container.fill(current, liquid, true);
|
||||
tank.drain(null, qtyToFill, true);
|
||||
} else if (mustFill || entityplayer.isSneaking()) {
|
||||
if (liquid.amount > 0) {
|
||||
int qty = tank.fill(null, liquid, false);
|
||||
tank.fill(null, container.drain(current, qty, true), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static ItemStack consumeItem(ItemStack stack) {
|
||||
if (stack.stackSize == 1) {
|
||||
if (stack.getItem().hasContainerItem(stack)) {
|
||||
return stack.getItem().getContainerItem(stack);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
stack.splitStack(1);
|
||||
|
||||
return stack;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureNameFromState(IBlockState blockState, EnumFacing facing) {
|
||||
if(this instanceof IRotationTexture){
|
||||
IRotationTexture rotationTexture = (IRotationTexture) this;
|
||||
if(getFacing(blockState) == facing){
|
||||
return isActive(blockState) ? rotationTexture.getFrontOn() : rotationTexture.getFrontOff();
|
||||
}
|
||||
if(facing == EnumFacing.UP){
|
||||
return rotationTexture.getTop();
|
||||
}
|
||||
if(facing == EnumFacing.DOWN){
|
||||
return rotationTexture.getBottom();
|
||||
}
|
||||
return rotationTexture.getSide();
|
||||
}
|
||||
if(this instanceof IAdvancedRotationTexture){
|
||||
IAdvancedRotationTexture advancedRotationTexture = (IAdvancedRotationTexture) this;
|
||||
if(getFacing(blockState) == facing){
|
||||
return advancedRotationTexture.getFront(isActive(blockState));
|
||||
}
|
||||
if(facing == EnumFacing.UP){
|
||||
return advancedRotationTexture.getTop(isActive(blockState));
|
||||
}
|
||||
if(facing == EnumFacing.DOWN){
|
||||
return advancedRotationTexture.getBottom(isActive(blockState));
|
||||
}
|
||||
return advancedRotationTexture.getSide(isActive(blockState));
|
||||
}
|
||||
return "techreborn:blocks/machine/machine_side";
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state) {
|
||||
int facingInt = getSideFromEnum(state.getValue(FACING));
|
||||
int activeInt = state.getValue(ACTIVE) ? 0 : 3;
|
||||
return facingInt + activeInt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta) {
|
||||
boolean active = false;
|
||||
int facingInt = meta;
|
||||
if(facingInt > 3){
|
||||
active = true;
|
||||
facingInt = facingInt - 3;
|
||||
}
|
||||
EnumFacing facing = getSideFromint(facingInt);
|
||||
return this.getDefaultState().withProperty(FACING, facing).withProperty(ACTIVE, active);
|
||||
}
|
||||
|
||||
public boolean isActive(IBlockState state){
|
||||
return state.getValue(ACTIVE);
|
||||
}
|
||||
|
||||
public EnumFacing getFacing(IBlockState state){
|
||||
return state.getValue(FACING);
|
||||
}
|
||||
|
||||
public void setFacing(EnumFacing facing, World world, BlockPos pos){
|
||||
world.setBlockState(pos, world.getBlockState(pos).withProperty(FACING, facing));
|
||||
}
|
||||
|
||||
|
||||
public void setActive(Boolean active, World world, BlockPos pos){
|
||||
world.setBlockState(pos, world.getBlockState(pos).withProperty(ACTIVE, active));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int amountOfStates() {
|
||||
return 8; //0-3 off nsew, 4-8 on nsew
|
||||
}
|
||||
|
||||
public EnumFacing getSideFromint(int i){
|
||||
if(i == 0){
|
||||
return EnumFacing.NORTH;
|
||||
} else if(i == 1){
|
||||
return EnumFacing.SOUTH;
|
||||
}else if(i == 2){
|
||||
return EnumFacing.EAST;
|
||||
}else if(i == 3){
|
||||
return EnumFacing.WEST;
|
||||
}
|
||||
return EnumFacing.NORTH;
|
||||
}
|
||||
|
||||
public int getSideFromEnum(EnumFacing facing){
|
||||
if(facing == EnumFacing.NORTH){
|
||||
return 0;
|
||||
} else if(facing == EnumFacing.SOUTH){
|
||||
return 1;
|
||||
}else if(facing == EnumFacing.EAST){
|
||||
return 2;
|
||||
}else if(facing == EnumFacing.WEST){
|
||||
return 3;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,16 +1,14 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
|
@ -19,7 +17,7 @@ import techreborn.tiles.TileQuantumChest;
|
|||
public class BlockQuantumChest extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
||||
public BlockQuantumChest() {
|
||||
super(Material.rock);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.quantumChest");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
setHardness(2.0F);
|
||||
|
|
|
@ -5,17 +5,21 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.Core;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileQuantumTank;
|
||||
|
||||
public class BlockQuantumTank extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
||||
|
||||
public BlockQuantumTank() {
|
||||
super(Material.rock);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.quantumTank");
|
||||
setHardness(2.0F);
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -126,7 +126,7 @@ public class BlockRubberLog extends Block implements ITexturedBlock {
|
|||
public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random rand) {
|
||||
super.updateTick(worldIn, pos, state, rand);
|
||||
if(!state.getValue(HAS_SAP)){
|
||||
if(rand.nextInt(100) == 0){
|
||||
if(rand.nextInt(50) == 0){
|
||||
EnumFacing facing = EnumFacing.getHorizontal(rand.nextInt(3));
|
||||
if(worldIn.getBlockState(pos.down()).getBlock() == this && worldIn.getBlockState(pos.up()).getBlock() == this && worldIn.isAirBlock(pos.offset(facing))){
|
||||
worldIn.setBlockState(pos, state.withProperty(HAS_SAP, true).withProperty(SAP_SIDE, facing));
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
|
||||
public class BlockSupercondensator extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
||||
|
||||
public BlockSupercondensator(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.supercondensator");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
private final String prefix = "techreborn:blocks/machine/";
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
|
||||
public interface IAdvancedRotationTexture {
|
||||
|
||||
String getFront(boolean isActive);
|
||||
|
||||
String getSide(boolean isActive);
|
||||
|
||||
String getTop(boolean isActive);
|
||||
|
||||
String getBottom(boolean isActive);
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
package techreborn.blocks;
|
||||
|
||||
public interface IRotationTexture {
|
||||
|
||||
String getFrontOff();
|
||||
|
||||
String getFrontOn();
|
||||
|
||||
String getSide();
|
||||
|
||||
String getTop();
|
||||
|
||||
String getBottom();
|
||||
}
|
|
@ -6,17 +6,19 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IAdvancedRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.generator.TileDieselGenerator;
|
||||
|
||||
public class BlockDieselGenerator extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
||||
|
||||
public BlockDieselGenerator(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.dieselgenerator");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -3,8 +3,9 @@ package techreborn.blocks.generator;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IAdvancedRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.generator.TileDragonEggSiphoner;
|
||||
|
||||
public class BlockDragonEggSiphoner extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
@ -12,8 +13,9 @@ public class BlockDragonEggSiphoner extends BlockMachineBase implements IAdvance
|
|||
|
||||
|
||||
public BlockDragonEggSiphoner(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.dragoneggsiphoner");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -6,17 +6,19 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IAdvancedRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.generator.TileGasTurbine;
|
||||
|
||||
public class BlockGasTurbine extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
||||
|
||||
public BlockGasTurbine(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.gasTurbine");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,20 +3,20 @@ package techreborn.blocks.generator;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IAdvancedRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.tiles.generator.TileDieselGenerator;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.generator.TileGenerator;
|
||||
|
||||
public class BlockGenerator extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
||||
public BlockGenerator() {
|
||||
super(Material.iron);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.generator");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,16 +3,18 @@ package techreborn.blocks.generator;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IAdvancedRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.generator.TileHeatGenerator;
|
||||
|
||||
public class BlockHeatGenerator extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
||||
|
||||
public BlockHeatGenerator(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.heatgenerator");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,15 +1,17 @@
|
|||
package techreborn.blocks.generator;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IAdvancedRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
|
||||
public class BlockLightningRod extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
||||
|
||||
public BlockLightningRod(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.lightningrod");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
private final String prefix = "techreborn:blocks/machine/";
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
package techreborn.blocks.generator;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IAdvancedRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
|
||||
public class BlockMagicEnergyAbsorber extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
||||
public BlockMagicEnergyAbsorber(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.magicenergyabsorber");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
package techreborn.blocks.generator;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IAdvancedRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
|
||||
public class BlockMagicEnergyConverter extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
||||
public BlockMagicEnergyConverter(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.magicenergyconverter");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,16 +1,18 @@
|
|||
package techreborn.blocks.generator;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IAdvancedRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
|
||||
public class BlockPlasmaGenerator extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
||||
|
||||
|
||||
public BlockPlasmaGenerator(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.plasmagenerator");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
private final String prefix = "techreborn:blocks/machine/";
|
||||
|
|
|
@ -6,9 +6,10 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IAdvancedRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.generator.TileSemifluidGenerator;
|
||||
|
||||
public class BlockSemiFluidGenerator extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
@ -16,8 +17,9 @@ public class BlockSemiFluidGenerator extends BlockMachineBase implements IAdvanc
|
|||
|
||||
|
||||
public BlockSemiFluidGenerator(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.semifluidgenerator");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -6,9 +6,10 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IAdvancedRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileThermalGenerator;
|
||||
|
||||
public class BlockThermalGenerator extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
@ -16,8 +17,9 @@ public class BlockThermalGenerator extends BlockMachineBase implements IAdvanced
|
|||
|
||||
|
||||
public BlockThermalGenerator() {
|
||||
super(Material.rock);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.thermalGenerator");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,17 +5,19 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileAlloyFurnace;
|
||||
|
||||
public class BlockAlloyFurnace extends BlockMachineBase implements IRotationTexture {
|
||||
|
||||
|
||||
public BlockAlloyFurnace(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.alloyfurnace");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,17 +5,19 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileAlloySmelter;
|
||||
|
||||
public class BlockAlloySmelter extends BlockMachineBase implements IRotationTexture {
|
||||
|
||||
|
||||
public BlockAlloySmelter(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.alloysmelter");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,17 +5,19 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileAssemblingMachine;
|
||||
|
||||
public class BlockAssemblingMachine extends BlockMachineBase implements IRotationTexture {
|
||||
|
||||
|
||||
public BlockAssemblingMachine(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.assemblingmachine");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -5,17 +5,19 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileBlastFurnace;
|
||||
|
||||
public class BlockBlastFurnace extends BlockMachineBase implements IRotationTexture {
|
||||
|
||||
|
||||
public BlockBlastFurnace(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.blastfurnace");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,9 +5,10 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileCentrifuge;
|
||||
|
||||
public class BlockCentrifuge extends BlockMachineBase implements IRotationTexture {
|
||||
|
@ -15,8 +16,9 @@ public class BlockCentrifuge extends BlockMachineBase implements IRotationTextur
|
|||
|
||||
|
||||
public BlockCentrifuge() {
|
||||
super(Material.rock);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.centrifuge");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,17 +5,19 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileChargeBench;
|
||||
|
||||
public class BlockChargeBench extends BlockMachineBase implements IRotationTexture {
|
||||
|
||||
|
||||
public BlockChargeBench(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.chargebench");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,9 +5,10 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileChemicalReactor;
|
||||
|
||||
public class BlockChemicalReactor extends BlockMachineBase implements IRotationTexture {
|
||||
|
@ -15,8 +16,9 @@ public class BlockChemicalReactor extends BlockMachineBase implements IRotationT
|
|||
|
||||
|
||||
public BlockChemicalReactor(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.chemicalreactor");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
package techreborn.blocks.machine;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IRotationTexture;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
|
||||
public class BlockDistillationTower extends BlockMachineBase implements IRotationTexture {
|
||||
|
||||
public BlockDistillationTower(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.distillationtower");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
private final String prefix = "techreborn:blocks/machine/";
|
||||
|
|
|
@ -5,17 +5,19 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileImplosionCompressor;
|
||||
|
||||
public class BlockImplosionCompressor extends BlockMachineBase implements IRotationTexture {
|
||||
|
||||
|
||||
public BlockImplosionCompressor(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.implosioncompressor");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,17 +5,19 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileIndustrialElectrolyzer;
|
||||
|
||||
public class BlockIndustrialElectrolyzer extends BlockMachineBase implements IRotationTexture {
|
||||
|
||||
|
||||
public BlockIndustrialElectrolyzer(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.industrialelectrolyzer");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -6,17 +6,19 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileIndustrialGrinder;
|
||||
|
||||
public class BlockIndustrialGrinder extends BlockMachineBase implements IRotationTexture {
|
||||
|
||||
|
||||
public BlockIndustrialGrinder(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.industrialgrinder");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -6,16 +6,18 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileIndustrialSawmill;
|
||||
|
||||
public class BlockIndustrialSawmill extends BlockMachineBase implements IRotationTexture {
|
||||
|
||||
public BlockIndustrialSawmill(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.industrialsawmill");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,17 +5,19 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IAdvancedRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileMatterFabricator;
|
||||
|
||||
public class BlockMatterFabricator extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
||||
|
||||
public BlockMatterFabricator(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.matterfabricator");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,9 +5,10 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IAdvancedRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileRollingMachine;
|
||||
|
||||
public class BlockRollingMachine extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
@ -15,8 +16,9 @@ public class BlockRollingMachine extends BlockMachineBase implements IAdvancedRo
|
|||
|
||||
|
||||
public BlockRollingMachine(Material material) {
|
||||
super(material.rock);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.rollingmachine");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -6,17 +6,19 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IAdvancedRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileVacuumFreezer;
|
||||
|
||||
public class BlockVacuumFreezer extends BlockMachineBase implements IAdvancedRotationTexture{
|
||||
|
||||
|
||||
public BlockVacuumFreezer(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.vacuumfreezer");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -5,9 +5,10 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.TileAesu;
|
||||
|
||||
public class BlockAesu extends BlockMachineBase implements IRotationTexture {
|
||||
|
@ -15,8 +16,9 @@ public class BlockAesu extends BlockMachineBase implements IRotationTexture {
|
|||
|
||||
|
||||
public BlockAesu(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.aesu");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -8,17 +8,19 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IAdvancedRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.idsu.TileIDSU;
|
||||
|
||||
public class BlockIDSU extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
||||
|
||||
public BlockIDSU(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.idsu");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -5,17 +5,19 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IAdvancedRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.lesu.TileLesu;
|
||||
|
||||
public class BlockLesu extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
||||
|
||||
public BlockLesu(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.lesu");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -8,15 +8,17 @@ import net.minecraft.tileentity.TileEntity;
|
|||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IAdvancedRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IAdvancedRotationTexture;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.lesu.TileLesuStorage;
|
||||
|
||||
public class BlockLesuStorage extends BlockMachineBase implements IAdvancedRotationTexture {
|
||||
|
||||
public BlockLesuStorage(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.lesustorage");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -3,21 +3,20 @@ package techreborn.blocks.teir1;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.tiles.TileIndustrialGrinder;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.teir1.TileCompressor;
|
||||
import techreborn.tiles.teir1.TileGrinder;
|
||||
|
||||
public class BlockCompressor extends BlockMachineBase implements IRotationTexture{
|
||||
|
||||
public BlockCompressor(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.compressor");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,21 +3,20 @@ package techreborn.blocks.teir1;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.tiles.TileIndustrialGrinder;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.teir1.TileElectricFurnace;
|
||||
import techreborn.tiles.teir1.TileGrinder;
|
||||
|
||||
public class BlockElectricFurnace extends BlockMachineBase implements IRotationTexture{
|
||||
|
||||
public BlockElectricFurnace(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.electricfurnace");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,21 +3,20 @@ package techreborn.blocks.teir1;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.tiles.TileIndustrialGrinder;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.teir1.TileExtractor;
|
||||
import techreborn.tiles.teir1.TileGrinder;
|
||||
|
||||
public class BlockExtractor extends BlockMachineBase implements IRotationTexture{
|
||||
|
||||
public BlockExtractor(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.extractor");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -3,20 +3,20 @@ package techreborn.blocks.teir1;
|
|||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.Core;
|
||||
import techreborn.blocks.BlockMachineBase;
|
||||
import techreborn.blocks.IRotationTexture;
|
||||
import reborncore.common.blocks.BlockMachineBase;
|
||||
import reborncore.common.blocks.IRotationTexture;
|
||||
import techreborn.client.GuiHandler;
|
||||
import techreborn.tiles.TileIndustrialGrinder;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.teir1.TileGrinder;
|
||||
|
||||
public class BlockGrinder extends BlockMachineBase implements IRotationTexture{
|
||||
|
||||
public BlockGrinder(Material material) {
|
||||
super(material);
|
||||
super();
|
||||
setUnlocalizedName("techreborn.grinder");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue