tangled
alpha
login
or
join now
codexarchonic.nekoweb.org
/
ProjectInfinity
0
fork
atom
Inspired by 2020's April Fools' 20w14infinite Snapshot, this mod brings endless randomly generated dimensions into Minecraft.
0
fork
atom
overview
issues
6
pulls
pipelines
null checks and portal tags
cassian.cc
7 months ago
7872d759
46f85ba2
+11
-3
3 changed files
expand all
collapse all
unified
split
common
src
main
java
net
lerariemann
infinity
block
entity
InfinityPortalBlockEntity.java
resources
data
minecraft
tags
block
portals.json
gradle.properties
+4
-2
common/src/main/java/net/lerariemann/infinity/block/entity/InfinityPortalBlockEntity.java
···
163
163
}
164
164
else if (tag.getType("Dimension") == NbtElement.STRING_TYPE) { //new better format
165
165
this.dimension = Identifier.of(NbtUtils.getString(tag, "Dimension"));
166
166
-
this.portalColor = NbtUtils.getInt(tag, "Color", (world != null ? PortalColorApplier.of(dimension, world.getServer()) :
167
167
-
PortalColorApplier.of(dimension, new NbtCompound())).apply(pos) & 0xFFFFFF);
166
166
+
if (world != null && world.getServer() != null)
167
167
+
this.portalColor = NbtUtils.getInt(tag, "Color", PortalColorApplier.of(dimension, world.getServer()).apply(pos) & 0xFFFFFF);
168
168
+
else
169
169
+
this.portalColor = NbtUtils.getInt(tag, "Color", PortalColorApplier.of(dimension, new NbtCompound()).apply(pos) & 0xFFFFFF);
168
170
}
169
171
else {
170
172
setDimension(InfinityMethods.getRandomSeed(new Random())); //random by default
+6
common/src/main/resources/data/minecraft/tags/block/portals.json
···
1
1
+
{
2
2
+
"replace": false,
3
3
+
"values": [
4
4
+
"infinity:neither_portal"
5
5
+
]
6
6
+
}
+1
-1
gradle.properties
···
7
7
maven_group = net.lerariemann
8
8
archives_name = infinity
9
9
enabled_platforms = fabric,neoforge
10
10
-
tbversion = 4
10
10
+
tbversion = 7
11
11
12
12
# Minecraft properties
13
13
minecraft_version = 1.21.1