Skip to content

Commit fa60541

Browse files
committed
6.2.0
6.2.0 well it runs.. porting.. moved db errors to lib spawned mobs > mob lists moving classes map finish rar refactor
1 parent 7281ab7 commit fa60541

File tree

687 files changed

+1738
-12964
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

687 files changed

+1738
-12964
lines changed

CHANGELOG.txt

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,32 @@
1-
Changelog of recent updates: https://github.com/RobertSkalko/Mine-And-Slash-Rework/blob/1.20-Forge/changelogs/v.6.1.txt
1+
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.1.15
3+
v.6.2.0
44

5-
- fixed a crafting output exploit
6-
- any curio should now work and apply stats
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!

build.gradle

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,13 @@ apply plugin: 'org.spongepowered.mixin'
2828

2929
apply from: 'https://raw.githubusercontent.com/RobertSkalko/ModResources/refs/heads/main/1.20.1/common.gradle'
3030
apply from: 'https://raw.githubusercontent.com/RobertSkalko/ModResources/refs/heads/main/1.20.1/exile_lib_dep.gradle'
31-
apply from: 'https://raw.githubusercontent.com/RobertSkalko/ModResources/refs/heads/main/1.20.1/orbs_dep.gradle'
3231
apply from: 'https://raw.githubusercontent.com/RobertSkalko/ModResources/refs/heads/main/1.20.1/ide_runs.gradle'
3332
apply from: 'https://raw.githubusercontent.com/RobertSkalko/ModResources/refs/heads/main/1.20.1/meta.gradle'
3433
apply from: 'https://raw.githubusercontent.com/RobertSkalko/ModResources/refs/heads/main/1.20.1/publishing.gradle'
3534
apply from: 'https://raw.githubusercontent.com/RobertSkalko/ModResources/refs/heads/main/1.20.1/mixin.gradle'
35+
apply from: 'https://raw.githubusercontent.com/RobertSkalko/ModResources/refs/heads/main/1.20.1/dungeon_dep.gradle'
36+
apply from: 'https://raw.githubusercontent.com/RobertSkalko/ModResources/refs/heads/main/1.20.1/mns_other_deps.gradle'
37+
3638

3739
// --- COMMON BUILD SCRIPT END ---
3840

@@ -75,13 +77,15 @@ publishMods {
7577
requires { slug = "library-of-exile" }
7678
requires { slug = "curios" }
7779
requires { slug = "playeranimator" }
78-
requires { slug = "orbs-of-crafting" }
80+
requires { slug = "dungeon-realm" }
81+
requires { slug = "the-harvest" }
7982
}
8083
modrinth {
8184
requires { slug = "library-of-exile" }
8285
requires { slug = "curios" }
8386
requires { slug = "playeranimator" }
84-
requires { slug = "orbs-of-crafting" }
87+
requires { slug = "dungeon-realm" }
88+
requires { slug = "the-harvest" }
8589
}
8690
}
8791

gradle.properties

