Rewrite Transformers, closes #441
|
@ -7,7 +7,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.tiles.transformers.TileHVTransformer;
|
||||
|
||||
|
@ -16,14 +15,12 @@ import java.util.Random;
|
|||
/**
|
||||
* Created by modmuss50 on 16/03/2016.
|
||||
*/
|
||||
public class BlockHVTransformer extends BlockLVTransformer
|
||||
public class BlockHVTransformer extends BlockTransformer
|
||||
{
|
||||
|
||||
public BlockHVTransformer()
|
||||
{
|
||||
super();
|
||||
setUnlocalizedName("techreborn.hvt");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
super("hvtransformer");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -31,36 +28,6 @@ public class BlockHVTransformer extends BlockLVTransformer
|
|||
{
|
||||
return new TileHVTransformer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFrontOff()
|
||||
{
|
||||
return prefix + "hv_transformer_front";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFrontOn()
|
||||
{
|
||||
return prefix + "hv_transformer_front";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSide()
|
||||
{
|
||||
return prefix + "hv_transformer_side";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTop()
|
||||
{
|
||||
return prefix + "hv_transformer_side";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBottom()
|
||||
{
|
||||
return prefix + "hv_transformer_side";
|
||||
}
|
||||
@Override
|
||||
public void breakBlock(World world, BlockPos pos, IBlockState state)
|
||||
{
|
||||
|
|
|
@ -7,8 +7,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.blocks.storage.BlockBatBox;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.tiles.transformers.TileLVTransformer;
|
||||
|
||||
import java.util.Random;
|
||||
|
@ -16,14 +14,12 @@ import java.util.Random;
|
|||
/**
|
||||
* Created by modmuss50 on 16/03/2016.
|
||||
*/
|
||||
public class BlockLVTransformer extends BlockBatBox
|
||||
public class BlockLVTransformer extends BlockTransformer
|
||||
{
|
||||
|
||||
public BlockLVTransformer()
|
||||
{
|
||||
super();
|
||||
setUnlocalizedName("techreborn.lvt");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
super("lvtransformer");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -32,35 +28,6 @@ public class BlockLVTransformer extends BlockBatBox
|
|||
return new TileLVTransformer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFrontOff()
|
||||
{
|
||||
return prefix + "lv_transformer_front";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFrontOn()
|
||||
{
|
||||
return prefix + "lv_transformer_front";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSide()
|
||||
{
|
||||
return prefix + "lv_transformer_side";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTop()
|
||||
{
|
||||
return prefix + "lv_transformer_side";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBottom()
|
||||
{
|
||||
return prefix + "lv_transformer_side";
|
||||
}
|
||||
@Override
|
||||
public void breakBlock(World world, BlockPos pos, IBlockState state)
|
||||
{
|
||||
|
|
|
@ -7,7 +7,6 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
import techreborn.init.ModBlocks;
|
||||
import techreborn.tiles.transformers.TileMVTransformer;
|
||||
|
||||
|
@ -16,14 +15,12 @@ import java.util.Random;
|
|||
/**
|
||||
* Created by modmuss50 on 16/03/2016.
|
||||
*/
|
||||
public class BlockMVTransformer extends BlockLVTransformer
|
||||
public class BlockMVTransformer extends BlockTransformer
|
||||
{
|
||||
|
||||
public BlockMVTransformer()
|
||||
{
|
||||
super();
|
||||
setUnlocalizedName("techreborn.mvt");
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
super("mvtransformer");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -31,36 +28,6 @@ public class BlockMVTransformer extends BlockLVTransformer
|
|||
{
|
||||
return new TileMVTransformer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFrontOff()
|
||||
{
|
||||
return prefix + "mv_transformer_front";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFrontOn()
|
||||
{
|
||||
return prefix + "mv_transformer_front";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSide()
|
||||
{
|
||||
return prefix + "mv_transformer_side";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTop()
|
||||
{
|
||||
return prefix + "mv_transformer_side";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBottom()
|
||||
{
|
||||
return prefix + "mv_transformer_side";
|
||||
}
|
||||
@Override
|
||||
public void breakBlock(World world, BlockPos pos, IBlockState state)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,323 @@
|
|||
package techreborn.blocks.transformers;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.collect.Iterators;
|
||||
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.PropertyDirection;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fluids.BlockFluidBase;
|
||||
import reborncore.common.BaseTileBlock;
|
||||
import reborncore.common.blocks.IRotationTexture;
|
||||
import techreborn.client.TechRebornCreativeTab;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* Created by Rushmead
|
||||
*/
|
||||
public abstract class BlockTransformer extends BaseTileBlock implements IRotationTexture, ITexturedBlock
|
||||
{
|
||||
public static PropertyDirection FACING = PropertyDirection.create("facing", Facings.ALL);
|
||||
protected final String prefix = "techreborn:blocks/machine/storage/";
|
||||
public String name;
|
||||
|
||||
public BlockTransformer(String name)
|
||||
{
|
||||
super(Material.rock);
|
||||
setHardness(2f);
|
||||
setUnlocalizedName("techreborn." + name.toLowerCase());
|
||||
setCreativeTab(TechRebornCreativeTab.instance);
|
||||
this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
|
||||
this.name = name;
|
||||
}
|
||||
protected BlockStateContainer createBlockState()
|
||||
{
|
||||
FACING = PropertyDirection.create("facing", Facings.ALL);
|
||||
return new BlockStateContainer(this, FACING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state)
|
||||
{
|
||||
super.onBlockAdded(worldIn, pos, state);
|
||||
this.setDefaultFacing(worldIn, pos, state);
|
||||
}
|
||||
|
||||
private void setDefaultFacing(World worldIn, BlockPos pos, IBlockState state)
|
||||
{
|
||||
if (!worldIn.isRemote)
|
||||
{
|
||||
IBlockState sate = worldIn.getBlockState(pos.north());
|
||||
Block block = sate.getBlock();
|
||||
IBlockState state1 = worldIn.getBlockState(pos.south());
|
||||
Block block1 = state1.getBlock();
|
||||
IBlockState state2 = worldIn.getBlockState(pos.west());
|
||||
Block block2 = state2.getBlock();
|
||||
IBlockState state3 = worldIn.getBlockState(pos.east());
|
||||
Block block3 = state3.getBlock();
|
||||
EnumFacing enumfacing = (EnumFacing) state.getValue(FACING);
|
||||
|
||||
if (enumfacing == EnumFacing.NORTH && block.isFullBlock(state) && !block1.isFullBlock(state1))
|
||||
{
|
||||
enumfacing = EnumFacing.SOUTH;
|
||||
} else if (enumfacing == EnumFacing.SOUTH && block1.isFullBlock(state1) && !block.isFullBlock(state))
|
||||
{
|
||||
enumfacing = EnumFacing.NORTH;
|
||||
} else if (enumfacing == EnumFacing.WEST && block2.isFullBlock(state2) && !block3.isFullBlock(state2))
|
||||
{
|
||||
enumfacing = EnumFacing.EAST;
|
||||
} else if (enumfacing == EnumFacing.EAST && block3.isFullBlock(state3) && !block2.isFullBlock(state2))
|
||||
{
|
||||
enumfacing = EnumFacing.WEST;
|
||||
}
|
||||
|
||||
worldIn.setBlockState(pos, state.withProperty(FACING, enumfacing), 2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer,
|
||||
ItemStack stack)
|
||||
{
|
||||
super.onBlockPlacedBy(worldIn, pos, state, placer, stack);
|
||||
EnumFacing facing = placer.getHorizontalFacing().getOpposite();
|
||||
if (placer.rotationPitch < -50)
|
||||
{
|
||||
facing = EnumFacing.DOWN;
|
||||
} else if (placer.rotationPitch > 50)
|
||||
{
|
||||
facing = EnumFacing.UP;
|
||||
}
|
||||
setFacing(facing, worldIn, pos);
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected List<ItemStack> dropInventory(IBlockAccess world, BlockPos pos, ItemStack itemToDrop)
|
||||
{
|
||||
TileEntity tileEntity = world.getTileEntity(pos);
|
||||
|
||||
if (tileEntity == null)
|
||||
{
|
||||
System.out.print("Null");
|
||||
return null;
|
||||
}
|
||||
if (!(tileEntity instanceof IInventory))
|
||||
{
|
||||
|
||||
System.out.print("Not INstance");
|
||||
return null;
|
||||
}
|
||||
|
||||
IInventory inventory = (IInventory) tileEntity;
|
||||
|
||||
List<ItemStack> items = new ArrayList<ItemStack>();
|
||||
|
||||
for (int i = 0; i < inventory.getSizeInventory(); i++)
|
||||
{
|
||||
ItemStack itemStack = inventory.getStackInSlot(i);
|
||||
|
||||
if (itemStack == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
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)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
items.add(itemStack.copy());
|
||||
}
|
||||
items.add(itemToDrop.copy());
|
||||
return items;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state)
|
||||
{
|
||||
int facingInt = getSideFromEnum(state.getValue(FACING));
|
||||
return facingInt;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta)
|
||||
{
|
||||
boolean active = false;
|
||||
EnumFacing facing = getSideFromint(meta);
|
||||
return this.getDefaultState().withProperty(FACING, facing);
|
||||
}
|
||||
|
||||
public void setFacing(EnumFacing facing, World world, BlockPos pos)
|
||||
{
|
||||
world.setBlockState(pos, world.getBlockState(pos).withProperty(FACING, facing));
|
||||
}
|
||||
|
||||
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;
|
||||
} else if (i == 4)
|
||||
{
|
||||
return EnumFacing.UP;
|
||||
} else if (i == 5)
|
||||
{
|
||||
return EnumFacing.DOWN;
|
||||
}
|
||||
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;
|
||||
} else if (facing == EnumFacing.UP)
|
||||
{
|
||||
return 4;
|
||||
} else if (facing == EnumFacing.DOWN)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getFrontOff()
|
||||
{
|
||||
return prefix + name.toLowerCase() + "_front";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFrontOn()
|
||||
{
|
||||
return prefix + name.toLowerCase() + "_front";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSide()
|
||||
{
|
||||
return prefix + name.toLowerCase() + "_side";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTop()
|
||||
{
|
||||
return prefix + name.toLowerCase() + "_side";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBottom()
|
||||
{
|
||||
return prefix + name.toLowerCase() + "_side";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTextureNameFromState(IBlockState blockState, EnumFacing facing)
|
||||
{
|
||||
if (this instanceof IRotationTexture)
|
||||
{
|
||||
IRotationTexture rotationTexture = (IRotationTexture) this;
|
||||
if (getFacing(blockState) == facing)
|
||||
{
|
||||
return rotationTexture.getFrontOff();
|
||||
}
|
||||
if (facing == EnumFacing.UP)
|
||||
{
|
||||
return rotationTexture.getTop();
|
||||
}
|
||||
if (facing == EnumFacing.DOWN)
|
||||
{
|
||||
return rotationTexture.getBottom();
|
||||
}
|
||||
return rotationTexture.getSide();
|
||||
}
|
||||
return "techreborn:blocks/machine/machine_side";
|
||||
}
|
||||
|
||||
public EnumFacing getFacing(IBlockState state)
|
||||
{
|
||||
return state.getValue(FACING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int amountOfStates()
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public enum Facings implements Predicate<EnumFacing>,Iterable<EnumFacing>
|
||||
{
|
||||
ALL;
|
||||
|
||||
public EnumFacing[] facings()
|
||||
{
|
||||
return new EnumFacing[] { EnumFacing.NORTH, EnumFacing.EAST, EnumFacing.SOUTH, EnumFacing.WEST,
|
||||
EnumFacing.UP, EnumFacing.DOWN };
|
||||
}
|
||||
|
||||
public EnumFacing random(Random rand)
|
||||
{
|
||||
EnumFacing[] aenumfacing = this.facings();
|
||||
return aenumfacing[rand.nextInt(aenumfacing.length)];
|
||||
}
|
||||
|
||||
public boolean apply(EnumFacing p_apply_1_)
|
||||
{
|
||||
return p_apply_1_ != null;
|
||||
}
|
||||
|
||||
public Iterator<EnumFacing> iterator()
|
||||
{
|
||||
return Iterators.forArray(this.facings());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,28 +1,17 @@
|
|||
package techreborn.tiles.transformers;
|
||||
|
||||
import reborncore.api.power.EnumPowerTier;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
||||
/**
|
||||
* Created by modmuss50 on 16/03/2016.
|
||||
*/
|
||||
public class TileHVTransformer extends TileLVTransformer
|
||||
public class TileHVTransformer extends TileTransformer
|
||||
{
|
||||
|
||||
@Override
|
||||
public double getMaxOutput()
|
||||
public TileHVTransformer()
|
||||
{
|
||||
return 512;
|
||||
super("HVTransformer", ModBlocks.hvt, EnumPowerTier.EXTREME, 2048, 412, 2048*2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxInput()
|
||||
{
|
||||
return 2048;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPowerTier getTier()
|
||||
{
|
||||
return EnumPowerTier.EXTREME;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,45 +1,17 @@
|
|||
package techreborn.tiles.transformers;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import reborncore.api.power.EnumPowerTier;
|
||||
import techreborn.tiles.storage.TileBatBox;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
||||
/**
|
||||
* Created by modmuss50 on 16/03/2016.
|
||||
*/
|
||||
public class TileLVTransformer extends TileBatBox
|
||||
public class TileLVTransformer extends TileTransformer
|
||||
{
|
||||
|
||||
@Override
|
||||
public double getMaxOutput()
|
||||
public TileLVTransformer()
|
||||
{
|
||||
return 32;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxInput()
|
||||
{
|
||||
return 128;
|
||||
}
|
||||
|
||||
@Override
|
||||
// Can take medium power in
|
||||
public EnumPowerTier getTier()
|
||||
{
|
||||
return EnumPowerTier.MEDIUM;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxPower()
|
||||
{
|
||||
return getMaxInput() * 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getWrenchDrop(EntityPlayer entityPlayer)
|
||||
{
|
||||
return new ItemStack(worldObj.getBlockState(pos).getBlock());
|
||||
super("LVTransformer", ModBlocks.lvt, EnumPowerTier.LOW, 128, 32, 128*2);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,13 +1,19 @@
|
|||
package techreborn.tiles.transformers;
|
||||
|
||||
import reborncore.api.power.EnumPowerTier;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
||||
/**
|
||||
* Created by modmuss50 on 16/03/2016.
|
||||
*/
|
||||
public class TileMVTransformer extends TileLVTransformer
|
||||
public class TileMVTransformer extends TileTransformer
|
||||
{
|
||||
|
||||
public TileMVTransformer()
|
||||
{
|
||||
super("MVTransformer", ModBlocks.mvt, EnumPowerTier.HIGH, 512, 128, 512*2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxOutput()
|
||||
{
|
||||
|
|
107
src/main/java/techreborn/tiles/transformers/TileTransformer.java
Normal file
|
@ -0,0 +1,107 @@
|
|||
package techreborn.tiles.transformers;
|
||||
|
||||
import ic2.api.tile.IWrenchable;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ITickable;
|
||||
import reborncore.api.power.EnumPowerTier;
|
||||
import reborncore.common.powerSystem.TilePowerAcceptor;
|
||||
import techreborn.blocks.transformers.BlockTransformer;
|
||||
|
||||
/**
|
||||
* Created by Rushmead
|
||||
*/
|
||||
public class TileTransformer extends TilePowerAcceptor implements IWrenchable, ITickable
|
||||
{
|
||||
|
||||
public String name;
|
||||
public Block wrenchDrop;
|
||||
public EnumPowerTier tier;
|
||||
public int maxInput;
|
||||
public int maxOutput;
|
||||
public int maxStorage;
|
||||
|
||||
public TileTransformer(String name, Block wrenchDrop, EnumPowerTier tier, int maxInput, int maxOuput, int maxStorage)
|
||||
{
|
||||
super(1);
|
||||
this.wrenchDrop = wrenchDrop;
|
||||
this.tier = tier;
|
||||
this.name = name;
|
||||
this.maxInput = maxInput;
|
||||
this.maxOutput = maxOuput;
|
||||
this.maxStorage = maxStorage;
|
||||
}
|
||||
|
||||
@Override public boolean wrenchCanSetFacing(EntityPlayer p0, EnumFacing p1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override public EnumFacing getFacing()
|
||||
{
|
||||
return getFacingEnum();
|
||||
}
|
||||
|
||||
@Override public boolean wrenchCanRemove(EntityPlayer entityPlayer)
|
||||
{
|
||||
if (entityPlayer.isSneaking())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override public float getWrenchDropRate()
|
||||
{
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
@Override public ItemStack getWrenchDrop(EntityPlayer p0)
|
||||
{
|
||||
return new ItemStack(wrenchDrop);
|
||||
}
|
||||
|
||||
@Override public double getMaxPower()
|
||||
{
|
||||
return maxStorage;
|
||||
}
|
||||
|
||||
@Override public boolean canAcceptEnergy(EnumFacing direction)
|
||||
{
|
||||
|
||||
return getFacingEnum() != direction;
|
||||
}
|
||||
|
||||
@Override public EnumFacing getFacingEnum()
|
||||
{
|
||||
Block block = worldObj.getBlockState(pos).getBlock();
|
||||
if (block instanceof BlockTransformer)
|
||||
{
|
||||
return ((BlockTransformer) block).getFacing(worldObj.getBlockState(pos));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public boolean canProvideEnergy(EnumFacing direction)
|
||||
{
|
||||
return getFacing() == direction;
|
||||
}
|
||||
|
||||
|
||||
@Override public double getMaxOutput()
|
||||
{
|
||||
return maxOutput;
|
||||
}
|
||||
|
||||
@Override public double getMaxInput()
|
||||
{
|
||||
return maxInput;
|
||||
}
|
||||
|
||||
@Override public EnumPowerTier getTier()
|
||||
{
|
||||
return tier;
|
||||
}
|
||||
}
|
|
@ -78,9 +78,9 @@ tile.techreborn.mfe.name=MFE
|
|||
tile.techreborn.mfsu.name=MFSU
|
||||
tile.techreborn.reinforcedglass.name=Reinforced Glass
|
||||
tile.techreborn.nuke.name=Nuke
|
||||
tile.techreborn.lvt.name=LV Transformer
|
||||
tile.techreborn.mvt.name=MV Transformer
|
||||
tile.techreborn.hvt.name=HV Transformer
|
||||
tile.techreborn.lvtransformer.name=LV Transformer
|
||||
tile.techreborn.mvtransformer.name=MV Transformer
|
||||
tile.techreborn.hvtransformer.name=HV Transformer
|
||||
|
||||
|
||||
#Blocks
|
||||
|
|
Before Width: | Height: | Size: 673 B After Width: | Height: | Size: 673 B |
Before Width: | Height: | Size: 719 B After Width: | Height: | Size: 719 B |
Before Width: | Height: | Size: 622 B After Width: | Height: | Size: 622 B |
Before Width: | Height: | Size: 804 B After Width: | Height: | Size: 804 B |
Before Width: | Height: | Size: 610 B After Width: | Height: | Size: 610 B |
Before Width: | Height: | Size: 644 B After Width: | Height: | Size: 644 B |