Skip to content

Commit

Permalink
fix GT armors being able to take durability damage
Browse files Browse the repository at this point in the history
  • Loading branch information
screret committed May 13, 2024
1 parent 227bd87 commit ce1697b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class ArmorComponentItem extends ArmorItem implements IComponentItem {
protected List<IItemComponent> components;

public ArmorComponentItem(ArmorMaterial material, ArmorItem.Type type, Properties properties) {
super(material, type, properties);
super(material, type, properties.durability(0));
components = new ArrayList<>();
}

Expand Down Expand Up @@ -83,6 +83,11 @@ public void onArmorTick(ItemStack stack, Level level, Player player) {
this.armorLogic.onArmorTick(level, player, stack);
}

@Override
public int getMaxDamage(ItemStack stack) {
return super.getMaxDamage(stack);
}

@Override
public boolean isValidRepairItem(ItemStack stack, ItemStack repairCandidate) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@

@AllArgsConstructor
public enum GTArmorMaterials implements ArmorMaterial, StringRepresentable {
GOGGLES("goggles", 7, Util.make(new EnumMap<>(ArmorItem.Type.class), map -> {
GOGGLES("goggles", 0, Util.make(new EnumMap<>(ArmorItem.Type.class), map -> {
map.put(ArmorItem.Type.BOOTS, 0);
map.put(ArmorItem.Type.LEGGINGS, 0);
map.put(ArmorItem.Type.CHESTPLATE, 0);
map.put(ArmorItem.Type.HELMET, 0);
}), 50, SoundEvents.ARMOR_EQUIP_GENERIC, 0.0F, 0.0F, () -> Ingredient.EMPTY),
JETPACK("jetpack", 15, Util.make(new EnumMap<>(ArmorItem.Type.class), map -> {
JETPACK("jetpack", 0, Util.make(new EnumMap<>(ArmorItem.Type.class), map -> {
map.put(ArmorItem.Type.BOOTS, 0);
map.put(ArmorItem.Type.LEGGINGS, 0);
map.put(ArmorItem.Type.CHESTPLATE, 0);
map.put(ArmorItem.Type.HELMET, 0);
}), 50, SoundEvents.ARMOR_EQUIP_GENERIC, 0.0F, 0.0F, () -> Ingredient.EMPTY),
ARMOR("armor", 40, Util.make(new EnumMap<>(ArmorItem.Type.class), map -> {
ARMOR("armor", 0, Util.make(new EnumMap<>(ArmorItem.Type.class), map -> {
map.put(ArmorItem.Type.BOOTS, 0);
map.put(ArmorItem.Type.LEGGINGS, 0);
map.put(ArmorItem.Type.CHESTPLATE, 0);
Expand Down
31 changes: 0 additions & 31 deletions src/main/java/com/gregtechceu/gtceu/core/mixins/ForgeGuiMixin.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ private static void miscRecipes(Consumer<FinishedRecipe> provider) {
.outputItems(new ItemStack(Items.BLAZE_ROD))
.save(provider);

FLUID_HEATER_RECIPES.recipeBuilder("mud_to_clay")
COMPRESSOR_RECIPES.recipeBuilder("mud_to_clay")
.inputItems(Items.MUD)
.outputItems(Items.CLAY)
.duration(40).EUt(VA[LV]).save(provider);
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/gtceu.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"plugin": "com.gregtechceu.gtceu.core.mixins.GregTechMixinPlugin",
"client": [
"BlockModelMixin",
"ForgeGuiMixin",
"GuiGraphicsAccessor",
"GuiGraphicsMixin",
"LevelRendererMixin",
Expand Down

0 comments on commit ce1697b

Please sign in to comment.