Skip to content

Commit

Permalink
Fix getItems with only three parameters sometimes not working
Browse files Browse the repository at this point in the history
  • Loading branch information
OutCraft-Mods committed Feb 4, 2023
1 parent 08246e9 commit d5f8c90
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import java.util.List;

public class ExtendOBoots extends LivingEntity {
private int lifeTime;
public static final EntityDataAccessor<Float> HEIGHT = SynchedEntityData.defineId(ExtendOBoots.class,
EntityDataSerializers.FLOAT);

Expand All @@ -31,7 +32,9 @@ public static AttributeSupplier createAttributes() {
@Override
public void tick() {
super.tick();
// TODO make ExtendOBoots dissapear automatically
this.lifeTime++;
/*if (this.lifeTime >= 20)
this.discard();*/
}

@Override
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/workert/robotics/helpers/CodeHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ public static void registerDefaultCommands() {
for (int slot = 0; slot < handler.getSlots(); slot++) {
while (!handler.getStackInSlot(slot)
.isEmpty() && (arguments.size() < 4 || CodeHelper.getItemById(arguments.get(3))
.equals(handler.getStackInSlot(slot).getItem())
.equals(handler.getStackInSlot(slot).getItem()))
&& robot.wantsToPickUp(
handler.extractItem(slot, 1, true)))) {
handler.extractItem(slot, 1, true))) {
robot.getInventory().addItem(handler.extractItem(slot, 1, false));
}
}
Expand Down

0 comments on commit d5f8c90

Please sign in to comment.