Lines changed: 5 additions & 4 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.1.15
5+
mod_version=6.2.0
66
# Minecraft Versions
77
minecraft_version=1.20.1
88
forgeversion=47.1.43
@@ -20,13 +20,14 @@ modrinth_id=oifKCkhG
2020
release_type=release
2121
maven_group=com.robertx22
2222
# Dependencies
23-
exile_library_version=1.6.9
23+
exile_library_version=2.0.1
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
2727
publish_plugin_version=0.8.3
2828
# --- COMMON GRADLE END ---
2929
# -- Mod Specific --
3030
player_animator_version=1.0.2-rc1+1.20
31-
orbs_of_crafting_version=1.0.2
32-
31+
orbs_of_crafting_version=1.0.3
32+
dungeon_realm_version=1.0.0
33+
the_harvest_version=1.0.0
Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
package com.robertx22.addons.dungeon_realm;
2+
3+
import com.robertx22.dungeon_realm.api.*;
4+
import com.robertx22.dungeon_realm.database.holders.DungeonMapBlocks;
5+
import com.robertx22.dungeon_realm.main.DungeonMain;
6+
import com.robertx22.library_of_exile.events.base.EventConsumer;
7+
import com.robertx22.mine_and_slash.capability.world.WorldData;
8+
import com.robertx22.mine_and_slash.config.forge.ServerContainer;
9+
import com.robertx22.mine_and_slash.database.registry.ExileDB;
10+
import com.robertx22.mine_and_slash.loot.LootInfo;
11+
import com.robertx22.mine_and_slash.loot.blueprints.MapBlueprint;
12+
import com.robertx22.mine_and_slash.maps.MapData;
13+
import com.robertx22.mine_and_slash.maps.MapItemData;
14+
import com.robertx22.mine_and_slash.uncommon.ExplainedResultUtil;
15+
import com.robertx22.mine_and_slash.uncommon.datasaving.Load;
16+
import com.robertx22.mine_and_slash.uncommon.datasaving.StackSaving;
17+
import com.robertx22.mine_and_slash.uncommon.interfaces.data_items.IRarity;
18+
import com.robertx22.mine_and_slash.uncommon.localization.Chats;
19+
import com.robertx22.mine_and_slash.uncommon.localization.Words;
20+
import net.minecraft.network.chat.Component;
21+
import net.minecraft.world.entity.LivingEntity;
22+
import net.minecraft.world.entity.player.Player;
23+
24+
import java.util.List;
25+
26+
public class DungeonAddonEvents {
27+
28+
public static void init() {
29+
30+
DungeonExileEvents.ON_GENERATE_NEW_MAP_ITEM.register(new EventConsumer<OnGenerateNewMapItemEvent>() {
31+
@Override
32+
public void accept(OnGenerateNewMapItemEvent event) {
33+
MapBlueprint b = new MapBlueprint(LootInfo.ofLevel(1));
34+
StackSaving.MAP.saveTo(event.mapStack, b.createData());
35+
}
36+
});
37+
38+
DungeonExileEvents.ON_START_NEW_MAP.register(new EventConsumer<OnStartMapEvent>() {
39+
@Override
40+
public void accept(OnStartMapEvent event) {
41+
42+
if (event.mapInfo.dimensionId.equals(DungeonMain.DIMENSION_KEY)) {
43+
44+
var map = StackSaving.MAP.loadFrom(event.stack);
45+
46+
if (map != null) {
47+
48+
map.lvl = Load.Unit(event.p).getLevel();
49+
50+
var mapdata = MapData.newMap(event.p, map);
51+
52+
WorldData.get(event.p.level()).map.setData(event.p, mapdata, event.mapInfo.structure, event.startChunkPos.getMiddleBlockPosition(5));
53+
54+
Load.Unit(event.p).getCooldowns().setOnCooldown("start_map", 20 * 60 * 2);
55+
}
56+
}
57+
}
58+
});
59+
60+
DungeonExileEvents.ON_SPAWN_UBER_BOSS.register(new EventConsumer<SpawnUberEvent>() {
61+
@Override
62+
public void accept(SpawnUberEvent event) {
63+
LivingEntity en = event.uberBoss;
64+
Load.Unit(en).setRarity(IRarity.UBER);
65+
Load.Unit(en).recalcStats_DONT_CALL();
66+
}
67+
});
68+
69+
DungeonExileEvents.PREPARE_DUNGEON_MOB_SPAWN.register(new EventConsumer<PrepareDungeonMobEditsEvent>() {
70+
@Override
71+
public void accept(PrepareDungeonMobEditsEvent event) {
72+
event.dataBlock.ifPresent(x -> {
73+
74+
if (DungeonMapBlocks.INSTANCE.ELITE_MOB.GUID().equals(x.GUID()) || DungeonMapBlocks.INSTANCE.ELITE_MOB_HORDE.GUID().equals(x.GUID())) {
75+
var rar = ExileDB.MobRarities().getFilterWrapped(e -> e.is_elite).random();
76+
event.edits.add(DungeonAddonUtil.createMobRarityEdit(rar));
77+
}
78+
if (DungeonMapBlocks.INSTANCE.MAP_BOSS.GUID().equals(x.GUID())) {
79+
var rar = ExileDB.MobRarities().get(IRarity.BOSS);
80+
event.edits.add(DungeonAddonUtil.createMobRarityEdit(rar));
81+
}
82+
if (DungeonMapBlocks.INSTANCE.BOSS.GUID().equals(x.GUID())) {
83+
var rar = ExileDB.MobRarities().get(IRarity.MYTHIC_ID);
84+
event.edits.add(DungeonAddonUtil.createMobRarityEdit(rar));
85+
}
86+
87+
});
88+
}
89+
});
90+
91+
DungeonExileEvents.CAN_START_MAP.register(new EventConsumer<CanStartMapEvent>() {
92+
@Override
93+
public void accept(CanStartMapEvent event) {
94+
95+
Player p = event.p;
96+
97+
if (Load.Unit(p).getLevel() < ServerContainer.get().MIN_LEVEL_MAP_DROPS.get()) {
98+
p.sendSystemMessage(ExplainedResultUtil.createErrorAndReason(Chats.MAP_DEVICE_USE_ERROR.locName(), Chats.TOO_LOW_LEVEL.locName(ServerContainer.get().MIN_LEVEL_MAP_DROPS.get())));
99+
event.canEnter = false;
100+
return;
101+
}
102+
MapItemData data = StackSaving.MAP.loadFrom(event.stack);
103+
104+
if (data == null) {
105+
p.sendSystemMessage(ExplainedResultUtil.createErrorAndReason(Chats.MAP_DEVICE_USE_ERROR, Chats.INVALID_MAP_ITEM));
106+
event.canEnter = false;
107+
return;
108+
}
109+
if (!checkCooldown(p)) {
110+
event.canEnter = false;
111+
return;
112+
}
113+
if (!meetsResists(p, data)) {
114+
event.canEnter = false;
115+
return;
116+
}
117+
118+
}
119+
});
120+
DungeonExileEvents.CAN_ENTER_MAP.register(new EventConsumer<CanEnterMapEvent>() {
121+
@Override
122+
public void accept(CanEnterMapEvent event) {
123+
124+
try {
125+
// we use this getter here because we don't want to check dimension ids now
126+
var map = WorldData.get(event.p.level()).map.getData(DungeonMain.MAIN_DUNGEON_STRUCTURE, event.mapDevice.pos);
127+
128+
if (map == null) {
129+
event.canEnter = false;
130+
return;
131+
}
132+
if (!canJoinMap(event.p, map)) {
133+
event.canEnter = false;
134+
return;
135+
}
136+
} catch (Exception e) {
137+
e.printStackTrace();
138+
}
139+
140+
}
141+
});
142+
143+
}
144+
145+
static boolean checkCooldown(Player p) {
146+
147+
var cds = Load.Unit(p).getCooldowns();
148+
149+
if (!p.isCreative()) {
150+
if (cds.isOnCooldown("start_map")) {
151+
int sec = cds.getCooldownTicks("start_map") / 20;
152+
p.sendSystemMessage(ExplainedResultUtil.createErrorAndReason(Chats.MAP_DEVICE_USE_ERROR.locName(), Words.MAP_START_COOLDOWN.locName(sec)));
153+
return false;
154+
}
155+
}
156+
return true;
157+
}
158+
159+
static boolean meetsResists(Player p, MapItemData data) {
160+
if (!data.getStatReq().meetsReq(Load.Unit(p).getLevel(), Load.Unit(p))) {
161+
ExplainedResultUtil.sendErrorMessage(p, Chats.MAP_DEVICE_USE_ERROR, Chats.RESISTS_TOO_LOW_FOR_MAP);
162+
163+
List<Component> reqDifference = data.getStatReq().getReqDifference(data.lvl, Load.Unit(p));
164+
if (!reqDifference.isEmpty()) {
165+
ExplainedResultUtil.sendErrorMessage(p, Chats.MAP_DEVICE_USE_ERROR, Chats.NOT_MEET_MAP_REQ_FIRST_LINE);
166+
reqDifference.forEach(p::sendSystemMessage);
167+
}
168+
return false;
169+
}
170+
return true;
171+
}
172+
173+
174+
static boolean canJoinMap(Player p, MapData mapData) {
175+
176+
177+
if (!meetsResists(p, mapData.map)) {
178+
return false;
179+
}
180+
181+
MapItemData map1 = mapData.map;
182+
183+
if (Load.Unit(p).getLevel() < (map1.lvl - 5)) {
184+
p.sendSystemMessage(ExplainedResultUtil.createErrorAndReason(Chats.MAP_DEVICE_USE_ERROR, Chats.TOO_LOW_LEVEL));
185+
return false;
186+
}
187+
188+
return true;
189+
}
190+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package com.robertx22.addons.dungeon_realm;
2+
3+
import com.robertx22.mine_and_slash.database.data.rarities.MobRarity;
4+
import com.robertx22.mine_and_slash.event_hooks.entity.OnMobSpawn;
5+
import com.robertx22.mine_and_slash.uncommon.datasaving.Load;
6+
import net.minecraft.world.entity.LivingEntity;
7+
8+
import java.util.function.Consumer;
9+
10+
public class DungeonAddonUtil {
11+
12+
public static Consumer<LivingEntity> createMobRarityEdit(MobRarity rarity) {
13+
return mob -> {
14+
if (rarity != null) {
15+
Load.Unit(mob).setRarity(rarity.GUID());
16+
}
17+
OnMobSpawn.setupNewMobOnSpawn(mob);
18+
if (rarity != null) {
19+
Load.Unit(mob).setRarity(rarity.GUID());
20+
}
21+
};
22+
}
23+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package com.robertx22.addons.dungeon_realm;
2+
3+
import com.robertx22.addons.orbs_of_crafting.currency.reworked.item_req.ItemReqs;
4+
import com.robertx22.dungeon_realm.database.holders.DungeonOrbs;
5+
import com.robertx22.library_of_exile.registry.helpers.ExileKey;
6+
import com.robertx22.library_of_exile.registry.helpers.ExileKeyHolder;
7+
import com.robertx22.library_of_exile.registry.helpers.KeyInfo;
8+
import com.robertx22.library_of_exile.registry.register_info.ModRequiredRegisterInfo;
9+
import com.robertx22.mine_and_slash.mmorpg.MMORPG;
10+
import com.robertx22.orbs_of_crafting.register.orb_edit.OrbEdit;
11+
12+
public class MnsDungeonOrbEdits extends ExileKeyHolder<OrbEdit> {
13+
14+
public static MnsDungeonOrbEdits INSTANCE = new MnsDungeonOrbEdits(MMORPG.REGISTER_INFO);
15+
16+
public MnsDungeonOrbEdits(ModRequiredRegisterInfo modRegisterInfo) {
17+
super(modRegisterInfo);
18+
}
19+
20+
public ExileKey<OrbEdit, KeyInfo> UBER_UPGRADE = ExileKey.ofId(this, "uber_upgrade", x -> {
21+
var e = OrbEdit.of(x.GUID(), DungeonOrbs.INSTANCE.UBER_UPGRADE.GUID());
22+
e.req.add(ItemReqs.INSTANCE.MAP_IS_MYTHIC.GUID());
23+
return e;
24+
});
25+
26+
@Override
27+
public void loadClass() {
28+
29+
}
30+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.robertx22.addons.dungeon_realm;
2+
3+
import com.robertx22.library_of_exile.database.league.League;
4+
import com.robertx22.library_of_exile.registry.helpers.ExileKey;
5+
import com.robertx22.library_of_exile.registry.helpers.ExileKeyHolder;
6+
import com.robertx22.library_of_exile.registry.helpers.KeyInfo;
7+
import com.robertx22.library_of_exile.registry.register_info.ModRequiredRegisterInfo;
8+
import com.robertx22.mine_and_slash.mmorpg.MMORPG;
9+
10+
public class MnsLeagues extends ExileKeyHolder<League> {
11+
12+
public static MnsLeagues INSTANCE = new MnsLeagues(MMORPG.REGISTER_INFO);
13+
14+
public MnsLeagues(ModRequiredRegisterInfo modRegisterInfo) {
15+
super(modRegisterInfo);
16+
}
17+
18+
public ExileKey<League, KeyInfo> PROPHECY = ExileKey.ofId(this, "prophecy", x -> new ProphecyLeague(x.GUID()));
19+
20+
@Override
21+
public void loadClass() {
22+
23+
}
24+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package com.robertx22.addons.dungeon_realm;
2+
3+
import com.robertx22.library_of_exile.database.extra_map_content.MapContent;
4+
import com.robertx22.library_of_exile.registry.helpers.ExileKey;
5+
import com.robertx22.library_of_exile.registry.helpers.ExileKeyHolder;
6+
import com.robertx22.library_of_exile.registry.helpers.KeyInfo;
7+
import com.robertx22.library_of_exile.registry.register_info.ModRequiredRegisterInfo;
8+
import com.robertx22.mine_and_slash.mmorpg.MMORPG;
9+
import com.robertx22.mine_and_slash.mmorpg.registers.common.SlashBlocks;
10+
11+
public class MnsMapContents extends ExileKeyHolder<MapContent> {
12+
13+
public static MnsMapContents INSTANCE = new MnsMapContents(MMORPG.REGISTER_INFO);
14+
15+
public MnsMapContents(ModRequiredRegisterInfo info) {
16+
super(info);
17+
}
18+
19+
public ExileKey<MapContent, KeyInfo> PROPHECY = ExileKey.ofId(this, "prophecy", x -> MapContent.of(x.GUID(), 1000, SlashBlocks.PROPHECY_ALTAR.getRegistryObject().getKey().location().toString(), 3, 5));
20+
21+
22+
@Override
23+
public void loadClass() {
24+
25+
}
26+
}

0 commit comments

Comments
 (0)