[Fabric] 1.21.4

This commit is contained in:
Madeline Miller 2024-12-04 20:28:09 +10:00 committed by Maddy Miller
parent a753a5f318
commit 7373bfe9e9
3 changed files with 18 additions and 15 deletions

View File

@ -10,7 +10,7 @@ piston = "0.5.10"
autoValue = "1.10.4"
antlr = "4.13.1"
fabric-api = "0.109.0+1.21.3"
fabric-api = "0.110.5+1.21.4"
neogradle = "7.0.171"
neoforge-minecraft = "1.21.3"
@ -88,19 +88,19 @@ rhino = "org.mozilla:rhino-runtime:1.7.13"
jchronic = "com.sk89q:jchronic:0.2.4a"
jlibnoise = "com.sk89q.lib:jlibnoise:1.0.0"
fabric-minecraft = "com.mojang:minecraft:1.21.3"
fabric-loader = "net.fabricmc:fabric-loader:0.16.7"
fabric-minecraft = "com.mojang:minecraft:1.21.4"
fabric-loader = "net.fabricmc:fabric-loader:0.16.9"
fabric-permissions-api = "me.lucko:fabric-permissions-api:0.3.1"
neoforge = "net.neoforged:neoforge:21.3.40-beta"
# Mojang-provided libraries, CHECK AGAINST MINECRAFT for versions
guava = "com.google.guava:guava:32.1.3-jre!!"
log4j-bom = "org.apache.logging.log4j:log4j-bom:2.22.1!!"
guava = "com.google.guava:guava:33.3.1-jre!!"
log4j-bom = "org.apache.logging.log4j:log4j-bom:2.24.1!!"
log4j-api.module = "org.apache.logging.log4j:log4j-api"
log4j-core.module = "org.apache.logging.log4j:log4j-core"
gson = "com.google.code.gson:gson:2.10.1!!"
fastutil = "it.unimi.dsi:fastutil:8.5.12!!"
gson = "com.google.code.gson:gson:2.11.0!!"
fastutil = "it.unimi.dsi:fastutil:8.5.15!!"
# Bukkit-provided libraries, CHECK AGAINST SPIGOT for versions
# Note that we need to balance support for older MC versus working at all on newer ones, so the exact versions here

View File

@ -122,7 +122,7 @@ public RuntimeException rethrowAndClose(Throwable t) throws IOException {
*/
public RuntimeException rethrow(Throwable e) throws IOException {
thrown = e;
Throwables.propagateIfPossible(e, IOException.class);
Throwables.throwIfInstanceOf(e, IOException.class);
Throwables.throwIfUnchecked(e);
throw new RuntimeException(e);
}
@ -144,8 +144,8 @@ public RuntimeException rethrow(Throwable e) throws IOException {
public <X extends Exception> RuntimeException rethrow(Throwable e,
Class<X> declaredType) throws IOException, X {
thrown = e;
Throwables.propagateIfPossible(e, IOException.class);
Throwables.propagateIfPossible(e, declaredType);
Throwables.throwIfInstanceOf(e, IOException.class);
Throwables.throwIfInstanceOf(e, declaredType);
Throwables.throwIfUnchecked(e);
throw new RuntimeException(e);
}
@ -168,8 +168,9 @@ public <X extends Exception> RuntimeException rethrow(Throwable e,
public <X1 extends Exception, X2 extends Exception> RuntimeException rethrow(
Throwable e, Class<X1> declaredType1, Class<X2> declaredType2) throws IOException, X1, X2 {
thrown = e;
Throwables.propagateIfPossible(e, IOException.class);
Throwables.propagateIfPossible(e, declaredType1, declaredType2);
Throwables.throwIfInstanceOf(e, IOException.class);
Throwables.throwIfInstanceOf(e, declaredType1);
Throwables.throwIfInstanceOf(e, declaredType2);
Throwables.throwIfUnchecked(e);
throw new RuntimeException(e);
}
@ -212,7 +213,7 @@ public void close() throws IOException {
}
if (thrown == null && throwable != null) {
Throwables.propagateIfPossible(throwable, IOException.class);
Throwables.throwIfInstanceOf(throwable, IOException.class);
throw new AssertionError(throwable); // not possible
}
}

View File

@ -67,6 +67,7 @@
import net.minecraft.Util;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Holder;
import net.minecraft.core.Registry;
import net.minecraft.core.SectionPos;
import net.minecraft.core.registries.Registries;
import net.minecraft.data.worldgen.features.EndFeatures;
@ -497,7 +498,8 @@ public boolean generateFeature(ConfiguredFeatureType type, EditSession editSessi
@Override
public boolean generateStructure(StructureType type, EditSession editSession, BlockVector3 position) {
ServerLevel world = (ServerLevel) getWorld();
Structure k = world.registryAccess().lookupOrThrow(Registries.STRUCTURE).getValue(ResourceLocation.tryParse(type.id()));
Registry<Structure> structureRegistry = world.registryAccess().lookupOrThrow(Registries.STRUCTURE);
Structure k = structureRegistry.getValue(ResourceLocation.tryParse(type.id()));
if (k == null) {
return false;
}
@ -505,7 +507,7 @@ public boolean generateStructure(StructureType type, EditSession editSession, Bl
ServerChunkCache chunkManager = world.getChunkSource();
WorldGenLevel proxyLevel = FabricServerLevelDelegateProxy.newInstance(editSession, world);
ChunkPos chunkPos = new ChunkPos(new BlockPos(position.x(), position.y(), position.z()));
StructureStart structureStart = k.generate(world.registryAccess(), chunkManager.getGenerator(), chunkManager.getGenerator().getBiomeSource(), chunkManager.randomState(), world.getStructureManager(), world.getSeed(), chunkPos, 0, proxyLevel, biome -> true);
StructureStart structureStart = k.generate(structureRegistry.wrapAsHolder(k), world.dimension(), world.registryAccess(), chunkManager.getGenerator(), chunkManager.getGenerator().getBiomeSource(), chunkManager.randomState(), world.getStructureManager(), world.getSeed(), chunkPos, 0, proxyLevel, biome -> true);
if (!structureStart.isValid()) {
return false;