Skip to content

Commit

Permalink
deprecate hoe_required in favour of hoe_never_required
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamalam360 committed Aug 9, 2023
1 parent bd81657 commit e6f8ecd
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@

- Fix ModMenu icon error.
- Add French translation.
- Deprecate the `hoe_required` tag. Use `hoe_never_required` instead. This improves mod compatibility.

[Full Changelog](https://github.com/JamCoreModding/right-click-harvest/compare/3.2.2+1.19.x-1.20.1-fabric...3.2.3+1.19.x-1.20.1-fabric)
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,11 @@ public class RightClickHarvestModInit implements ModInitializer {

public static final Direction[] CARDINAL_DIRECTIONS = new Direction[] { Direction.NORTH, Direction.EAST,
Direction.SOUTH, Direction.WEST };
@Deprecated(forRemoval = true)
public static final TagKey<Block> HOE_REQUIRED = TagKey.of(VersionUtils.BLOCK_KEY,
new Identifier(MOD_ID, "hoe_required"));
public static final TagKey<Block> HOE_NEVER_REQUIRED = TagKey.of(VersionUtils.BLOCK_KEY,
new Identifier(MOD_ID, "hoe_never_required"));
public static final TagKey<Block> RADIUS_HARVEST_BLACKLIST = TagKey.of(VersionUtils.BLOCK_KEY,
new Identifier(MOD_ID, "radius_harvest_blacklist"));
public static final TagKey<Item> LOW_TIER_HOES = TagKey.of(VersionUtils.ITEM_KEY,
Expand Down Expand Up @@ -102,7 +105,7 @@ private static ActionResult onBlockUse(PlayerEntity player, World world, Hand ha
}
}

if (state.isIn(HOE_REQUIRED) && Config.requireHoe) {
if (!state.isIn(HOE_NEVER_REQUIRED) && Config.requireHoe) {
if (!stack.isIn(VersionUtils.HOES)) {
return ActionResult.PASS;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"minecraft:cocoa",
"minecraft:sugar_cane"
]
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"replace": false,
"values": [
"minecraft:cocoa"
"minecraft:cocoa",
"minecraft:sugar_cane"
]
}
}
3 changes: 2 additions & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"FITFC",
"Fourmisain",
"Telezhka-the-First",
"ShapeLayer"
"ShapeLayer",
"Calvineries"
],
"contact": {
"homepage": "https://www.curseforge.com/minecraft/mc-mods/rightclickharvest-fabric",
Expand Down

0 comments on commit e6f8ecd

Please sign in to comment.