Merge pull request #490 from wchen1990/mc1.15/dev

Fix Bell contraptions and Schematic usage
This commit is contained in:
simibubi 2020-10-20 12:53:30 +02:00 committed by GitHub
commit 47f5225129
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -25,6 +25,7 @@ public class BellMovementBehaviour extends MovementBehaviour {
@Override @Override
public void stopMoving(MovementContext context) { public void stopMoving(MovementContext context) {
if (context.position != null)
context.world.playSound(null, new BlockPos(context.position), SoundEvents.BLOCK_BELL_USE, SoundCategory.BLOCKS, context.world.playSound(null, new BlockPos(context.position), SoundEvents.BLOCK_BELL_USE, SoundCategory.BLOCKS,
2.0F, 1.0F); 2.0F, 1.0F);
} }

View File

@ -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;