Stone Tools useless?
G-Stav opened this issue ยท 6 comments
With version 1.14.4 1.2.0 stone tools have mirrored wooden tools and cannot be used to mine blocks. This may also maybe be breaking Waterstrainers shovel the garden trowel.
Maybe it's possible to add a whitelist for which tools do disable instead?
confirmed....
it is this bit of code... in com.oitsjustjose.naturalprogression.common.config; lines 61-63
REMOVE_STONE_TOOL_RECIPES = COMMON_BUILDER.comment(
"Setting this to true prevents the ability to craft stone tools. This is totally unrealistic anyways.")
.define("removeWoodenToolRecipes", true);
line 63 should read
.define("removeStoneToolRecipes", true);
Although I would argue the wood and stone tools have varied realistic uses...
-flint axe would be better than a stone axe but less durable, in a fight flint more damage, chopping down a tree stone axe would be more durable and less likely to just crack apart.
-flint sword and stone sword useless, maybe some sharp pieces attached/embedded into a club or bone "Macuahuitl" is one example of wood. same damage. clubs in general would have been a common item, more bit ticket versions would be bound and studded with metal.
-flint shovel and stone shovel would be usless, wood was used for shovels, hoes.
-flint/stone armor would be a no, unless it was some studded leather [stone for extra protection and flint for close quarters damage]
Thanks for the insight! Fixed this issue in e099b78.
There still may be more to the problem, I changed the code and ran the code and still get the message in red on the stone tools. Checked the log and it only shows the wooden tools being remove though. Digging some more.
neuteredTools in ToolTips needs to be built based on the config settings, but still does not fix the problem. so more digging.
registerEvent in ToolNeutering needs to check config before canceling the event
NOTE: instead of just making a change I tried to comment out what I changed/replaced for clarity.
One day I will figure out how to use github to contribute correctly. Wow insert code butches the flow of the code.
added to the ToolTips.java file...
public ToolTips()
{
if (CommonConfig.REMOVE_WOODEN_TOOL_RECIPES.get())
{
neuteredTools.add(Items.WOODEN_AXE);
neuteredTools.add(Items.WOODEN_PICKAXE);
neuteredTools.add(Items.WOODEN_SHOVEL);
neuteredTools.add(Items.WOODEN_HOE);
neuteredTools.add(Items.WOODEN_SWORD);
}
if (CommonConfig.REMOVE_STONE_TOOL_RECIPES.get())
{
neuteredTools.add(Items.STONE_AXE);
neuteredTools.add(Items.STONE_PICKAXE);
neuteredTools.add(Items.STONE_SHOVEL);
neuteredTools.add(Items.STONE_HOE);
neuteredTools.add(Items.STONE_SWORD);
}
made this change as well on ToolTips.java...
private ArrayList neuteredTools = Lists.newArrayList();
//Items.WOODEN_AXE, Items.WOODEN_PICKAXE, Items.WOODEN_SHOVEL, Items.WOODEN_HOE, Items.WOODEN_SWORD
//Items.STONE_AXE, Items.STONE_PICKAXE, Items.STONE_SHOVEL, Items.STONE_HOE, Items.STONE_SWORD
changed ToolNeutering.java line26...
ToolItem tool = (ToolItem) heldItem.getItem();
//if (tool.getTier() == ItemTier.WOOD || tool.getTier() == ItemTier.STONE)
if ((CommonConfig.REMOVE_WOODEN_TOOL_RECIPES.get() && tool.getTier() == ItemTier.WOOD) ||
(CommonConfig.REMOVE_WOODEN_TOOL_RECIPES.get() && tool.getTier() == ItemTier.WOOD))
and line 36 {36 after above change}...
SwordItem tool = (SwordItem) heldItem.getItem();
//if (tool.getTier() == ItemTier.WOOD || tool.getTier() == ItemTier.STONE)
if ((CommonConfig.REMOVE_WOODEN_TOOL_RECIPES.get() && tool.getTier() == ItemTier.WOOD) ||
(CommonConfig.REMOVE_WOODEN_TOOL_RECIPES.get() && tool.getTier() == ItemTier.WOOD))
{
event.setCanceled(true);
}
and of course the change to the CommonConfig.java line 63
.define("removeStoneToolRecipes", true);
Yeah, so I didn't really think through a lot of this stuff at the time - there was a large gap between when I started and finished that update.
I've re-worked the tooltips to take into account the same exact logic as the event itself, so all stone-tier items show the right tooltip if stone tools are disabled, and all wood-tier items show the right tooltip if wooden tools are disabled.
I've also fixed up the logic in the events to take into account the different configs for the different ToolTiers
, so that should fix that issue as well. I'm about to test to make sure everything works as expected.