GregTechCEu Modern

GregTechCEu Modern

6M Downloads

World Accelerators `/setblock` the block entity they're accelerating onto themselves.

James103 opened this issue ยท 0 comments

commented

Checked for existing issues

  • I have checked for existing issues, and have found none.

Tested latest version

  • I have checked that this occurs on the latest version.

GregTech CEu Version

1.1.3.b

Recipe Viewer Installed

JEI

Environment

Singleplayer

Cross-Mod Interaction

Unsure

Other Installed Mods

All the Mods 9, version 0.2.26

Expected Behavior

World Accelerators should not overwrite themselves with the block entity they're accelerating.

Actual Behavior

When a World Accelerator is set to accelerate block entities, as soon as it is given power, the accelerator copies the default block state of the block entity onto the accelerator block itself, causing the block they're accelerating to be duplicated and the Accelerator itself to be destroyed and voided.

Steps to Reproduce

  1. Give yourself a World Accelerator (any voltage).
  2. Place it down.
  3. Set it to accelerate block entities.
  4. Place down a Furnace next to the accelerator.
  5. Power the accelerator.
  6. Give the furnace fuel and items to smelt.
  7. The World Accelerator accelerates the furnace for one tick, then duplicates the furnace and destroys itself.

For modded block entities, this can crash the game due to getting a block state property that doesn't exist.
An example of such a crash report is attached: crash-2024-02-17_17.30.10-server.txt

Additional Information

This may be caused by an incorrect position being used here:

blockEntityTicker.tick(this.getLevel(), this.getPos(), blockEntity.getBlockState(), blockEntity);