mirror of
https://github.com/architectury/architectury-api.git
synced 2026-04-02 13:37:43 -05:00
committed by
GitHub
parent
dc2e644ed2
commit
dbb955808f
@@ -21,6 +21,7 @@ package dev.architectury.mixin.fabric;
|
||||
|
||||
import com.mojang.serialization.Codec;
|
||||
import dev.architectury.event.events.common.ChunkEvent;
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.ListTag;
|
||||
@@ -49,9 +50,10 @@ public class MixinChunkSerializer {
|
||||
@Inject(method = "read", at = @At("RETURN"), locals = LocalCapture.CAPTURE_FAILHARD)
|
||||
private static void load(ServerLevel serverLevel, PoiManager poiManager, ChunkPos chunkPos, CompoundTag compoundTag,
|
||||
CallbackInfoReturnable<ProtoChunk> cir, ChunkPos chunkPos2, UpgradeData upgradeData,
|
||||
boolean bl, ListTag listTag, int i, LevelChunkSection levelChunkSections[], boolean bl2, ChunkSource chunkSource,
|
||||
LevelLightEngine levelLightEngine, Registry registry, Codec<PalettedContainer<Biome>> codec, long m, ChunkStatus.ChunkType chunkType,
|
||||
BlendingData blendingData, ChunkAccess chunkAccess2) {
|
||||
ChunkEvent.LOAD_DATA.invoker().load(chunkAccess2, serverLevel, compoundTag);
|
||||
boolean bl, ListTag listTag, int i, LevelChunkSection[] levelChunkSections, boolean bl2,
|
||||
ChunkSource chunkSource, LevelLightEngine levelLightEngine, Registry<Biome> registry,
|
||||
Codec<PalettedContainer<Holder<Biome>>> codec, boolean bl3, long m,
|
||||
ChunkStatus.ChunkType chunkType, BlendingData blendingData, ChunkAccess chunkAccess) {
|
||||
ChunkEvent.LOAD_DATA.invoker().load(chunkAccess, serverLevel, compoundTag);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,9 +74,8 @@ public abstract class MixinScreen implements ScreenInputDelegate {
|
||||
return inputDelegate;
|
||||
}
|
||||
|
||||
@Inject(method = "init(Lnet/minecraft/client/Minecraft;II)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screens/Screen;clearWidgets()V", ordinal = 0),
|
||||
cancellable = true)
|
||||
private void preInit(Minecraft minecraft, int i, int j, CallbackInfo ci) {
|
||||
@Inject(method = "rebuildWidgets", at = @At(value = "HEAD"), cancellable = true)
|
||||
private void preInit(CallbackInfo ci) {
|
||||
if (ClientGuiEvent.INIT_PRE.invoker().init((Screen) (Object) this, getAccess()).isFalse()) {
|
||||
ci.cancel();
|
||||
}
|
||||
|
||||
@@ -36,7 +36,6 @@ import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.world.entity.EntityType;
|
||||
import net.minecraft.world.entity.MobCategory;
|
||||
import net.minecraft.world.level.biome.*;
|
||||
import net.minecraft.world.level.biome.Biome.BiomeCategory;
|
||||
import net.minecraft.world.level.biome.Biome.Precipitation;
|
||||
import net.minecraft.world.level.biome.Biome.TemperatureModifier;
|
||||
import net.minecraft.world.level.biome.BiomeSpecialEffects.GrassColorModifier;
|
||||
@@ -121,11 +120,6 @@ public class BiomeModificationsImpl {
|
||||
new MutableGenerationProperties(biome, context.getGenerationSettings()),
|
||||
new MutableSpawnProperties(biome, context.getSpawnSettings())
|
||||
) {
|
||||
@Override
|
||||
public BiomeProperties.Mutable setCategory(BiomeCategory category) {
|
||||
context.setCategory(category);
|
||||
return this;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
},
|
||||
"icon": "icon.png",
|
||||
"depends": {
|
||||
"minecraft": "~1.18-",
|
||||
"minecraft": "~1.19-",
|
||||
"fabricloader": ">=0.13.0",
|
||||
"fabric": ">=0.44.0"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user