Skip to content

Commit

Permalink
Durability fix, 1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
agmass committed Sep 15, 2024
1 parent 8b0c488 commit f892332
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ minecraft_version=1.21.1
yarn_mappings=1.21.1+build.3
loader_version=0.16.5
# Mod Properties
mod_version=1.0.2
mod_version=1.0.3
maven_group=org.agmas
archives_base_name=Scythes
# Dependencies
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/org/agmas/scythes/Scythes.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ public class Scythes implements ModInitializer {
public void onInitialize() {
ScythesItems.initalize();
ItemGroupEvents.modifyEntriesEvent(ItemGroups.COMBAT).register((a)->{
a.add(ScythesItems.WOODEN_SCYTHE);
a.add(ScythesItems.STONE_SCYTHE);
a.add(ScythesItems.IRON_SCYTHE);
a.add(ScythesItems.CLOUD_SCYTHE);
a.add(ScythesItems.GOLDEN_SCYTHE);
a.add(ScythesItems.DIAMOND_SCYTHE);
a.add(ScythesItems.IRON_SCYTHE);
a.add(ScythesItems.NETHERITE_SCYTHE);
a.add(ScythesItems.GOLDEN_SCYTHE);
a.add(ScythesItems.WOODEN_SCYTHE);
a.add(ScythesItems.STONE_SCYTHE);
});
PolymerResourcePackUtils.addModAssets("scythes");
}
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/org/agmas/scythes/items/Scythe.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,12 @@ public ItemStack getPolymerItemStack(ItemStack itemStack, TooltipType tooltipTyp
return itemStack1;
}

public void postDamageEntity(ItemStack stack, LivingEntity target, LivingEntity attacker) {
@Override
public boolean postHit(ItemStack stack, LivingEntity target, LivingEntity attacker) {
stack.damage(1, attacker, EquipmentSlot.MAINHAND);
return super.postHit(stack, target, attacker);
}

@Override
public Item getPolymerItem(ItemStack itemStack, @Nullable ServerPlayerEntity player) {
try {
Expand Down

0 comments on commit f892332

Please sign in to comment.