mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-25 14:36:29 +01:00
Added return after schematic activation to prevent double interaction
This commit is contained in:
parent
a92c08b1e1
commit
1d2da07756
1 changed files with 6 additions and 1 deletions
|
@ -73,6 +73,7 @@ public class DeployerMovementBehaviour implements MovementBehaviour {
|
|||
return;
|
||||
|
||||
activate(context, pos, player, mode);
|
||||
checkForPlacementAdvancement();
|
||||
tryDisposeOfExcess(context);
|
||||
context.stall = player.blockBreakingProgress != null;
|
||||
}
|
||||
|
@ -81,8 +82,10 @@ public class DeployerMovementBehaviour implements MovementBehaviour {
|
|||
Level world = context.world;
|
||||
|
||||
FilterItemStack filter = context.getFilterFromBE();
|
||||
if (AllItems.SCHEMATIC.isIn(filter.item()))
|
||||
if (AllItems.SCHEMATIC.isIn(filter.item())) {
|
||||
activateAsSchematicPrinter(context, pos, player, world, filter.item());
|
||||
return;
|
||||
}
|
||||
|
||||
Vec3 facingVec = Vec3.atLowerCornerOf(context.state.getValue(DeployerBlock.FACING)
|
||||
.getNormal());
|
||||
|
@ -104,7 +107,9 @@ public class DeployerMovementBehaviour implements MovementBehaviour {
|
|||
player.placedTracks = false;
|
||||
|
||||
DeployerHandler.activate(player, vec, pos, facingVec, mode);
|
||||
}
|
||||
|
||||
protected void checkForPlacementAdvancement() {
|
||||
if ((context.contraption instanceof MountedContraption || context.contraption instanceof CarriageContraption)
|
||||
&& player.placedTracks && context.blockEntityData != null && context.blockEntityData.contains("Owner"))
|
||||
AllAdvancements.SELF_DEPLOYING.awardTo(world.getPlayerByUUID(context.blockEntityData.getUUID("Owner")));
|
||||
|
|
Loading…
Reference in a new issue