Auto format code
This commit is contained in:
parent
fc4d8686b8
commit
b25742dde0
175 changed files with 527 additions and 737 deletions
|
@ -52,7 +52,7 @@ import techreborn.multiblocks.MultiBlockCasing;
|
|||
import techreborn.tiles.TileMachineCasing;
|
||||
|
||||
public class TileBlastFurnace extends TilePowerAcceptor implements IWrenchable, IInventoryProvider,
|
||||
ITileRecipeHandler<BlastFurnaceRecipe>, IRecipeCrafterProvider, IContainerProvider {
|
||||
ITileRecipeHandler<BlastFurnaceRecipe>, IRecipeCrafterProvider, IContainerProvider {
|
||||
|
||||
public static int euTick = 5;
|
||||
public int tickTime;
|
||||
|
@ -108,32 +108,32 @@ public class TileBlastFurnace extends TilePowerAcceptor implements IWrenchable,
|
|||
public int getHeat() {
|
||||
for (final EnumFacing direction : EnumFacing.values()) {
|
||||
final TileEntity tileEntity = this.world.getTileEntity(new BlockPos(this.getPos().getX() + direction.getFrontOffsetX(),
|
||||
this.getPos().getY() + direction.getFrontOffsetY(), this.getPos().getZ() + direction.getFrontOffsetZ()));
|
||||
this.getPos().getY() + direction.getFrontOffsetY(), this.getPos().getZ() + direction.getFrontOffsetZ()));
|
||||
if (tileEntity instanceof TileMachineCasing) {
|
||||
if (((TileMachineCasing) tileEntity).isConnected()
|
||||
&& ((TileMachineCasing) tileEntity).getMultiblockController().isAssembled()) {
|
||||
&& ((TileMachineCasing) tileEntity).getMultiblockController().isAssembled()) {
|
||||
final MultiBlockCasing casing = ((TileMachineCasing) tileEntity).getMultiblockController();
|
||||
final Location location = new Location(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), direction);
|
||||
location.modifyPositionFromSide(direction, 1);
|
||||
int heat = 0;
|
||||
if (this.world.getBlockState(new BlockPos(location.getX(), location.getY() - 1, location.getZ()))
|
||||
.getBlock() == tileEntity.getBlockType()) {
|
||||
.getBlock() == tileEntity.getBlockType()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (final IMultiblockPart part : casing.connectedParts) {
|
||||
final BlockMachineCasing casing1 = (BlockMachineCasing) this.world.getBlockState(part.getPos())
|
||||
.getBlock();
|
||||
.getBlock();
|
||||
heat += casing1
|
||||
.getHeatFromState(part.getWorld().getBlockState(part.getWorldLocation().toBlockPos()));
|
||||
.getHeatFromState(part.getWorld().getBlockState(part.getWorldLocation().toBlockPos()));
|
||||
// TODO meta fix
|
||||
}
|
||||
|
||||
if (this.world.getBlockState(new BlockPos(location.getX(), location.getY(), location.getZ()))
|
||||
.getBlock().getUnlocalizedName().equals("tile.lava")
|
||||
&& this.world
|
||||
.getBlockState(new BlockPos(location.getX(), location.getY() + 1, location.getZ()))
|
||||
.getBlock().getUnlocalizedName().equals("tile.lava")) {
|
||||
.getBlock().getUnlocalizedName().equals("tile.lava")
|
||||
&& this.world
|
||||
.getBlockState(new BlockPos(location.getX(), location.getY() + 1, location.getZ()))
|
||||
.getBlock().getUnlocalizedName().equals("tile.lava")) {
|
||||
heat += 500;
|
||||
}
|
||||
return heat;
|
||||
|
@ -146,7 +146,7 @@ public class TileBlastFurnace extends TilePowerAcceptor implements IWrenchable,
|
|||
@Override
|
||||
public void onDataPacket(final NetworkManager net, final SPacketUpdateTileEntity packet) {
|
||||
this.world.markBlockRangeForRenderUpdate(this.getPos().getX(), this.getPos().getY(), this.getPos().getZ(), this.getPos().getX(),
|
||||
this.getPos().getY(), this.getPos().getZ());
|
||||
this.getPos().getY(), this.getPos().getZ());
|
||||
this.readFromNBT(packet.getNbtCompound());
|
||||
}
|
||||
|
||||
|
@ -252,8 +252,8 @@ public class TileBlastFurnace extends TilePowerAcceptor implements IWrenchable,
|
|||
@Override
|
||||
public BuiltContainer createContainer(final EntityPlayer player) {
|
||||
return new ContainerBuilder("blastfurnace").player(player.inventory).inventory().hotbar()
|
||||
.addInventory().tile(this).slot(0, 50, 27).slot(1, 50, 47).outputSlot(2, 92, 36).outputSlot(3, 110, 36)
|
||||
.syncEnergyValue().syncCrafterValue().syncIntegerValue(this::getHeat, this::setHeat).addInventory()
|
||||
.create();
|
||||
.addInventory().tile(this).slot(0, 50, 27).slot(1, 50, 47).outputSlot(2, 92, 36).outputSlot(3, 110, 36)
|
||||
.syncEnergyValue().syncCrafterValue().syncIntegerValue(this::getHeat, this::setHeat).addInventory()
|
||||
.create();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ import techreborn.client.container.builder.ContainerBuilder;
|
|||
import techreborn.init.ModBlocks;
|
||||
|
||||
public class TileImplosionCompressor extends TilePowerAcceptor
|
||||
implements IWrenchable, IInventoryProvider, IRecipeCrafterProvider, IContainerProvider {
|
||||
implements IWrenchable, IInventoryProvider, IRecipeCrafterProvider, IContainerProvider {
|
||||
|
||||
public Inventory inventory = new Inventory(4, "TileImplosionCompressor", 64, this);
|
||||
public MultiblockChecker multiblockChecker;
|
||||
|
@ -174,8 +174,8 @@ public class TileImplosionCompressor extends TilePowerAcceptor
|
|||
@Override
|
||||
public BuiltContainer createContainer(final EntityPlayer player) {
|
||||
return new ContainerBuilder("implosioncompressor").player(player.inventory).inventory(8, 84).hotbar(8, 142)
|
||||
.addInventory().tile(this).slot(0, 37, 26).slot(1, 37, 44).outputSlot(2, 93, 35).outputSlot(3, 111, 35)
|
||||
.syncEnergyValue().syncCrafterValue().addInventory().create();
|
||||
.addInventory().tile(this).slot(0, 37, 26).slot(1, 37, 44).outputSlot(2, 93, 35).outputSlot(3, 111, 35)
|
||||
.syncEnergyValue().syncCrafterValue().addInventory().create();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ public class TileIndustrialGrinder extends TilePowerAcceptor implements IWrencha
|
|||
}
|
||||
|
||||
public boolean getMutliBlock() {
|
||||
if(multiblockChecker == null){
|
||||
if (multiblockChecker == null) {
|
||||
return false;
|
||||
}
|
||||
final boolean down = this.multiblockChecker.checkRectY(1, 1, MultiblockChecker.CASING_NORMAL,
|
||||
|
@ -225,7 +225,7 @@ public class TileIndustrialGrinder extends TilePowerAcceptor implements IWrencha
|
|||
|
||||
@Override
|
||||
public boolean canCraft(final TileEntity tile, final IndustrialGrinderRecipe recipe) {
|
||||
if(!getMutliBlock()){
|
||||
if (!getMutliBlock()) {
|
||||
return false;
|
||||
}
|
||||
final FluidStack recipeFluid = recipe.fluidStack;
|
||||
|
|
|
@ -50,7 +50,7 @@ import techreborn.items.ItemDusts;
|
|||
import java.util.Random;
|
||||
|
||||
public class TileIndustrialSawmill extends TilePowerAcceptor
|
||||
implements IWrenchable, IInventoryProvider, IContainerProvider {
|
||||
implements IWrenchable, IInventoryProvider, IContainerProvider {
|
||||
public static final int TANK_CAPACITY = 16000;
|
||||
|
||||
public Inventory inventory = new Inventory(5, "Sawmill", 64, this);
|
||||
|
@ -74,8 +74,8 @@ implements IWrenchable, IInventoryProvider, IContainerProvider {
|
|||
for (final int id : OreDictionary.getOreIDs(wood)) {
|
||||
final String name = OreDictionary.getOreName(id);
|
||||
if (name.equals("logWood") && this.canAddOutput(2, 10) && this.canAddOutput(3, 5)
|
||||
&& this.canAddOutput(4, 3) && this.canUseEnergy(128.0F) && !this.tank.isEmpty()
|
||||
&& this.tank.getFluid().amount >= 1000) {
|
||||
&& this.canAddOutput(4, 3) && this.canUseEnergy(128.0F) && !this.tank.isEmpty()
|
||||
&& this.tank.getFluid().amount >= 1000) {
|
||||
wood.shrink(1);
|
||||
if (wood.getCount() == 0)
|
||||
this.setInventorySlotContents(0, ItemStack.EMPTY);
|
||||
|
@ -122,11 +122,11 @@ implements IWrenchable, IInventoryProvider, IContainerProvider {
|
|||
|
||||
public boolean getMutliBlock() {
|
||||
final boolean down = this.multiblockChecker.checkRectY(1, 1, MultiblockChecker.CASING_NORMAL,
|
||||
MultiblockChecker.ZERO_OFFSET);
|
||||
MultiblockChecker.ZERO_OFFSET);
|
||||
final boolean up = this.multiblockChecker.checkRectY(1, 1, MultiblockChecker.CASING_NORMAL,
|
||||
new BlockPos(0, 2, 0));
|
||||
new BlockPos(0, 2, 0));
|
||||
final boolean blade = this.multiblockChecker.checkRingY(1, 1, MultiblockChecker.CASING_REINFORCED,
|
||||
new BlockPos(0, 1, 0));
|
||||
new BlockPos(0, 1, 0));
|
||||
final IBlockState centerBlock = this.multiblockChecker.getBlock(0, 1, 0);
|
||||
final boolean center = centerBlock.getBlock() == Blocks.WATER;
|
||||
return down && center && blade && up;
|
||||
|
@ -243,7 +243,7 @@ implements IWrenchable, IInventoryProvider, IContainerProvider {
|
|||
@Override
|
||||
public BuiltContainer createContainer(final EntityPlayer player) {
|
||||
return new ContainerBuilder("industrialsawmill").player(player.inventory).inventory(8, 84).hotbar(8, 142)
|
||||
.addInventory().tile(this).slot(0, 32, 26).slot(1, 32, 44).outputSlot(2, 84, 35).outputSlot(3, 102, 35)
|
||||
.outputSlot(4, 120, 35).syncEnergyValue().addInventory().create();
|
||||
.addInventory().tile(this).slot(0, 32, 26).slot(1, 32, 44).outputSlot(2, 84, 35).outputSlot(3, 102, 35)
|
||||
.outputSlot(4, 120, 35).syncEnergyValue().addInventory().create();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ import techreborn.client.container.builder.ContainerBuilder;
|
|||
import techreborn.init.ModBlocks;
|
||||
|
||||
public class TileVacuumFreezer extends TilePowerAcceptor
|
||||
implements IWrenchable, IInventoryProvider, IRecipeCrafterProvider, IContainerProvider {
|
||||
implements IWrenchable, IInventoryProvider, IRecipeCrafterProvider, IContainerProvider {
|
||||
|
||||
public Inventory inventory = new Inventory(3, "TileVacuumFreezer", 64, this);
|
||||
public MultiblockChecker multiblockChecker;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue