Skip to content

Commit

Permalink
5.9.34
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertSkalko committed Dec 11, 2024
1 parent 098504c commit 40accb2
Show file tree
Hide file tree
Showing 14 changed files with 300 additions and 268 deletions.
8 changes: 3 additions & 5 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
Changelog of recent updates: https://github.com/RobertSkalko/Mine-And-Slash-Rework/blob/1.20-Forge/changelogs/v.5.9.txt

v.5.9.33
v.5.9.34

- try again fix 0 hp mobs
- fix stations only crafting a few times instead of all
- added allow_self_damage to spell datapack options
- pressing shift now shows you locked sockets, this is how many more sockets you can add to this item
- attempt to fix keybind bugs
- fix soul modifiers being able to make crazy items
7 changes: 6 additions & 1 deletion changelogs/v.5.9.txt
Original file line number Diff line number Diff line change
Expand Up @@ -272,4 +272,9 @@ v.5.9.33
- try again fix 0 hp mobs
- fix stations only crafting a few times instead of all
- added allow_self_damage to spell datapack options
- pressing shift now shows you locked sockets, this is how many more sockets you can add to this item
- pressing shift now shows you locked sockets, this is how many more sockets you can add to this item

v.5.9.34

- attempt to fix keybind bugs
- fix soul modifiers being able to make crazy items
2 changes: 1 addition & 1 deletion docs/newbie_guide/leveling_up.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ There are a few different points you get:
5) Ascendancy Points: Main Hub > Ascendancies. These are major build-defining points.
You won't get them every level!

