From f4d920c8fd393efef76e2ee174a5bd838d1d2caf Mon Sep 17 00:00:00 2001 From: Bugord Date: Mon, 12 Aug 2024 11:24:59 +0200 Subject: [PATCH] Fixed pumpjack oil output --- .../blocks/entity/PumpjackHoleBlockEntity.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/jesz/createdieselgenerators/blocks/entity/PumpjackHoleBlockEntity.java b/src/main/java/com/jesz/createdieselgenerators/blocks/entity/PumpjackHoleBlockEntity.java index 69c34ee..3bb5364 100644 --- a/src/main/java/com/jesz/createdieselgenerators/blocks/entity/PumpjackHoleBlockEntity.java +++ b/src/main/java/com/jesz/createdieselgenerators/blocks/entity/PumpjackHoleBlockEntity.java @@ -162,7 +162,7 @@ public CompoundTag getUpdateTag() { @Override public void addBehaviours(List behaviours) { - tank = SmartFluidTankBehaviour.single(this, 1000); + tank = SmartFluidTankBehaviour.single(this, 81000); behaviours.add(tank); } @@ -181,10 +181,10 @@ public void tickFluid(boolean isCrankLarge) { if(storedOilAmount == 0){ sd.setChunkAmount(chunkPos, amount-1); oilAmount = amount -1; - storedOilAmount = 1000; + storedOilAmount = 81000; } - int subtractedAmount = Mth.clamp((int) (100 * Math.abs((float) headPos / (float) bearingPos)) * (isCrankLarge ? 2 : 1), 0, 1000); - storedOilAmount = storedOilAmount < subtractedAmount ? 0 : (int) (storedOilAmount - (100 / Math.abs((float) headPos / (float) bearingPos))); + int subtractedAmount = Mth.clamp((int) (8100 * Math.abs((float) headPos / (float) bearingPos)) * (isCrankLarge ? 2 : 1), 0, 81000); + storedOilAmount = storedOilAmount < subtractedAmount ? 0 : storedOilAmount - subtractedAmount; TagKey fluidTag = TagRegistry.FluidTags.PUMPJACK_OUTPUT.tag;