From ef419cc574b7f74721b931c7f0cb88801196cbb4 Mon Sep 17 00:00:00 2001 From: khj xiaogu <54445543+khjxiaogu@users.noreply.github.com> Date: Wed, 27 Oct 2021 01:42:06 +0800 Subject: [PATCH] Not Enough Config --- .../steampowered/content/boiler/BoilerTileEntity.java | 7 +++++-- .../steampowered/content/boiler/BronzeBoilerBlock.java | 3 ++- .../content/boiler/BronzeBoilerTileEntity.java | 4 +++- .../steampowered/content/boiler/CastIronBoilerBlock.java | 3 ++- .../content/boiler/CastIronBoilerTileEntity.java | 4 +++- .../steampowered/content/boiler/SteelBoilerBlock.java | 3 ++- .../steampowered/content/boiler/SteelBoilerTileEntity.java | 4 +++- .../steampowered/content/burner/BronzeBurnerBlock.java | 3 ++- .../content/burner/BronzeBurnerTileEntity.java | 4 +++- .../steampowered/content/burner/BurnerTileEntity.java | 4 +++- .../steampowered/content/burner/CastIronBurnerBlock.java | 3 ++- .../content/burner/CastIronBurnerTileEntity.java | 4 +++- .../steampowered/content/burner/SteelBurnerBlock.java | 3 ++- .../steampowered/content/burner/SteelBurnerTileEntity.java | 4 +++- 14 files changed, 38 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/teammoeg/steampowered/content/boiler/BoilerTileEntity.java b/src/main/java/com/teammoeg/steampowered/content/boiler/BoilerTileEntity.java index c65a156..ddad278 100644 --- a/src/main/java/com/teammoeg/steampowered/content/boiler/BoilerTileEntity.java +++ b/src/main/java/com/teammoeg/steampowered/content/boiler/BoilerTileEntity.java @@ -20,6 +20,7 @@ package com.teammoeg.steampowered.content.boiler; import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation; import com.teammoeg.steampowered.FluidRegistry; +import com.teammoeg.steampowered.SPConfig; import com.teammoeg.steampowered.content.burner.IHeatReceiver; import net.minecraft.block.BlockState; import net.minecraft.fluid.Fluids; @@ -157,9 +158,11 @@ public abstract class BoilerTileEntity extends TileEntity implements IHeatReceiv if (this.level != null && !this.level.isClientSide) { int consume = Math.min(getHUPerTick(), heatreceived); heatreceived = 0; - consume = Math.min(this.input.drain(consume / 120, FluidAction.EXECUTE).getAmount() * 120, consume); + int waterconsume=(int) (SPConfig.COMMON.steamPerWater.get()*10); + consume = Math.min(this.input.drain((int) Math.ceil(consume / waterconsume), FluidAction.EXECUTE).getAmount() * waterconsume, consume); this.output.fill(new FluidStack(FluidRegistry.steam.get().getFluid(), consume / 10), FluidAction.EXECUTE); - this.level.sendBlockUpdated(this.getBlockPos(), this.level.getBlockState(this.getBlockPos()), this.level.getBlockState(this.getBlockPos()), 3); + + this.level.sendBlockUpdated(this.getBlockPos(),this.getBlockState(),this.getBlockState(), 3); } } diff --git a/src/main/java/com/teammoeg/steampowered/content/boiler/BronzeBoilerBlock.java b/src/main/java/com/teammoeg/steampowered/content/boiler/BronzeBoilerBlock.java index d11864d..909cb0c 100644 --- a/src/main/java/com/teammoeg/steampowered/content/boiler/BronzeBoilerBlock.java +++ b/src/main/java/com/teammoeg/steampowered/content/boiler/BronzeBoilerBlock.java @@ -18,6 +18,7 @@ package com.teammoeg.steampowered.content.boiler; +import com.teammoeg.steampowered.SPConfig; import com.teammoeg.steampowered.registrate.SPTiles; import net.minecraft.block.BlockState; import net.minecraft.tileentity.TileEntity; @@ -35,6 +36,6 @@ public class BronzeBoilerBlock extends BoilerBlock { @Override public int getHuConsume() { - return 120; + return SPConfig.COMMON.bronzeBoilerHU.get(); } } diff --git a/src/main/java/com/teammoeg/steampowered/content/boiler/BronzeBoilerTileEntity.java b/src/main/java/com/teammoeg/steampowered/content/boiler/BronzeBoilerTileEntity.java index 7087799..13359cb 100644 --- a/src/main/java/com/teammoeg/steampowered/content/boiler/BronzeBoilerTileEntity.java +++ b/src/main/java/com/teammoeg/steampowered/content/boiler/BronzeBoilerTileEntity.java @@ -18,6 +18,8 @@ package com.teammoeg.steampowered.content.boiler; +import com.teammoeg.steampowered.SPConfig; + import net.minecraft.tileentity.TileEntityType; public class BronzeBoilerTileEntity extends BoilerTileEntity { @@ -27,7 +29,7 @@ public class BronzeBoilerTileEntity extends BoilerTileEntity { } protected int getHUPerTick() { - return 120; + return SPConfig.COMMON.bronzeBoilerHU.get(); } } diff --git a/src/main/java/com/teammoeg/steampowered/content/boiler/CastIronBoilerBlock.java b/src/main/java/com/teammoeg/steampowered/content/boiler/CastIronBoilerBlock.java index 48804dc..6ec8280 100644 --- a/src/main/java/com/teammoeg/steampowered/content/boiler/CastIronBoilerBlock.java +++ b/src/main/java/com/teammoeg/steampowered/content/boiler/CastIronBoilerBlock.java @@ -18,6 +18,7 @@ package com.teammoeg.steampowered.content.boiler; +import com.teammoeg.steampowered.SPConfig; import com.teammoeg.steampowered.registrate.SPTiles; import net.minecraft.block.BlockState; import net.minecraft.tileentity.TileEntity; @@ -35,6 +36,6 @@ public class CastIronBoilerBlock extends BoilerBlock { @Override public int getHuConsume() { - return 240; + return SPConfig.COMMON.castIronBoilerHU.get(); } } diff --git a/src/main/java/com/teammoeg/steampowered/content/boiler/CastIronBoilerTileEntity.java b/src/main/java/com/teammoeg/steampowered/content/boiler/CastIronBoilerTileEntity.java index e90f50b..6d03616 100644 --- a/src/main/java/com/teammoeg/steampowered/content/boiler/CastIronBoilerTileEntity.java +++ b/src/main/java/com/teammoeg/steampowered/content/boiler/CastIronBoilerTileEntity.java @@ -18,6 +18,8 @@ package com.teammoeg.steampowered.content.boiler; +import com.teammoeg.steampowered.SPConfig; + import net.minecraft.tileentity.TileEntityType; public class CastIronBoilerTileEntity extends BoilerTileEntity { @@ -27,7 +29,7 @@ public class CastIronBoilerTileEntity extends BoilerTileEntity { } protected int getHUPerTick() { - return 240; + return SPConfig.COMMON.castIronBoilerHU.get(); } } diff --git a/src/main/java/com/teammoeg/steampowered/content/boiler/SteelBoilerBlock.java b/src/main/java/com/teammoeg/steampowered/content/boiler/SteelBoilerBlock.java index ffe7dbe..092a35e 100644 --- a/src/main/java/com/teammoeg/steampowered/content/boiler/SteelBoilerBlock.java +++ b/src/main/java/com/teammoeg/steampowered/content/boiler/SteelBoilerBlock.java @@ -18,6 +18,7 @@ package com.teammoeg.steampowered.content.boiler; +import com.teammoeg.steampowered.SPConfig; import com.teammoeg.steampowered.registrate.SPTiles; import net.minecraft.block.BlockState; import net.minecraft.tileentity.TileEntity; @@ -35,6 +36,6 @@ public class SteelBoilerBlock extends BoilerBlock { @Override public int getHuConsume() { - return 480; + return SPConfig.COMMON.steelBoilerHU.get(); } } diff --git a/src/main/java/com/teammoeg/steampowered/content/boiler/SteelBoilerTileEntity.java b/src/main/java/com/teammoeg/steampowered/content/boiler/SteelBoilerTileEntity.java index 75d10ae..02e2a31 100644 --- a/src/main/java/com/teammoeg/steampowered/content/boiler/SteelBoilerTileEntity.java +++ b/src/main/java/com/teammoeg/steampowered/content/boiler/SteelBoilerTileEntity.java @@ -18,6 +18,8 @@ package com.teammoeg.steampowered.content.boiler; +import com.teammoeg.steampowered.SPConfig; + import net.minecraft.tileentity.TileEntityType; public class SteelBoilerTileEntity extends BoilerTileEntity { @@ -27,7 +29,7 @@ public class SteelBoilerTileEntity extends BoilerTileEntity { } protected int getHUPerTick() { - return 480; + return SPConfig.COMMON.steelBoilerHU.get(); } } diff --git a/src/main/java/com/teammoeg/steampowered/content/burner/BronzeBurnerBlock.java b/src/main/java/com/teammoeg/steampowered/content/burner/BronzeBurnerBlock.java index 70ba761..0701c71 100644 --- a/src/main/java/com/teammoeg/steampowered/content/burner/BronzeBurnerBlock.java +++ b/src/main/java/com/teammoeg/steampowered/content/burner/BronzeBurnerBlock.java @@ -18,6 +18,7 @@ package com.teammoeg.steampowered.content.burner; +import com.teammoeg.steampowered.SPConfig; import com.teammoeg.steampowered.registrate.SPTiles; import net.minecraft.block.BlockState; import net.minecraft.tileentity.TileEntity; @@ -35,6 +36,6 @@ public class BronzeBurnerBlock extends BurnerBlock { @Override public int getHuProduce() { - return 120; + return SPConfig.COMMON.bronzeBurnerHU.get(); } } diff --git a/src/main/java/com/teammoeg/steampowered/content/burner/BronzeBurnerTileEntity.java b/src/main/java/com/teammoeg/steampowered/content/burner/BronzeBurnerTileEntity.java index b5bce75..58c39dd 100644 --- a/src/main/java/com/teammoeg/steampowered/content/burner/BronzeBurnerTileEntity.java +++ b/src/main/java/com/teammoeg/steampowered/content/burner/BronzeBurnerTileEntity.java @@ -18,6 +18,8 @@ package com.teammoeg.steampowered.content.burner; +import com.teammoeg.steampowered.SPConfig; + import net.minecraft.tileentity.TileEntityType; public class BronzeBurnerTileEntity extends BurnerTileEntity { @@ -28,6 +30,6 @@ public class BronzeBurnerTileEntity extends BurnerTileEntity { @Override protected int getHuPerTick() { - return 120; + return SPConfig.COMMON.bronzeBurnerHU.get(); } } diff --git a/src/main/java/com/teammoeg/steampowered/content/burner/BurnerTileEntity.java b/src/main/java/com/teammoeg/steampowered/content/burner/BurnerTileEntity.java index 77fb99a..eaa9f63 100644 --- a/src/main/java/com/teammoeg/steampowered/content/burner/BurnerTileEntity.java +++ b/src/main/java/com/teammoeg/steampowered/content/burner/BurnerTileEntity.java @@ -19,6 +19,8 @@ package com.teammoeg.steampowered.content.burner; import com.simibubi.create.content.contraptions.goggles.IHaveGoggleInformation; +import com.teammoeg.steampowered.SPConfig; + import net.minecraft.block.BlockState; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.IRecipeType; @@ -168,7 +170,7 @@ public abstract class BurnerTileEntity extends TileEntity implements ITickableTi int time = ForgeHooks.getBurnTime(inv.getStackInSlot(0), IRecipeType.SMELTING); if (time <= 0) return false; inv.getStackInSlot(0).shrink(1); - HURemain += time * 24;//2.4HU/t + HURemain += time * SPConfig.COMMON.HUPerFuelTick.get();//2.4HU/t return true; } diff --git a/src/main/java/com/teammoeg/steampowered/content/burner/CastIronBurnerBlock.java b/src/main/java/com/teammoeg/steampowered/content/burner/CastIronBurnerBlock.java index 5c0a619..98de3c3 100644 --- a/src/main/java/com/teammoeg/steampowered/content/burner/CastIronBurnerBlock.java +++ b/src/main/java/com/teammoeg/steampowered/content/burner/CastIronBurnerBlock.java @@ -18,6 +18,7 @@ package com.teammoeg.steampowered.content.burner; +import com.teammoeg.steampowered.SPConfig; import com.teammoeg.steampowered.registrate.SPTiles; import net.minecraft.block.BlockState; import net.minecraft.tileentity.TileEntity; @@ -35,6 +36,6 @@ public class CastIronBurnerBlock extends BurnerBlock { @Override public int getHuProduce() { - return 240; + return SPConfig.COMMON.castIronBurnerHU.get(); } } diff --git a/src/main/java/com/teammoeg/steampowered/content/burner/CastIronBurnerTileEntity.java b/src/main/java/com/teammoeg/steampowered/content/burner/CastIronBurnerTileEntity.java index e77ff8c..f91daa9 100644 --- a/src/main/java/com/teammoeg/steampowered/content/burner/CastIronBurnerTileEntity.java +++ b/src/main/java/com/teammoeg/steampowered/content/burner/CastIronBurnerTileEntity.java @@ -18,6 +18,8 @@ package com.teammoeg.steampowered.content.burner; +import com.teammoeg.steampowered.SPConfig; + import net.minecraft.tileentity.TileEntityType; public class CastIronBurnerTileEntity extends BurnerTileEntity { @@ -28,6 +30,6 @@ public class CastIronBurnerTileEntity extends BurnerTileEntity { @Override protected int getHuPerTick() { - return 240; + return SPConfig.COMMON.castIronBurnerHU.get(); } } diff --git a/src/main/java/com/teammoeg/steampowered/content/burner/SteelBurnerBlock.java b/src/main/java/com/teammoeg/steampowered/content/burner/SteelBurnerBlock.java index 543e48f..0d67784 100644 --- a/src/main/java/com/teammoeg/steampowered/content/burner/SteelBurnerBlock.java +++ b/src/main/java/com/teammoeg/steampowered/content/burner/SteelBurnerBlock.java @@ -18,6 +18,7 @@ package com.teammoeg.steampowered.content.burner; +import com.teammoeg.steampowered.SPConfig; import com.teammoeg.steampowered.registrate.SPTiles; import net.minecraft.block.BlockState; import net.minecraft.tileentity.TileEntity; @@ -35,6 +36,6 @@ public class SteelBurnerBlock extends BurnerBlock { @Override public int getHuProduce() { - return 480; + return SPConfig.COMMON.steelBurnerHU.get(); } } diff --git a/src/main/java/com/teammoeg/steampowered/content/burner/SteelBurnerTileEntity.java b/src/main/java/com/teammoeg/steampowered/content/burner/SteelBurnerTileEntity.java index 8641439..448b221 100644 --- a/src/main/java/com/teammoeg/steampowered/content/burner/SteelBurnerTileEntity.java +++ b/src/main/java/com/teammoeg/steampowered/content/burner/SteelBurnerTileEntity.java @@ -18,6 +18,8 @@ package com.teammoeg.steampowered.content.burner; +import com.teammoeg.steampowered.SPConfig; + import net.minecraft.tileentity.TileEntityType; public class SteelBurnerTileEntity extends BurnerTileEntity { @@ -28,6 +30,6 @@ public class SteelBurnerTileEntity extends BurnerTileEntity { @Override protected int getHuPerTick() { - return 480; + return SPConfig.COMMON.steelBurnerHU.get(); } }