Skip to content

Commit

Permalink
add ONE give type
Browse files Browse the repository at this point in the history
  • Loading branch information
sisby-folk committed Dec 1, 2024
1 parent c27ac51 commit 2b29163
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ authors=HavenKing, ModFest
contributors=Chai, Sisby folk, ShiroJR, Superkat32, maximumpower55, CallMeEcho, quaternary, comp500, LemmaEOF, acikek, TheEpicBlock, SkyNotTheLimit, Patbox, AmyMialee
license=CC0-1.0
# Mod Version
baseVersion=1.7.4
baseVersion=1.7.5
# Branch Metadata
branch=1.21
tagBranch=1.21
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ public void cycleGiveType() {
switch (this.givesItem) {
case YES -> this.givesItem = GivesItem.NO;
case NO -> this.givesItem = GivesItem.ONCE;
case ONCE -> this.givesItem = GivesItem.YES;
case ONCE -> this.givesItem = GivesItem.ONE;
case ONE -> this.givesItem = GivesItem.YES;
}
givenTo.clear();
markDirty();
Expand All @@ -187,6 +188,7 @@ else return switch (this.givesItem) {
case YES -> true;
case NO -> false;
case ONCE -> player.isCreative() || !givenTo.contains(player.getUuid());
case ONE -> player.isCreative() || !player.getInventory().containsAny(Set.of(stack.getItem()));
};
}

Expand Down Expand Up @@ -232,7 +234,7 @@ public enum RotationType {
}

public enum GivesItem {
YES, NO, ONCE
YES, NO, ONCE, ONE
}

public enum Offset {
Expand Down

0 comments on commit 2b29163

Please sign in to comment.