Added compatibility with tall blocks#3
Conversation
|
Thanks for the PR! Ideally, I'd rather not use a hardcoded method like this. What do you think about this:
This should solve the silk touch problem, eliminate the need to whitelist blocks, and solve cases like breaking the sand under a sugar cane or breaking the block behind a torch. I can try implementing this if you don't have the time. |
|
About hard-coded blocks I could try using NBT tags for players today or tomorrow, but I think it wouldn't work with choruses. But still better than that we have right now. |
|
I don't understand what you are referring to as a waste of time. I don't think we need to persist any data as an NBT tag, the data only needs to be in memory (I.e. add a property and some methods to PlayerEntity via mixin). I am not working on a config file. We might have to just manually code in chorus plant logic. |
|
Waste of time if we both separately added config support. If the mod will use different approach for tall blocks then config file isn't needed. I've done most tall blocks support via checking if entity is null. Side effect of this is for some reason blocks still drop their item. I'll try to check once more, but maybe you could find how to fix this? Possibly delete item entity after it's spawned |
|
I've checked most combinations, and the only thing isn't affected is torches placed on blocks. But is this an issue? For example, Hypixel Skyblock doesn't even add sugarcane to your inventory if you break block below it |
|
You need to return false to have it not drop a block. The torch thing isn't too much of an issue, I can take a look at it when I have the time. |
|
Off the top of my head there are two problems with the current implementation here:
I've gone ahead and made some changes, what do you think of d187867? |
Partial fix of #2
Don't work with doors and blocks that require silk touch