Skip to content

Commit

Permalink
Fixed unintended behavior in expanded API
Browse files Browse the repository at this point in the history
  • Loading branch information
jss2a98aj committed Jan 30, 2023
1 parent 7221cac commit 7f9bb75
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/main/java/baubles/api/expanded/BaubleExpandedSlots.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class BaubleExpandedSlots {
//The type used in place of null.
public static final String unknownType = "unknown";

//Ppre-registered types.
//Pre-registered types.
public static final String ringType = "ring";
public static final String amuletType = "amulet";
public static final String beltType = "belt";
Expand Down Expand Up @@ -311,11 +311,11 @@ public static void overrideSlots(String[] overrideSlots) {
if(Loader.instance().getLoaderState() == LoaderState.INITIALIZATION) {
newSlotsRemaining = 0;
for(int slot = 0; slot < slotLimit; slot++) {
if(slot < overrideSlots.length && isTypeRegistered(overrideSlots[slot])) {
if(slot < overrideSlots.length && isTypeRegistered(overrideSlots[slot]) && !overrideSlots[slot].equals(unknownType)) {
assignedSlots[slot] = overrideSlots[slot];
newSlotsRemaining++;
} else {
assignedSlots[slot] = unknownType;
newSlotsRemaining++;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/baubles/api/package-info.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@API(owner = "Baubles", apiVersion = "2.0.1", provides = "Baubles|API")
@API(owner = "Baubles", apiVersion = "2.0.2", provides = "Baubles|API")
package baubles.api;

import cpw.mods.fml.common.API;
Expand Down

0 comments on commit 7f9bb75

Please sign in to comment.