Fix warnings
This commit is contained in:
parent
ae75191c00
commit
02473d4585
1 changed files with 30 additions and 30 deletions
|
@ -37,7 +37,6 @@ import net.minecraft.util.math.BlockPos;
|
||||||
import reborncore.api.recipe.IRecipeCrafterProvider;
|
import reborncore.api.recipe.IRecipeCrafterProvider;
|
||||||
import reborncore.api.tile.IInventoryProvider;
|
import reborncore.api.tile.IInventoryProvider;
|
||||||
import reborncore.api.IToolDrop;
|
import reborncore.api.IToolDrop;
|
||||||
import reborncore.common.misc.Location;
|
|
||||||
import reborncore.common.multiblock.IMultiblockPart;
|
import reborncore.common.multiblock.IMultiblockPart;
|
||||||
import reborncore.common.powerSystem.TilePowerAcceptor;
|
import reborncore.common.powerSystem.TilePowerAcceptor;
|
||||||
import reborncore.common.recipes.RecipeCrafter;
|
import reborncore.common.recipes.RecipeCrafter;
|
||||||
|
@ -110,16 +109,19 @@ public class TileIndustrialBlastFurnace extends TilePowerAcceptor implements ITo
|
||||||
if (!this.getMutliBlock()){
|
if (!this.getMutliBlock()){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
for (final EnumFacing direction : EnumFacing.values()) {
|
|
||||||
final TileEntity tileEntity = this.world.getTileEntity(new BlockPos(this.getPos().getX() + direction.getFrontOffsetX(),
|
// Bottom center of multiblock
|
||||||
this.getPos().getY() + direction.getFrontOffsetY(), this.getPos().getZ() + direction.getFrontOffsetZ()));
|
final BlockPos location = this.getPos().offset(this.getFacing().getOpposite(), 2);
|
||||||
|
final TileEntity tileEntity = this.world.getTileEntity(location);
|
||||||
|
|
||||||
if (tileEntity instanceof TileMachineCasing) {
|
if (tileEntity instanceof TileMachineCasing) {
|
||||||
if (((TileMachineCasing) tileEntity).isConnected()
|
if (((TileMachineCasing) tileEntity).isConnected()
|
||||||
&& ((TileMachineCasing) tileEntity).getMultiblockController().isAssembled()) {
|
&& ((TileMachineCasing) tileEntity).getMultiblockController().isAssembled()) {
|
||||||
final MultiBlockCasing casing = ((TileMachineCasing) tileEntity).getMultiblockController();
|
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;
|
int heat = 0;
|
||||||
|
|
||||||
|
// Bottom center shouldn't have any tile entities below it
|
||||||
if (this.world.getBlockState(new BlockPos(location.getX(), location.getY() - 1, location.getZ()))
|
if (this.world.getBlockState(new BlockPos(location.getX(), location.getY() - 1, location.getZ()))
|
||||||
.getBlock() == tileEntity.getBlockType()) {
|
.getBlock() == tileEntity.getBlockType()) {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -128,22 +130,20 @@ public class TileIndustrialBlastFurnace extends TilePowerAcceptor implements ITo
|
||||||
for (final IMultiblockPart part : casing.connectedParts) {
|
for (final IMultiblockPart part : casing.connectedParts) {
|
||||||
final BlockMachineCasing casing1 = (BlockMachineCasing) this.world.getBlockState(part.getPos())
|
final BlockMachineCasing casing1 = (BlockMachineCasing) this.world.getBlockState(part.getPos())
|
||||||
.getBlock();
|
.getBlock();
|
||||||
heat += casing1
|
heat += casing1.getHeatFromState(this.world.getBlockState(part.getPos()));
|
||||||
.getHeatFromState(part.getWorld().getBlockState(part.getWorldLocation().toBlockPos()));
|
|
||||||
// TODO meta fix
|
// TODO meta fix
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.world.getBlockState(new BlockPos(location.getX(), location.getY() + 1, location.getZ()))
|
if (this.world.getBlockState(location.offset(EnumFacing.UP, 1)).getBlock().getUnlocalizedName()
|
||||||
.getBlock().getUnlocalizedName().equals("tile.lava")
|
.equals("tile.lava")
|
||||||
&& this.world
|
&& this.world.getBlockState(location.offset(EnumFacing.UP, 2)).getBlock().getUnlocalizedName()
|
||||||
.getBlockState(new BlockPos(location.getX(), location.getY() + 2, location.getZ()))
|
.equals("tile.lava")) {
|
||||||
.getBlock().getUnlocalizedName().equals("tile.lava")) {
|
|
||||||
heat += 500;
|
heat += 500;
|
||||||
}
|
}
|
||||||
return heat;
|
return heat;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue