Quark Oddities

Quark Oddities

22M Downloads

Iron rod moves block instead of breaking it

NekoNoor opened this issue ยท 2 comments

commented

Minecraft 1.12.2
AutoRegLib 1.3-26
Quark 1.5-146
log here (from 1.5-146)

It seems to have been broken since this commit. I tested block breakers in 1.5-139 and it breaks the block, in 1.5-140 and 1.5-146 the iron rod just moves the block instead of breaking it.

commented

With the new code, this doesn't run the hook before the movement list is obtained, meaning that the block will be moved instead of destroyed.

I think this would be solved by changing the target for the injection to

    NEW net/minecraft/block/state/BlockPistonStructureHelper
    DUP
    ALOAD 1
    ALOAD 2
    ALOAD 3
    ILOAD 4
    INVOKESPECIAL net/minecraft/block/state/BlockPistonStructureHelper.<init> (Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/EnumFacing;Z)V
    ASTORE 5

After this INVOKESPECIAL.

commented

This might also be because you're injecting another ALOAD 5 in, which might be picked up. I'm not sure, but in that case you should use a DUP instead of another ALOAD.