mirror of
https://github.com/GTNewHorizons/BloodArsenal.git
synced 2026-10-26 14:23:58 +00:00
Merge pull request #3 from GTNewHorizons/life-infuser-fix
Life Infuser: fixed changing meta in items with subtypes
This commit is contained in:
3 files changed
+24
-40
No files matched your search
+4
-4
@@ -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')
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -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
|
||||
@@ -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.getItem().isDamageable() && inputStack.getItem().isDamaged(inputStack)) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user