<ModAsset width="50%" location="mmorpg:asc_screen" />
![Image](https://raw.githubusercontent.com/RobertSkalko/Mine-And-Slash-Rework/refs/heads/1.20-Forge/docs/.assets/item/mmorpg/asc_screen.png)
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
# Mod Properties
mod_id=mmorpg
mod_version=5.9.33
mod_version=5.9.34
maven_group=net.fabricmc
mod_archive_name=Mine_and_Slash
minecraft_version=1.20.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,13 @@ public class StatConditions implements ExileRegistryInit {
"is_attack_or_spell_attack",
Arrays.asList(ATTACK_TYPE_MATCHES.get(AttackType.hit).GUID())
);
public static StatCondition IS_HIT_OR_BONUS = new EitherIsTrueCondition(
"is_hit_or_bonus",
Arrays.asList(
ATTACK_TYPE_MATCHES.get(AttackType.hit).GUID(),
ATTACK_TYPE_MATCHES.get(AttackType.bonus_dmg).GUID()
)
);

public static StatCondition IS_NOT_DOT = new StringMatchesCondition(EventData.ATTACK_TYPE, AttackType.dot.name()).flipCondition();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public class ResourceStats {
.worksWithEvent(DamageEvent.ID)
.setPriority(StatPriority.Damage.AFTER_DAMAGE_BONUSES)
.setSide(EffectSides.Source)
.addCondition(StatConditions.IS_ATTACK_DAMAGE)
.addCondition(StatConditions.IS_HIT_OR_BONUS)
.addEffect(StatEffects.LEECH_PERCENT_OF_DAMAGE_AS_RESOURCE.get(ResourceType.health))
.setLocName(x -> "Lifesteal")
.setLocDesc(x -> "Restore % of damage as health.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public void applyINTERNAL(ExileStack stack, ItemModificationResult r) {
// todo i should merge souls into 1 type of data saving..
// maybe add profession outcome types, default type being tier 1 and 2 etc?
// can also leave it as is, souls probably wont get any more specific currencies


var craftedStack = stack.getStack();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,15 @@ public SoundAction() {
@Override
public void tryActivate(Collection<LivingEntity> targets, SpellCtx ctx, MapHolder data) {
if (!ctx.world.isClientSide) {

float pitch = data.get(PITCH).floatValue();
float volume = data.get(VOLUME).floatValue();
SoundEvent sound = data.getSound();

SoundUtils.playSound(ctx.world, ctx.getBlockPos(), sound, volume, pitch);
try {
float pitch = data.get(PITCH).floatValue();
float volume = data.get(VOLUME).floatValue();
SoundEvent sound = data.getSound();

SoundUtils.playSound(ctx.world, ctx.getBlockPos(), sound, volume, pitch);
} catch (Exception e) {
e.printStackTrace();
}
}
}

Expand All @@ -36,8 +39,7 @@ public MapHolder create(SoundEvent sound, Double volume, Double pitch) {
d.type = GUID();
d.put(VOLUME, volume);
d.put(PITCH, pitch);
d.put(SOUND, BuiltInRegistries.SOUND_EVENT.getKey(sound)
.toString());
d.put(SOUND, BuiltInRegistries.SOUND_EVENT.getKey(sound).toString());
return d;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ public static void onEndTick(Minecraft mc) {
number = key.getIndex();
}
}


// try see if consuming clicks fixes the random key bugs
for (SpellKeybind key : keys) {
key.key.consumeClick();
}
if (ClientConfigs.getConfig().HOTBAR_SWAPPING.get()) {
if (SpellKeybind.IS_ON_SECONd_HOTBAR) {
if (number > -1) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ public static void register() {


ForgeEvents.registerForgeEvent(TickEvent.ClientTickEvent.class, event -> {
if (event.phase == TickEvent.Phase.END) {
OnClientTick.onEndTick(Minecraft.getInstance());
OnKeyPress.onEndTick(Minecraft.getInstance());
if (event.phase != TickEvent.Phase.END) {
return;
}
OnClientTick.onEndTick(Minecraft.getInstance());
OnKeyPress.onEndTick(Minecraft.getInstance());

});


}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.robertx22.mine_and_slash.saveclasses.stat_soul;

import com.robertx22.library_of_exile.utils.ItemstackDataSaver;
import com.robertx22.library_of_exile.utils.RandomUtils;
import com.robertx22.mine_and_slash.database.data.game_balance_config.GameBalanceConfig;
import com.robertx22.mine_and_slash.database.data.gear_slots.GearSlot;
import com.robertx22.mine_and_slash.database.data.gear_types.bases.SlotFamily;
Expand Down Expand Up @@ -43,6 +44,7 @@

import javax.annotation.Nullable;
import java.util.*;
import java.util.stream.Collectors;


public class StatSoulData implements ICommonDataItem<GearRarity>, ISettableLevelTier {
Expand Down Expand Up @@ -189,9 +191,19 @@ public ExileStacklessData createGearData(@Nullable ItemStack stack, Player p) {
GearSlot gearslot = getSlotFor(stack);
String slotid = gearslot.GUID();

b.gearItemSlot.set(ExileDB.GearTypes()
.getFilterWrapped(x -> x.gear_slot.equals(slotid) && (!forcesTag() ? true : x.tags.contains(force_tag)))
.random());

var possible = ExileDB.GearTypes().getFilterWrapped(x -> x.gear_slot.equals(slotid)).list;

if (forcesTag()) {
// only use the force tag if the slot can actually roll that tag, this is a bandaid fix for now
var filted = possible.stream().filter(x -> x.tags.contains(force_tag)).collect(Collectors.toList());
if (!filted.isEmpty()) {
possible = filted;
}
}
if (!possible.isEmpty()) {
b.gearItemSlot.set(RandomUtils.weightedRandom(possible));
}

UniqueGear uniq = ExileDB.UniqueGears().get(this.uniq);

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ license = "All rights reserved"
issueTrackerURL = "https://github.com/RobertSkalko/Mine-And-Slash-Rework"
[[mods]]
modId = "mmorpg"
version = "5.9.33"
version = "5.9.34"
displayName = "Mine and Slash"
# A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/
#updateJSONURL="https://change.me.example.invalid/updates.json" #optional
Expand Down
Loading

0 comments on commit 40accb2

Please sign in to comment.