Skip to content

Commit

Permalink
fixes (#539)
Browse files Browse the repository at this point in the history
* feat: allow singleblock generators to face up

* fix: allow tools to use their last durability point

* fix: disable worldstripper in dev

* fix: wrong operator on large boiler tooltip

* chore: run data

* fix: special check for diode in Cleanroom energy hatch collection
  • Loading branch information
screret authored Nov 12, 2023
1 parent 2745b1a commit 967cd62
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static boolean is(ItemStack stack, GTToolType toolType) {
}

public static boolean canUse(ItemStack stack) {
return stack.getDamageValue() < stack.getMaxDamage();
return stack.getDamageValue() <= stack.getMaxDamage();
}

public static void damageItem(@Nonnull ItemStack stack, RandomSource random, @Nullable ServerPlayer user) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,7 @@ public static MachineDefinition[] registerSimpleGenerator(String name,
return registerTieredMachines(name, (holder, tier) -> new SimpleGeneratorMachine(holder, tier, tankScalingFunction), (tier, builder) -> builder
.langValue("%s %s Generator %s".formatted(VLVH[tier], toEnglishName(name), VLVT[tier]))
.editableUI(SimpleGeneratorMachine.EDITABLE_UI_CREATOR.apply(GTCEu.id(name), recipeType))
.rotationState(RotationState.NON_Y_AXIS)
.rotationState(RotationState.ALL)
.recipeType(recipeType)
.recipeModifier(SimpleGeneratorMachine::recipeModifier, true)
.renderer(() -> new SimpleGeneratorMachineRenderer(tier, GTCEu.id("block/generators/" + name)))
Expand Down Expand Up @@ -1648,7 +1648,7 @@ public static MultiblockMachineDefinition registerLargeBoiler(String name, Suppl
.recoveryItems(() -> new ItemLike[]{GTItems.MATERIAL_ITEMS.get(TagPrefix.dustTiny, GTMaterials.Ash).get()})
.renderer(() -> new LargeBoilerRenderer(texture, firebox, GTCEu.id("block/multiblock/generator/large_%s_boiler".formatted(name))))
.tooltips(
Component.translatable("gtceu.multiblock.large_boiler.max_temperature", (int)(maxTemperature * 274.15), maxTemperature),
Component.translatable("gtceu.multiblock.large_boiler.max_temperature", (int)(maxTemperature + 274.15), maxTemperature),
Component.translatable("gtceu.multiblock.large_boiler.heat_time_tooltip", maxTemperature / heatSpeed / 20),
Component.translatable("gtceu.multiblock.large_boiler.explosion_tooltip").withStyle(ChatFormatting.DARK_RED))
.compassSections(GTCompassSections.STEAM)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.gregtechceu.gtceu.api.capability.GTCapabilityHelper;
import com.gregtechceu.gtceu.api.capability.ICleanroomReceiver;
import com.gregtechceu.gtceu.api.capability.IEnergyContainer;
import com.gregtechceu.gtceu.common.machine.multiblock.part.DiodePartMachine;
import com.gregtechceu.gtceu.common.machine.trait.CleanroomLogic;
import com.gregtechceu.gtceu.api.capability.recipe.EURecipeCapability;
import com.gregtechceu.gtceu.api.capability.recipe.IO;
Expand Down Expand Up @@ -157,6 +158,7 @@ protected void initializeAbilities() {
List<IEnergyContainer> energyContainers = new ArrayList<>();
Map<Long, IO> ioMap = getMultiblockState().getMatchContext().getOrCreate("ioMap", Long2ObjectMaps::emptyMap);
for (IMultiPart part : getParts()) {
if (part instanceof DiodePartMachine) continue;
IO io = ioMap.getOrDefault(part.self().getPos().asLong(), IO.BOTH);
if(io == IO.NONE || io == IO.OUT) continue;
for (var handler : part.getRecipeHandlers()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ public class MachineLang {

protected static void init(RegistrateLangProvider provider) {

replace(provider, "block.gtceu.steam_large_turbine", "Large Steam Turbine");
replace(provider, "block.gtceu.gas_large_turbine", "Large Gas Turbine");
replace(provider, "block.gtceu.plasma_large_turbine", "Large Plasma Turbine");

// Steam machines
replace(provider, "block.gtceu.steam_solid_boiler.bronze", "Small Steam Solid Boiler");
replace(provider, "block.gtceu.steam_liquid_boiler.bronze", "Small Steam Liquid Boiler");
Expand Down
6 changes: 3 additions & 3 deletions fabric/src/generated/resources/assets/gtceu/lang/en_ud.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
"block.gtceu.fusion_casing_mk3": "III ʞW buısɐƆ ǝuıɥɔɐW uoısnℲ",
"block.gtceu.fusion_coil": "ʞɔoןᗺ ןıoƆ uoısnℲ",
"block.gtceu.fusion_glass": "ssɐן⅁ uoısnℲ",
"block.gtceu.gas_large_turbine": "ǝuıqɹn⟘ ǝbɹɐꞀ sɐ⅁",
"block.gtceu.gas_large_turbine": "ǝuıqɹn⟘ sɐ⅁ ǝbɹɐꞀ",
"block.gtceu.gold_drum": "ɯnɹᗡ pןo⅁",
"block.gtceu.heat_vent": "ʇuǝΛ ʇɐǝH",
"block.gtceu.heatproof_machine_casing": "buısɐƆ ǝuıɥɔɐW ɹɐʌuI ɟooɹԀ ʇɐǝH",
Expand Down Expand Up @@ -752,7 +752,7 @@
"block.gtceu.opv_thermal_centrifuge": "ɹ§ ǝbnɟıɹʇuǝƆ ןɐɯɹǝɥ⟘ ʎɹɐpuǝbǝꞀ6§",
"block.gtceu.opv_wiremill": "ɹ§ ןןıɯǝɹıM ʎɹɐpuǝbǝꞀ6§",
"block.gtceu.plascrete": "ǝʇǝɹɔsɐןԀ",
"block.gtceu.plasma_large_turbine": "ǝuıqɹn⟘ ǝbɹɐꞀ ɐɯsɐןԀ",
"block.gtceu.plasma_large_turbine": "ǝuıqɹn⟘ ɐɯsɐןԀ ǝbɹɐꞀ",
"block.gtceu.primitive_blast_furnace": "ǝɔɐuɹnℲ ʇsɐןᗺ ǝʌıʇıɯıɹԀ",
"block.gtceu.primitive_pump": "dɯnԀ ǝʌıʇıɯıɹԀ",
"block.gtceu.ptfe_pipe_casing": "buısɐƆ ǝdıԀ ƎℲ⟘Ԁ",
Expand Down Expand Up @@ -785,7 +785,7 @@
"block.gtceu.steam_grinder": "ɹǝpuıɹ⅁ ɯɐǝʇS",
"block.gtceu.steam_input_bus": ")ɯɐǝʇS( snᗺ ʇnduI",
"block.gtceu.steam_input_hatch": "ɥɔʇɐH ʇnduI ɯɐǝʇS",
"block.gtceu.steam_large_turbine": "ǝuıqɹn⟘ ǝbɹɐꞀ ɯɐǝʇS",
"block.gtceu.steam_large_turbine": "ǝuıqɹn⟘ ɯɐǝʇS ǝbɹɐꞀ",
"block.gtceu.steam_liquid_boiler.bronze": "ɹǝןıoᗺ pınbıꞀ ɯɐǝʇS ןןɐɯS",
"block.gtceu.steam_machine_casing": "buısɐƆ ǝuıɥɔɐW ɯɐǝʇS",
"block.gtceu.steam_miner": "ɹǝuıW ɯɐǝʇS",
Expand Down
6 changes: 3 additions & 3 deletions fabric/src/generated/resources/assets/gtceu/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
"block.gtceu.fusion_casing_mk3": "Fusion Machine Casing MK III",
"block.gtceu.fusion_coil": "Fusion Coil Block",
"block.gtceu.fusion_glass": "Fusion Glass",
"block.gtceu.gas_large_turbine": "Gas Large Turbine",
"block.gtceu.gas_large_turbine": "Large Gas Turbine",
"block.gtceu.gold_drum": "Gold Drum",
"block.gtceu.heat_vent": "Heat Vent",
"block.gtceu.heatproof_machine_casing": "Heat Proof Invar Machine Casing",
Expand Down Expand Up @@ -752,7 +752,7 @@
"block.gtceu.opv_thermal_centrifuge": "§9Legendary Thermal Centrifuge §r",
"block.gtceu.opv_wiremill": "§9Legendary Wiremill §r",
"block.gtceu.plascrete": "Plascrete",
"block.gtceu.plasma_large_turbine": "Plasma Large Turbine",
"block.gtceu.plasma_large_turbine": "Large Plasma Turbine",
"block.gtceu.primitive_blast_furnace": "Primitive Blast Furnace",
"block.gtceu.primitive_pump": "Primitive Pump",
"block.gtceu.ptfe_pipe_casing": "PTFE Pipe Casing",
Expand Down Expand Up @@ -785,7 +785,7 @@
"block.gtceu.steam_grinder": "Steam Grinder",
"block.gtceu.steam_input_bus": "Input Bus (Steam)",
"block.gtceu.steam_input_hatch": "Steam Input Hatch",
"block.gtceu.steam_large_turbine": "Steam Large Turbine",
"block.gtceu.steam_large_turbine": "Large Steam Turbine",
"block.gtceu.steam_liquid_boiler.bronze": "Small Steam Liquid Boiler",
"block.gtceu.steam_machine_casing": "Steam Machine Casing",
"block.gtceu.steam_miner": "Steam Miner",
Expand Down
2 changes: 1 addition & 1 deletion forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ dependencies {
include(forge.configuration)

// Runtime only testing mods
modRuntimeOnly(forge.worldStripper)
//modRuntimeOnly(forge.worldStripper)
}

processResources {
Expand Down
6 changes: 3 additions & 3 deletions forge/src/generated/resources/assets/gtceu/lang/en_ud.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
"block.gtceu.fusion_casing_mk3": "III ʞW buısɐƆ ǝuıɥɔɐW uoısnℲ",
"block.gtceu.fusion_coil": "ʞɔoןᗺ ןıoƆ uoısnℲ",
"block.gtceu.fusion_glass": "ssɐן⅁ uoısnℲ",
"block.gtceu.gas_large_turbine": "ǝuıqɹn⟘ ǝbɹɐꞀ sɐ⅁",
"block.gtceu.gas_large_turbine": "ǝuıqɹn⟘ sɐ⅁ ǝbɹɐꞀ",
"block.gtceu.gold_drum": "ɯnɹᗡ pןo⅁",
"block.gtceu.heat_vent": "ʇuǝΛ ʇɐǝH",
"block.gtceu.heatproof_machine_casing": "buısɐƆ ǝuıɥɔɐW ɹɐʌuI ɟooɹԀ ʇɐǝH",
Expand Down Expand Up @@ -752,7 +752,7 @@
"block.gtceu.opv_thermal_centrifuge": "ɹ§ ǝbnɟıɹʇuǝƆ ןɐɯɹǝɥ⟘ ʎɹɐpuǝbǝꞀ6§",
"block.gtceu.opv_wiremill": "ɹ§ ןןıɯǝɹıM ʎɹɐpuǝbǝꞀ6§",
"block.gtceu.plascrete": "ǝʇǝɹɔsɐןԀ",
"block.gtceu.plasma_large_turbine": "ǝuıqɹn⟘ ǝbɹɐꞀ ɐɯsɐןԀ",
"block.gtceu.plasma_large_turbine": "ǝuıqɹn⟘ ɐɯsɐןԀ ǝbɹɐꞀ",
"block.gtceu.primitive_blast_furnace": "ǝɔɐuɹnℲ ʇsɐןᗺ ǝʌıʇıɯıɹԀ",
"block.gtceu.primitive_pump": "dɯnԀ ǝʌıʇıɯıɹԀ",
"block.gtceu.ptfe_pipe_casing": "buısɐƆ ǝdıԀ ƎℲ⟘Ԁ",
Expand Down Expand Up @@ -785,7 +785,7 @@
"block.gtceu.steam_grinder": "ɹǝpuıɹ⅁ ɯɐǝʇS",
"block.gtceu.steam_input_bus": ")ɯɐǝʇS( snᗺ ʇnduI",
"block.gtceu.steam_input_hatch": "ɥɔʇɐH ʇnduI ɯɐǝʇS",
"block.gtceu.steam_large_turbine": "ǝuıqɹn⟘ ǝbɹɐꞀ ɯɐǝʇS",
"block.gtceu.steam_large_turbine": "ǝuıqɹn⟘ ɯɐǝʇS ǝbɹɐꞀ",
"block.gtceu.steam_liquid_boiler.bronze": "ɹǝןıoᗺ pınbıꞀ ɯɐǝʇS ןןɐɯS",
"block.gtceu.steam_machine_casing": "buısɐƆ ǝuıɥɔɐW ɯɐǝʇS",
"block.gtceu.steam_miner": "ɹǝuıW ɯɐǝʇS",
Expand Down
6 changes: 3 additions & 3 deletions forge/src/generated/resources/assets/gtceu/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
"block.gtceu.fusion_casing_mk3": "Fusion Machine Casing MK III",
"block.gtceu.fusion_coil": "Fusion Coil Block",
"block.gtceu.fusion_glass": "Fusion Glass",
"block.gtceu.gas_large_turbine": "Gas Large Turbine",
"block.gtceu.gas_large_turbine": "Large Gas Turbine",
"block.gtceu.gold_drum": "Gold Drum",
"block.gtceu.heat_vent": "Heat Vent",
"block.gtceu.heatproof_machine_casing": "Heat Proof Invar Machine Casing",
Expand Down Expand Up @@ -752,7 +752,7 @@
"block.gtceu.opv_thermal_centrifuge": "§9Legendary Thermal Centrifuge §r",
"block.gtceu.opv_wiremill": "§9Legendary Wiremill §r",
"block.gtceu.plascrete": "Plascrete",
"block.gtceu.plasma_large_turbine": "Plasma Large Turbine",
"block.gtceu.plasma_large_turbine": "Large Plasma Turbine",
"block.gtceu.primitive_blast_furnace": "Primitive Blast Furnace",
"block.gtceu.primitive_pump": "Primitive Pump",
"block.gtceu.ptfe_pipe_casing": "PTFE Pipe Casing",
Expand Down Expand Up @@ -785,7 +785,7 @@
"block.gtceu.steam_grinder": "Steam Grinder",
"block.gtceu.steam_input_bus": "Input Bus (Steam)",
"block.gtceu.steam_input_hatch": "Steam Input Hatch",
"block.gtceu.steam_large_turbine": "Steam Large Turbine",
"block.gtceu.steam_large_turbine": "Large Steam Turbine",
"block.gtceu.steam_liquid_boiler.bronze": "Small Steam Liquid Boiler",
"block.gtceu.steam_machine_casing": "Steam Machine Casing",
"block.gtceu.steam_miner": "Steam Miner",
Expand Down

0 comments on commit 967cd62

Please sign in to comment.