mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-10 12:33:57 +01:00
Added return after schematic activation to prevent double interaction
This commit is contained in:
parent
a92c08b1e1
commit
1d2da07756
@ -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 New Issue
Block a user