Water crucibles now collect rain water. Close #49
This commit is contained in:
parent
9177aea415
commit
ffe32fe3ac
|
|
@ -333,7 +333,8 @@ public abstract class AbstractCrucibleBlockEntity extends EBlockEntity {
|
||||||
crucible.needsLightUpdate = false;
|
crucible.needsLightUpdate = false;
|
||||||
}
|
}
|
||||||
// Update twice per tick
|
// Update twice per tick
|
||||||
if (!level.isClientSide && (level.getGameTime() % 10L) == 0L) {
|
if (!level.isClientSide) {
|
||||||
|
if ((level.getGameTime() % 10L) == 0L) {
|
||||||
short delta = (short) Math.min(crucible.solids, crucible.getMeltingRate());
|
short delta = (short) Math.min(crucible.solids, crucible.getMeltingRate());
|
||||||
|
|
||||||
// Skip if no heat
|
// Skip if no heat
|
||||||
|
|
@ -357,6 +358,16 @@ public abstract class AbstractCrucibleBlockEntity extends EBlockEntity {
|
||||||
crucible.markUpdated();
|
crucible.markUpdated();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (crucible instanceof WaterCrucibleBlockEntity && level.isRainingAt(pos.above())) {
|
||||||
|
if (crucible.tank.isEmpty()) {
|
||||||
|
crucible.tank.setFluid(new FluidStack(Fluids.WATER, 1));
|
||||||
|
crucible.markUpdated();
|
||||||
|
} else if (crucible.tank.getFluid().getFluid() == Fluids.WATER) {
|
||||||
|
crucible.tank.getFluid().grow(1);
|
||||||
|
crucible.markUpdated();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user