Skip to content

Commit

Permalink
Fixed "Between" constraint and ModularSlot place item validation.
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon3055 committed Feb 22, 2024
1 parent 0834135 commit 2fbbb12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public Between(GeoRef start, GeoRef end, double pos) {

@Override
protected double getImpl() {
return start.get() + (end.get() - start.get()) * getPos();
return start.get() + ((end.get() - start.get()) * getPos());
}

public double getPos() {
Expand Down Expand Up @@ -202,7 +202,7 @@ public BetweenDynamic(GeoRef start, GeoRef end, Supplier<Double> pos) {

@Override
protected double getImpl() {
return start.get() + (end.get() - start.get()) * getPos();
return start.get() + ((end.get() - start.get()) * getPos());
}

public double getPos() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public ModularSlot setEnabled(boolean enabled) {

@Override
public boolean mayPlace(ItemStack itemStack) {
return canPlace && validator.test(itemStack) && (!checkContainer || container.canPlaceItem(getContainerSlot(), itemStack));
return canPlace && validator.test(itemStack) && (!checkContainer || getItemHandler().isItemValid(getContainerSlot(), itemStack));
}

@Override
Expand Down

0 comments on commit 2fbbb12

Please sign in to comment.