CC: Tweaked

CC: Tweaked

42M Downloads

[1.14.4] Exploit- Turtles dupe when you break them indirectly with a hammer.

ProsperCraft opened this issue ยท 5 comments

commented

Useful information to include:

  • Minecraft version forge-1.14.4-28.0.49
  • CC: Tweaked version cc-tweaked-1.14.4-1.84.1
  • place a turtle down and cobble next to it, break the cobble with a hammer, and the one turtle that was broken indirectly now becomes 2 place those two next to a cobble and break that cobble, and those two become four.
commented

Is the hammer a vanilla item, or a modded one?

commented

Modded hammer from SilentGems, and tested the same with one from Ray's Dongles

commented

This is a bug with both SilentGear and Ray's dongles - their break handlers both include the following code:

state.getBlock().onBlockHarvested(world, pos2, state, player);
tool.getItem().onBlockDestroyed(tool, world, state, pos2, player);
TileEntity tileEntity = world.getTileEntity(pos2);
if (state.removedByPlayer(world, pos2, player, true, state.getFluidState())) {
  // ...

However, removedByPlayer also calls onBlockHarvested, which means it's being called twice.

CC has some slightly weird block-drop code in order to ensure computers are still dropped in creative mode, which is why it only happens to CC:T blocks.

commented

@SquidDev Thanks for pointing this out. It has been fixed.

commented

Fantastic. Thank you for the fast fix!