Create

Create

86M Downloads

Remote block breaker

RungeCC opened this issue ยท 1 comments

commented

Describe the Bug

  • MC 1.18.2
  • Create 0.5.0d

If a MinecartContraption which contains breakers(e.g. drill) turn to item by player when the breaker is just in a "breaking process"(i.e., it has NBT like breakingPos etc), then of course the breaker will "remember" the process and relate state, breakingPos, so once this minecart item be placed again it will restore previous working process, that is, continue to break the origin block even if now the position of the breaker is very far from its breakingPos. And more weird is that the item dropped will be stored into the inventory of the contraption, so if the origin block to be broken is a shulker box then one can teleport items by using this bug.

Reproduction Steps

1.A minecart with contraption contained a breaker(e.g. drill).
2.just during a process when the breaker try to break some block, right click the minecart with wrench in hand to itemize it.
3.let the assembled minecart to be entity again, and let the breaker work again;
4.breaker will continue to break the block, though which may not in front of it at this time;
5.when block broke, the dropped item will be stored into the inventory of the contraption(if have), or be dropped out at the position of the minecart.
...

Expected Result

Breakers should not break blocks remotely.

Screenshots and Videos

https://www.bilibili.com/video/BV18W4y1B7V2 and https://www.bilibili.com/video/BV1XV4y1u7z2;
notice the language of videos is Chinese.

Crash Report or Log

No response

Operating System

linux

Mod Version

0.5.0d

Minecraft Version

1.18.2

Forge Version

40.1.69

Other Mods

not relative.

Additional Context

note that's because method in class:

package com.simibubi.create.content.contraptions.components.actors;

public class BlockBreakingMovementBehaviour implements MovementBehaviour;
public void tickBreaker(MovementContext context); // line 143

do not check if the current position of breaker matches breakingPos, also event listener:

@SubscribeEvent
public static void wrenchCanBeUsedToPickUpMinecartContraptions(PlayerInteractEvent.EntityInteract event);

in class:

package com.simibubi.create.content.contraptions.components.structureMovement.mounted;

public class MinecartContraptionItem extends Item;

do not cancel the working process of breaker, it just serialize the nbt data of it.

commented

1

2

3