Skip to content

Commit

Permalink
fix: fix container id assigning
Browse files Browse the repository at this point in the history
  • Loading branch information
smartcmd committed Mar 30, 2024
1 parent 5bc0dde commit 245dcb9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class EntityPlayerContainerViewerComponentImpl implements EntityContainer
@ComponentIdentifier
protected static final Identifier IDENTIFIER = new Identifier("minecraft:entity_inventory_viewer_component");

protected byte idCounter = 0;
protected byte idCounter = 1;
@Dependency
protected EntityPlayerBaseComponent baseComponent;
@Dependency
Expand All @@ -51,7 +51,7 @@ public class EntityPlayerContainerViewerComponentImpl implements EntityContainer
@Override
public byte assignInventoryId() {
if (idCounter + 1 >= 100) {
idCounter = 0;
idCounter = 1;
}
return idCounter++;
}
Expand Down

0 comments on commit 245dcb9

Please sign in to comment.