mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-06-17 14:21:08 +00:00
do tag stuff at proper time
This commit is contained in:
+28
@@ -0,0 +1,28 @@
|
|||||||
|
package com.dfsek.terra.fabric.mixin.lifecycle;
|
||||||
|
|
||||||
|
import com.dfsek.terra.fabric.util.FabricUtil;
|
||||||
|
|
||||||
|
import net.minecraft.server.DataPackContents;
|
||||||
|
import net.minecraft.util.registry.DynamicRegistryManager;
|
||||||
|
import net.minecraft.util.registry.Registry;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.spongepowered.asm.mixin.Final;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
|
|
||||||
|
@Mixin(DataPackContents.class)
|
||||||
|
public class DataPackContentsMixin {
|
||||||
|
@Shadow
|
||||||
|
@Final
|
||||||
|
private static Logger LOGGER;
|
||||||
|
|
||||||
|
@Inject(method = "refresh(Lnet/minecraft/util/registry/DynamicRegistryManager;)V", at = @At("RETURN"))
|
||||||
|
private void injectReload(DynamicRegistryManager dynamicRegistryManager, CallbackInfo ci) {
|
||||||
|
LOGGER.info("Doing tag garbage....");
|
||||||
|
FabricUtil.registerTags(dynamicRegistryManager.get(Registry.BIOME_KEY));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,50 +1,51 @@
|
|||||||
{
|
{
|
||||||
"required": true,
|
"required": true,
|
||||||
"minVersion": "0.8",
|
"minVersion": "0.8",
|
||||||
"package": "com.dfsek.terra.fabric.mixin",
|
"package": "com.dfsek.terra.fabric.mixin",
|
||||||
"compatibilityLevel": "JAVA_16",
|
"compatibilityLevel": "JAVA_16",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
"access.BiomeEffectsAccessor",
|
"access.BiomeEffectsAccessor",
|
||||||
"access.MobSpawnerLogicAccessor",
|
"access.MobSpawnerLogicAccessor",
|
||||||
"access.StateAccessor",
|
"access.StateAccessor",
|
||||||
"access.StructureAccessorAccessor",
|
"access.StructureAccessorAccessor",
|
||||||
"implementations.BiomeMixin",
|
"implementations.BiomeMixin",
|
||||||
"implementations.HandleImplementationMixin",
|
"implementations.HandleImplementationMixin",
|
||||||
"implementations.block.BlockMixin",
|
"implementations.block.BlockMixin",
|
||||||
"implementations.block.entity.BlockEntityMixin",
|
"implementations.block.entity.BlockEntityMixin",
|
||||||
"implementations.block.entity.LootableContainerBlockEntityMixin",
|
"implementations.block.entity.LootableContainerBlockEntityMixin",
|
||||||
"implementations.block.entity.MobSpawnerBlockEntityMixin",
|
"implementations.block.entity.MobSpawnerBlockEntityMixin",
|
||||||
"implementations.block.entity.SignBlockEntityMixin",
|
"implementations.block.entity.SignBlockEntityMixin",
|
||||||
"implementations.block.state.BlockStateMixin",
|
"implementations.block.state.BlockStateMixin",
|
||||||
"implementations.block.state.PropertyMixin",
|
"implementations.block.state.PropertyMixin",
|
||||||
"implementations.chunk.ChunkRegionMixin",
|
"implementations.chunk.ChunkRegionMixin",
|
||||||
"implementations.chunk.WorldChunkMixin",
|
"implementations.chunk.WorldChunkMixin",
|
||||||
"implementations.chunk.data.ProtoChunkMixin",
|
"implementations.chunk.data.ProtoChunkMixin",
|
||||||
"implementations.entity.EntityMixin",
|
"implementations.entity.EntityMixin",
|
||||||
"implementations.entity.EntityTypeMixin",
|
"implementations.entity.EntityTypeMixin",
|
||||||
"implementations.entity.PlayerEntityMixin",
|
"implementations.entity.PlayerEntityMixin",
|
||||||
"implementations.entity.ServerCommandSourceMixin",
|
"implementations.entity.ServerCommandSourceMixin",
|
||||||
"implementations.inventory.LockableContainerBlockEntityMixin",
|
"implementations.inventory.LockableContainerBlockEntityMixin",
|
||||||
"implementations.inventory.item.ItemMixin",
|
"implementations.inventory.item.ItemMixin",
|
||||||
"implementations.inventory.item.ItemStackMixin",
|
"implementations.inventory.item.ItemStackMixin",
|
||||||
"implementations.inventory.meta.EnchantmentMixin",
|
"implementations.inventory.meta.EnchantmentMixin",
|
||||||
"implementations.inventory.meta.ItemStackDamageableMixin",
|
"implementations.inventory.meta.ItemStackDamageableMixin",
|
||||||
"implementations.inventory.meta.ItemStackMetaMixin",
|
"implementations.inventory.meta.ItemStackMetaMixin",
|
||||||
"implementations.world.ChunkRegionMixin",
|
"implementations.world.ChunkRegionMixin",
|
||||||
"implementations.world.ServerWorldMixin",
|
"implementations.world.ServerWorldMixin",
|
||||||
"lifecycle.ChunkGenerator_ChunkGeneratorRegistrationMixin",
|
"lifecycle.ChunkGenerator_ChunkGeneratorRegistrationMixin",
|
||||||
"lifecycle.MinecraftServerMixin"
|
"lifecycle.DataPackContentsMixin",
|
||||||
],
|
"lifecycle.MinecraftServerMixin"
|
||||||
"client": [
|
],
|
||||||
"access.GeneratorTypeAccessor",
|
"client": [
|
||||||
"lifecycle.client.MinecraftClientMixin"
|
"access.GeneratorTypeAccessor",
|
||||||
],
|
"lifecycle.client.MinecraftClientMixin"
|
||||||
"server": [
|
],
|
||||||
"lifecycle.server.GeneratorOptionsMixin",
|
"server": [
|
||||||
"lifecycle.server.ServerMainMixin"
|
"lifecycle.server.GeneratorOptionsMixin",
|
||||||
],
|
"lifecycle.server.ServerMainMixin"
|
||||||
"injectors": {
|
],
|
||||||
"defaultRequire": 1
|
"injectors": {
|
||||||
},
|
"defaultRequire": 1
|
||||||
"refmap": "terra-refmap.json"
|
},
|
||||||
|
"refmap": "terra-refmap.json"
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user