mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-23 21:49:58 +00:00
#640 Graphical Glitch with Combustion Generator
Moved the fuel tank to the left.
This commit is contained in:
1 parent
aa999fadb0
commit
c8c732ebee
4 files changed
+28
-16
No files matched your search
@@ -85,8 +85,8 @@ public abstract class AbstractMachineContainer extends Container {
|
||||
} else {
|
||||
//Check from inv->input then inv->upgrade then inv->hotbar or hotbar->inv
|
||||
if(slotIndex >= startPlayerSlot) {
|
||||
if(!mergeItemStack(origStack, slotDef.getMinInputSlot(), slotDef.getMaxInputSlot() + 1, false)) {
|
||||
if(slotDef.getNumUpgradeSlots() > 0 && !mergeItemStack(origStack, slotDef.getMinUpgradeSlot(), slotDef.getMaxUpgradeSlot() + 1, false)) {
|
||||
if(slotDef.getNumInputSlots() <= 0 || !mergeItemStack(origStack, slotDef.getMinInputSlot(), slotDef.getMaxInputSlot() + 1, false)) {
|
||||
if(slotDef.getNumUpgradeSlots() <= 0 || !mergeItemStack(origStack, slotDef.getMinUpgradeSlot(), slotDef.getMaxUpgradeSlot() + 1, false)) {
|
||||
if(slotIndex <= endPlayerSlot) {
|
||||
if(!mergeItemStack(origStack, startHotBarSlot, endHotBarSlot, false)) {
|
||||
return null;
|
||||
|
||||
@@ -142,16 +142,20 @@ public class BlockCombustionGenerator extends AbstractMachineBlock<TileCombustio
|
||||
facing = me.facing;
|
||||
}
|
||||
ForgeDirection dir = ForgeDirection.getOrientation(facing);
|
||||
int xmod = Math.abs(dir.offsetX);
|
||||
int zmod = Math.abs(dir.offsetY);
|
||||
float startX = x + (dir.offsetX == 0 ? 0.5f : 0f);
|
||||
float startY = y + 0.5f;
|
||||
float startZ = z + (dir.offsetZ == 0 ? 0.5f : 0f);
|
||||
|
||||
float startX = x + (1.0F * zmod) + (0.5f * xmod);
|
||||
float startY = y + 0.5F;
|
||||
float startZ = z + (1.0F * xmod) + (0.5f * zmod);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
float xOffset = (-0.2F - rand.nextFloat() * 0.6F);
|
||||
float yOffset = -0.1F + rand.nextFloat() * 0.2F;
|
||||
float zOffset = (-0.2F - rand.nextFloat() * 0.6F);
|
||||
if(dir.offsetX == 1) {
|
||||
startX++;
|
||||
} else if (dir.offsetZ == 1) {
|
||||
startZ++;
|
||||
}
|
||||
|
||||
for (int i = 0; i < 2; i++) {
|
||||
float xOffset = 0;
|
||||
float yOffset = 0;
|
||||
float zOffset = 0;
|
||||
world.spawnParticle("smoke", startX + xOffset, startY + yOffset, startZ + zOffset, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -150,6 +150,11 @@ public class CombustionGeneratorRenderer extends TileEntitySpecialRenderer imple
|
||||
private void renderTank(TileCombustionGenerator gen, BoundingBox bb, FluidTank tank, boolean isLeft) {
|
||||
boolean scaleX = gen.getFacing() != 4 && gen.getFacing() != 5;
|
||||
float size = 0.34f;
|
||||
|
||||
if(gen.getFacing() == 5 || gen.getFacing() == 2) {
|
||||
isLeft = !isLeft;
|
||||
}
|
||||
|
||||
if(tank.getFluidAmount() > 0) {
|
||||
IIcon icon = tank.getFluid().getFluid().getStillIcon();
|
||||
if(icon != null) {
|
||||
|
||||
@@ -27,7 +27,7 @@ public class GuiCombustionGenerator extends GuiMachineBase {
|
||||
super(te, new ContainerCombustionEngine(par1InventoryPlayer, te));
|
||||
this.gen = te;
|
||||
|
||||
addToolTip(new GuiToolTip(new Rectangle(48, 21, 15, 47), "") {
|
||||
addToolTip(new GuiToolTip(new Rectangle(114, 21, 15, 47), "") {
|
||||
|
||||
@Override
|
||||
protected void updateText() {
|
||||
@@ -42,7 +42,7 @@ public class GuiCombustionGenerator extends GuiMachineBase {
|
||||
|
||||
});
|
||||
|
||||
addToolTip(new GuiToolTip(new Rectangle(114, 21, 15, 47), "") {
|
||||
addToolTip(new GuiToolTip(new Rectangle(48, 21, 15, 47), "") {
|
||||
|
||||
@Override
|
||||
protected void updateText() {
|
||||
@@ -101,7 +101,8 @@ public class GuiCombustionGenerator extends GuiMachineBase {
|
||||
int x = guiLeft + 48;
|
||||
int y = guiTop + 21;
|
||||
if(gen.coolantTank.getFluidAmount() > 0) {
|
||||
//left tank
|
||||
x = guiLeft + 114;
|
||||
//right tank
|
||||
RenderUtil.renderGuiTank(gen.coolantTank.getFluid(), 4000, gen.coolantTank.getFluidAmount() - 1000, x, y, zLevel, 15, 47);
|
||||
|
||||
if(gen.isActive()) {
|
||||
@@ -121,9 +122,10 @@ public class GuiCombustionGenerator extends GuiMachineBase {
|
||||
}
|
||||
|
||||
if(gen.fuelTank.getFluidAmount() > 0) {
|
||||
//right tank
|
||||
x = guiLeft + 114;
|
||||
//left tank
|
||||
x = guiLeft + 48;
|
||||
|
||||
//RenderUtil.renderGuiTank(gen.fuelTank.getFluid(), 4000, gen.fuelTank.getFluidAmount() - 1000, x, y, zLevel, 15, 47);
|
||||
RenderUtil.renderGuiTank(gen.fuelTank.getFluid(), 4000, gen.fuelTank.getFluidAmount() - 1000, x, y, zLevel, 15, 47);
|
||||
|
||||
if(gen.isActive()) {
|
||||
@@ -133,6 +135,7 @@ public class GuiCombustionGenerator extends GuiMachineBase {
|
||||
}
|
||||
|
||||
//center tank
|
||||
//RenderUtil.renderGuiTank(gen.fuelTank.getFluid(), 1000, Math.min(gen.fuelTank.getFluidAmount(), 1000), guiLeft + 81, guiTop + 5, zLevel, 14, 14);
|
||||
RenderUtil.renderGuiTank(gen.fuelTank.getFluid(), 1000, Math.min(gen.fuelTank.getFluidAmount(), 1000), guiLeft + 81, guiTop + 5, zLevel, 14, 14);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user