Skip to content

Commit 5b5ea2f

Browse files
committed
Biome datagen, WIP tunnels
1 parent a133521 commit 5b5ea2f

40 files changed

+1332
-851
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ apply plugin: "net.minecraftforge.gradle"
2020
def gitCommitHash = 'git rev-parse --verify --short HEAD'.execute().text.trim()
2121
def isRelease = (System.getenv("CM_RELEASE") ?: "false").equalsIgnoreCase("true")
2222

23-
version = isRelease ? mod_version : "nightly-${gitCommitHash}"
23+
version = isRelease ? mod_version : "${mod_version}+nightly-${gitCommitHash}"
2424
group = "dev.compactmods"
2525
archivesBaseName = mod_id
2626

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ public abstract class Messages {
99
public static final ResourceLocation TELEPORT_OUT_OF_BOUNDS = new ResourceLocation(Constants.MOD_ID, "teleport_oob");
1010
public static final ResourceLocation HOW_DID_YOU_GET_HERE = new ResourceLocation(Constants.MOD_ID, "how_did_you_get_here");
1111
public static final ResourceLocation FIXBIOME_IN_BAD_DIMENSION = new ResourceLocation(Constants.MOD_ID, "fixbiome_bad_dim");
12+
public static final ResourceLocation UNKNOWN_TUNNEL = new ResourceLocation(Constants.MOD_ID, "unknown_tunnel_type");
1213
}

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@
44
import net.minecraft.server.MinecraftServer;
55
import net.minecraft.core.BlockPos;
66
import net.minecraft.server.level.ServerLevel;
7+
import net.minecraft.world.level.block.state.BlockState;
78

89
public interface IDimensionalPosition {
910
BlockPos getBlockPosition();
1011

1112
Optional<ServerLevel> getWorld(MinecraftServer server);
13+
14+
Optional<BlockState> getBlockState(MinecraftServer server);
1215
}
Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
package dev.compactmods.machines.api.room;
22

3+
import dev.compactmods.machines.api.tunnels.TunnelDefinition;
34
import net.minecraft.core.Direction;
45
import net.minecraftforge.common.capabilities.Capability;
6+
import net.minecraftforge.common.util.LazyOptional;
57

68
public interface IRoomCapabilities {
79

8-
<T> void addCapability(Capability<T> capability, T instance, Direction side);
10+
<CapType, TunnType extends TunnelDefinition>
11+
void addCapability(TunnType tunnel, Capability<CapType> capability, CapType instance, Direction side);
912

10-
<T> void removeCapability(Capability<T> capability, Direction side);
13+
<CapType, TunnType extends TunnelDefinition>
14+
void removeCapability(TunnType tunnel, Capability<CapType> capability, Direction side);
15+
16+
<CapType, TunnType extends TunnelDefinition>
17+
LazyOptional<CapType> getCapability(Capability<CapType> capability, Direction side);
1118
}

