mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-11-13 05:54:17 +01:00
Fix Bell contraptions and Schematic usage
- Bell contraptions no longer causes a NullPointerException when they are stopped - Schematic usage shouldn't require a player to not be sneaking, and changes the key to CTRL to match tool tips
This commit is contained in:
parent
42f97477cf
commit
9729c137f1
@ -25,7 +25,8 @@ public class BellMovementBehaviour extends MovementBehaviour {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void stopMoving(MovementContext context) {
|
public void stopMoving(MovementContext context) {
|
||||||
context.world.playSound(null, new BlockPos(context.position), SoundEvents.BLOCK_BELL_USE, SoundCategory.BLOCKS,
|
if (context.position != null)
|
||||||
2.0F, 1.0F);
|
context.world.playSound(null, new BlockPos(context.position), SoundEvents.BLOCK_BELL_USE, SoundCategory.BLOCKS,
|
||||||
|
2.0F, 1.0F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -221,14 +221,14 @@ public class SchematicHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean mouseScrolled(double delta) {
|
public boolean mouseScrolled(double delta) {
|
||||||
if (!active || Minecraft.getInstance().player.isSneaking())
|
if (!active)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (selectionScreen.focused) {
|
if (selectionScreen.focused) {
|
||||||
selectionScreen.cycle((int) delta);
|
selectionScreen.cycle((int) delta);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (AllKeys.ACTIVATE_TOOL.isPressed())
|
if (!AllKeys.ctrlDown())
|
||||||
return currentTool.getTool()
|
return currentTool.getTool()
|
||||||
.handleMouseWheel(delta);
|
.handleMouseWheel(delta);
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user