Skip to content

Commit 473d99e

Browse files
committed
Merge branch 'next-4.3.0' into 1.18.x
2 parents b09e0f7 + 29b9af6 commit 473d99e

File tree

145 files changed

+4593
-3002
lines changed

Some content is hidden

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

145 files changed

+4593
-3002
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,5 @@ logs/
3434
*.dot
3535

3636
src/generated/
37+
38+
raw-assets/

build.gradle

Lines changed: 53 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
buildscript {
22
repositories {
33
maven { url = 'https://maven.minecraftforge.net' }
4+
maven { url = 'https://repo.spongepowered.org/repository/maven-public' }
45
mavenCentral()
56
mavenLocal()
67
}
78

89
dependencies {
910
classpath "net.minecraftforge.gradle:ForgeGradle:5.1.+"
11+
classpath "org.spongepowered:mixingradle:${mixingradle_version}"
1012
}
1113
}
1214

@@ -17,6 +19,7 @@ plugins {
1719
}
1820

1921
apply plugin: "net.minecraftforge.gradle"
22+
apply plugin: 'org.spongepowered.mixin'
2023

2124
def semver = { ->
2225
try {
@@ -130,6 +133,7 @@ minecraft {
130133
property 'mixin.env.remapRefMap', 'true'
131134
property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg"
132135

136+
arg '-mixin.config=compactmachines.mixin.json'
133137
args '--username', 'Dev'
134138
args '--width', 1920
135139
args '--height', 1080
@@ -157,6 +161,8 @@ minecraft {
157161
property 'mixin.env.remapRefMap', 'true'
158162
property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg"
159163

164+
arg '-mixin.config=compactmachines.mixin.json'
165+
160166
mods {
161167
compactmachines {
162168
source sourceSets.tunnels
@@ -215,7 +221,7 @@ minecraft {
215221
property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg"
216222

217223
forceExit false
218-
224+
219225
mods {
220226
compactmachines {
221227
source sourceSets.tunnels
@@ -246,7 +252,11 @@ repositories {
246252

247253
// TheOneProbe
248254
maven {
249-
name 'tterrag maven'
255+
url "https://maven.k-4u.nl"
256+
}
257+
258+
maven {
259+
name "tterrag maven"
250260
url "https://maven.tterrag.com/"
251261
}
252262
}
@@ -263,36 +273,45 @@ dependencies {
263273

264274
// The One Probe
265275
implementation(fg.deobf("curse.maven:theoneprobe-245211:3671753"))
266-
// compileOnly fg.deobf("mcjty.theoneprobe:TheOneProbe-1.16:${top_version}:api")
267-
// runtimeOnly fg.deobf("mcjty.theoneprobe:TheOneProbe-1.16:${top_version}")
268-
269-
// Nicephore - Screenshots and Stuff
270-
runtimeOnly(fg.deobf("curse.maven:nicephore-401014:3651214"))
271-
272-
// Shut up Experimental Settings - so we don't have to deal with that CONSTANTLY
273-
runtimeOnly(fg.deobf("curse.maven:shutupexperimental-407174:3544525"))
274-
275-
// // Testing Mods - Trash Cans, Pipez, Create, Refined Pipes, Pretty Pipes, Refined Storage
276-
// runtimeOnly(fg.deobf("curse.maven:SuperMartijn642-454372:3649270"))
277-
// runtimeOnly(fg.deobf("curse.maven:trashcans-394535:3597654"))
278-
// runtimeOnly(fg.deobf("curse.maven:pipez-443900:3569514"))
279-
// runtimeOnly(fg.deobf("curse.maven:flywheel-486392:3687357"))
280-
// runtimeOnly(fg.deobf("curse.maven:create-328085:3687358"))
281-
// runtimeOnly(fg.deobf("curse.maven:refinedpipes-370696:3570151"))
282-
// runtimeOnly(fg.deobf("curse.maven:prettypipes-376737:3573145"))
283-
// runtimeOnly(fg.deobf("curse.maven:refinedstorage-243076:3623324"))
284-
//
285-
// // Scalable Cat's Force, BdLib, Advanced Generators
286-
// runtimeOnly(fg.deobf("curse.maven:scalable-320926:3634756"))
287-
// runtimeOnly(fg.deobf("curse.maven:bdlib-70496:3663149"))
288-
// runtimeOnly(fg.deobf("curse.maven:advgen-223622:3665335"))
289-
//
290-
// // Immersive Eng - 7.1.0-145 (Dec 31)
291-
// runtimeOnly(fg.deobf("curse.maven:immersiveeng-231951:3587149"))
292-
293-
// Mekanism + Mek Generators - Tunnel testing
294-
// runtimeOnly(fg.deobf("curse.maven:mekanism-268560:3206392"))
295-
// runtimeOnly(fg.deobf("curse.maven:mekanismgenerators-268566:3206395"))
276+
277+
if (!System.getenv().containsKey("CI") && include_test_mods) {
278+
// Nicephore - Screenshots and Stuff
279+
runtimeOnly(fg.deobf("curse.maven:nicephore-401014:3741832"))
280+
281+
// // Testing Mods - Trash Cans, Pipez, Create, Refined Pipes, Pretty Pipes, Refined Storage
282+
runtimeOnly(fg.deobf("curse.maven:SuperMartijn642-454372:3649270"))
283+
runtimeOnly(fg.deobf("curse.maven:trashcans-394535:3597654"))
284+
runtimeOnly(fg.deobf("curse.maven:pipez-443900:3760255"))
285+
286+
runtimeOnly(fg.deobf("curse.maven:flywheel-486392:3737402"))
287+
runtimeOnly(fg.deobf("curse.maven:create-328085:3737418"))
288+
289+
// runtimeOnly(fg.deobf("curse.maven:refinedpipes-370696:3570151"))
290+
// runtimeOnly(fg.deobf("curse.maven:prettypipes-376737:3573145"))
291+
// runtimeOnly(fg.deobf("curse.maven:refinedstorage-243076:3623324"))
292+
//
293+
// // Scalable Cat's Force, BdLib, Advanced Generators
294+
// runtimeOnly(fg.deobf("curse.maven:scalable-320926:3634756"))
295+
// runtimeOnly(fg.deobf("curse.maven:bdlib-70496:3663149"))
296+
// runtimeOnly(fg.deobf("curse.maven:advgen-223622:3665335"))
297+
//
298+
// // Immersive Eng - 7.1.0-145 (Dec 31)
299+
// runtimeOnly(fg.deobf("curse.maven:immersiveeng-231951:3587149"))
300+
301+
// FTB Chunks
302+
runtimeOnly(fg.deobf("curse.maven:architectury-forge-419699:3781711"))
303+
runtimeOnly(fg.deobf("curse.maven:ftb-teams-404468:3725501"))
304+
runtimeOnly(fg.deobf("curse.maven:ftblib-404465:3725485"))
305+
runtimeOnly(fg.deobf("curse.maven:ftbchunks-314906:3780113"))
306+
307+
// Mekanism + Mek Generators - Tunnel testing
308+
runtimeOnly(fg.deobf("curse.maven:mekanism-268560:3743835"))
309+
runtimeOnly(fg.deobf("curse.maven:mekanismgenerators-268566:3743837"))
310+
}
311+
}
312+
313+
mixin {
314+
add sourceSets.main, "${mod_id}.refmap.json"
296315
}
297316

298317
processResources {
@@ -323,7 +342,8 @@ jar {
323342
"Implementation-Title" : project.name,
324343
"Implementation-Version" : archiveVersion,
325344
"Implementation-Vendor" : "",
326-
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
345+
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
346+
'MixinConfigs': "${mod_id}.mixin.json"
327347
])
328348
}
329349
}

gradle.properties

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,15 @@ mod_id=compactmachines
1010

1111
# Dependencies and Libs
1212
jei_mc_version=1.18.2
13-
jei_version=9.5.2.135
13+
jei_version=9.7.0.194
1414
#top_version=1.16-3.1.4-22
1515

1616
# Curseforge
1717
cf_project=224218
1818
cf_release_type=release
19+
20+
# Plugins that shall not be named
21+
mixin_version = 0.8.5
22+
mixingradle_version = 0.7-SNAPSHOT
23+
24+
include_test_mods = true

src/api/java/dev/compactmods/machines/api/core/Advancements.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@ public class Advancements {
1515
public static final ResourceLocation CLAIMED_LARGE_MACHINE = new ResourceLocation(Constants.MOD_ID, "claimed_machine_large");
1616
public static final ResourceLocation CLAIMED_GIANT_MACHINE = new ResourceLocation(Constants.MOD_ID, "claimed_machine_giant");
1717
public static final ResourceLocation CLAIMED_MAX_MACHINE = new ResourceLocation(Constants.MOD_ID, "claimed_machine_max");
18+
19+
public static final ResourceLocation RECURSIVE_ROOMS = new ResourceLocation(Constants.MOD_ID, "recursion");
1820
}

src/api/java/dev/compactmods/machines/api/core/CMCommands.java

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,29 @@
77
public class CMCommands {
88
public static final ResourceLocation LEVEL_REGISTERED = new ResourceLocation(MOD_ID, "level_registered");
99
public static final ResourceLocation LEVEL_NOT_FOUND = new ResourceLocation(MOD_ID, "level_not_found");
10-
public static final ResourceLocation ROOM_DATA_NOT_FOUND = new ResourceLocation(MOD_ID, "room_data_not_found");
1110

1211
/**
1312
* Used for displaying the number of registered machines via summary commands.
1413
*/
15-
public static final ResourceLocation MACHINE_REG_COUNT = new ResourceLocation(MOD_ID, "machine_reg_count");
14+
public static final ResourceLocation MACHINE_REG_DIM = new ResourceLocation(MOD_ID, "summary.machines.dimension");
15+
public static final ResourceLocation MACHINE_REG_TOTAL = new ResourceLocation(MOD_ID, "summary.machines.total");
1616

1717
/**
1818
* Used for displaying the number of registered rooms via summary commands.
1919
*/
2020
public static final ResourceLocation ROOM_REG_COUNT = new ResourceLocation(MOD_ID, "room_reg_count");
2121
public static final ResourceLocation NOT_A_MACHINE_BLOCK = new ResourceLocation(MOD_ID, "not_a_machine_block");
22+
23+
/**
24+
* Shows a machine is not bound. Takes in a single param, the machine position in world.
25+
*/
2226
public static final ResourceLocation MACHINE_NOT_BOUND = new ResourceLocation(MOD_ID, "machine_not_bound");
23-
public static final ResourceLocation REBIND_HAS_TUNNEL_CONNECTED = new ResourceLocation(MOD_ID, "rebind_tunnel_connected");
2427

25-
public static final ResourceLocation CMD_ROOM_NOT_REGISTERED = new ResourceLocation(MOD_ID, "room_not_registered");
26-
public static final ResourceLocation CMD_MACHINE_NOT_REGISTERED = new ResourceLocation(MOD_ID, "machine_not_registered");
27-
public static final ResourceLocation CMD_BAD_STATE = new ResourceLocation(MOD_ID, "incorrect_machine_state");
28-
public static final ResourceLocation NO_PLAYER_HISTORY = new ResourceLocation(MOD_ID, "no_player_history");
2928
public static final ResourceLocation WRONG_DIMENSION = new ResourceLocation(MOD_ID, "not_in_compact_dimension");
3029
public static final ResourceLocation NOT_IN_COMPACT_DIMENSION = new ResourceLocation(MOD_ID, "not_in_compact_dim");
3130
public static final ResourceLocation FAILED_CMD_FILE_ERROR = new ResourceLocation(MOD_ID, "failed_command_file_error");
31+
32+
public static final ResourceLocation CANNOT_GIVE_MACHINE = new ResourceLocation(MOD_ID, "cannot_give_machine_item");
33+
public static final ResourceLocation MACHINE_GIVEN = new ResourceLocation(MOD_ID, "machine_given_successfully");
34+
public static final ResourceLocation NO_REBIND_TUNNEL_PRESENT = new ResourceLocation(MOD_ID, "cannot_rebind_tunnel_present");
3235
}

src/api/java/dev/compactmods/machines/api/core/Tooltips.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ public abstract class Tooltips {
77
public static final ResourceLocation UNKNOWN_PLAYER_NAME = new ResourceLocation(Constants.MOD_ID, "unknown_player");
88
public static final ResourceLocation TUNNEL_TYPE = new ResourceLocation(Constants.MOD_ID, "tunnel_type");
99
public static final ResourceLocation UNKNOWN_TUNNEL_TYPE = new ResourceLocation(Constants.MOD_ID, "unknown_tunnel_type");
10+
public static final ResourceLocation ROOM_NAME = new ResourceLocation(Constants.MOD_ID, "room_name");
1011

1112
public static abstract class Machines {
1213
public static final ResourceLocation ID = new ResourceLocation(Constants.MOD_ID, "machine.id");

src/api/java/dev/compactmods/machines/api/location/IDimensionalPosition.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313

1414
public interface IDimensionalPosition {
1515

16-
IDimensionalPosition relative(Direction direction, float amount);
17-
1816
BlockPos getBlockPosition();
1917
Vec3 getExactPosition();
2018

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
11
package dev.compactmods.machines.api.room;
22

3+
import net.minecraft.core.BlockPos;
4+
import net.minecraft.resources.ResourceKey;
5+
import net.minecraft.server.level.ServerLevel;
36
import net.minecraft.world.level.ChunkPos;
7+
import net.minecraft.world.level.Level;
48

59
import javax.annotation.Nonnull;
610
import java.util.Collection;
711
import java.util.Optional;
812

913
public interface MachineRoomConnections {
1014
@Nonnull
11-
Optional<ChunkPos> getConnectedRoom(int machineId);
15+
Optional<ChunkPos> getConnectedRoom(ResourceKey<Level> machineLevel, BlockPos machinePos);
1216

1317
@Nonnull Collection<Integer> getMachinesFor(ChunkPos chunkPos);
1418

15-
void registerMachine(int machine);
19+
void registerMachine(ResourceKey<Level> machineLevel, BlockPos machinePos);
1620

1721
void registerRoom(ChunkPos roomChunk);
1822

19-
void connectMachineToRoom(int machine, ChunkPos room);
20-
void changeMachineLink(int machine, ChunkPos newRoom);
23+
void connectMachineToRoom(ResourceKey<Level> machineLevel, BlockPos machinePos, ChunkPos room);
24+
void changeMachineLink(ResourceKey<Level> machineLevel, BlockPos machinePos, ChunkPos newRoom);
2125

22-
void disconnect(int machine);
26+
void disconnect(ResourceKey<Level> level, BlockPos pos);
2327

2428
void unregisterRoom(ChunkPos room);
2529
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
package dev.compactmods.machines.api.room.history;
22

3+
import dev.compactmods.machines.api.location.IDimensionalBlockPosition;
34
import dev.compactmods.machines.api.location.IDimensionalPosition;
45

56
public interface IRoomHistoryItem {
67

78
IDimensionalPosition getEntryLocation();
89

9-
int getMachine();
10+
IDimensionalBlockPosition getMachine();
1011
}

src/datagen/java/dev/compactmods/machines/datagen/AdvancementGenerator.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import com.google.gson.Gson;
55
import com.google.gson.GsonBuilder;
66
import dev.compactmods.machines.CompactMachines;
7-
import dev.compactmods.machines.advancement.trigger.ClaimedMachineTrigger;
7+
import dev.compactmods.machines.advancement.trigger.BasicPlayerAdvTrigger;
88
import dev.compactmods.machines.advancement.trigger.HowDidYouGetHereTrigger;
99
import dev.compactmods.machines.api.core.Advancements;
1010
import dev.compactmods.machines.core.Registration;
@@ -87,6 +87,17 @@ private void generateAdvancements(Consumer<Advancement> consumer) {
8787
.build())
8888
.save(consumer, Advancements.HOW_DID_YOU_GET_HERE.toString());
8989

90+
Advancement.Builder.advancement()
91+
.parent(root)
92+
.addCriterion("recursion", BasicPlayerAdvTrigger.Instance.create(Advancements.RECURSIVE_ROOMS))
93+
.display(new DisplayBuilder()
94+
.frame(FrameType.CHALLENGE)
95+
.item(new ItemStack(Registration.PERSONAL_SHRINKING_DEVICE.get()))
96+
.id(Advancements.RECURSIVE_ROOMS)
97+
.toast(false).hidden(true)
98+
.build())
99+
.save(consumer, Advancements.RECURSIVE_ROOMS.toString());
100+
90101
Advancement.Builder.advancement()
91102
.parent(root)
92103
.addCriterion("obtained_wall", InventoryChangeTrigger.TriggerInstance.hasItems(Registration.BLOCK_BREAKABLE_WALL.get()))
@@ -118,7 +129,7 @@ private void generateAdvancements(Consumer<Advancement> consumer) {
118129
private void machineAdvancement(Consumer<Advancement> consumer, Advancement root, ResourceLocation advancement, Supplier<Item> item) {
119130
Advancement.Builder.advancement()
120131
.parent(root)
121-
.addCriterion("claimed_machine", ClaimedMachineTrigger.Instance.create(advancement))
132+
.addCriterion("claimed_machine", BasicPlayerAdvTrigger.Instance.create(advancement))
122133
.display(new DisplayBuilder()
123134
.frame(FrameType.TASK)
124135
.item(new ItemStack(item.get()))

0 commit comments

Comments
 (0)