Skip to content

Commit

Permalink
[FF]: Port to 1.19.4.
Browse files Browse the repository at this point in the history
  • Loading branch information
Crystal-Spider committed Dec 1, 2023
1 parent 0d4540f commit 4df49a7
Show file tree
Hide file tree
Showing 11 changed files with 120 additions and 89 deletions.
86 changes: 82 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,86 @@

All notable changes to the "leathered-boots" Minecraft mod will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Forge Semantic Versioning](https://mcforge.readthedocs.io/en/latest/gettingstarted/versioning/#versioning).
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Forge Semantic Versioning](https://mcforge.readthedocs.io/en/latest/gettingstarted/versioning/#versioning).

## **Migration**
This Changelog has been migrated to the newest [Changelog](https://github.com/Nyphet/leathered-boots/blob/master/CHANGELOG.md), refer to that one.
## [Unreleased]
- Nothing new.

## [1.19.4-3.0.0.0] - 2023/12/01
- Port to 1.19.4.

## [1.19.3-3.0.0.0] - 2023/11/28
- Finalized changes from [1.19.3-3.0.0.0-beta].
- Removed mod id parameters from the API methods.
- Fixed a minor bug in leathered boots registration.
- Added override for the `getMaterial()` method in `LeatheredBootsItem`.

## [1.19.2-3.0.0.0] - 2023/11/28
- Finalized changes from [1.19.3-3.0.0.0-beta].
- Removed mod id parameters from the API methods.
- Fixed a minor bug in leathered boots registration.
- Added override for the `getMaterial()` method in `LeatheredBootsItem`.

## [1.18.2-3.0.0.0] - 2023/11/28
- Finalized changes from [1.19.3-3.0.0.0-beta].
- Removed mod id parameters from the API methods.
- Fixed a minor bug in leathered boots registration.
- Added override for the `getMaterial()` method in `LeatheredBootsItem`.

## [1.19.3-3.0.0.0-beta] - 2023/11/25
- Added API.
- Added smithing recipes for all leathered boots.
- Fixed some Vanilla advancements to include leathered boots.
- Changed all item and translation keys.
- Added Soft Step enchantment.

## [1.19.3-2.0.0.0] - 2023/01/02
- Ported to 1.19.3.

## [1.19.2-1.0.0.2] - 2022/10/24
- Fixed golden leathered boots not making piglins neutral.

## [1.18.2-1.0.0.2] - 2022/10/24
- Fixed golden leathered boots not making piglins neutral.

## [1.19.2-1.0.0.1] - 2022/10/23
- Added smithing recipe to craft diamond leathered boots into netherite leathered boots.

## [1.18.2-1.0.0.1] - 2022/10/23
- Added smithing recipe to craft diamond leathered boots into netherite leathered boots.

## [1.19.2-1.0.0.0] - 2022/10/21
- Added leathered boots for each Vanilla boots apart from leather boots.
- Leathered boots prevent freezing and allow walking on powdered snow.
- Leathered boots can be dyed with a dye and undyed with a cauldron.
- Added villager trades for leathered boots.
- Modified Vanilla loot tables for igloos and snowy village houses.
- Drafted some code for future compatibility with Revamped End and Gilded Armors.
- Added craftings for leathered boots.

## [1.18.2-1.0.0.0] - 2022/10/20
- Added leathered boots for each Vanilla boots apart from leather boots.
- Leathered boots prevent freezing and allow walking on powdered snow.
- Leathered boots can be dyed with a dye and undyed with a cauldron.
- Added villager trades for leathered boots.
- Modified Vanilla loot tables for igloos and snowy village houses.
- Drafted some code for future compatibility with Revamped End and Gilded Armors.
- Added craftings for leathered boots.

[Unreleased]: https://github.com/Nyphet/leathered-boots

[1.19.4-3.0.0.0]: https://github.com/Nyphet/leathered-boots/releases/tag/v1.19.4-3.0.0.0

[1.19.3-3.0.0.0]: https://github.com/Nyphet/leathered-boots/releases/tag/v1.19.3-3.0.0.0
[1.19.3-3.0.0.0-beta]: https://github.com/Nyphet/leathered-boots/releases/tag/v1.19.3-3.0.0.0-beta
[1.19.3-2.0.0.0]: https://github.com/Nyphet/leathered-boots/releases/tag/v1.19.3-2.0.0.0

[1.19.2-3.0.0.0]: https://github.com/Nyphet/leathered-boots/releases/tag/v1.19.2-3.0.0.0
[1.19.2-1.0.0.2]: https://github.com/Nyphet/leathered-boots/releases/tag/v1.19.2-1.0.0.2
[1.19.2-1.0.0.1]: https://github.com/Nyphet/leathered-boots/releases/tag/v1.19.2-1.0.0.1
[1.19.2-1.0.0.0]: https://github.com/Nyphet/leathered-boots/releases/tag/v1.19.2-1.0.0.0

[1.18.2-3.0.0.0]: https://github.com/Nyphet/leathered-boots/releases/tag/v1.18.2-3.0.0.0
[1.18.2-1.0.0.2]: https://github.com/Nyphet/leathered-boots/releases/tag/v1.18.2-1.0.0.2
[1.18.2-1.0.0.1]: https://github.com/Nyphet/leathered-boots/releases/tag/v1.18.2-1.0.0.1
[1.18.2-1.0.0.0]: https://github.com/Nyphet/leathered-boots/releases/tag/v1.18.2-1.0.0.0
8 changes: 4 additions & 4 deletions fabric/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ org.gradle.daemon = false

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version = 1.19.3
yarn_mappings = 1.19.3+build.5
loader_version = 0.14.12
minecraft_version = 1.19.4
yarn_mappings = 1.19.4+build.1
loader_version = 0.14.14
loader = Fabric

# Mod Properties
Expand All @@ -19,7 +19,7 @@ org.gradle.daemon = false
modid_kebab = leathered-boots

# Dependencies
fabric_version = 0.76.1+1.19.3
fabric_version = 0.75.3+1.19.4

# Miscellaneous
github_user = Nyphet
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package crystalspider.leatheredboots.api;

import net.minecraft.entity.EquipmentSlot;
import net.minecraft.item.ArmorItem.Type;
import net.minecraft.item.ArmorMaterial;
import net.minecraft.item.ArmorMaterials;
import net.minecraft.recipe.Ingredient;
Expand All @@ -17,58 +17,36 @@ public class LeatheredArmorMaterial implements ArmorMaterial {
public static final LeatheredArmorMaterial LEATHERED_NETHERITE = new LeatheredArmorMaterial(ArmorMaterials.NETHERITE);

private final String name;
private final int[] durabilities;
private final int[] protectionAmounts;
private final int enchantability;
private final SoundEvent equipSound;
private final float toughness;
private final float knockbackResistance;
private final Ingredient repairIngredient;
private final ArmorMaterial armorMaterial;

public LeatheredArmorMaterial(ArmorMaterial armorMaterial) {
this.name = "leathered_" + armorMaterial.getName();
this.durabilities = new int[]{
armorMaterial.getDurability(EquipmentSlot.FEET),
armorMaterial.getDurability(EquipmentSlot.LEGS),
armorMaterial.getDurability(EquipmentSlot.CHEST),
armorMaterial.getDurability(EquipmentSlot.HEAD),
};
this.protectionAmounts = new int[]{
armorMaterial.getProtectionAmount(EquipmentSlot.FEET),
armorMaterial.getProtectionAmount(EquipmentSlot.LEGS),
armorMaterial.getProtectionAmount(EquipmentSlot.CHEST),
armorMaterial.getProtectionAmount(EquipmentSlot.HEAD)
};
this.enchantability = armorMaterial.getEnchantability();
this.equipSound = armorMaterial.getEquipSound();
this.toughness = armorMaterial.getToughness();
this.knockbackResistance = armorMaterial.getKnockbackResistance();
this.repairIngredient = armorMaterial.getRepairIngredient();
this.armorMaterial = armorMaterial;
}

@Override
public int getDurability(EquipmentSlot equipmentSlot) {
return this.durabilities[equipmentSlot.getEntitySlotId()];
public int getDurability(Type type) {
return this.armorMaterial.getDurability(type);
}

@Override
public int getProtectionAmount(EquipmentSlot equipmentSlot) {
return this.protectionAmounts[equipmentSlot.getEntitySlotId()];
public int getProtection(Type type) {
return this.armorMaterial.getProtection(type);
}

@Override
public int getEnchantability() {
return this.enchantability;
return this.armorMaterial.getEnchantability();
}

@Override
public SoundEvent getEquipSound() {
return this.equipSound;
return this.armorMaterial.getEquipSound();
}

@Override
public Ingredient getRepairIngredient() {
return this.repairIngredient;
return this.armorMaterial.getRepairIngredient();
}

@Override
Expand All @@ -78,11 +56,11 @@ public String getName() {

@Override
public float getToughness() {
return this.toughness;
return this.armorMaterial.getToughness();
}

@Override
public float getKnockbackResistance() {
return this.knockbackResistance;
return this.armorMaterial.getKnockbackResistance();
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package crystalspider.leatheredboots.item;

import crystalspider.leatheredboots.api.LeatheredArmorMaterial;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.item.DyeableArmorItem;

/**
* Leathered Boots Item.
*/
public class LeatheredBootsItem extends DyeableArmorItem {
public LeatheredBootsItem(LeatheredArmorMaterial armorMaterial, boolean isFireproof) {
super(armorMaterial, EquipmentSlot.FEET, isFireproof ? new Settings().fireproof() : new Settings());
super(armorMaterial, Type.BOOTS, isFireproof ? new Settings().fireproof() : new Settings());
}

public LeatheredBootsItem(LeatheredArmorMaterial armorMaterial) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import com.google.gson.JsonElement;
import com.google.gson.internal.Streams;
import com.google.gson.stream.JsonWriter;
import com.mojang.bridge.game.PackType;

import net.minecraft.SharedConstants;
import net.minecraft.resource.InputSupplier;
Expand Down Expand Up @@ -73,7 +72,7 @@ public DynamicDatapack(Identifier name, TagBuilder<?> builder) {
this.name = name;
this.namespace = name.getNamespace();
this.namespaces.add(name.getNamespace());
this.metadata = Suppliers.memoize(()-> new PackResourceMetadata(Text.translatable(namespace + "_dynamic_" + name.getPath()), SharedConstants.getGameVersion().getPackVersion(PackType.DATA)));
this.metadata = Suppliers.memoize(()-> new PackResourceMetadata(Text.translatable(namespace + "_dynamic_" + name.getPath()), SharedConstants.getGameVersion().getResourceVersion(ResourceType.SERVER_DATA)));
this.build(builder);
}

Expand Down
6 changes: 3 additions & 3 deletions forge/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ org.gradle.jvmargs = -Xmx4G
org.gradle.daemon = false

# Forge Properties
minecraft_version = 1.19.3
loader_version = 44
minecraft_version = 1.19.4
loader_version = 45
loader = Forge

# Mod Properties
Expand All @@ -17,7 +17,7 @@ org.gradle.daemon = false
modid_kebab = leathered-boots

# Dependencies
forge_subversion = .0.48
forge_subversion = .0.9

# Miscellaneous
github_user = Nyphet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public final class ModLoader {
/**
* Network channel protocol version.
*/
public static final String PROTOCOL_VERSION = "1.19.3-3.0";
public static final String PROTOCOL_VERSION = "1.19.4-3.0";
/**
* {@link SimpleChannel} instance for compatibility client-server.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package crystalspider.leatheredboots.api;

import net.minecraft.sounds.SoundEvent;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.item.ArmorItem.Type;
import net.minecraft.world.item.ArmorMaterial;
import net.minecraft.world.item.ArmorMaterials;
import net.minecraft.world.item.crafting.Ingredient;
Expand All @@ -17,58 +17,36 @@ public class LeatheredArmorMaterial implements ArmorMaterial {
public static final LeatheredArmorMaterial LEATHERED_NETHERITE = new LeatheredArmorMaterial(ArmorMaterials.NETHERITE);

private final String name;
private final int[] slotDurabilities;
private final int[] slotProtections;
private final int enchantmentValue;
private final SoundEvent sound;
private final float toughness;
private final float knockbackResistance;
private final Ingredient repairIngredient;

private final ArmorMaterial armorMaterial;

public LeatheredArmorMaterial(ArmorMaterial armorMaterial) {
this.name = "leathered_" + armorMaterial.getName();
this.slotDurabilities = new int[]{
armorMaterial.getDurabilityForSlot(EquipmentSlot.FEET),
armorMaterial.getDurabilityForSlot(EquipmentSlot.LEGS),
armorMaterial.getDurabilityForSlot(EquipmentSlot.CHEST),
armorMaterial.getDurabilityForSlot(EquipmentSlot.HEAD)
};
this.slotProtections = new int[]{
armorMaterial.getDefenseForSlot(EquipmentSlot.FEET),
armorMaterial.getDefenseForSlot(EquipmentSlot.LEGS),
armorMaterial.getDefenseForSlot(EquipmentSlot.CHEST),
armorMaterial.getDefenseForSlot(EquipmentSlot.HEAD)
};
this.enchantmentValue = armorMaterial.getEnchantmentValue();
this.sound = armorMaterial.getEquipSound();
this.toughness = armorMaterial.getToughness();
this.knockbackResistance = armorMaterial.getKnockbackResistance();
this.repairIngredient = armorMaterial.getRepairIngredient();
this.armorMaterial = armorMaterial;
}

@Override
public int getDurabilityForSlot(EquipmentSlot equipmentSlot) {
return this.slotDurabilities[equipmentSlot.getIndex()];
public int getDurabilityForType(Type type) {
return this.armorMaterial.getDurabilityForType(type);
}

@Override
public int getDefenseForSlot(EquipmentSlot equipmentSlot) {
return this.slotProtections[equipmentSlot.getIndex()];
public int getDefenseForType(Type type) {
return this.armorMaterial.getDefenseForType(type);
}

@Override
public int getEnchantmentValue() {
return this.enchantmentValue;
return this.armorMaterial.getEnchantmentValue();
}

@Override
public SoundEvent getEquipSound() {
return this.sound;
return this.armorMaterial.getEquipSound();
}

@Override
public Ingredient getRepairIngredient() {
return this.repairIngredient;
return this.armorMaterial.getRepairIngredient();
}

@Override
Expand All @@ -78,11 +56,11 @@ public String getName() {

@Override
public float getToughness() {
return this.toughness;
return this.armorMaterial.getToughness();
}

@Override
public float getKnockbackResistance() {
return this.knockbackResistance;
return this.armorMaterial.getKnockbackResistance();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static void handle(CreativeModeTabEvent.Register event) {
builder -> builder
.icon(() -> LeatheredBoots.getLeatheredBootsStack(LeatheredArmorMaterial.LEATHERED_NETHERITE))
.title(Component.translatable("itemGroup." + ModLoader.MOD_ID + "." + LEATHERED_BOOTS_TAB_ID))
.displayItems((features, output, hasPermissions) -> LeatheredBoots.getLeatheredBootsStack().forEach(stack -> output.accept(stack)))
.displayItems((features, output) -> LeatheredBoots.getLeatheredBootsStack().forEach(stack -> output.accept(stack)))
);
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package crystalspider.leatheredboots.item;

import crystalspider.leatheredboots.api.LeatheredArmorMaterial;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.item.ArmorMaterial;
import net.minecraft.world.item.DyeableArmorItem;
Expand All @@ -12,7 +11,7 @@
*/
public class LeatheredBootsItem extends DyeableArmorItem {
public LeatheredBootsItem(ArmorMaterial armorMaterial, boolean isFireResistant) {
super(armorMaterial, EquipmentSlot.FEET, isFireResistant ? new Properties().fireResistant() : new Properties());
super(armorMaterial, Type.BOOTS, isFireResistant ? new Properties().fireResistant() : new Properties());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public DynamicDatapack(ResourceLocation name, TagBuilder<?> builder) {
this.name = name;
this.namespace = name.getNamespace();
this.namespaces.add(name.getNamespace());
this.metadata = Suppliers.memoize(()-> new PackMetadataSection(Component.translatable(namespace + "_dynamic_" + name.getPath()), SharedConstants.getCurrentVersion().getPackVersion(PackType.SERVER_DATA.bridgeType)));
this.metadata = Suppliers.memoize(()-> new PackMetadataSection(Component.translatable(namespace + "_dynamic_" + name.getPath()), SharedConstants.getCurrentVersion().getPackVersion(PackType.SERVER_DATA)));
this.build(builder);
}

Expand Down

0 comments on commit 4df49a7

Please sign in to comment.