Energy storages item charging fixes, transformers fixes, electric items fixes.
This commit is contained in:
parent
b42b5274b5
commit
be4f10b975
63 changed files with 2154 additions and 2123 deletions
|
@ -0,0 +1,12 @@
|
|||
package techreborn.tiles.transformers;
|
||||
|
||||
import reborncore.api.power.EnumPowerTier;
|
||||
import techreborn.init.ModBlocks;
|
||||
|
||||
public class TileEVTransformer extends TileTransformer {
|
||||
|
||||
public TileEVTransformer() {
|
||||
super("EVTransformer", ModBlocks.evt, EnumPowerTier.EXTREME, 8192, 2048, 8192);
|
||||
}
|
||||
|
||||
}
|
|
@ -12,7 +12,7 @@ public class TileHVTransformer extends TileTransformer
|
|||
|
||||
public TileHVTransformer()
|
||||
{
|
||||
super("HVTransformer", ModBlocks.hvt, EnumPowerTier.EXTREME, ConfigTechReborn.HVTransformerMaxInput, ConfigTechReborn.HVTransformerMaxOutput, ConfigTechReborn.HVTransformerMaxInput*2);
|
||||
super("HVTransformer", ModBlocks.hvt, EnumPowerTier.HIGH, 2048, 512, 2048);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -10,9 +10,8 @@ import techreborn.init.ModBlocks;
|
|||
public class TileLVTransformer extends TileTransformer
|
||||
{
|
||||
|
||||
public TileLVTransformer()
|
||||
{
|
||||
super("LVTransformer", ModBlocks.lvt, EnumPowerTier.LOW, ConfigTechReborn.LVTransformerMaxInput, ConfigTechReborn.LVTransformerMaxOutput, ConfigTechReborn.LVTransformerMaxInput*2);
|
||||
public TileLVTransformer() {
|
||||
super("LVTransformer", ModBlocks.lvt, EnumPowerTier.MEDIUM, 128, 32, 128);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,29 +7,10 @@ import techreborn.init.ModBlocks;
|
|||
/**
|
||||
* Created by modmuss50 on 16/03/2016.
|
||||
*/
|
||||
public class TileMVTransformer extends TileTransformer
|
||||
{
|
||||
public class TileMVTransformer extends TileTransformer {
|
||||
|
||||
public TileMVTransformer()
|
||||
{
|
||||
super("MVTransformer", ModBlocks.mvt, EnumPowerTier.HIGH, ConfigTechReborn.MVTransformerMaxInput, ConfigTechReborn.MVTransformerMaxOutput, ConfigTechReborn.LVTransformerMaxInput*2);
|
||||
}
|
||||
public TileMVTransformer() {
|
||||
super("MVTransformer", ModBlocks.mvt, EnumPowerTier.HIGH, 512, 128, 512);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxOutput()
|
||||
{
|
||||
return 128;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxInput()
|
||||
{
|
||||
return 512;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPowerTier getTier()
|
||||
{
|
||||
return EnumPowerTier.HIGH;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,101 +7,105 @@ 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 reborncore.common.tile.TilePowerAcceptor;
|
||||
import techreborn.blocks.transformers.BlockTransformer;
|
||||
|
||||
/**
|
||||
* Created by Rushmead
|
||||
*
|
||||
* @deprecated ? If wires limited to transfer rate and doesn't burn out, what's use of the transformers?
|
||||
* TODO: Rewrite, find use or remove
|
||||
*/
|
||||
@Deprecated
|
||||
public class TileTransformer extends TilePowerAcceptor implements IWrenchable, ITickable
|
||||
{
|
||||
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 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;
|
||||
}
|
||||
public TileTransformer(String name, Block wrenchDrop, EnumPowerTier tier, int maxInput, int maxOuput, int maxStorage) {
|
||||
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 boolean wrenchCanSetFacing(EntityPlayer p0, EnumFacing p1) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override public EnumFacing getFacing()
|
||||
{
|
||||
return getFacingEnum();
|
||||
}
|
||||
@Override
|
||||
public EnumFacing getFacing() {
|
||||
return getFacingEnum();
|
||||
}
|
||||
|
||||
@Override public boolean wrenchCanRemove(EntityPlayer entityPlayer)
|
||||
{
|
||||
return entityPlayer.isSneaking();
|
||||
}
|
||||
@Override
|
||||
public void setFacing(EnumFacing facing) {
|
||||
|
||||
@Override public float getWrenchDropRate()
|
||||
{
|
||||
return 1.0F;
|
||||
}
|
||||
}
|
||||
|
||||
@Override public ItemStack getWrenchDrop(EntityPlayer p0)
|
||||
{
|
||||
return new ItemStack(wrenchDrop);
|
||||
}
|
||||
@Override
|
||||
public boolean wrenchCanRemove(EntityPlayer entityPlayer) {
|
||||
return entityPlayer.isSneaking();
|
||||
}
|
||||
|
||||
@Override public double getMaxPower()
|
||||
{
|
||||
return maxStorage;
|
||||
}
|
||||
@Override
|
||||
public float getWrenchDropRate() {
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
@Override public boolean canAcceptEnergy(EnumFacing direction)
|
||||
{
|
||||
@Override
|
||||
public ItemStack getWrenchDrop(EntityPlayer p0) {
|
||||
return new ItemStack(wrenchDrop);
|
||||
}
|
||||
|
||||
return getFacingEnum() != direction;
|
||||
}
|
||||
@Override
|
||||
public double getMaxPower() {
|
||||
return maxStorage;
|
||||
}
|
||||
|
||||
@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 canAcceptEnergy(EnumFacing direction) {
|
||||
|
||||
@Override public boolean canProvideEnergy(EnumFacing direction)
|
||||
{
|
||||
return getFacing() == 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 getMaxOutput() {
|
||||
return maxOutput;
|
||||
}
|
||||
|
||||
@Override public double getMaxInput()
|
||||
{
|
||||
return maxInput;
|
||||
}
|
||||
@Override
|
||||
public double getMaxInput() {
|
||||
return maxInput;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumPowerTier getTier() {
|
||||
return tier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update() {
|
||||
|
||||
}
|
||||
|
||||
@Override public EnumPowerTier getTier()
|
||||
{
|
||||
return tier;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue