Skip to content

Commit b8eae70

Browse files
committed
6.2.1
1 parent fa60541 commit b8eae70

File tree

17 files changed

+355
-450
lines changed

17 files changed

+355
-450
lines changed

CHANGELOG.txt

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,5 @@
11
Changelog of recent updates: https://github.com/RobertSkalko/Mine-And-Slash-Rework/blob/1.20-Forge/changelogs/v.6.2.txt
22

3-
v.6.2.0
3+
v.6.2.1
44

5-
- orbs of crafting was moved to library of exile mod so it's not needed anymore
6-
- the harvest now a separate required dependency (I tried to make it an optional dependency but was a bit too difficult, I might try to jarjar it again later)
7-
- adventure maps are now a separate required dependency called: dungeon realm
8-
- old dimension will stay as an empty dimension so future saves aren't borked by its removal
9-
- return to old map item system meaning: maps drop again, no more upgrading, but i made map boss always drop 1 map
10-
- uber maps changed slightly, now maps can become uber maps with an orb item, crafted with 4 uber frags, but the map must be mythic for the orb to be used
11-
- map mobs now drop vanilla loot again, this was removed due to item clutter, but will clash with the dungeon mod features now possibly
12-
- builder note: map boss arenas now need the 'map_teleporter' block
13-
- builder note2: harvest maps now use harvest_spawner blocks placed around the map instead of the league processor;32 something block
14-
- the map dimension no longer puts you in adventure mode, now uses events to make sure you can't place/break etc, report any bugs please!
15-
- new feature, command blocks should no longer show in maps
16-
- other dimension mod addons for dungeon realm now connect the maps, um. That means if you enter a harvest/obelisk etc through a map, it counts as your map too
17-
- changed dungeon datapack json, now require all types of rooms and no more fallback rooms
18-
- changed rarity json, map finish rarity is now a separate datapack under library mod
19-
- removed spawned mobs, now use mob lists from library mod
20-
- datapack checker now works for any of library's datapacks, not just mns
21-
- ailment procs now show damage chat messages when applied
22-
- buffed gathering profession dropchances at early levels by reducing the effect of exp to loot multiplier by half
23-
Now all gathers count as if they have an extra 50 experience. So if say you're mining a block that gives 10 exp, you'd before have 0.1x loot multi,
24-
now you'd have 0.6x loot multi. For a block that gives 200 exp, loot multi was 2x before, now it's 2.5x
25-
- as maps are now drops again, added a currency that allows you to upgrade map rarity
26-
- removed map lives system, possibly temporary
27-
28-
New Feature: Relics!
29-
- the map device can now be equipped with relics
30-
- relics boost your maps with stats like mob pack size, chance to contain additional harvest etc
31-
- relics currently drop once per map boss and 3 per uber boss
32-
Enjoy customizing your maps and playing content you like or want to focus on!
5+
- fixed prophecy gui

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
org.gradle.jvmargs=-Xmx2G
33
# --- COMMON GRADLE START ---
44
# Mod Properties
5-
mod_version=6.2.0
5+
mod_version=6.2.1
66
# Minecraft Versions
77
minecraft_version=1.20.1
88
forgeversion=47.1.43
@@ -20,7 +20,7 @@ modrinth_id=oifKCkhG
2020
release_type=release
2121
maven_group=com.robertx22
2222
# Dependencies
23-
exile_library_version=2.0.1
23+
exile_library_version=2.0.2
2424
curios_version=5.2.0-beta.3+1.20.1
2525
jei_version=15.2.0.27
2626
wiki_toolkit_version=0.2.4
@@ -29,5 +29,5 @@ publish_plugin_version=0.8.3
2929
# -- Mod Specific --
3030
player_animator_version=1.0.2-rc1+1.20
3131
orbs_of_crafting_version=1.0.3
32-
dungeon_realm_version=1.0.0
32+
dungeon_realm_version=1.0.3
3333
the_harvest_version=1.0.0

