LemADEC / WarpDrive

A warp drive mod for minecraft
69 stars 39 forks source link

Redstone drops after jump #504

Closed NCrashed closed 2 years ago

NCrashed commented 2 years ago

Describe the bug Redstone that is placed over any block with a tile entity (e.x. stone furnace) will be dropped as an item after a jump.

To Reproduce Steps to reproduce the behavior:

  1. Place a stone furnace and place a redstone line over it
  2. Jump in any direction
  3. See how the line is destroyed

Expected behavior Redstone should persist.

Screenshots 2021-10-06_04 12 09

2021-10-06_04 12 29

Versions (latest is not a valid answer) WarpDrive version: 1.12.2 1.5.23 (latest git) Forge version: 1.12.2-14.23.5.2847-PROJECT

NCrashed commented 2 years ago

There is an easy fix, add the following line to config/warpdrive/dictionary.yml:

S:"minecraft:redstone_wire"=PlaceLatest
LemADEC commented 2 years ago

Redstone wire has no entity attached, hence they're placed before tile entities like a vanilla furnace. Since redstone is pretty much like a machine, it would make sense to keep them in sync. In which case, the PlaceLater tag would be more appropriate.

NCrashed commented 2 years ago

I tried PlaceLater, it prevents dropping but introduces new bugs. For instance, consider a redstone torch placed to power the redstone wire. The wire will lose its power after a jump with PlaceLater but will be powered with PlaceLatest.

LemADEC commented 2 years ago

Using PlaceLatest for redstone wires improves the torch propagation only in some orientation cases. Torchs are tagged PlaceLatest because they need the attaching block. I prefer to keep wires on PlaceLater so the behavior is more predictable for players. We'll have to find another way to refresh redstone states consistently after jump.

LemADEC commented 2 years ago

Fixed in dev