diff --git a/src/main/java/techreborn/blockentity/data/DataDrivenBEProvider.java b/src/main/java/techreborn/blockentity/data/DataDrivenBEProvider.java index 285eec320..92aff7cd3 100644 --- a/src/main/java/techreborn/blockentity/data/DataDrivenBEProvider.java +++ b/src/main/java/techreborn/blockentity/data/DataDrivenBEProvider.java @@ -118,7 +118,7 @@ public class DataDrivenBEProvider extends BlockEntityType recipeType = ModRecipes.byName(provider.identifier); Validate.notNull(recipeType); this.inventory = new RebornInventory<>(provider.slots.size(), provider.getSimpleName() + "BlockEntity", 64, this); diff --git a/src/main/java/techreborn/blockentity/machine/multiblock/DistillationTowerBlockEntity.java b/src/main/java/techreborn/blockentity/machine/multiblock/DistillationTowerBlockEntity.java index 438cbf391..6d01844c4 100644 --- a/src/main/java/techreborn/blockentity/machine/multiblock/DistillationTowerBlockEntity.java +++ b/src/main/java/techreborn/blockentity/machine/multiblock/DistillationTowerBlockEntity.java @@ -56,9 +56,9 @@ public class DistillationTowerBlockEntity extends GenericMachineBlockEntity impl return false; } final boolean layer0 = multiblockChecker.checkRectY(1, 1, MultiblockChecker.STANDARD_CASING, MultiblockChecker.ZERO_OFFSET); - final boolean layer1 = multiblockChecker.checkRingY(1, 1, MultiblockChecker.ADVANCED_CASING, new BlockPos(0, 1, 0)); + final boolean layer1 = multiblockChecker.checkRingY(1, 1, MultiblockChecker.INDUSTRIAL_CASING, new BlockPos(0, 1, 0)); final boolean layer2 = multiblockChecker.checkRingY(1, 1, MultiblockChecker.STANDARD_CASING, new BlockPos(0, 2, 0)); - final boolean layer3 = multiblockChecker.checkRectY(1, 1, MultiblockChecker.ADVANCED_CASING, new BlockPos(0, 3, 0)); + final boolean layer3 = multiblockChecker.checkRectY(1, 1, MultiblockChecker.INDUSTRIAL_CASING, new BlockPos(0, 3, 0)); final Material centerBlock1 = multiblockChecker.getBlock(0, 1, 0).getMaterial(); final Material centerBlock2 = multiblockChecker.getBlock(0, 2, 0).getMaterial(); final boolean center1 = (centerBlock1 == Material.AIR); diff --git a/src/main/java/techreborn/blockentity/machine/multiblock/FluidReplicatorBlockEntity.java b/src/main/java/techreborn/blockentity/machine/multiblock/FluidReplicatorBlockEntity.java index 270310fe9..e9cd3be27 100644 --- a/src/main/java/techreborn/blockentity/machine/multiblock/FluidReplicatorBlockEntity.java +++ b/src/main/java/techreborn/blockentity/machine/multiblock/FluidReplicatorBlockEntity.java @@ -66,7 +66,7 @@ public class FluidReplicatorBlockEntity extends GenericMachineBlockEntity implem if (multiblockChecker == null) { return false; } - final boolean ring = multiblockChecker.checkRingY(1, 1, MultiblockChecker.REINFORCED_CASING, + final boolean ring = multiblockChecker.checkRingY(1, 1, MultiblockChecker.ADVANCED_CASING, MultiblockChecker.ZERO_OFFSET); return ring; } diff --git a/src/main/java/techreborn/blockentity/machine/multiblock/ImplosionCompressorBlockEntity.java b/src/main/java/techreborn/blockentity/machine/multiblock/ImplosionCompressorBlockEntity.java index 034febd6e..a80022c84 100644 --- a/src/main/java/techreborn/blockentity/machine/multiblock/ImplosionCompressorBlockEntity.java +++ b/src/main/java/techreborn/blockentity/machine/multiblock/ImplosionCompressorBlockEntity.java @@ -54,9 +54,9 @@ public class ImplosionCompressorBlockEntity extends GenericMachineBlockEntity im if(multiblockChecker == null){ return false; } - final boolean down = multiblockChecker.checkRectY(1, 1, MultiblockChecker.REINFORCED_CASING, MultiblockChecker.ZERO_OFFSET); - final boolean up = multiblockChecker.checkRectY(1, 1, MultiblockChecker.REINFORCED_CASING, new BlockPos(0, 2, 0)); - final boolean chamber = multiblockChecker.checkRingYHollow(1, 1, MultiblockChecker.REINFORCED_CASING, new BlockPos(0, 1, 0)); + final boolean down = multiblockChecker.checkRectY(1, 1, MultiblockChecker.ADVANCED_CASING, MultiblockChecker.ZERO_OFFSET); + final boolean up = multiblockChecker.checkRectY(1, 1, MultiblockChecker.ADVANCED_CASING, new BlockPos(0, 2, 0)); + final boolean chamber = multiblockChecker.checkRingYHollow(1, 1, MultiblockChecker.ADVANCED_CASING, new BlockPos(0, 1, 0)); return down && chamber && up; } diff --git a/src/main/java/techreborn/blockentity/machine/multiblock/IndustrialGrinderBlockEntity.java b/src/main/java/techreborn/blockentity/machine/multiblock/IndustrialGrinderBlockEntity.java index 41004dd64..dcc6699bd 100644 --- a/src/main/java/techreborn/blockentity/machine/multiblock/IndustrialGrinderBlockEntity.java +++ b/src/main/java/techreborn/blockentity/machine/multiblock/IndustrialGrinderBlockEntity.java @@ -70,7 +70,7 @@ public class IndustrialGrinderBlockEntity extends GenericMachineBlockEntity impl } final boolean down = multiblockChecker.checkRectY(1, 1, MultiblockChecker.STANDARD_CASING, MultiblockChecker.ZERO_OFFSET); final boolean up = multiblockChecker.checkRectY(1, 1, MultiblockChecker.STANDARD_CASING, new BlockPos(0, 2, 0)); - final boolean blade = multiblockChecker.checkRingY(1, 1, MultiblockChecker.REINFORCED_CASING, new BlockPos(0, 1, 0)); + final boolean blade = multiblockChecker.checkRingY(1, 1, MultiblockChecker.ADVANCED_CASING, new BlockPos(0, 1, 0)); final BlockState centerBlock = multiblockChecker.getBlock(0, 1, 0); final boolean center = ((centerBlock.getBlock() instanceof FluidBlock || centerBlock.getBlock() instanceof FluidBlock) diff --git a/src/main/java/techreborn/blockentity/machine/multiblock/IndustrialSawmillBlockEntity.java b/src/main/java/techreborn/blockentity/machine/multiblock/IndustrialSawmillBlockEntity.java index dfaeac680..0cf66b047 100644 --- a/src/main/java/techreborn/blockentity/machine/multiblock/IndustrialSawmillBlockEntity.java +++ b/src/main/java/techreborn/blockentity/machine/multiblock/IndustrialSawmillBlockEntity.java @@ -70,7 +70,7 @@ public class IndustrialSawmillBlockEntity extends GenericMachineBlockEntity impl } final boolean down = multiblockChecker.checkRectY(1, 1, MultiblockChecker.STANDARD_CASING, MultiblockChecker.ZERO_OFFSET); final boolean up = multiblockChecker.checkRectY(1, 1, MultiblockChecker.STANDARD_CASING, new BlockPos(0, 2, 0)); - final boolean blade = multiblockChecker.checkRingY(1, 1, MultiblockChecker.REINFORCED_CASING, new BlockPos(0, 1, 0)); + final boolean blade = multiblockChecker.checkRingY(1, 1, MultiblockChecker.ADVANCED_CASING, new BlockPos(0, 1, 0)); final BlockState centerBlock = multiblockChecker.getBlock(0, 1, 0); final boolean center = ((centerBlock.getBlock() instanceof FluidBlock || centerBlock.getBlock() instanceof FluidBlock) diff --git a/src/main/java/techreborn/blockentity/machine/multiblock/MultiblockChecker.java b/src/main/java/techreborn/blockentity/machine/multiblock/MultiblockChecker.java index a241b080b..b6dc2a03b 100644 --- a/src/main/java/techreborn/blockentity/machine/multiblock/MultiblockChecker.java +++ b/src/main/java/techreborn/blockentity/machine/multiblock/MultiblockChecker.java @@ -35,8 +35,8 @@ public class MultiblockChecker { public static final BlockPos ZERO_OFFSET = BlockPos.ORIGIN; public static final String STANDARD_CASING = "standard"; - public static final String REINFORCED_CASING = "reinforced"; public static final String ADVANCED_CASING = "advanced"; + public static final String INDUSTRIAL_CASING = "industrial"; public static final String CASING_ANY = "any"; private final World world; @@ -56,10 +56,10 @@ public class MultiblockChecker { } else if ( type == "standard" && block == TRContent.MachineBlocks.BASIC.getCasing()) { return true; } - else if (type == "reinforced" && block == TRContent.MachineBlocks.ADVANCED.getCasing()) { + else if (type == "advanced" && block == TRContent.MachineBlocks.ADVANCED.getCasing()) { return true; } - else if (type == "advanced" && block == TRContent.MachineBlocks.INDUSTRIAL.getCasing()) { + else if (type == "industrial" && block == TRContent.MachineBlocks.INDUSTRIAL.getCasing()) { return true; } } diff --git a/src/main/java/techreborn/blockentity/machine/multiblock/VacuumFreezerBlockEntity.java b/src/main/java/techreborn/blockentity/machine/multiblock/VacuumFreezerBlockEntity.java index 520021276..6f138478d 100644 --- a/src/main/java/techreborn/blockentity/machine/multiblock/VacuumFreezerBlockEntity.java +++ b/src/main/java/techreborn/blockentity/machine/multiblock/VacuumFreezerBlockEntity.java @@ -54,9 +54,9 @@ public class VacuumFreezerBlockEntity extends GenericMachineBlockEntity implemen if (multiblockChecker == null) { return false; } - final boolean up = multiblockChecker.checkRectY(1, 1, MultiblockChecker.REINFORCED_CASING, MultiblockChecker.ZERO_OFFSET); - final boolean down = multiblockChecker.checkRectY(1, 1, MultiblockChecker.REINFORCED_CASING, new BlockPos(0, -2, 0)); - final boolean chamber = multiblockChecker.checkRingYHollow(1, 1, MultiblockChecker.ADVANCED_CASING, new BlockPos(0, -1, 0)); + final boolean up = multiblockChecker.checkRectY(1, 1, MultiblockChecker.ADVANCED_CASING, MultiblockChecker.ZERO_OFFSET); + final boolean down = multiblockChecker.checkRectY(1, 1, MultiblockChecker.ADVANCED_CASING, new BlockPos(0, -2, 0)); + final boolean chamber = multiblockChecker.checkRingYHollow(1, 1, MultiblockChecker.INDUSTRIAL_CASING, new BlockPos(0, -1, 0)); return down && chamber && up; } diff --git a/src/main/java/techreborn/blockentity/storage/energy/lesu/LSUStorageBlockEntity.java b/src/main/java/techreborn/blockentity/storage/energy/lesu/LSUStorageBlockEntity.java index c987c4c6f..77ae8f0ae 100644 --- a/src/main/java/techreborn/blockentity/storage/energy/lesu/LSUStorageBlockEntity.java +++ b/src/main/java/techreborn/blockentity/storage/energy/lesu/LSUStorageBlockEntity.java @@ -24,6 +24,7 @@ package techreborn.blockentity.storage.energy.lesu; +import net.minecraft.block.entity.BlockEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.util.math.BlockPos; @@ -43,27 +44,27 @@ public class LSUStorageBlockEntity extends MachineBaseBlockEntity super(TRBlockEntities.LSU_STORAGE); } - public final void findAndJoinNetwork(World world, int x, int y, int z) { + public final void findAndJoinNetwork(World world, BlockPos pos) { network = new LesuNetwork(); network.addElement(this); for (Direction direction : Direction.values()) { - if (world.getBlockEntity(new BlockPos(x + direction.getOffsetX(), y + direction.getOffsetY(), - z + direction.getOffsetZ())) instanceof LSUStorageBlockEntity) { - LSUStorageBlockEntity lesu = (LSUStorageBlockEntity) world.getBlockEntity(new BlockPos(x + direction.getOffsetX(), - y + direction.getOffsetY(), z + direction.getOffsetZ())); - if (lesu.network != null) { - lesu.network.merge(network); - } + BlockEntity be = world.getBlockEntity(pos.offset(direction)); + if (!(be instanceof LSUStorageBlockEntity)) { + continue; + } + LSUStorageBlockEntity lesuStorage = (LSUStorageBlockEntity) be; + if (lesuStorage.network != null) { + lesuStorage.network.merge(network); } } } public final void setNetwork(LesuNetwork n) { if (n == null) { - } else { - network = n; - network.addElement(this); + return; } + network = n; + network.addElement(this); } public final void resetNetwork() { @@ -72,14 +73,15 @@ public class LSUStorageBlockEntity extends MachineBaseBlockEntity public final void removeFromNetwork() { if (network == null) { - } else - network.removeElement(this); + return; + } + network.removeElement(this); } public final void rebuildNetwork() { removeFromNetwork(); resetNetwork(); - findAndJoinNetwork(world, pos.getX(), pos.getY(), pos.getZ()); + findAndJoinNetwork(world, pos); } // TileMachineBase @@ -87,7 +89,7 @@ public class LSUStorageBlockEntity extends MachineBaseBlockEntity public void tick() { super.tick(); if (network == null) { - findAndJoinNetwork(world, pos.getX(), pos.getY(), pos.getZ()); + findAndJoinNetwork(world, pos); } else { if (network.master != null && network.master.getWorld().getBlockEntity(new BlockPos(network.master.getPos().getX(), diff --git a/src/main/java/techreborn/blockentity/storage/energy/lesu/LapotronicSUBlockEntity.java b/src/main/java/techreborn/blockentity/storage/energy/lesu/LapotronicSUBlockEntity.java index 0a593d060..e9f0bc677 100644 --- a/src/main/java/techreborn/blockentity/storage/energy/lesu/LapotronicSUBlockEntity.java +++ b/src/main/java/techreborn/blockentity/storage/energy/lesu/LapotronicSUBlockEntity.java @@ -43,44 +43,73 @@ import java.util.ArrayList; public class LapotronicSUBlockEntity extends EnergyStorageBlockEntity implements IContainerProvider{ - public int connectedBlocks = 0; + private int connectedBlocks = 0; private ArrayList countedNetworks = new ArrayList<>(); public LapotronicSUBlockEntity() { - super(TRBlockEntities.LAPOTRONIC_SU, "LESU", 2, TRContent.Machine.LAPOTRONIC_SU.block, EnergyTier.LOW, 1_000_000); + super(TRBlockEntities.LAPOTRONIC_SU, "LESU", 2, TRContent.Machine.LAPOTRONIC_SU.block, EnergyTier.LOW, TechRebornConfig.lesuStoragePerBlock); checkOverfill = false; + this.maxOutput = TechRebornConfig.lesuBaseOutput; } + private void setMaxStorage(){ + maxStorage = (connectedBlocks + 1) * TechRebornConfig.lesuStoragePerBlock; + if (maxStorage < 0 || maxStorage > Integer.MAX_VALUE) { + maxStorage = Integer.MAX_VALUE; + } + } + + private void setIORate(){ + maxOutput = TechRebornConfig.lesuBaseOutput + (connectedBlocks * TechRebornConfig.lesuExtraIOPerBlock); + if (connectedBlocks < 32) { + return; + } + else if (connectedBlocks < 128) { + maxInput = EnergyTier.MEDIUM.getMaxInput(); + } + else { + maxInput = EnergyTier.HIGH.getMaxInput(); + } + } + + private void checkNetwork() { + countedNetworks.clear(); + connectedBlocks = 0; + for (Direction dir : Direction.values()) { + BlockEntity adjacent = world.getBlockEntity(pos.offset(dir)); + if (!(adjacent instanceof LSUStorageBlockEntity)) { + continue; + } + LesuNetwork network = ((LSUStorageBlockEntity) adjacent).network; + if (network == null) { + continue; + } + if (countedNetworks.contains(network)) { + continue; + } + if (network.master == null || network.master == this) { + connectedBlocks += network.storages.size(); + countedNetworks.add(network); + network.master = this; + break; + } + } + } + + // EnergyStorageBlockEntity @Override public void tick() { super.tick(); if (world.isClient) { return; } - countedNetworks.clear(); - connectedBlocks = 0; - for (Direction dir : Direction.values()) { - BlockPos adjucentBlockPos = getPos().offset(dir); - BlockEntity adjucent = world.getBlockEntity(adjucentBlockPos); - if (!(adjucent instanceof LSUStorageBlockEntity)) { - continue; - } - if (((LSUStorageBlockEntity) adjucent).network == null) { - continue; - } - LesuNetwork network = ((LSUStorageBlockEntity) adjucent).network; - if (!countedNetworks.contains(network)) { - if (network.master == null || network.master == this) { - connectedBlocks += network.storages.size(); - countedNetworks.add(network); - network.master = this; - break; - } - } + if (world.getTime() % 20 == 0) { + checkNetwork(); } + setMaxStorage(); - maxOutput = (connectedBlocks * TechRebornConfig.lesuExtraIOPerBlock) + tier.getMaxOutput(); + setIORate(); if (getEnergy() > getMaxStoredPower()) { setEnergy(getMaxStoredPower()); @@ -95,38 +124,40 @@ public class LapotronicSUBlockEntity extends EnergyStorageBlockEntity implements } return null; } - - public int getOutputRate() { - return maxOutput; - } - - public void setOutputRate(int output) { - this.maxOutput = output; - } - - public int getConnectedBlocksNum() { - return connectedBlocks; - } - - public void setConnectedBlocksNum(int value) { - this.connectedBlocks = value; - if (world.isClient) { - setMaxStorage(); - } - } - - public void setMaxStorage(){ - maxStorage = (connectedBlocks + 1) * TechRebornConfig.lesuStoragePerBlock; - if (maxStorage < 0 || maxStorage > Integer.MAX_VALUE) { - maxStorage = Integer.MAX_VALUE; - } - } + // IContainerProvider @Override public BuiltContainer createContainer(int syncID, final PlayerEntity player) { return new ContainerBuilder("lesu").player(player.inventory).inventory().hotbar().armor().complete(8, 18) .addArmor().addInventory().blockEntity(this).energySlot(0, 62, 45).energySlot(1, 98, 45).syncEnergyValue() - .sync(this::getOutputRate, this::setOutputRate) .sync(this::getConnectedBlocksNum, this::setConnectedBlocksNum).addInventory().create(this, syncID); } + +// public int getOutputRate() { +// return maxOutput; +// } +// +// public void setOutputRate(int output) { +// this.maxOutput = output; +// } +// +// public int getInputRate(){ +// return maxInput; +// } +// +// public void setInputRate(int input){ +// this.maxInput = input; +// } + + public int getConnectedBlocksNum() { + return connectedBlocks; + } + + public void setConnectedBlocksNum(int value) { + this.connectedBlocks = value; + if (world.isClient) { + setMaxStorage(); + setIORate(); + } + } } diff --git a/src/main/java/techreborn/blockentity/storage/energy/lesu/LesuNetwork.java b/src/main/java/techreborn/blockentity/storage/energy/lesu/LesuNetwork.java index ff7f25b35..370ed7d42 100644 --- a/src/main/java/techreborn/blockentity/storage/energy/lesu/LesuNetwork.java +++ b/src/main/java/techreborn/blockentity/storage/energy/lesu/LesuNetwork.java @@ -46,15 +46,13 @@ public class LesuNetwork { private void rebuild() { master = null; for (LSUStorageBlockEntity lesuStorage : storages) { - lesuStorage.findAndJoinNetwork(lesuStorage.getWorld(), lesuStorage.getPos().getX(), - lesuStorage.getPos().getY(), lesuStorage.getPos().getZ()); + lesuStorage.findAndJoinNetwork(lesuStorage.getWorld(), lesuStorage.getPos()); } } public void merge(LesuNetwork network) { if (network != this) { - ArrayList blockEntityLesuStorages = new ArrayList<>(); - blockEntityLesuStorages.addAll(network.storages); + ArrayList blockEntityLesuStorages = new ArrayList<>(network.storages); network.clear(false); for (LSUStorageBlockEntity lesuStorage : blockEntityLesuStorages) { lesuStorage.setNetwork(this); diff --git a/src/main/java/techreborn/client/gui/GuiDistillationTower.java b/src/main/java/techreborn/client/gui/GuiDistillationTower.java index a7d13993b..a6d3c0751 100644 --- a/src/main/java/techreborn/client/gui/GuiDistillationTower.java +++ b/src/main/java/techreborn/client/gui/GuiDistillationTower.java @@ -87,7 +87,7 @@ public class GuiDistillationTower extends GuiBase { { // This code here makes a basic multiblock and then sets to the selected one. final Multiblock multiblock = new Multiblock(); - BlockState advancedCasing = TRContent.MachineBlocks.ADVANCED.getCasing().getDefaultState(); + BlockState industrialCasing = TRContent.MachineBlocks.INDUSTRIAL.getCasing().getDefaultState(); BlockState standardCasing = TRContent.MachineBlocks.BASIC.getCasing().getDefaultState(); addComponent(0, 0, 0, standardCasing, multiblock); @@ -100,14 +100,14 @@ public class GuiDistillationTower extends GuiBase { addComponent(1, 0, -1, standardCasing, multiblock); addComponent(1, 0, 1, standardCasing, multiblock); - addComponent(1, 1, 0, advancedCasing, multiblock); - addComponent(0, 1, 1, advancedCasing, multiblock); - addComponent(-1, 1, 0, advancedCasing, multiblock); - addComponent(0, 1, -1, advancedCasing, multiblock); - addComponent(-1, 1, -1, advancedCasing, multiblock); - addComponent(-1, 1, 1, advancedCasing, multiblock); - addComponent(1, 1, -1, advancedCasing, multiblock); - addComponent(1, 1, 1, advancedCasing, multiblock); + addComponent(1, 1, 0, industrialCasing, multiblock); + addComponent(0, 1, 1, industrialCasing, multiblock); + addComponent(-1, 1, 0, industrialCasing, multiblock); + addComponent(0, 1, -1, industrialCasing, multiblock); + addComponent(-1, 1, -1, industrialCasing, multiblock); + addComponent(-1, 1, 1, industrialCasing, multiblock); + addComponent(1, 1, -1, industrialCasing, multiblock); + addComponent(1, 1, 1, industrialCasing, multiblock); addComponent(1, 2, 0, standardCasing, multiblock); addComponent(0, 2, 1, standardCasing, multiblock); @@ -118,15 +118,15 @@ public class GuiDistillationTower extends GuiBase { addComponent(1, 2, -1, standardCasing, multiblock); addComponent(1, 2, 1, standardCasing, multiblock); - addComponent(0, 3, 0, advancedCasing, multiblock); - addComponent(1, 3, 0, advancedCasing, multiblock); - addComponent(0, 3, 1, advancedCasing, multiblock); - addComponent(-1, 3, 0, advancedCasing, multiblock); - addComponent(0, 3, -1, advancedCasing, multiblock); - addComponent(-1, 3, -1, advancedCasing, multiblock); - addComponent(-1, 3, 1, advancedCasing, multiblock); - addComponent(1, 3, -1, advancedCasing, multiblock); - addComponent(1, 3, 1, advancedCasing, multiblock); + addComponent(0, 3, 0, industrialCasing, multiblock); + addComponent(1, 3, 0, industrialCasing, multiblock); + addComponent(0, 3, 1, industrialCasing, multiblock); + addComponent(-1, 3, 0, industrialCasing, multiblock); + addComponent(0, 3, -1, industrialCasing, multiblock); + addComponent(-1, 3, -1, industrialCasing, multiblock); + addComponent(-1, 3, 1, industrialCasing, multiblock); + addComponent(1, 3, -1, industrialCasing, multiblock); + addComponent(1, 3, 1, industrialCasing, multiblock); blockEntity.renderMultiblock = multiblock; } diff --git a/src/main/java/techreborn/config/TechRebornConfig.java b/src/main/java/techreborn/config/TechRebornConfig.java index 0792a781a..b61a961da 100644 --- a/src/main/java/techreborn/config/TechRebornConfig.java +++ b/src/main/java/techreborn/config/TechRebornConfig.java @@ -178,23 +178,23 @@ public class TechRebornConfig { @Config(config = "items", category = "power", key = "electricTreetapCost", comment = "Energy Cost for Electric Treetap (FE)") public static int electricTreetapCost = 20; - @Config(config = "items", category = "power", key = "basicDrillCharge", comment = "Energy Capacity for Basic Drill (FE)") - public static int basicDrillCharge = 40_000; + @Config(config = "items", category = "power", key = "basicDrillCharge", comment = "Energy Capacity for Basic Drill") + public static int basicDrillCharge = 10_000; - @Config(config = "items", category = "power", key = "basicDrillCost", comment = "Energy Cost for Basic Drill (FE)") + @Config(config = "items", category = "power", key = "basicDrillCost", comment = "Energy Cost for Basic Drill") public static int basicDrillCost = 50; - @Config(config = "items", category = "power", key = "advancedDrillCharge", comment = "Energy Capacity for Advanced Drill (FE)") - public static int advancedDrillCharge = 400_000; + @Config(config = "items", category = "power", key = "advancedDrillCharge", comment = "Energy Capacity for Advanced Drill") + public static int advancedDrillCharge = 100_000; - @Config(config = "items", category = "power", key = "advancedDrillCost", comment = "Energy Cost for Advanced Drill (FE)") + @Config(config = "items", category = "power", key = "advancedDrillCost", comment = "Energy Cost for Advanced Drill") public static int advancedDrillCost = 100; - @Config(config = "items", category = "power", key = "industrialDrillCharge", comment = "Energy Capacity for Industrial Drill (FE)") - public static int industrialDrillCharge = 4_000_000; + @Config(config = "items", category = "power", key = "industrialDrillCharge", comment = "Energy Capacity for Industrial Drill") + public static int industrialDrillCharge = 1_000_000; - @Config(config = "items", category = "power", key = "industrialDrillCost", comment = "Energy Cost for Industrial Drill (FE)") - public static int industrialDrillCost = 250; + @Config(config = "items", category = "power", key = "industrialDrillCost", comment = "Energy Cost for Industrial Drill") + public static int industrialDrillCost = 150; @Config(config = "items", category = "power", key = "basicChainsawCharge", comment = "Energy Capacity for Basic Chainsaw (FE)") public static int basicChainsawCharge = 40_000; @@ -289,6 +289,9 @@ public class TechRebornConfig { @Config(config = "items", category = "power", key = "quantumSuitSprintingCost", comment = "Quantum Suit Sprinting Cost") public static double quantumSuitSprintingCost = 20; + @Config(config = "items", category = "power", key = "quantumSuitFireExtinguishCost", comment = "Quantum Suit Cost for Fire Extinguish") + public static double fireExtinguishCost = 50; + @Config(config = "items", category = "upgrades", key = "overclcoker_speed", comment = "Overclocker behavior speed multipiler") public static double overclockerSpeed = 0.25; @@ -313,7 +316,10 @@ public class TechRebornConfig { public static int lesuStoragePerBlock = 1_000_000; @Config(config = "machines", category = "lesu", key = "LesuExtraIO", comment = "LESU Extra I/O Multiplier") - public static int lesuExtraIOPerBlock = 8; + public static int lesuExtraIOPerBlock = 1; + + @Config(config = "machines", category = "lesu", key = "LesuBaseOutput", comment = "LESU Base Output") + public static int lesuBaseOutput = 5; @Config(config = "machines", category = "aesu", key = "AesuMaxEnergy", comment = "AESU Max Energy") public static int aesuMaxEnergy = 100_000_000; diff --git a/src/main/java/techreborn/items/armor/QuantumSuitItem.java b/src/main/java/techreborn/items/armor/QuantumSuitItem.java index b7ba4bab2..95dbf0182 100644 --- a/src/main/java/techreborn/items/armor/QuantumSuitItem.java +++ b/src/main/java/techreborn/items/armor/QuantumSuitItem.java @@ -47,7 +47,6 @@ import reborncore.common.powerSystem.PowerSystem; import reborncore.common.util.ItemUtils; import team.reborn.energy.Energy; import team.reborn.energy.EnergyHolder; -import team.reborn.energy.EnergySide; import team.reborn.energy.EnergyTier; import techreborn.TechReborn; import techreborn.config.TechRebornConfig; @@ -59,6 +58,7 @@ public class QuantumSuitItem extends TRArmourItem implements ItemStackModifiers, public final double swimCost = TechRebornConfig.quantumSuitSwimmingCost; public final double breathingCost = TechRebornConfig.quantumSuitBreathingCost; public final double sprintingCost = TechRebornConfig.quantumSuitSprintingCost; + public final double fireExtinguishCost = TechRebornConfig.fireExtinguishCost; public QuantumSuitItem(ArmorMaterial material, EquipmentSlot slot) { super(material, slot, new Item.Settings().group(TechReborn.ITEMGROUP).maxDamage(-1).maxCount(1)); @@ -96,10 +96,14 @@ public class QuantumSuitItem extends TRArmourItem implements ItemStackModifiers, if (playerEntity.abilities.flying) { Energy.of(stack).use(flyCost); } + playerEntity.onGround = true; } else { playerEntity.abilities.allowFlying = false; playerEntity.abilities.flying = false; } + if (playerEntity.isOnFire() && Energy.of(stack).getEnergy() > fireExtinguishCost) { + playerEntity.extinguish(); + } break; case LEGS: if (playerEntity.isSprinting()) { diff --git a/src/main/resources/data/techreborn/recipes/crafting_table/dust/gunpowder.json b/src/main/resources/data/techreborn/recipes/crafting_table/dust/gunpowder.json new file mode 100644 index 000000000..e26b13e80 --- /dev/null +++ b/src/main/resources/data/techreborn/recipes/crafting_table/dust/gunpowder.json @@ -0,0 +1,21 @@ +{ + "type": "minecraft:crafting_shapeless", + "ingredients": [ + { + "item": "techreborn:charcoal_dust" + }, + { + "item": "techreborn:sulfur_dust" + }, + { + "item": "techreborn:saltpeter_dust" + }, + { + "item": "techreborn:saltpeter_dust" + } + ], + "result": { + "item": "minecraft:gunpowder", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/techreborn/recipes/extractor/auto/rubber_1.json b/src/main/resources/data/techreborn/recipes/extractor/rubber_from_log.json similarity index 100% rename from src/main/resources/data/techreborn/recipes/extractor/auto/rubber_1.json rename to src/main/resources/data/techreborn/recipes/extractor/rubber_from_log.json diff --git a/src/main/resources/data/techreborn/recipes/extractor/auto/rubber_3.json b/src/main/resources/data/techreborn/recipes/extractor/rubber_from_sap.json similarity index 100% rename from src/main/resources/data/techreborn/recipes/extractor/auto/rubber_3.json rename to src/main/resources/data/techreborn/recipes/extractor/rubber_from_sap.json diff --git a/src/main/resources/data/techreborn/recipes/extractor/auto/rubber.json b/src/main/resources/data/techreborn/recipes/extractor/rubber_from_sapling.json similarity index 100% rename from src/main/resources/data/techreborn/recipes/extractor/auto/rubber.json rename to src/main/resources/data/techreborn/recipes/extractor/rubber_from_sapling.json diff --git a/src/main/resources/data/techreborn/recipes/extractor/auto/rubber_2.json b/src/main/resources/data/techreborn/recipes/extractor/rubber_from_slime_ball.json similarity index 100% rename from src/main/resources/data/techreborn/recipes/extractor/auto/rubber_2.json rename to src/main/resources/data/techreborn/recipes/extractor/rubber_from_slime_ball.json diff --git a/src/main/resources/data/techreborn/recipes/extractor/rubber_from_stripepd_log.json b/src/main/resources/data/techreborn/recipes/extractor/rubber_from_stripepd_log.json new file mode 100644 index 000000000..ada6244c4 --- /dev/null +++ b/src/main/resources/data/techreborn/recipes/extractor/rubber_from_stripepd_log.json @@ -0,0 +1,15 @@ +{ + "type": "techreborn:extractor", + "power": 10, + "time": 300, + "ingredients": [ + { + "item": "techreborn:rubber_log_stripped" + } + ], + "results": [ + { + "item": "techreborn:rubber" + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/techreborn/recipes/implosion_compressor/iridium_alloy_plate.json b/src/main/resources/data/techreborn/recipes/implosion_compressor/iridium_alloy_plate.json index ad95cbe29..56239610e 100644 --- a/src/main/resources/data/techreborn/recipes/implosion_compressor/iridium_alloy_plate.json +++ b/src/main/resources/data/techreborn/recipes/implosion_compressor/iridium_alloy_plate.json @@ -5,7 +5,7 @@ "ingredients" : [ { "item": "minecraft:tnt", - "count": 16 + "count": 8 }, { "item": "techreborn:iridium_alloy_ingot"