Skip to content

Commit

Permalink
6.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertSkalko committed Jan 2, 2025
1 parent 5c1836f commit ad6a454
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 14 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Changelog of recent updates: https://github.com/RobertSkalko/Mine-And-Slash-Rework/blob/1.20-Forge/changelogs/v.6.0.txt

v.6.0.1
- fixed 1 hp mobs
v.6.0.2
- fixed sweeping
Binary file added UPDATE/v.6.0.txt - Shortcut.lnk
Binary file not shown.
5 changes: 5 additions & 0 deletions changelogs/v.6.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,8 @@ Other:
- loot chests can no longer be salvaged
- merged clefal's PR to reduce talent tree lag

v.6.0.1
- fixed 1 hp mobs

v.6.0.2
- fixed sweeping
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
org.gradle.jvmargs=-Xmx2G
# --- COMMON GRADLE START ---
# Mod Properties
mod_version=6.0.1
mod_version=6.0.2
# Minecraft Versions
minecraft_version=1.20.1
forgeversion=47.1.43
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ public void setAmount(float f) {
}
}

// setting it to super tiny number still allows the bit of damage to go through
// this makes sweeping edge work
public void setToMinimalNonZero() {
this.setAmount(0.0000001F);
}

public LivingEntity getTargetEntity() {
return targetEntity;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.robertx22.mine_and_slash.itemstack;

import com.google.common.collect.ImmutableList;
import com.robertx22.mine_and_slash.gui.texts.textblocks.AdditionalBlock;
import com.robertx22.mine_and_slash.uncommon.localization.Itemtips;
import com.robertx22.mine_and_slash.uncommon.localization.Words;
Expand All @@ -14,14 +13,15 @@

public class CommonTooltips {

public static AdditionalBlock potentialCorruptionAndQuality(ExileStack exStack) {
public static AdditionalBlock potentialCorruptionAndQuality(ExileStack exStack, boolean doQuality) {

return new AdditionalBlock(
ImmutableList.of(
exStack.isCorrupted() ? Component.literal("").append(Itemtips.POTENTIAL.locName(exStack.get(StackKeys.POTENTIAL).getOrCreate().potential).withStyle(ChatFormatting.DARK_GRAY, ChatFormatting.STRIKETHROUGH)).append(Component.literal(" ")).append(Words.Corrupted.locName().withStyle(ChatFormatting.RED)) : Itemtips.POTENTIAL.locName(exStack.get(StackKeys.POTENTIAL).getOrCreate().potential).withStyle(ChatFormatting.GOLD),
Itemtips.QUALITY.locName(exStack.get(StackKeys.CUSTOM).getOrCreate().data.get(CustomItemData.KEYS.QUALITY)).withStyle(ChatFormatting.GOLD)
)
).showWhen(() -> Screen.hasShiftDown());
List<MutableComponent> list = new ArrayList<>();
list.add(exStack.isCorrupted() ? Component.literal("").append(Itemtips.POTENTIAL.locName(exStack.get(StackKeys.POTENTIAL).getOrCreate().potential).withStyle(ChatFormatting.DARK_GRAY, ChatFormatting.STRIKETHROUGH)).append(Component.literal(" ")).append(Words.Corrupted.locName().withStyle(ChatFormatting.RED)) : Itemtips.POTENTIAL.locName(exStack.get(StackKeys.POTENTIAL).getOrCreate().potential).withStyle(ChatFormatting.GOLD));

if (doQuality) {
Itemtips.QUALITY.locName(exStack.get(StackKeys.CUSTOM).getOrCreate().data.get(CustomItemData.KEYS.QUALITY)).withStyle(ChatFormatting.GOLD);
}
return new AdditionalBlock(list).showWhen(() -> Screen.hasShiftDown());
}

public static AdditionalBlock craftedItem(ExileStack exStack) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public List<? extends Component> getAvailableComponents() {
return list;
}
})
.accept(CommonTooltips.potentialCorruptionAndQuality(exStack))
.accept(CommonTooltips.potentialCorruptionAndQuality(exStack, true))
.accept(CommonTooltips.craftedItem(exStack))
.accept(new AdditionalBlock(() -> {
int cost = (int) Energy.getInstance().scale(ModType.FLAT, gear.GetBaseGearType().getGearSlot().weapon_data.energy_cost_per_swing, data.getLevel());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public List<? extends Component> getAvailableComponents() {

.accept(new OperationTipBlock().setShift().setAlt());

tip.accept(CommonTooltips.potentialCorruptionAndQuality(ex));
tip.accept(CommonTooltips.potentialCorruptionAndQuality(ex, false));

tip.accept(new ClickToOpenGuiBlock());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ protected void activate() {
}
if (attackInfo != null) {
if (CompatConfig.get().DAMAGE_COMPATIBILITY().overridesDamage) {
attackInfo.setAmount(0);
attackInfo.setToMinimalNonZero();
}
}
if (stopFriendlyFire()) {
Expand Down

0 comments on commit ad6a454

Please sign in to comment.