Continue the great refactor of mid 2017 (A lot of stuff still broken, it's a WIP)
This commit is contained in:
parent
1fa9f1cf52
commit
40e3062903
123 changed files with 1469 additions and 1486 deletions
|
@ -37,7 +37,7 @@ import techreborn.init.ModBlocks;
|
|||
import techreborn.lib.ModInfo;
|
||||
|
||||
@RebornRegistry(modID = ModInfo.MOD_ID)
|
||||
public class TileAesu extends TilePowerAcceptor implements IWrenchable {
|
||||
public class TileAdjustableSU extends TilePowerAcceptor implements IWrenchable {
|
||||
|
||||
@ConfigRegistry(config = "machines", category = "aesu", key = "AesuMaxInput", comment = "AESU Max Input (Value in EU)")
|
||||
public static int maxInput = 8192;
|
||||
|
@ -46,13 +46,13 @@ public class TileAesu extends TilePowerAcceptor implements IWrenchable {
|
|||
@ConfigRegistry(config = "machines", category = "aesu", key = "AesuMaxEnergy", comment = "AESU Max Energy (Value in EU)")
|
||||
public static int maxEnergy = 100000000;
|
||||
|
||||
public Inventory inventory = new Inventory(4, "TileAesu", 64, this);
|
||||
public Inventory inventory = new Inventory(4, "TileAdjustableSU", 64, this);
|
||||
private int OUTPUT = 64; // The current output
|
||||
private double euLastTick = 0;
|
||||
private double euChange;
|
||||
private int ticks;
|
||||
|
||||
public TileAesu() {
|
||||
public TileAdjustableSU() {
|
||||
super();
|
||||
}
|
||||
|
|
@ -50,14 +50,14 @@ import techreborn.init.ModBlocks;
|
|||
import techreborn.lib.ModInfo;
|
||||
|
||||
@RebornRegistry(modID = ModInfo.MOD_ID)
|
||||
public class TileAlloyFurnace extends TileLegacyMachineBase
|
||||
public class TileIronAlloyFurnace extends TileLegacyMachineBase
|
||||
implements IWrenchable, IInventoryProvider, IContainerProvider {
|
||||
|
||||
// @ConfigRegistry(config = "machines", category = "alloy_furnace", key = "AlloyFurnaceWrenchDropRate", comment = "Alloy Furnace Wrench Drop Rate")
|
||||
public static float wrenchDropRate = 1.0F;
|
||||
|
||||
public int tickTime;
|
||||
public Inventory inventory = new Inventory(4, "TileAlloyFurnace", 64, this);
|
||||
public Inventory inventory = new Inventory(4, "TileIronAlloyFurnace", 64, this);
|
||||
public int burnTime;
|
||||
public int currentItemBurnTime;
|
||||
public int cookTime;
|
||||
|
@ -66,7 +66,7 @@ public class TileAlloyFurnace extends TileLegacyMachineBase
|
|||
int output = 2;
|
||||
int fuel = 3;
|
||||
|
||||
public TileAlloyFurnace() {
|
||||
public TileIronAlloyFurnace() {
|
||||
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,7 @@ public class TileAlloyFurnace extends TileLegacyMachineBase
|
|||
if (!this.world.isRemote) {
|
||||
if (this.burnTime != 0 || this.getStackInSlot(this.input1) != ItemStack.EMPTY && this.getStackInSlot(this.fuel) != ItemStack.EMPTY) {
|
||||
if (this.burnTime == 0 && this.canSmelt()) {
|
||||
this.currentItemBurnTime = this.burnTime = TileAlloyFurnace.getItemBurnTime(this.getStackInSlot(this.fuel));
|
||||
this.currentItemBurnTime = this.burnTime = TileIronAlloyFurnace.getItemBurnTime(this.getStackInSlot(this.fuel));
|
||||
if (this.burnTime > 0) {
|
||||
flag1 = true;
|
||||
if (this.getStackInSlot(this.fuel) != ItemStack.EMPTY) {
|
|
@ -45,7 +45,7 @@ import techreborn.init.ModBlocks;
|
|||
import techreborn.lib.ModInfo;
|
||||
|
||||
@RebornRegistry(modID = ModInfo.MOD_ID)
|
||||
public class TileEntityFusionController extends TilePowerAcceptor implements IInventoryProvider, IContainerProvider {
|
||||
public class TileFusionControlComputer extends TilePowerAcceptor implements IInventoryProvider, IContainerProvider {
|
||||
|
||||
@ConfigRegistry(config = "machines", category = "fusion_reactor", key = "FusionReactorMaxInput", comment = "Fusion Reactor Max Input (Value in EU)")
|
||||
public static int maxInput = 8192;
|
||||
|
@ -56,7 +56,7 @@ public class TileEntityFusionController extends TilePowerAcceptor implements IIn
|
|||
// @ConfigRegistry(config = "machines", category = "fusion_reactor", key = "FusionReactorWrenchDropRate", comment = "Fusion Reactor Wrench Drop Rate")
|
||||
public static float wrenchDropRate = 1.0F;
|
||||
|
||||
public Inventory inventory = new Inventory(3, "TileEntityFusionController", 64, this);
|
||||
public Inventory inventory = new Inventory(3, "TileFusionControlComputer", 64, this);
|
||||
|
||||
// 0= no coils, 1 = coils
|
||||
public int coilStatus = 0;
|
||||
|
@ -69,7 +69,7 @@ public class TileEntityFusionController extends TilePowerAcceptor implements IIn
|
|||
FusionReactorRecipe currentRecipe = null;
|
||||
boolean hasStartedCrafting = false;
|
||||
|
||||
public TileEntityFusionController() {
|
||||
public TileFusionControlComputer() {
|
||||
super();
|
||||
}
|
||||
|
|
@ -38,7 +38,7 @@ import java.util.List;
|
|||
/**
|
||||
* Created by modmuss50 on 25/02/2016.
|
||||
*/
|
||||
public class TileCreativePanel extends TilePowerAcceptor implements IWrenchable {
|
||||
public class TileCreativeSolarPanel extends TilePowerAcceptor implements IWrenchable {
|
||||
|
||||
boolean shouldMakePower = false;
|
||||
boolean lastTickSate = false;
|
|
@ -40,7 +40,7 @@ import techreborn.init.ModBlocks;
|
|||
import techreborn.lib.ModInfo;
|
||||
|
||||
@RebornRegistry(modID = ModInfo.MOD_ID)
|
||||
public class TileDragonEggSiphoner extends TilePowerAcceptor implements IWrenchable, IInventoryProvider {
|
||||
public class TileDragonEggSyphon extends TilePowerAcceptor implements IWrenchable, IInventoryProvider {
|
||||
|
||||
@ConfigRegistry(config = "machines", category = "dragon_egg_siphoner", key = "DragonEggSiphonerMaxOutput", comment = "Dragon Egg Siphoner Max Output (Value in EU)")
|
||||
public static int maxOutput = 128;
|
||||
|
@ -49,10 +49,10 @@ public class TileDragonEggSiphoner extends TilePowerAcceptor implements IWrencha
|
|||
@ConfigRegistry(config = "machines", category = "dragon_egg_siphoner", key = "DragonEggSiphonerEnergyPerTick", comment = "Dragon Egg Siphoner Energy Per Tick (Value in EU)")
|
||||
public static int energyPerTick = 4;
|
||||
|
||||
public Inventory inventory = new Inventory(3, "TileDragonEggSiphoner", 64, this);
|
||||
public Inventory inventory = new Inventory(3, "TileDragonEggSyphon", 64, this);
|
||||
private long lastOutput = 0;
|
||||
|
||||
public TileDragonEggSiphoner() {
|
||||
public TileDragonEggSyphon() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@ public class TileDragonEggSiphoner extends TilePowerAcceptor implements IWrencha
|
|||
|
||||
@Override
|
||||
public ItemStack getWrenchDrop(EntityPlayer entityPlayer) {
|
||||
return new ItemStack(ModBlocks.DRAGON_EGG_SIPHONER, 1);
|
||||
return new ItemStack(ModBlocks.DRAGON_EGG_SYPHON, 1);
|
||||
}
|
||||
|
||||
public boolean isComplete() {
|
|
@ -36,7 +36,7 @@ import techreborn.init.ModBlocks;
|
|||
import techreborn.lib.ModInfo;
|
||||
|
||||
@RebornRegistry(modID = ModInfo.MOD_ID)
|
||||
public class TileSemifluidGenerator extends TileBaseFluidGenerator implements IContainerProvider {
|
||||
public class TileSemiFluidGenerator extends TileBaseFluidGenerator implements IContainerProvider {
|
||||
|
||||
@ConfigRegistry(config = "machines", category = "semifluid_generator", key = "SemifluidGeneratorMaxOutput", comment = "Semifluid Generator Max Output (Value in EU)")
|
||||
public static int maxOutput = 128;
|
||||
|
@ -47,13 +47,13 @@ public class TileSemifluidGenerator extends TileBaseFluidGenerator implements IC
|
|||
@ConfigRegistry(config = "machines", category = "semifluid_generator", key = "SemifluidGeneratorEnergyPerTick", comment = "Semifluid Generator Energy Per Tick (Value in EU)")
|
||||
public static int energyPerTick = 8;
|
||||
|
||||
public TileSemifluidGenerator() {
|
||||
super(EFluidGenerator.SEMIFLUID, "TileSemifluidGenerator", tankCapacity, energyPerTick);
|
||||
public TileSemiFluidGenerator() {
|
||||
super(EFluidGenerator.SEMIFLUID, "TileSemiFluidGenerator", tankCapacity, energyPerTick);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getWrenchDrop(final EntityPlayer arg0) {
|
||||
return new ItemStack(ModBlocks.SEMIFLUID_GENERATOR, 1);
|
||||
return new ItemStack(ModBlocks.SEMI_FLUID_GENERATOR, 1);
|
||||
}
|
||||
|
||||
@Override
|
|
@ -45,7 +45,7 @@ import techreborn.init.ModBlocks;
|
|||
import techreborn.lib.ModInfo;
|
||||
|
||||
@RebornRegistry(modID = ModInfo.MOD_ID)
|
||||
public class TileGenerator extends TilePowerAcceptor implements IWrenchable, IInventoryProvider, IContainerProvider {
|
||||
public class TileSolidFuelGenerator extends TilePowerAcceptor implements IWrenchable, IInventoryProvider, IContainerProvider {
|
||||
|
||||
@ConfigRegistry(config = "machines", category = "generator", key = "GeneratorMaxOutput", comment = "Solid Fuel Generator Max Output (Value in EU)")
|
||||
public static int maxOutput = 32;
|
||||
|
@ -54,7 +54,7 @@ public class TileGenerator extends TilePowerAcceptor implements IWrenchable, IIn
|
|||
@ConfigRegistry(config = "machines", category = "generator", key = "GeneratorEnergyOutput", comment = "Solid Fuel Generator Energy Output Amount (Value in EU)")
|
||||
public static int outputAmount = 10;
|
||||
|
||||
public Inventory inventory = new Inventory(2, "TileGenerator", 64, this);
|
||||
public Inventory inventory = new Inventory(2, "TileSolidFuelGenerator", 64, this);
|
||||
public int fuelSlot = 0;
|
||||
public int burnTime;
|
||||
public int totalBurnTime = 0;
|
||||
|
@ -64,7 +64,7 @@ public class TileGenerator extends TilePowerAcceptor implements IWrenchable, IIn
|
|||
public boolean lastTickBurning;
|
||||
ItemStack burnItem;
|
||||
|
||||
public TileGenerator() {
|
||||
public TileSolidFuelGenerator() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
@ -81,7 +81,7 @@ public class TileGenerator extends TilePowerAcceptor implements IWrenchable, IIn
|
|||
if (this.getEnergy() < this.getMaxPower()) {
|
||||
if (this.burnTime > 0) {
|
||||
this.burnTime--;
|
||||
this.addEnergy(TileGenerator.outputAmount);
|
||||
this.addEnergy(TileSolidFuelGenerator.outputAmount);
|
||||
this.isBurning = true;
|
||||
}
|
||||
} else {
|
||||
|
@ -90,7 +90,7 @@ public class TileGenerator extends TilePowerAcceptor implements IWrenchable, IIn
|
|||
|
||||
if (this.burnTime == 0) {
|
||||
this.updateState();
|
||||
this.burnTime = this.totalBurnTime = TileGenerator.getItemBurnTime(this.getStackInSlot(this.fuelSlot));
|
||||
this.burnTime = this.totalBurnTime = TileSolidFuelGenerator.getItemBurnTime(this.getStackInSlot(this.fuelSlot));
|
||||
if (this.burnTime > 0) {
|
||||
this.updateState();
|
||||
this.burnItem = this.getStackInSlot(this.fuelSlot);
|
||||
|
@ -204,7 +204,7 @@ public class TileGenerator extends TilePowerAcceptor implements IWrenchable, IIn
|
|||
|
||||
@Override
|
||||
public boolean canInsertItem(int index, ItemStack itemStackIn, EnumFacing direction) {
|
||||
return TileGenerator.getItemBurnTime(itemStackIn) != 0;
|
||||
return TileSolidFuelGenerator.getItemBurnTime(itemStackIn) != 0;
|
||||
}
|
||||
|
||||
@Override
|
|
@ -38,7 +38,7 @@ import techreborn.lib.ModInfo;
|
|||
import techreborn.tiles.storage.TileEnergyStorage;
|
||||
|
||||
@RebornRegistry(modID = ModInfo.MOD_ID)
|
||||
public class TileIDSU extends TileEnergyStorage implements IContainerProvider {
|
||||
public class TileInterdimensionalSU extends TileEnergyStorage implements IContainerProvider {
|
||||
|
||||
@ConfigRegistry(config = "machines", category = "idsu", key = "IdsuMaxInput", comment = "IDSU Max Input (Value in EU)")
|
||||
public static int maxInput = 8192;
|
||||
|
@ -49,7 +49,7 @@ public class TileIDSU extends TileEnergyStorage implements IContainerProvider {
|
|||
|
||||
public String ownerUdid;
|
||||
|
||||
public TileIDSU() {
|
||||
public TileInterdimensionalSU() {
|
||||
super("IDSU", 2, ModBlocks.INTERDIMENSIONAL_SU, EnumPowerTier.EXTREME, maxInput, maxOutput, maxEnergy);
|
||||
}
|
||||
|
|
@ -28,24 +28,24 @@ import java.util.ArrayList;
|
|||
|
||||
public class LesuNetwork {
|
||||
|
||||
public ArrayList<TileLesuStorage> storages = new ArrayList<>();
|
||||
public ArrayList<TileLSUStorage> storages = new ArrayList<>();
|
||||
|
||||
public TileLesu master;
|
||||
public TileLapotronicSU master;
|
||||
|
||||
public void addElement(TileLesuStorage lesuStorage) {
|
||||
public void addElement(TileLSUStorage lesuStorage) {
|
||||
if (!storages.contains(lesuStorage) && storages.size() < 5000) {
|
||||
storages.add(lesuStorage);
|
||||
}
|
||||
}
|
||||
|
||||
public void removeElement(TileLesuStorage lesuStorage) {
|
||||
public void removeElement(TileLSUStorage lesuStorage) {
|
||||
storages.remove(lesuStorage);
|
||||
rebuild();
|
||||
}
|
||||
|
||||
private void rebuild() {
|
||||
master = null;
|
||||
for (TileLesuStorage lesuStorage : storages) {
|
||||
for (TileLSUStorage lesuStorage : storages) {
|
||||
lesuStorage.findAndJoinNetwork(lesuStorage.getWorld(), lesuStorage.getPos().getX(),
|
||||
lesuStorage.getPos().getY(), lesuStorage.getPos().getZ());
|
||||
}
|
||||
|
@ -53,10 +53,10 @@ public class LesuNetwork {
|
|||
|
||||
public void merge(LesuNetwork network) {
|
||||
if (network != this) {
|
||||
ArrayList<TileLesuStorage> tileLesuStorages = new ArrayList<>();
|
||||
ArrayList<TileLSUStorage> tileLesuStorages = new ArrayList<>();
|
||||
tileLesuStorages.addAll(network.storages);
|
||||
network.clear(false);
|
||||
for (TileLesuStorage lesuStorage : tileLesuStorages) {
|
||||
for (TileLSUStorage lesuStorage : tileLesuStorages) {
|
||||
lesuStorage.setNetwork(this);
|
||||
}
|
||||
if (network.master != null && this.master == null) {
|
||||
|
@ -67,7 +67,7 @@ public class LesuNetwork {
|
|||
|
||||
private void clear(boolean clearTiles) {
|
||||
if (clearTiles) {
|
||||
for (TileLesuStorage tileLesuStorage : storages) {
|
||||
for (TileLSUStorage tileLesuStorage : storages) {
|
||||
tileLesuStorage.resetNetwork();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.world.World;
|
||||
import reborncore.common.tile.TileLegacyMachineBase;
|
||||
|
||||
public class TileLesuStorage extends TileLegacyMachineBase {
|
||||
public class TileLSUStorage extends TileLegacyMachineBase {
|
||||
|
||||
public LesuNetwork network;
|
||||
|
||||
|
@ -52,8 +52,8 @@ public class TileLesuStorage extends TileLegacyMachineBase {
|
|||
network.addElement(this);
|
||||
for (EnumFacing direction : EnumFacing.values()) {
|
||||
if (world.getTileEntity(new BlockPos(x + direction.getFrontOffsetX(), y + direction.getFrontOffsetY(),
|
||||
z + direction.getFrontOffsetZ())) instanceof TileLesuStorage) {
|
||||
TileLesuStorage lesu = (TileLesuStorage) world
|
||||
z + direction.getFrontOffsetZ())) instanceof TileLSUStorage) {
|
||||
TileLSUStorage lesu = (TileLSUStorage) world
|
||||
.getTileEntity(new BlockPos(x + direction.getFrontOffsetX(), y + direction.getFrontOffsetY(),
|
||||
z + direction.getFrontOffsetZ()));
|
||||
if (lesu.network != null) {
|
|
@ -31,13 +31,13 @@ import reborncore.common.powerSystem.TilePowerAcceptor;
|
|||
import reborncore.common.registration.RebornRegistry;
|
||||
import reborncore.common.registration.impl.ConfigRegistry;
|
||||
import reborncore.common.util.Inventory;
|
||||
import techreborn.blocks.storage.BlockLESU;
|
||||
import techreborn.blocks.storage.BlockLapotronicSU;
|
||||
import techreborn.lib.ModInfo;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@RebornRegistry(modID = ModInfo.MOD_ID)
|
||||
public class TileLesu extends TilePowerAcceptor {// TODO wrench
|
||||
public class TileLapotronicSU extends TilePowerAcceptor {// TODO wrench
|
||||
|
||||
@ConfigRegistry(config = "machines", category = "lesu", key = "LesuMaxInput", comment = "LESU Max Input (Value in EU)")
|
||||
public static int maxInput = 8192;
|
||||
|
@ -49,7 +49,7 @@ public class TileLesu extends TilePowerAcceptor {// TODO wrench
|
|||
public static int extraIOPerBlock = 8;
|
||||
|
||||
public int connectedBlocks = 0;
|
||||
public Inventory inventory = new Inventory(2, "TileAesu", 64, this);
|
||||
public Inventory inventory = new Inventory(2, "TileAdjustableSU", 64, this);
|
||||
private ArrayList<LesuNetwork> countedNetworks = new ArrayList<>();
|
||||
private double euLastTick = 0;
|
||||
private double euChange;
|
||||
|
@ -57,7 +57,7 @@ public class TileLesu extends TilePowerAcceptor {// TODO wrench
|
|||
private int output;
|
||||
private int maxStorage;
|
||||
|
||||
public TileLesu() {
|
||||
public TileLapotronicSU() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
@ -72,11 +72,11 @@ public class TileLesu extends TilePowerAcceptor {// TODO wrench
|
|||
for (EnumFacing dir : EnumFacing.values()) {
|
||||
if (world.getTileEntity(
|
||||
new BlockPos(getPos().getX() + dir.getFrontOffsetX(), getPos().getY() + dir.getFrontOffsetY(),
|
||||
getPos().getZ() + dir.getFrontOffsetZ())) instanceof TileLesuStorage) {
|
||||
if (((TileLesuStorage) world.getTileEntity(
|
||||
getPos().getZ() + dir.getFrontOffsetZ())) instanceof TileLSUStorage) {
|
||||
if (((TileLSUStorage) world.getTileEntity(
|
||||
new BlockPos(getPos().getX() + dir.getFrontOffsetX(), getPos().getY() + dir.getFrontOffsetY(),
|
||||
getPos().getZ() + dir.getFrontOffsetZ()))).network != null) {
|
||||
LesuNetwork network = ((TileLesuStorage) world.getTileEntity(new BlockPos(
|
||||
LesuNetwork network = ((TileLSUStorage) world.getTileEntity(new BlockPos(
|
||||
getPos().getX() + dir.getFrontOffsetX(), getPos().getY() + dir.getFrontOffsetY(),
|
||||
getPos().getZ() + dir.getFrontOffsetZ()))).network;
|
||||
if (!countedNetworks.contains(network)) {
|
||||
|
@ -145,8 +145,8 @@ public class TileLesu extends TilePowerAcceptor {// TODO wrench
|
|||
@Override
|
||||
public EnumFacing getFacingEnum() {
|
||||
Block block = world.getBlockState(pos).getBlock();
|
||||
if (block instanceof BlockLESU) {
|
||||
return ((BlockLESU) block).getFacing(world.getBlockState(pos));
|
||||
if (block instanceof BlockLapotronicSU) {
|
||||
return ((BlockLapotronicSU) block).getFacing(world.getBlockState(pos));
|
||||
}
|
||||
return null;
|
||||
}
|
|
@ -34,9 +34,9 @@ public class MultiblockChecker {
|
|||
|
||||
public static final BlockPos ZERO_OFFSET = BlockPos.ORIGIN;
|
||||
|
||||
public static final int CASING_NORMAL = 0;
|
||||
public static final int CASING_REINFORCED = 1;
|
||||
public static final int CASING_ADVANCED = 2;
|
||||
public static final String STANDARD_CASING = "standard";
|
||||
public static final String REINFORCED_CASING = "reinforced";
|
||||
public static final String ADVANCED_CASING = "advanced";
|
||||
|
||||
private final World world;
|
||||
private final BlockPos downCenter;
|
||||
|
@ -46,10 +46,10 @@ public class MultiblockChecker {
|
|||
this.downCenter = downCenter;
|
||||
}
|
||||
|
||||
public boolean checkCasing(int offX, int offY, int offZ, int type) {
|
||||
public boolean checkCasing(int offX, int offY, int offZ, String type) {
|
||||
IBlockState block = getBlock(offX, offY, offZ);
|
||||
if (block.getBlock() == ModBlocks.MACHINE_CASINGS) {
|
||||
if (block.getValue(BlockMachineCasing.METADATA) == type)
|
||||
if (block.getValue(BlockMachineCasing.TYPE).equals(type))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -65,7 +65,7 @@ public class MultiblockChecker {
|
|||
return world.getBlockState(pos);
|
||||
}
|
||||
|
||||
public boolean checkRectY(int sizeX, int sizeZ, int casingType, BlockPos offset) {
|
||||
public boolean checkRectY(int sizeX, int sizeZ, String casingType, BlockPos offset) {
|
||||
for (int x = -sizeX; x <= sizeX; x++) {
|
||||
for (int z = -sizeZ; z <= sizeZ; z++) {
|
||||
if (!checkCasing(x + offset.getX(), offset.getY(), z + offset.getZ(), casingType))
|
||||
|
@ -75,7 +75,7 @@ public class MultiblockChecker {
|
|||
return true;
|
||||
}
|
||||
|
||||
public boolean checkRectZ(int sizeX, int sizeY, int casingType, BlockPos offset) {
|
||||
public boolean checkRectZ(int sizeX, int sizeY, String casingType, BlockPos offset) {
|
||||
for (int x = -sizeX; x <= sizeX; x++) {
|
||||
for (int y = -sizeY; y <= sizeY; y++) {
|
||||
if (!checkCasing(x + offset.getX(), y + offset.getY(), offset.getZ(), casingType))
|
||||
|
@ -85,7 +85,7 @@ public class MultiblockChecker {
|
|||
return true;
|
||||
}
|
||||
|
||||
public boolean checkRectX(int sizeZ, int sizeY, int casingType, BlockPos offset) {
|
||||
public boolean checkRectX(int sizeZ, int sizeY, String casingType, BlockPos offset) {
|
||||
for (int z = -sizeZ; z <= sizeZ; z++) {
|
||||
for (int y = -sizeY; y <= sizeY; y++) {
|
||||
if (!checkCasing(offset.getX(), y + offset.getY(), z + offset.getZ(), casingType))
|
||||
|
@ -95,7 +95,7 @@ public class MultiblockChecker {
|
|||
return true;
|
||||
}
|
||||
|
||||
public boolean checkRingY(int sizeX, int sizeZ, int casingType, BlockPos offset) {
|
||||
public boolean checkRingY(int sizeX, int sizeZ, String casingType, BlockPos offset) {
|
||||
for (int x = -sizeX; x <= sizeX; x++) {
|
||||
for (int z = -sizeZ; z <= sizeZ; z++) {
|
||||
if ((x == sizeX || x == -sizeX) || (z == sizeZ || z == -sizeZ)) {
|
||||
|
@ -107,7 +107,7 @@ public class MultiblockChecker {
|
|||
return true;
|
||||
}
|
||||
|
||||
public boolean checkRingYHollow(int sizeX, int sizeZ, int casingType, BlockPos offset) {
|
||||
public boolean checkRingYHollow(int sizeX, int sizeZ, String casingType, BlockPos offset) {
|
||||
for (int x = -sizeX; x <= sizeX; x++) {
|
||||
for (int z = -sizeZ; z <= sizeZ; z++) {
|
||||
if ((x == sizeX || x == -sizeX) || (z == sizeZ || z == -sizeZ)) {
|
||||
|
|
|
@ -87,9 +87,9 @@ public class TileImplosionCompressor extends TilePowerAcceptor
|
|||
}
|
||||
|
||||
public boolean getMutliBlock() {
|
||||
final boolean down = this.multiblockChecker.checkRectY(1, 1, MultiblockChecker.CASING_REINFORCED, MultiblockChecker.ZERO_OFFSET);
|
||||
final boolean up = this.multiblockChecker.checkRectY(1, 1, MultiblockChecker.CASING_REINFORCED, new BlockPos(0, 2, 0));
|
||||
final boolean chamber = this.multiblockChecker.checkRingYHollow(1, 1, MultiblockChecker.CASING_REINFORCED, new BlockPos(0, 1, 0));
|
||||
final boolean down = this.multiblockChecker.checkRectY(1, 1, MultiblockChecker.REINFORCED_CASING, MultiblockChecker.ZERO_OFFSET);
|
||||
final boolean up = this.multiblockChecker.checkRectY(1, 1, MultiblockChecker.REINFORCED_CASING, new BlockPos(0, 2, 0));
|
||||
final boolean chamber = this.multiblockChecker.checkRingYHollow(1, 1, MultiblockChecker.REINFORCED_CASING, new BlockPos(0, 1, 0));
|
||||
return down && chamber && up;
|
||||
}
|
||||
|
||||
|
|
|
@ -105,11 +105,11 @@ public class TileIndustrialGrinder extends TilePowerAcceptor implements IWrencha
|
|||
if (multiblockChecker == null) {
|
||||
return false;
|
||||
}
|
||||
final boolean down = this.multiblockChecker.checkRectY(1, 1, MultiblockChecker.CASING_NORMAL,
|
||||
final boolean down = this.multiblockChecker.checkRectY(1, 1, MultiblockChecker.STANDARD_CASING,
|
||||
MultiblockChecker.ZERO_OFFSET);
|
||||
final boolean up = this.multiblockChecker.checkRectY(1, 1, MultiblockChecker.CASING_NORMAL,
|
||||
final boolean up = this.multiblockChecker.checkRectY(1, 1, MultiblockChecker.STANDARD_CASING,
|
||||
new BlockPos(0, 2, 0));
|
||||
final boolean blade = this.multiblockChecker.checkRingY(1, 1, MultiblockChecker.CASING_REINFORCED,
|
||||
final boolean blade = this.multiblockChecker.checkRingY(1, 1, MultiblockChecker.REINFORCED_CASING,
|
||||
new BlockPos(0, 1, 0));
|
||||
final IBlockState centerBlock = this.multiblockChecker.getBlock(0, 1, 0);
|
||||
final boolean center = centerBlock.getBlock() == Blocks.WATER;
|
||||
|
|
|
@ -121,11 +121,11 @@ public class TileIndustrialSawmill extends TilePowerAcceptor
|
|||
}
|
||||
|
||||
public boolean getMutliBlock() {
|
||||
final boolean down = this.multiblockChecker.checkRectY(1, 1, MultiblockChecker.CASING_NORMAL,
|
||||
final boolean down = this.multiblockChecker.checkRectY(1, 1, MultiblockChecker.STANDARD_CASING,
|
||||
MultiblockChecker.ZERO_OFFSET);
|
||||
final boolean up = this.multiblockChecker.checkRectY(1, 1, MultiblockChecker.CASING_NORMAL,
|
||||
final boolean up = this.multiblockChecker.checkRectY(1, 1, MultiblockChecker.STANDARD_CASING,
|
||||
new BlockPos(0, 2, 0));
|
||||
final boolean blade = this.multiblockChecker.checkRingY(1, 1, MultiblockChecker.CASING_REINFORCED,
|
||||
final boolean blade = this.multiblockChecker.checkRingY(1, 1, MultiblockChecker.REINFORCED_CASING,
|
||||
new BlockPos(0, 1, 0));
|
||||
final IBlockState centerBlock = this.multiblockChecker.getBlock(0, 1, 0);
|
||||
final boolean center = centerBlock.getBlock() == Blocks.WATER;
|
||||
|
|
|
@ -68,7 +68,7 @@ public class TileVacuumFreezer extends TilePowerAcceptor
|
|||
}
|
||||
|
||||
public boolean getMultiBlock() {
|
||||
return this.multiblockChecker.checkRectY(1, 1, MultiblockChecker.CASING_REINFORCED, MultiblockChecker.ZERO_OFFSET);
|
||||
return this.multiblockChecker.checkRectY(1, 1, MultiblockChecker.REINFORCED_CASING, MultiblockChecker.ZERO_OFFSET);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -34,10 +34,10 @@ import techreborn.init.ModBlocks;
|
|||
/**
|
||||
* Created by modmuss50 on 14/03/2016.
|
||||
*/
|
||||
public class TileMFSU extends TileEnergyStorage implements IContainerProvider {
|
||||
public class TileHighVoltageSU extends TileEnergyStorage implements IContainerProvider {
|
||||
|
||||
public TileMFSU() {
|
||||
super("MFSU", 2, ModBlocks.HVSU, EnumPowerTier.HIGH, 2048, 2048, 1000000);
|
||||
public TileHighVoltageSU() {
|
||||
super("HIGH_VOLTAGE_SU", 2, ModBlocks.HIGH_VOLTAGE_SU, EnumPowerTier.HIGH, 2048, 2048, 1000000);
|
||||
}
|
||||
|
||||
@Override
|
|
@ -34,10 +34,10 @@ import techreborn.init.ModBlocks;
|
|||
/**
|
||||
* Created by modmuss50 on 14/03/2016.
|
||||
*/
|
||||
public class TileBatBox extends TileEnergyStorage implements IContainerProvider {
|
||||
public class TileLowVoltageSU extends TileEnergyStorage implements IContainerProvider {
|
||||
|
||||
public TileBatBox() {
|
||||
super("BatBox", 2, ModBlocks.BATTERY_BOX, EnumPowerTier.LOW, 32, 32, 40000);
|
||||
public TileLowVoltageSU() {
|
||||
super("BatBox", 2, ModBlocks.LOW_VOLTAGE_SU, EnumPowerTier.LOW, 32, 32, 40000);
|
||||
}
|
||||
|
||||
@Override
|
|
@ -34,10 +34,10 @@ import techreborn.init.ModBlocks;
|
|||
/**
|
||||
* Created by modmuss50 on 14/03/2016.
|
||||
*/
|
||||
public class TileMFE extends TileEnergyStorage implements IContainerProvider {
|
||||
public class TileMediumVoltageSU extends TileEnergyStorage implements IContainerProvider {
|
||||
|
||||
public TileMFE() {
|
||||
super("MFE", 2, ModBlocks.MVSU, EnumPowerTier.MEDIUM, 512, 512, 600000);
|
||||
public TileMediumVoltageSU() {
|
||||
super("MEDIUM_VOLTAGE_SU", 2, ModBlocks.MEDIUM_VOLTAGE_SU, EnumPowerTier.MEDIUM, 512, 512, 600000);
|
||||
}
|
||||
|
||||
@Override
|
Loading…
Add table
Add a link
Reference in a new issue