Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for rotating / spinning the other direction #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
public class AstralDisplayBlockEntity extends LockableContainerBlockEntity implements InventoryChangedListener {
public static final int SIZE = 9;
private final SimpleInventory inventory = new SimpleInventory(SIZE);
// yLevel, rotSpeed and spin are all values between 0 and 1, scale accordingly
public ScaledDouble yLevel = new ScaledDouble(0.0, 0, 32);
public ScaledDouble rotSpeed = new ScaledDouble(0.0, 0, 1);
public ScaledDouble spin = new ScaledDouble(0.0, 0, 1);
// rotSpeed and spin are all values between -1 and 1, scale accordingly, the value 0.5 is the center of the slider, in this case 0.5 is a speed/spin of 0
public ScaledDouble rotSpeed = new ScaledDouble(0.5, -1, 1);
public ScaledDouble spin = new ScaledDouble(0.5, -1, 1);
private BlockPos parentPos;

public AstralDisplayBlockEntity(BlockPos pos, BlockState state) {
Expand Down