Skip to content

Commit

Permalink
Fix bleeding applying Bane instead (See #102)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrbysco committed Oct 3, 2024
1 parent f6ae981 commit 28edc86
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ private void processTool() {
if (recipeHolder.value().matchesModifier(new RecipeWrapper(this.handler), modifier, true)) {
ItemStack tool = getFromToolSlot();
boolean success = applyModifier(tool, modifier, recipeHolder);
ForceCraft.LOGGER.debug("Applying modifier {} on tool {}, succes: {}", modifier, tool, success);
ForceCraft.LOGGER.debug("Applying modifier {} on tool {}, success: {}", modifier, tool, success);
if (success) {

// for EACH modifier
Expand Down Expand Up @@ -682,23 +682,23 @@ static boolean addBleedingModifier(ItemStack stack) {
if (item instanceof ForceSwordItem) {
int currentBleed = stack.getOrDefault(ForceComponents.TOOL_BLEED, 0);
if (currentBleed < MAX_CAP) {
stack.set(ForceComponents.TOOL_BANE, currentBleed + 1);
stack.set(ForceComponents.TOOL_BLEED, currentBleed + 1);
addInfusedTag(stack);

return true;
}
} else if (item instanceof ForceBowItem) {
int currentBleed = stack.getOrDefault(ForceComponents.TOOL_BLEED, 0);
if (currentBleed < MAX_CAP) {
stack.set(ForceComponents.TOOL_BANE, currentBleed + 1);
stack.set(ForceComponents.TOOL_BLEED, currentBleed + 1);
addInfusedTag(stack);

return true;
}
} else if (item instanceof ForceArmorItem) {
int currentBleed = stack.getOrDefault(ForceComponents.TOOL_BLEED, 0);
if (currentBleed < MAX_CAP) {
stack.set(ForceComponents.TOOL_BANE, currentBleed + 1);
stack.set(ForceComponents.TOOL_BLEED, currentBleed + 1);
addInfusedTag(stack);

return true;
Expand Down

0 comments on commit 28edc86

Please sign in to comment.