Skip to content

Commit

Permalink
Assorted fixes (#1886)
Browse files Browse the repository at this point in the history
  • Loading branch information
krossgg authored Sep 5, 2024
1 parent be23e17 commit 44f6169
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/generated/resources/assets/gtceu/lang/en_ud.json
Original file line number Diff line number Diff line change
Expand Up @@ -3799,6 +3799,7 @@
"gtceu.multiblock.universal.problem.soft_mallet": ")ㄥ§ʇǝןןɐW ʇɟoSɐ§( ˙ʞɔnʇs sı buıɥʇǝɯoSㄥ§%s",
"gtceu.multiblock.universal.problem.wire_cutter": ")ㄥ§ɹǝʇʇnƆ ǝɹıMɐ§( ˙ʇno pǝuɹnq sǝɹıMㄥ§%s",
"gtceu.multiblock.universal.problem.wrench": ")ㄥ§ɥɔuǝɹMɐ§( ˙ǝsooן sı ǝdıԀㄥ§%s",
"gtceu.multiblock.universal.rotor_obstructed": "¡pǝʇɔnɹʇsqO sı ɹoʇoᴚ",
"gtceu.multiblock.uv_fusion_reactor.description": "˙W0ㄣ9 ɟo ɯnɯıxɐɯ ɐ sɐɥ puɐ '∩Ǝ W0ㄣ ʎq sǝsɐǝɹɔuı ɹǝɟɟnq sʇı 'sɐɥ ʇı ɥɔʇɐH ʎɹǝʌǝ ɹoℲ ˙sǝɥɔʇɐH ʎbɹǝuƎ Λ∩ ǝsn ʎןuo uɐɔ ʇI ˙sǝuo ɹǝıʌɐǝɥ oʇuı sʇuǝɯǝןǝ buısnɟ ɹoɟ pǝsn ǝɹnʇɔnɹʇs ʞɔoןqıʇןnɯ ǝbɹɐן ɐ sı Ɛ ʞW ɹoʇɔɐǝᴚ uoısnℲ ǝɥ⟘",
"gtceu.multiblock.vacuum_freezer.description": "˙ɹǝʇɐM sɐ ɥɔns 'sǝɔuɐʇsqns ɹǝɥʇo ǝzǝǝɹɟ osןɐ uɐɔ ʇı 'ɹǝʌǝʍoH ˙sʇobuI ɹɐןnbǝɹ oʇuı sʇobuI ʇoH buızǝǝɹɟ ɹoɟ pǝsn ʎןuıɐɯ ǝɹnʇɔnɹʇs ʞɔoןqıʇןnɯ ɐ sı ɹǝzǝǝɹℲ ɯnnɔɐΛ ǝɥ⟘",
"gtceu.multiblock.validation_failed": "˙sʇndʇno/sʇnduı ɟo ʇunoɯɐ pıןɐʌuI",
Expand Down
1 change: 1 addition & 0 deletions src/generated/resources/assets/gtceu/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -3799,6 +3799,7 @@
"gtceu.multiblock.universal.problem.soft_mallet": "%s§7Something is stuck. (§aSoft Mallet§7)",
"gtceu.multiblock.universal.problem.wire_cutter": "%s§7Wires burned out. (§aWire Cutter§7)",
"gtceu.multiblock.universal.problem.wrench": "%s§7Pipe is loose. (§aWrench§7)",
"gtceu.multiblock.universal.rotor_obstructed": "Rotor is Obstructed!",
"gtceu.multiblock.uv_fusion_reactor.description": "The Fusion Reactor MK 3 is a large multiblock structure used for fusing elements into heavier ones. It can only use UV Energy Hatches. For every Hatch it has, its buffer increases by 40M EU, and has a maximum of 640M.",
"gtceu.multiblock.vacuum_freezer.description": "The Vacuum Freezer is a multiblock structure mainly used for freezing Hot Ingots into regular Ingots. However, it can also freeze other substances, such as Water.",
"gtceu.multiblock.validation_failed": "Invalid amount of inputs/outputs.",
Expand Down
6 changes: 6 additions & 0 deletions src/generated/resources/data/gtceu/tags/items/step_boots.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"values": [
"gtceu:nanomuscle_boots",
"gtceu:quarktech_boots"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ default void attachFancyTooltipsToController(IMultiController controller, Toolti
default void attachTooltips(TooltipsPanel tooltipsPanel) {
tooltipsPanel.attachTooltips(new IFancyTooltip.Basic(
() -> GuiTextures.INDICATOR_NO_STEAM.get(false),
() -> List.of(Component.translatable("gtceu.multiblock.universal.muffler_obstructed")
() -> List.of(Component.translatable("gtceu.multiblock.universal.rotor_obstructed")
.setStyle(Style.EMPTY.withColor(ChatFormatting.RED))),
() -> !isFrontFaceFree(),
() -> null));
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/gregtechceu/gtceu/common/data/GTItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -2503,6 +2503,7 @@ public Component getItemName(ItemStack stack) {
.lang("NanoMuscle™ Suite Boots")
.properties(p -> p.rarity(Rarity.UNCOMMON))
.tag(Tags.Items.ARMORS_BOOTS)
.tag(CustomTags.STEP_BOOTS)
.register();
public static ItemEntry<ArmorComponentItem> NANO_HELMET = REGISTRATE
.item("nanomuscle_helmet", (p) -> new ArmorComponentItem(GTArmorMaterials.ARMOR, ArmorItem.Type.HELMET, p)
Expand Down Expand Up @@ -2614,6 +2615,7 @@ public Component getItemName(ItemStack stack) {
.properties(p -> p.rarity(Rarity.RARE))
.tag(Tags.Items.ARMORS_BOOTS)
.tag(CustomTags.PPE_ARMOR)
.tag(CustomTags.STEP_BOOTS)
.register();
public static ItemEntry<ArmorComponentItem> QUANTUM_HELMET = REGISTRATE
.item("quarktech_helmet", (p) -> new ArmorComponentItem(GTArmorMaterials.ARMOR, ArmorItem.Type.HELMET, p)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ public void onArmorTick(Level world, Player player, ItemStack itemStack) {
}
data.putBoolean("nightVision", nightVision);

} else if (type == ArmorItem.Type.BOOTS) {
updateStepHeight(player);
}

if (nightVisionTimer > 0) nightVisionTimer--;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ public void onArmorTick(Level world, Player player, ItemStack itemStack) {
}
}
}
updateStepHeight(player);
data.putBoolean("boostedJump", boostedJump);

if (boostedJumpTimer > 0) boostedJumpTimer--;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1090,6 +1090,7 @@ public static void init(RegistrateLangProvider provider) {
provider.add("gtceu.multiblock.universal.muffler_obstructed", "Muffler Hatch is Obstructed!");
provider.add("gtceu.multiblock.universal.muffler_obstructed.tooltip",
"Muffler Hatch must have a block of airspace in front of it.");
provider.add("gtceu.multiblock.universal.rotor_obstructed", "Rotor is Obstructed!");
provider.add("gtceu.multiblock.universal.distinct", "Distinct Buses:");
provider.add("gtceu.multiblock.universal.distinct.no", "No");
provider.add("gtceu.multiblock.universal.distinct.yes", "Yes");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public class CustomTags {
};

public static final TagKey<Item> PPE_ARMOR = TagUtil.createModItemTag("ppe_armor");
public static final TagKey<Item> STEP_BOOTS = TagUtil.createModItemTag("step_boots");

// Platform-dependent tags
public static final TagKey<Block> NEEDS_WOOD_TOOL = TagUtil.createBlockTag("needs_wood_tool");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import com.gregtechceu.gtceu.data.loader.BedrockFluidLoader;
import com.gregtechceu.gtceu.data.loader.BedrockOreLoader;
import com.gregtechceu.gtceu.data.loader.GTOreLoader;
import com.gregtechceu.gtceu.data.recipe.CustomTags;
import com.gregtechceu.gtceu.utils.TaskHandler;

import net.minecraft.core.Direction;
Expand All @@ -62,6 +63,7 @@
import net.minecraftforge.common.util.LazyOptional;
import net.minecraftforge.event.*;
import net.minecraftforge.event.entity.living.LivingDeathEvent;
import net.minecraftforge.event.entity.living.LivingEvent;
import net.minecraftforge.event.entity.living.LivingFallEvent;
import net.minecraftforge.event.entity.living.MobSpawnEvent;
import net.minecraftforge.event.entity.player.PlayerEvent;
Expand Down Expand Up @@ -288,6 +290,19 @@ public static void onEntityLivingFallEvent(LivingFallEvent event) {
}
}

@SubscribeEvent
public static void stepAssistHandler(LivingEvent.LivingTickEvent event) {
float MAGIC_STEP_HEIGHT = 1.0023f;
if (event.getEntity() == null || !(event.getEntity() instanceof Player player)) return;
if (!player.isCrouching() && player.getItemBySlot(EquipmentSlot.FEET).is(CustomTags.STEP_BOOTS)) {
if (player.getStepHeight() < MAGIC_STEP_HEIGHT) {
player.setMaxUpStep(MAGIC_STEP_HEIGHT);
}
} else if (player.getStepHeight() == MAGIC_STEP_HEIGHT) {
player.setMaxUpStep(0.6f);
}
}

@SubscribeEvent
public static void onEntityDie(LivingDeathEvent event) {
if (event.getEntity() instanceof Player player) {
Expand Down

0 comments on commit 44f6169

Please sign in to comment.