src/generated/resources/.cache/cache

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ f4bbe5fccc3b629f578958c90b84cce5776618d0 data/compactmachines/advancements/claim
4343
d611c78e0b2b590bdbd5b17c37b295fb91739397 data/compactmachines/advancements/recipes/compactmachines/personal_shrinking_device.json
4444
fd7ccf69e4445ba0a2d7b2cd405ebe2ae85be240 data/compactmachines/advancements/recipes/compactmachines/wall.json
4545
2e9d5509d633970b1dd01bd99b535fd107e6e91a data/compactmachines/advancements/root.json
46+
e17415ff80140fc3aa2a0adf9119ac474f2ad789 data/compactmachines/dimension_type/compact_world.json
4647
8db7e50caf8d54a0e209fcd173b3f2e8461baf6a data/compactmachines/loot_tables/blocks/machine_giant.json
4748
19e7d71765db587639d5d09af0bee792cc222f83 data/compactmachines/loot_tables/blocks/machine_large.json
4849
6db7932ebd4de362a97bbffef28ec1e70b20ee45 data/compactmachines/loot_tables/blocks/machine_maximum.json
@@ -58,3 +59,4 @@ f75a1729536d4385bab2459216980501e0916ca5 data/compactmachines/recipes/machine_sm
5859
47e99c608cf5e67d771f545f4d23de7908eb779d data/compactmachines/recipes/machine_tiny.json
5960
670e2e5741a431ddb0bddfa185052b3ee4896d38 data/compactmachines/recipes/personal_shrinking_device.json
6061
8b5b4db0092b3cdc213c7e1044b7bb9f254ea545 data/compactmachines/recipes/wall.json
62+
e24d9d47cc4cb734609cdf48a51979b4361901d0 data/compactmachines/worldgen/biome/machine.json
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"logical_height": 256,
3+
"infiniburn": "minecraft:infiniburn_overworld",
4+
"effects": "minecraft:overworld",
5+
"ambient_light": 0.0,
6+
"respawn_anchor_works": false,
7+
"has_raids": false,
8+
"min_y": 0,
9+
"height": 256,
10+
"natural": false,
11+
"coordinate_scale": 1.0,
12+
"piglin_safe": false,
13+
"bed_works": false,
14+
"fixed_time": 18000,
15+
"has_skylight": true,
16+
"has_ceiling": false,
17+
"ultrawarm": false
18+
}
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
{
2+
"carvers": {},
3+
"features": [],
4+
"spawners": {
5+
"monster": [
6+
{
7+
"type": "minecraft:spider",
8+
"weight": 100,
9+
"minCount": 4,
10+
"maxCount": 4
11+
},
12+
{
13+
"type": "minecraft:zombie",
14+
"weight": 95,
15+
"minCount": 4,
16+
"maxCount": 4
17+
},
18+
{
19+
"type": "minecraft:zombie_villager",
20+
"weight": 5,
21+
"minCount": 1,
22+
"maxCount": 1
23+
},
24+
{
25+
"type": "minecraft:skeleton",
26+
"weight": 100,
27+
"minCount": 4,
28+
"maxCount": 4
29+
},
30+
{
31+
"type": "minecraft:creeper",
32+
"weight": 100,
33+
"minCount": 4,
34+
"maxCount": 4
35+
},
36+
{
37+
"type": "minecraft:slime",
38+
"weight": 100,
39+
"minCount": 4,
40+
"maxCount": 4
41+
},
42+
{
43+
"type": "minecraft:enderman",
44+
"weight": 10,
45+
"minCount": 1,
46+
"maxCount": 4
47+
},
48+
{
49+
"type": "minecraft:witch",
50+
"weight": 5,
51+
"minCount": 1,
52+
"maxCount": 1
53+
}
54+
],
55+
"creature": [
56+
{
57+
"type": "minecraft:sheep",
58+
"weight": 12,
59+
"minCount": 4,
60+
"maxCount": 4
61+
},
62+
{
63+
"type": "minecraft:pig",
64+
"weight": 10,
65+
"minCount": 4,
66+
"maxCount": 4
67+
},
68+
{
69+
"type": "minecraft:chicken",
70+
"weight": 10,
71+
"minCount": 4,
72+
"maxCount": 4
73+
},
74+
{
75+
"type": "minecraft:cow",
76+
"weight": 8,
77+
"minCount": 4,
78+
"maxCount": 4
79+
},
80+
{
81+
"type": "minecraft:horse",
82+
"weight": 5,
83+
"minCount": 2,
84+
"maxCount": 6
85+
},
86+
{
87+
"type": "minecraft:donkey",
88+
"weight": 1,
89+
"minCount": 1,
90+
"maxCount": 3
91+
}
92+
],
93+
"ambient": [
94+
{
95+
"type": "minecraft:bat",
96+
"weight": 10,
97+
"minCount": 8,
98+
"maxCount": 8
99+
}
100+
],
101+
"axolotls": [],
102+
"underground_water_creature": [
103+
{
104+
"type": "minecraft:glow_squid",
105+
"weight": 10,
106+
"minCount": 4,
107+
"maxCount": 6
108+
}
109+
],
110+
"water_creature": [],
111+
"water_ambient": [],
112+
"misc": []
113+
},
114+
"spawn_costs": {},
115+
"forge:registry_name": "compactmachines:machine",
116+
"precipitation": "none",
117+
"temperature": 0.8,
118+
"downfall": 0.0,
119+
"category": "none",
120+
"effects": {
121+
"sky_color": -16777216,
122+
"fog_color": 12638463,
123+
"water_color": 4159204,
124+
"water_fog_color": 329011
125+
}
126+
}

0 commit comments

Comments
 (0)