Minecraft Transit Railway (Automated trains, planes, and more!)

Minecraft Transit Railway (Automated trains, planes, and more!)

2M Downloads

Rubbish bin could not clean the rubbish properly

ZiYueCommentary opened this issue ยท 0 comments

commented

Before reporting, I have confirmed that

  • This bug does not appear to be reported on GitHub Issues before.
  • This bug still exists in the latest version of the Minecraft Transit Railway mod.
  • I have tested this in the official version of Minecraft Transit Railway, not a modified, custom, or unofficial build.

Describe the Bug

@Override
public void randomDisplayTick2(BlockState state, World world, BlockPos pos, Random random) {
final int newLevel = IBlock.getStatePropertySafe(state, FILLED) - 1;
if (newLevel >= 0) {
world.setBlockState(pos, state.with(new Property<>(FILLED.data), newLevel));
}
}

The code above intended to be cleaned up the rubbish bin automatically. However, randomDisplayTick2 is a client method. It can't change the state of the block on the server. Therefore, this code is not working as expected and does nothing actually.

Reproduction Steps

  1. Place a rubbish bin and put and rubbish in it.
  2. Waiting for it to clean itself.
  3. Rejoining the save or server, the rubbish is still there.

In-game Log and Crash Report

N/A

Mod Loader

Fabric

Minecraft Version

1.20.4

Minecraft Transit Railway Version

4.0.0-prerelease-3

Operating System

Windows 11

List of Mods or Modpack You Were Using

  • MTR 4.0.0-prerelease-3

Extra Information

No response