From 919c11bc2ebfb148729716519fa23346b0826c38 Mon Sep 17 00:00:00 2001 From: TimeConqueror Date: Sun, 8 Mar 2020 23:40:22 +0300 Subject: [PATCH 1/3] Updated dependencies --- build.gradle | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index ae286aa..59111b9 100644 --- a/build.gradle +++ b/build.gradle @@ -69,9 +69,9 @@ repositories { name 'rx14' url 'http://mvn.rx14.co.uk/local/' } - maven { // Baubles - name 'UsrvDE_3rdParty' - url "http://jenkins.usrv.eu:8081/nexus/content/repositories/thirdparty/" + maven { + name = "gt" + url = "http://gregtech.overminddl1.com/" } } @@ -92,7 +92,7 @@ dependencies { compile "mantle:Mantle:1.7.10-0.3.2.jenkins187:deobf" compile "tconstruct:TConstruct:" + config.mc_version + "-" + config.tconstruct_version + ":deobf" compile "info.amerifrance.guideapi:Guide-API:" + config.mc_version + "-" + config.guideapi_version + ":deobf" - compile "com.azanor.baubles:Baubles:" + config.baubles_version + ":deobf" + compile "com.azanor.baubles:Baubles:1.7.10-" + config.baubles_version + ":deobf" compile fileTree(dir: 'libs', include: '*.jar') } From 60583232c64f26d81efa4cc00efa1bfac976e961 Mon Sep 17 00:00:00 2001 From: TimeConqueror Date: Sun, 8 Mar 2020 23:50:13 +0300 Subject: [PATCH 2/3] TileLifeInfuser: Improved readability, because I hate such style --- .../common/tileentity/TileLifeInfuser.java | 54 +++++++------------ 1 file changed, 19 insertions(+), 35 deletions(-) diff --git a/src/main/java/com/arc/bloodarsenal/common/tileentity/TileLifeInfuser.java b/src/main/java/com/arc/bloodarsenal/common/tileentity/TileLifeInfuser.java index 2b13d8c..b977639 100644 --- a/src/main/java/com/arc/bloodarsenal/common/tileentity/TileLifeInfuser.java +++ b/src/main/java/com/arc/bloodarsenal/common/tileentity/TileLifeInfuser.java @@ -216,12 +216,10 @@ public class TileLifeInfuser extends TileEntity implements IInventory, IFluidTan //Logic for the actual block is under here @Override - public void updateEntity() - { + public void updateEntity() { super.updateEntity(); - if (worldObj.getWorldTime() % 10 == 0) - { + if (worldObj.getWorldTime() % 10 == 0) { int intakeMax = 500; int fluidInputted; fluidInputted = Math.min(intakeMax, capacity - this.fluid.amount); @@ -230,62 +228,48 @@ public class TileLifeInfuser extends TileEntity implements IInventory, IFluidTan this.fluidInput.amount -= fluidInputted; } - if (++ticksExisted % 10 == 0) - { - if (inv[0] != null) - { - if (inv[0].getItem() instanceof IFillable) - { - IFillable fillable = (IFillable) inv[0].getItem(); + if (++ticksExisted % 10 == 0) { + ItemStack inputStack = inv[0]; + if (inputStack != null) { + if (inputStack.getItem() instanceof IFillable) { + IFillable fillable = (IFillable) inputStack.getItem(); int fillAmount = 200; - if (fillable.getLPStored(inv[0]) < fillable.getMaxLP() && !(fillable.getLPStored(inv[0]) + fillAmount > fillable.getMaxLP()) && getFluidAmount() >= fillAmount) - { + if (fillable.getLPStored(inputStack) < fillable.getMaxLP() && !(fillable.getLPStored(inputStack) + fillAmount > fillable.getMaxLP()) && getFluidAmount() >= fillAmount) { fluid.amount = fluid.amount - fillAmount; - fillable.incrementLPStored(inv[0], fillAmount); + fillable.incrementLPStored(inputStack, fillAmount); SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); } - } - else if (inv[0].getItemDamage() > 0) - { + } else if (inputStack.getItemDamage() > 0) { int lpCost = 300; - int damage = inv[0].getItemDamage(); + int damage = inputStack.getItemDamage(); - if (getFluidAmount() >= lpCost) - { + if (getFluidAmount() >= lpCost) { fluid.amount = fluid.amount - lpCost; - inv[0].setItemDamage(Math.max(0, damage - 1)); - } - else - { + inputStack.setItemDamage(Math.max(0, damage - 1)); + } else { return; } processInput(); markDirty(); - if (damageLastTick != 0 && damageLastTick != damage) - { + if (damageLastTick != 0 && damageLastTick != damage) { //Insert fancy particles here SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); tookLastTick = true; - } - else - { + } else { tookLastTick = false; } } - } - else - { + } else { tookLastTick = false; } - damageLastTick = inv[0] == null ? 0 : inv[0].getItemDamage(); + damageLastTick = inputStack == null ? 0 : inputStack.getItemDamage(); } - if (worldObj != null) - { + if (worldObj != null) { worldObj.markBlockForUpdate(xCoord, yCoord, zCoord); } } From 9f7bbe375bd88d2f4c704d1e338d08c30a8115b9 Mon Sep 17 00:00:00 2001 From: TimeConqueror Date: Mon, 9 Mar 2020 00:09:28 +0300 Subject: [PATCH 3/3] TileLifeInfuser: fixed changing meta in items with subtypes --- build.properties | 2 +- .../com/arc/bloodarsenal/common/tileentity/TileLifeInfuser.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.properties b/build.properties index 8f55b5e..67adbfd 100644 --- a/build.properties +++ b/build.properties @@ -14,4 +14,4 @@ guideapi_version=1.0.1-20 baubles_version=1.0.1.10 forge_version=10.13.4.1614 -build_number=9 +build_number=10 diff --git a/src/main/java/com/arc/bloodarsenal/common/tileentity/TileLifeInfuser.java b/src/main/java/com/arc/bloodarsenal/common/tileentity/TileLifeInfuser.java index b977639..c2b9e1c 100644 --- a/src/main/java/com/arc/bloodarsenal/common/tileentity/TileLifeInfuser.java +++ b/src/main/java/com/arc/bloodarsenal/common/tileentity/TileLifeInfuser.java @@ -240,7 +240,7 @@ public class TileLifeInfuser extends TileEntity implements IInventory, IFluidTan fillable.incrementLPStored(inputStack, fillAmount); SpellHelper.sendIndexedParticleToAllAround(worldObj, xCoord, yCoord, zCoord, 20, worldObj.provider.dimensionId, 1, xCoord, yCoord, zCoord); } - } else if (inputStack.getItemDamage() > 0) { + } else if (inputStack.getItem().isDamageable() && inputStack.getItem().isDamaged(inputStack)) { int lpCost = 300; int damage = inputStack.getItemDamage();