Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Disabling Tools not working as expected #6

Open
tommyTT opened this issue Nov 19, 2016 · 6 comments
Open

Disabling Tools not working as expected #6

tommyTT opened this issue Nov 19, 2016 · 6 comments

Comments

@tommyTT
Copy link

tommyTT commented Nov 19, 2016

I want to completely disable the usage of a tool (i.e. the diamond pickaxe), so I set the harvest level in the config to -1. However the log tells me, that this change is not supported and the tool still can break blocks like normal.
[12:12:38] [Client thread/INFO]: Changing tool harvest level of minecraft:diamond_pickaxe for pickaxe from 3 to -1 [12:12:38] [Client thread/WARN]: Changing of tool harvest capabilities is not supported by item minecraft:diamond_pickaxe

Looking into the code, the harvest level gets set, but the getHarvestLevel method returns a different value. Apparently if the harvest level of the tool is -1 it will use the level of the material instead (if the tool class matches). I'm not sure if this is a bug or a feature, but in effect, I'm unable to achieve my goal. Maybe this mod can somehow provide a way to disable tools or otherwise document the effects of setting the level to -1 (or at least clarify the output of the log).

Versions
Minecraft 1.10.2
Forge 12.18.2.2151
HarvestTweaks 0.1.1
Mantle 1.1.1

Log
http://paste.ee/p/nRW6R

@bonii-xx
Copy link
Collaborator

bonii-xx commented Nov 19, 2016

That it uses the material for a harvest level of -1 is default vanilla/forge behaviour, iirc. The warning just tells you that the harvest level didn't actually get changed to what the value was. I suppose it's possible to add support for that, though. Question is if it wouldn't be better to have it separate from the harvest levels.

@jprocket45
Copy link

just in agreeing id love to be able to disable vanilla tools all together i've mentioned this in the past but cannot figure a way to due this am i missing something or is this a work in progress or not meant to be done? I know this is kind of a older post but even on the current update I don't see a way to make a ( tool ) totally useless.

@cosmo3001
Copy link

im also looking for that old setting from iguana tools to disable all vanilla tools

@mainrs
Copy link

mainrs commented May 9, 2017

I just looked into IguanaTweaks. Basically just 50 lines of code. Gimme some time, I will put the mod up on github tonight (it'll just disable all tools from being used but can still be crafted!)

@jprocket45
Copy link

sweet glad to see this!!

@mainrs
Copy link

mainrs commented May 9, 2017

https://minecraft.curseforge.com/projects/vanilla-tools/files here you go!
I took the idea from the original IguanaTweaks (registering handlers instead of deleting the recipes).
Edit: It got proven. Have fun! If you need anything else or have feature requests, just open up an issue!
The code should work for 1.10.2 and 1.11 (I only tested it on 1.10.2 though).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants