Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/interpreter/Visitor.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public Visitor(MinecraftServer server, ServerWorld world, BlockPos pos, SymbolTa
this.symbolTable = symbolTable;
this.placingBlock = Blocks.AIR;
this.shouldBreak = true;
this.turtleDelay = 500;
this.turtleDelay = 200;
this.server = server;
this.world = world;
this.pos = pos;
Expand Down Expand Up @@ -472,7 +472,7 @@ public MSType visitFuncCall(MineScriptParser.FuncCallContext ctx) {
throw new RuntimeException("Cannot set speed to " + n.getValue() + ", must be between 1 and 10");
}

this.turtleDelay = 550 - n.getValue() * 50;
this.turtleDelay = 200 - n.getValue() * 20;
}
case "GetXPosition" -> {
if (actualParams.size() != 0) {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/minescript/block/custom/TurtleBlock.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public ActionResult onUse(BlockState state, World world, BlockPos pos,

@Override
public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {
if (!state.isOf(newState.getBlock()) && !moved) {
if (!moved && !state.isOf(newState.getBlock())) {
BlockEntity blockEntity = world.getBlockEntity(pos);

if (blockEntity instanceof TurtleBlockEntity entity) {
Expand All @@ -74,8 +74,8 @@ public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockSt

ClientPlayNetworking.send(MineScriptPackets.STOP_INTERPRETER_ID, buf);
}
super.onStateReplaced(state, world, pos, newState, moved);
}
super.onStateReplaced(state, world, pos, newState, moved);
}

@Nullable
Expand Down