src/main/java/com/robertx22/addons/dungeon_realm/DungeonAddonEvents.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public void accept(OnStartMapEvent event) {
5151

5252
WorldData.get(event.p.level()).map.setData(event.p, mapdata, event.mapInfo.structure, event.startChunkPos.getMiddleBlockPosition(5));
5353

54-
Load.Unit(event.p).getCooldowns().setOnCooldown("start_map", 20 * 60 * 2);
54+
Load.Unit(event.p).getCooldowns().setOnCooldown("start_map", ServerContainer.get().MAP_START_COOLDOWN_SECONDS.get() * 20);
5555
}
5656
}
5757
}

src/main/java/com/robertx22/mine_and_slash/capability/player/PlayerData.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import com.robertx22.mine_and_slash.gui.screens.stat_gui.StatCalcInfoData;
1919
import com.robertx22.mine_and_slash.mmorpg.SlashRef;
2020
import com.robertx22.mine_and_slash.prophecy.PlayerProphecies;
21-
import com.robertx22.mine_and_slash.saveclasses.DeathStatsData;
2221
import com.robertx22.mine_and_slash.saveclasses.perks.TalentsData;
2322
import com.robertx22.mine_and_slash.saveclasses.spells.SpellCastingData;
2423
import com.robertx22.mine_and_slash.saveclasses.spells.SpellSchoolsData;
@@ -110,7 +109,6 @@ public void syncToClient(Player player) {
110109
public TeamData team = new TeamData();
111110
public TalentsData talents = new TalentsData();
112111
public StatPointsData statPoints = new StatPointsData();
113-
public DeathStatsData deathStats = new DeathStatsData();
114112
public SpellSchoolsData ascClass = new SpellSchoolsData();
115113
public PlayerProphecies prophecy = new PlayerProphecies();
116114
public SpellCastingData spellCastingData = new SpellCastingData();
@@ -133,7 +131,7 @@ public void syncToClient(Player player) {
133131

134132
public int bonusTalents = 0;
135133

136-
134+
137135
public int omensFilled = 0;
138136

139137
public PlayerData(Player player) {
@@ -157,7 +155,6 @@ public CompoundTag serializeNBT() {
157155
LoadSave.Save(talents, nbt, TALENTS_DATA);
158156
LoadSave.Save(prophecy, nbt, PROPHECY);
159157
LoadSave.Save(statPoints, nbt, STAT_POINTS);
160-
LoadSave.Save(deathStats, nbt, DEATH_STATS);
161158
LoadSave.Save(ascClass, nbt, ASC);
162159
LoadSave.Save(spellCastingData, nbt, CAST);
163160
LoadSave.Save(config, nbt, CONFIG);
@@ -187,7 +184,6 @@ public void deserializeNBT(CompoundTag nbt) {
187184
this.prophecy = loadOrBlank(PlayerProphecies.class, new PlayerProphecies(), nbt, PROPHECY, new PlayerProphecies());
188185
this.talents = loadOrBlank(TalentsData.class, new TalentsData(), nbt, TALENTS_DATA, new TalentsData());
189186
this.statPoints = loadOrBlank(StatPointsData.class, new StatPointsData(), nbt, STAT_POINTS, new StatPointsData());
190-
this.deathStats = loadOrBlank(DeathStatsData.class, new DeathStatsData(), nbt, DEATH_STATS, new DeathStatsData());
191187
this.ascClass = loadOrBlank(SpellSchoolsData.class, new SpellSchoolsData(), nbt, ASC, new SpellSchoolsData());
192188
this.spellCastingData = loadOrBlank(SpellCastingData.class, new SpellCastingData(), nbt, CAST, new SpellCastingData());
193189
this.config = loadOrBlank(PlayerConfigData.class, new PlayerConfigData(), nbt, CONFIG, new PlayerConfigData());

src/main/java/com/robertx22/mine_and_slash/config/forge/ServerContainer.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ public static ServerContainer get() {
8282
FAVOR_DEATH_LOSS = b.defineInRange("favor_death_loss", 50D, 0, 10000);
8383
MAX_POSSIBLE_FAVOR = b.defineInRange("MAX_POSSIBLE_FAVOR", 10000000, 0, 10000000);
8484
FAVOR_CHEST_GAIN = b.defineInRange("favor_chest_gain", 1D, 0, 10000);
85+
MAP_START_COOLDOWN_SECONDS = b.defineInRange("MAP_START_COOLDOWN_SECONDS", 60 * 2, 0, 10000000);
86+
8587

8688
GEAR_DROPRATE = b.defineInRange("gear_drop_rate", 7D, 0, 1000);
8789
SOUl_DROPRATE = b.defineInRange("soul_drop_rate", 0.3D, 0, 1000);
@@ -264,6 +266,7 @@ public boolean isSoulCleanBanned(Item item) {
264266
public ForgeConfigSpec.DoubleValue BLOCK_COST;
265267

266268
public ForgeConfigSpec.IntValue MAX_POSSIBLE_FAVOR;
269+
public ForgeConfigSpec.IntValue MAP_START_COOLDOWN_SECONDS;
267270

268271

269272
public ForgeConfigSpec.IntValue MAP_GEN_TERRAIN_RADIUS;

src/main/java/com/robertx22/mine_and_slash/database/data/stats/types/resources/DamageAbsorbedByMana.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22

33
import com.robertx22.mine_and_slash.database.data.stats.Stat;
44
import com.robertx22.mine_and_slash.database.data.stats.StatScaling;
5-
import com.robertx22.mine_and_slash.saveclasses.DeathStatsData;
65
import com.robertx22.mine_and_slash.saveclasses.unit.ResourceType;
76
import com.robertx22.mine_and_slash.saveclasses.unit.StatData;
87
import com.robertx22.mine_and_slash.uncommon.effectdatas.DamageEvent;
98
import com.robertx22.mine_and_slash.uncommon.enumclasses.Elements;
109
import net.minecraft.util.Mth;
11-
import net.minecraft.world.entity.player.Player;
1210

1311
public class DamageAbsorbedByMana extends Stat {
1412
public static String GUID = "mana_shield";
@@ -73,11 +71,6 @@ public static float modifyEntityDamage(DamageEvent effect, float dmg) {
7371
float dmgReduced = Mth.clamp(dmg * data.getValue() / 100F, 0, currentMana - (maxMana * 0.5F));
7472

7573
if (dmgReduced > 0) {
76-
77-
if (effect.target instanceof Player) {
78-
DeathStatsData.record((Player) effect.target, effect.getElement(), dmgReduced);
79-
}
80-
8174
effect.targetData.getResources()
8275
.spend(effect.target, ResourceType.mana, dmgReduced);
8376

src/main/java/com/robertx22/mine_and_slash/database/data/stats/types/resources/magic_shield/MagicShield.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
package com.robertx22.mine_and_slash.database.data.stats.types.resources.magic_shield;
22

3+
import com.robertx22.library_of_exile.utils.SoundUtils;
34
import com.robertx22.mine_and_slash.database.data.stats.Stat;
45
import com.robertx22.mine_and_slash.database.data.stats.StatScaling;
5-
import com.robertx22.mine_and_slash.saveclasses.DeathStatsData;
66
import com.robertx22.mine_and_slash.saveclasses.unit.ResourceType;
77
import com.robertx22.mine_and_slash.uncommon.effectdatas.DamageEvent;
88
import com.robertx22.mine_and_slash.uncommon.enumclasses.Elements;
9-
import com.robertx22.library_of_exile.utils.SoundUtils;
109
import net.minecraft.ChatFormatting;
1110
import net.minecraft.sounds.SoundEvents;
1211
import net.minecraft.util.Mth;
13-
import net.minecraft.world.entity.player.Player;
1412

1513
public class MagicShield extends Stat {
1614
public static String GUID = "magic_shield";
@@ -72,10 +70,7 @@ public static float modifyEntityDamage(DamageEvent effect, float dmg) {
7270
SoundUtils.playSound(effect.target, SoundEvents.GENERIC_HURT, 0.5F, 1);
7371
SoundUtils.playSound(effect.target, SoundEvents.GUARDIAN_HURT, 1, 1);
7472

75-
if (effect.target instanceof Player) {
76-
DeathStatsData.record((Player) effect.target, effect.getElement(), dmgReduced);
77-
}
78-
73+
7974
effect.targetData.getResources().spend(effect.target, ResourceType.magic_shield, dmgReduced);
8075

8176

src/main/java/com/robertx22/mine_and_slash/event_hooks/my_events/OnPlayerDeath.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import com.robertx22.mine_and_slash.capability.player.data.PlayerBuffData;
77
import com.robertx22.mine_and_slash.config.forge.ServerContainer;
88
import com.robertx22.mine_and_slash.uncommon.datasaving.Load;
9+
import com.robertx22.mine_and_slash.uncommon.localization.Words;
910
import net.minecraft.world.entity.player.Player;
1011

1112
public class OnPlayerDeath extends EventConsumer<ExileEvents.OnPlayerDeath> {
@@ -27,18 +28,18 @@ public void accept(ExileEvents.OnPlayerDeath event) {
2728

2829
PlayerData data = Load.player(player);
2930

30-
3131
if (Load.Unit(player).getLevel() > ServerContainer.get().DEATH_PENALTY_START_LEVEL.get()) {
3232
Load.Unit(player).onDeathDoPenalty();
3333
data.rested_xp.onDeath();
3434
data.favor.onDeath(player);
35+
} else {
36+
player.sendSystemMessage(Words.DEATH_PENALTY_AVOIDED.locName(ServerContainer.get().DEATH_PENALTY_START_LEVEL.get()));
3537
}
3638

37-
data.deathStats.died = true;
3839
data.buff = new PlayerBuffData(); // we delete all the buff foods and potions on death, if in the future i want some buffs to persist across death, change this
3940
data.playerDataSync.setDirty();
4041

41-
42+
4243
}
4344

4445
} catch (Exception e) {

src/main/java/com/robertx22/mine_and_slash/event_hooks/ontick/OnServerTick.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,12 @@ public static void onEndTick(ServerPlayer player) {
5151

5252
WorldUtils.ifMapData(sw, player.blockPosition()).ifPresent(map -> {
5353

54-
55-
if (map != null && map.map != null) {
56-
if (!map.map.getStatReq().meetsReq(map.map.lvl, unitdata)) {
57-
//float minusres = map.map.getStatReq().getLackingResistNumber(map.map.lvl, unitdata);
58-
player.hurt(player.damageSources().generic(), player.getMaxHealth() * 0.1F);
54+
if (player.tickCount % 20 == 0) {
55+
if (map != null && map.map != null) {
56+
if (!map.map.getStatReq().meetsReq(map.map.lvl, unitdata)) {
57+
//float minusres = map.map.getStatReq().getLackingResistNumber(map.map.lvl, unitdata);
58+
player.hurt(player.damageSources().generic(), player.getMaxHealth() * 0.1F);
59+
}
5960
}
6061
}
6162

src/main/java/com/robertx22/mine_and_slash/gui/screens/character_screen/MainHubScreen.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.robertx22.mine_and_slash.gui.screens.character_screen;
22

3+
import com.robertx22.dungeon_realm.main.DungeonMain;
34
import com.robertx22.library_of_exile.main.Packets;
45
import com.robertx22.library_of_exile.utils.RenderUtils;
56
import com.robertx22.library_of_exile.utils.TextUTIL;
@@ -53,7 +54,6 @@
5354
import com.robertx22.mine_and_slash.uncommon.enumclasses.Elements;
5455
import com.robertx22.mine_and_slash.uncommon.localization.Gui;
5556
import com.robertx22.mine_and_slash.uncommon.localization.Words;
56-
import com.robertx22.mine_and_slash.uncommon.utilityclasses.WorldUtils;
5757
import com.robertx22.mine_and_slash.vanilla_mc.packets.AllocateStatPacket;
5858
import com.robertx22.mine_and_slash.vanilla_mc.packets.proxies.OpenGuiWrapper;
5959
import net.minecraft.ChatFormatting;
@@ -256,7 +256,7 @@ public void init() {
256256
}
257257
rightButtons.add(new OpenJewelsScreen());
258258

259-
if (WorldUtils.isMapWorldClass(this.mc.level, mc.player.blockPosition())) {
259+
if (mc.level.dimension().location().equals(DungeonMain.DIMENSION_KEY)) {
260260
if (Load.player(mc.player).prophecy.affixOffers.isEmpty()) {
261261
rightButtons.add(new ProphecyScreen());
262262
} else {

0 commit comments

Comments
 (0)