mirror of
https://github.com/FabricMC/fabric.git
synced 2025-04-21 03:10:54 -04:00
parent
42d99c329d
commit
aeb40ebeab
121 changed files with 236 additions and 338 deletions
build.gradle
deprecated
fabric-containers-v0/src/main
java/net/fabricmc/fabric/mixin/container
resources
fabric-events-lifecycle-v0/src/main/java/net/fabricmc/fabric/mixin/event/lifecycle
fabric-loot-tables-v1/src/main
java/net/fabricmc/fabric/mixin/loot/table
resources
fabric-biome-api-v1/src/main
java/net/fabricmc/fabric
impl/biome
mixin/biome
resources
fabric-blockrenderlayer-v1/src/client
java/net/fabricmc/fabric/mixin/blockrenderlayer
resources
fabric-content-registries-v0/src/main
java/net/fabricmc/fabric/mixin/content/registry
resources
fabric-crash-report-info-v1/src/main
java/net/fabricmc/fabric/mixin/crash/report/info
resources
fabric-dimensions-v1/src/main
java/net/fabricmc/fabric/mixin/dimension
resources
fabric-events-interaction-v0/src
client
java/net/fabricmc/fabric/mixin/event/interaction/client
resources
main
java/net/fabricmc/fabric/mixin/event/interaction
ServerPlayNetworkHandlerMixin.javaServerPlayerEntityMixin.javaServerPlayerInteractionManagerMixin.java
resources
fabric-game-rule-api-v1/src
client
java/net/fabricmc/fabric/mixin/gamerule/client
resources
main
java/net/fabricmc/fabric
api/gamerule/v1
impl/gamerule/rule
mixin/gamerule
resources
fabric-item-groups-v0/src
client
java/net/fabricmc/fabric/mixin/item/group/client
resources
main
java/net/fabricmc/fabric/mixin/item/group
resources
fabric-key-binding-api-v1/src/client
java/net/fabricmc/fabric
api/client/keybinding/v1
mixin/client/keybinding
resources
fabric-lifecycle-events-v1/src
client
java/net/fabricmc/fabric/mixin/event/lifecycle/client
resources
main
java/net/fabricmc/fabric/mixin/event/lifecycle
resources
fabric-models-v0/src/client
java/net/fabricmc/fabric/mixin/client/model
resources
fabric-object-builder-api-v1
fabric-particles-v1
fabric-registry-sync-v0/src
client
java/net/fabricmc/fabric/mixin/registry/sync/client
BlockColorsMixin.javaItemColorsMixin.javaItemModelsMixin.javaMinecraftClientMixin.javaParticleManagerMixin.java
resources
main
java/net/fabricmc/fabric
api/event/registry
impl/registry/sync
mixin/registry/sync
BootstrapMixin.javaChunkSerializerMixin.javaDebugChunkGeneratorAccessor.javaDynamicRegistryManagerMixin.javaIdListMixin.javaLevelStorageSessionMixin.javaMinecraftServerMixin.javaMixinSimpleRegistry.javaRegistryAccessor.javaRegistryMixin.javaSimpleRegistryMixin.javaStructuresToConfiguredStructuresFixMixin.java
resources
fabric-renderer-api-v1/src/client
java/net/fabricmc/fabric/mixin/renderer/client
BakedModelMixin.javaMultipartBakedModelMixin.javaSpriteAtlasTextureMixin.javaWeightedBakedModelMixin.java
debughud
resources
fabric-renderer-indigo/src/client
java/net/fabricmc/fabric/mixin/client/indigo/renderer
BlockModelRendererMixin.javaChunkBuilderBuiltChunkRebuildTaskMixin.javaChunkRendererRegionMixin.javaItemRendererMixin.java
resources
|
@ -9,7 +9,7 @@ plugins {
|
|||
id "eclipse"
|
||||
id "idea"
|
||||
id "maven-publish"
|
||||
id "fabric-loom" version "0.13.6" apply false
|
||||
id "fabric-loom" version "0.13.12" apply false
|
||||
id "com.diffplug.spotless" version "6.5.1"
|
||||
id "org.ajoberstar.grgit" version "3.1.0"
|
||||
id "com.matthewprenger.cursegradle" version "1.4.0"
|
||||
|
@ -254,6 +254,12 @@ allprojects {
|
|||
addNestedDependencies = false
|
||||
}
|
||||
build.dependsOn remapTestmodJar
|
||||
|
||||
task validateMixinNames(type: net.fabricmc.loom.task.ValidateMixinNameTask) {
|
||||
source(sourceSets.main.output)
|
||||
source(sourceSets.client.output)
|
||||
source(sourceSets.testmod.output)
|
||||
}
|
||||
}
|
||||
|
||||
remapTestmodJar {
|
||||
|
|
|
@ -24,7 +24,7 @@ import net.minecraft.server.network.ServerPlayerEntity;
|
|||
import net.fabricmc.fabric.impl.container.ServerPlayerEntitySyncHook;
|
||||
|
||||
@Mixin(ServerPlayerEntity.class)
|
||||
public abstract class MixinServerPlayerEntity implements ServerPlayerEntitySyncHook {
|
||||
public abstract class ServerPlayerEntityMixin implements ServerPlayerEntitySyncHook {
|
||||
@Shadow
|
||||
private int screenHandlerSyncId;
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
"package": "net.fabricmc.fabric.mixin.container",
|
||||
"compatibilityLevel": "JAVA_16",
|
||||
"mixins": [
|
||||
"MixinServerPlayerEntity"
|
||||
"ServerPlayerEntityMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2016, 2017, 2018, 2019 FabricMC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package net.fabricmc.fabric.mixin.event.lifecycle;
|
||||
|
||||
import java.util.function.BooleanSupplier;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
|
||||
import net.fabricmc.fabric.api.event.server.ServerStartCallback;
|
||||
import net.fabricmc.fabric.api.event.server.ServerStopCallback;
|
||||
import net.fabricmc.fabric.api.event.server.ServerTickCallback;
|
||||
|
||||
@Mixin(MinecraftServer.class)
|
||||
public class MixinMinecraftServer {
|
||||
@Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/server/MinecraftServer;setFavicon(Lnet/minecraft/server/ServerMetadata;)V", ordinal = 0), method = "method_29741")
|
||||
public void afterSetupServer(CallbackInfo info) {
|
||||
ServerStartCallback.EVENT.invoker().onStartServer((MinecraftServer) (Object) this);
|
||||
}
|
||||
|
||||
@Inject(at = @At("HEAD"), method = "shutdown")
|
||||
public void beforeShutdownServer(CallbackInfo info) {
|
||||
ServerStopCallback.EVENT.invoker().onStopServer((MinecraftServer) (Object) this);
|
||||
}
|
||||
|
||||
@Inject(at = @At("RETURN"), method = "tick")
|
||||
protected void tick(BooleanSupplier var1, CallbackInfo info) {
|
||||
ServerTickCallback.EVENT.invoker().tick((MinecraftServer) (Object) this);
|
||||
}
|
||||
}
|
|
@ -32,7 +32,7 @@ import net.minecraft.loot.provider.number.LootNumberProvider;
|
|||
import net.fabricmc.fabric.api.loot.v1.FabricLootPool;
|
||||
|
||||
@Mixin(LootPool.class)
|
||||
public abstract class MixinLootPool implements FabricLootPool {
|
||||
public abstract class LootPoolMixin implements FabricLootPool {
|
||||
@Shadow
|
||||
@Final
|
||||
LootPoolEntry[] entries;
|
|
@ -30,7 +30,7 @@ import net.minecraft.loot.function.LootFunction;
|
|||
import net.fabricmc.fabric.api.loot.v1.FabricLootSupplier;
|
||||
|
||||
@Mixin(LootTable.class)
|
||||
public abstract class MixinLootSupplier implements FabricLootSupplier {
|
||||
public abstract class LootTableMixin implements FabricLootSupplier {
|
||||
@Shadow
|
||||
@Final
|
||||
LootPool[] pools;
|
|
@ -3,8 +3,8 @@
|
|||
"package": "net.fabricmc.fabric.mixin.loot.table",
|
||||
"compatibilityLevel": "JAVA_16",
|
||||
"mixins": [
|
||||
"MixinLootPool",
|
||||
"MixinLootSupplier"
|
||||
"LootPoolMixin",
|
||||
"LootTableMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
|
|
@ -23,12 +23,11 @@ import java.util.Set;
|
|||
import java.util.WeakHashMap;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import it.unimi.dsi.fastutil.Hash;
|
||||
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenCustomHashMap;
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import net.minecraft.util.math.noise.PerlinNoiseSampler;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
|
|
@ -29,7 +29,7 @@ import net.minecraft.world.biome.Biome;
|
|||
import net.minecraft.world.biome.source.BiomeSource;
|
||||
|
||||
@Mixin(BiomeSource.class)
|
||||
public class MixinBiomeSource {
|
||||
public class BiomeSourceMixin {
|
||||
// Not marked as @Final because of AW
|
||||
@Shadow
|
||||
public Set<RegistryEntry<Biome>> biomes;
|
|
@ -38,7 +38,7 @@ import net.minecraft.world.gen.noise.NoiseRouter;
|
|||
import net.fabricmc.fabric.impl.biome.MultiNoiseSamplerHooks;
|
||||
|
||||
@Mixin(ChunkNoiseSampler.class)
|
||||
public class MixinChunkNoiseSampler {
|
||||
public class ChunkNoiseSamplerMixin {
|
||||
@Unique
|
||||
private long seed;
|
||||
|
|
@ -32,7 +32,7 @@ import net.minecraft.world.SaveProperties;
|
|||
import net.fabricmc.fabric.impl.biome.NetherBiomeData;
|
||||
|
||||
@Mixin(MinecraftServer.class)
|
||||
public class MixinMinecraftServer {
|
||||
public class MinecraftServerMixin {
|
||||
@Shadow
|
||||
@Final
|
||||
protected SaveProperties saveProperties;
|
|
@ -24,7 +24,7 @@ import net.minecraft.world.biome.source.MultiNoiseBiomeSource;
|
|||
import net.fabricmc.fabric.impl.biome.BiomeSourceAccess;
|
||||
|
||||
@Mixin(MultiNoiseBiomeSource.class)
|
||||
public class MixinMultiNoiseBiomeSource implements BiomeSourceAccess {
|
||||
public class MultiNoiseBiomeSourceMixin implements BiomeSourceAccess {
|
||||
@Unique
|
||||
private boolean modifyBiomeEntries = true;
|
||||
|
|
@ -28,7 +28,7 @@ import net.minecraft.world.biome.source.util.MultiNoiseUtil;
|
|||
import net.fabricmc.fabric.impl.biome.MultiNoiseSamplerHooks;
|
||||
|
||||
@Mixin(MultiNoiseUtil.MultiNoiseSampler.class)
|
||||
public class MixinMultiNoiseSampler implements MultiNoiseSamplerHooks {
|
||||
public class MultiNoiseUtilMultiNoiseSamplerMixin implements MultiNoiseSamplerHooks {
|
||||
@Unique
|
||||
private Long seed = null;
|
||||
|
|
@ -31,7 +31,7 @@ import net.minecraft.world.gen.noise.NoiseConfig;
|
|||
import net.fabricmc.fabric.impl.biome.MultiNoiseSamplerHooks;
|
||||
|
||||
@Mixin(NoiseConfig.class)
|
||||
public class MixinNoiseConfig {
|
||||
public class NoiseConfigMixin {
|
||||
@Shadow
|
||||
@Final
|
||||
private MultiNoiseUtil.MultiNoiseSampler multiNoiseSampler;
|
|
@ -36,7 +36,7 @@ import net.minecraft.world.biome.source.util.MultiNoiseUtil;
|
|||
import net.fabricmc.fabric.impl.biome.TheEndBiomeData;
|
||||
|
||||
@Mixin(TheEndBiomeSource.class)
|
||||
public class MixinTheEndBiomeSource extends MixinBiomeSource {
|
||||
public class TheEndBiomeSourceMixin extends BiomeSourceMixin {
|
||||
@Unique
|
||||
private Supplier<TheEndBiomeData.Overrides> overrides;
|
||||
|
|
@ -28,7 +28,7 @@ import net.fabricmc.fabric.impl.biome.modification.BiomeModificationMarker;
|
|||
* {@link net.fabricmc.fabric.impl.biome.modification.BiomeModificationImpl} on a per-DynamicRegistryManager basis.
|
||||
*/
|
||||
@Mixin(DynamicRegistryManager.ImmutableImpl.class)
|
||||
public class DynamicRegistryManagerImplMixin implements BiomeModificationMarker {
|
||||
public class DynamicRegistryManagerImmutableImplMixin implements BiomeModificationMarker {
|
||||
@Unique
|
||||
private boolean modified;
|
||||
|
|
@ -3,15 +3,14 @@
|
|||
"package": "net.fabricmc.fabric.mixin.biome",
|
||||
"compatibilityLevel": "JAVA_16",
|
||||
"mixins": [
|
||||
"MixinMinecraftServer",
|
||||
|
||||
"MixinBiomeSource",
|
||||
"MixinChunkNoiseSampler",
|
||||
"MixinMultiNoiseBiomeSource",
|
||||
"MixinMultiNoiseSampler",
|
||||
"MixinNoiseConfig",
|
||||
"MixinTheEndBiomeSource",
|
||||
"modification.DynamicRegistryManagerImplMixin",
|
||||
"MinecraftServerMixin",
|
||||
"BiomeSourceMixin",
|
||||
"ChunkNoiseSamplerMixin",
|
||||
"MultiNoiseBiomeSourceMixin",
|
||||
"MultiNoiseUtilMultiNoiseSamplerMixin",
|
||||
"NoiseConfigMixin",
|
||||
"TheEndBiomeSourceMixin",
|
||||
"modification.DynamicRegistryManagerImmutableImplMixin",
|
||||
"modification.MinecraftServerMixin"
|
||||
],
|
||||
"injectors": {
|
||||
|
|
|
@ -32,7 +32,7 @@ import net.minecraft.fluid.Fluid;
|
|||
import net.fabricmc.fabric.impl.blockrenderlayer.BlockRenderLayerMapImpl;
|
||||
|
||||
@Mixin(RenderLayers.class)
|
||||
public class MixinBlockRenderLayer {
|
||||
public class RenderLayersMixin {
|
||||
@Shadow private static Map<Block, RenderLayer> BLOCKS;
|
||||
@Shadow private static Map<Fluid, RenderLayer> FLUIDS;
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
"package": "net.fabricmc.fabric.mixin.blockrenderlayer",
|
||||
"compatibilityLevel": "JAVA_16",
|
||||
"client": [
|
||||
"MixinBlockRenderLayer"
|
||||
"RenderLayersMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
|
|
@ -31,7 +31,7 @@ import net.fabricmc.fabric.api.registry.FuelRegistry;
|
|||
import net.fabricmc.fabric.impl.content.registry.FuelRegistryImpl;
|
||||
|
||||
@Mixin(AbstractFurnaceBlockEntity.class)
|
||||
public class MixinAbstractFurnaceBlockEntity {
|
||||
public class AbstractFurnaceBlockEntityMixin {
|
||||
@Inject(at = @At("RETURN"), method = "createFuelTimeMap")
|
||||
private static void fuelTimeMapHook(CallbackInfoReturnable<Map<Item, Integer>> info) {
|
||||
((FuelRegistryImpl) FuelRegistry.INSTANCE).apply(info.getReturnValue());
|
|
@ -33,7 +33,7 @@ import net.fabricmc.fabric.impl.content.registry.FireBlockHooks;
|
|||
import net.fabricmc.fabric.impl.content.registry.FlammableBlockRegistryImpl;
|
||||
|
||||
@Mixin(FireBlock.class)
|
||||
public class MixinFireBlock implements FireBlockHooks {
|
||||
public class FireBlockMixin implements FireBlockHooks {
|
||||
private FlammableBlockRegistryImpl fabric_registry;
|
||||
|
||||
@Shadow
|
|
@ -9,8 +9,8 @@
|
|||
"GiveGiftsToHeroTaskAccessor",
|
||||
"HoeItemAccessor",
|
||||
"HoneycombItemMixin",
|
||||
"MixinAbstractFurnaceBlockEntity",
|
||||
"MixinFireBlock",
|
||||
"AbstractFurnaceBlockEntityMixin",
|
||||
"FireBlockMixin",
|
||||
"OxidizableMixin",
|
||||
"SculkSensorBlockMixin",
|
||||
"ShovelItemAccessor",
|
||||
|
|
|
@ -32,7 +32,7 @@ import net.fabricmc.loader.api.FabricLoader;
|
|||
import net.fabricmc.loader.api.ModContainer;
|
||||
|
||||
@Mixin(SystemDetails.class)
|
||||
public abstract class MixinCrashReport {
|
||||
public abstract class SystemDetailsMixin {
|
||||
@Shadow
|
||||
public abstract void addSection(String string, Supplier<String> supplier);
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
"package": "net.fabricmc.fabric.mixin.crash.report.info",
|
||||
"compatibilityLevel": "JAVA_16",
|
||||
"mixins": [
|
||||
"MixinCrashReport"
|
||||
"SystemDetailsMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
|
|
@ -44,7 +44,7 @@ import net.minecraft.world.level.storage.LevelStorage;
|
|||
* With this Mixin, custom dimensions will be removed when its datapack is removed.
|
||||
*/
|
||||
@Mixin(LevelStorage.class)
|
||||
public class LevelStorageBugfixMixin {
|
||||
public class LevelStorageMixin {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Inject(method = "readGeneratorProperties", at = @At("HEAD"))
|
||||
private static <T> void onReadGeneratorProperties(
|
|
@ -51,7 +51,7 @@ import net.minecraft.world.level.storage.LevelStorage;
|
|||
* the testmod's commands), then the bug is fixed and this Mixin can be removed.
|
||||
*/
|
||||
@Mixin(value = Main.class)
|
||||
public class ServerBugfixMixin {
|
||||
public class MainMixin {
|
||||
@Unique
|
||||
private static LevelStorage.Session session;
|
||||
|
|
@ -4,8 +4,8 @@
|
|||
"compatibilityLevel": "JAVA_16",
|
||||
"mixins": [
|
||||
"EntityMixin",
|
||||
"LevelStorageBugfixMixin",
|
||||
"ServerBugfixMixin",
|
||||
"LevelStorageMixin",
|
||||
"MainMixin",
|
||||
"ServerPlayerEntityMixin"
|
||||
],
|
||||
"injectors": {
|
||||
|
|
|
@ -54,7 +54,7 @@ import net.fabricmc.fabric.api.event.player.UseEntityCallback;
|
|||
import net.fabricmc.fabric.api.event.player.UseItemCallback;
|
||||
|
||||
@Mixin(ClientPlayerInteractionManager.class)
|
||||
public abstract class MixinClientPlayerInteractionManager {
|
||||
public abstract class ClientPlayerInteractionManagerMixin {
|
||||
@Shadow
|
||||
private MinecraftClient client;
|
||||
@Shadow
|
|
@ -37,7 +37,7 @@ import net.fabricmc.fabric.api.event.client.player.ClientPickBlockCallback;
|
|||
import net.fabricmc.fabric.api.event.client.player.ClientPickBlockGatherCallback;
|
||||
|
||||
@Mixin(MinecraftClient.class)
|
||||
public abstract class MixinMinecraftClient {
|
||||
public abstract class MinecraftClientMixin {
|
||||
private boolean fabric_itemPickCancelled;
|
||||
|
||||
@SuppressWarnings("deprecation")
|
|
@ -3,8 +3,8 @@
|
|||
"package": "net.fabricmc.fabric.mixin.event.interaction.client",
|
||||
"compatibilityLevel": "JAVA_16",
|
||||
"client": [
|
||||
"MixinClientPlayerInteractionManager",
|
||||
"MixinMinecraftClient"
|
||||
"ClientPlayerInteractionManagerMixin",
|
||||
"MinecraftClientMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
|
|
@ -35,7 +35,7 @@ import net.minecraft.world.World;
|
|||
import net.fabricmc.fabric.api.event.player.UseEntityCallback;
|
||||
|
||||
@Mixin(targets = "net/minecraft/server/network/ServerPlayNetworkHandler$1")
|
||||
public abstract class MixinServerPlayNetworkHandler implements PlayerInteractEntityC2SPacket.Handler {
|
||||
public abstract class ServerPlayNetworkHandlerMixin implements PlayerInteractEntityC2SPacket.Handler {
|
||||
@Shadow
|
||||
public ServerPlayNetworkHandler field_28963;
|
||||
|
|
@ -29,7 +29,7 @@ import net.minecraft.util.Hand;
|
|||
import net.fabricmc.fabric.api.event.player.AttackEntityCallback;
|
||||
|
||||
@Mixin(ServerPlayerEntity.class)
|
||||
public class MixinServerPlayerEntity {
|
||||
public class ServerPlayerEntityMixin {
|
||||
@Inject(method = "attack", at = @At("HEAD"), cancellable = true)
|
||||
public void onPlayerInteractEntity(Entity target, CallbackInfo info) {
|
||||
ServerPlayerEntity player = (ServerPlayerEntity) (Object) this;
|
|
@ -49,7 +49,7 @@ import net.fabricmc.fabric.api.event.player.UseBlockCallback;
|
|||
import net.fabricmc.fabric.api.event.player.UseItemCallback;
|
||||
|
||||
@Mixin(ServerPlayerInteractionManager.class)
|
||||
public class MixinServerPlayerInteractionManager {
|
||||
public class ServerPlayerInteractionManagerMixin {
|
||||
@Shadow
|
||||
public ServerWorld world;
|
||||
@Shadow
|
|
@ -3,9 +3,9 @@
|
|||
"package": "net.fabricmc.fabric.mixin.event.interaction",
|
||||
"compatibilityLevel": "JAVA_16",
|
||||
"mixins": [
|
||||
"MixinServerPlayerEntity",
|
||||
"MixinServerPlayerInteractionManager",
|
||||
"MixinServerPlayNetworkHandler"
|
||||
"ServerPlayerEntityMixin",
|
||||
"ServerPlayerInteractionManagerMixin",
|
||||
"ServerPlayNetworkHandlerMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
|
|
@ -35,11 +35,11 @@ import net.fabricmc.fabric.api.gamerule.v1.CustomGameRuleCategory;
|
|||
|
||||
// For any future maintainers who wonder why this class does not compile because of jsr305, please reload gradle using `--refresh-dependencies`.
|
||||
@Mixin(EditGameRulesScreen.RuleListWidget.class)
|
||||
public abstract class RuleListWidgetMixin extends net.minecraft.client.gui.widget.EntryListWidget<EditGameRulesScreen.AbstractRuleWidget> {
|
||||
public abstract class EditGameRulesScreenRuleListWidgetMixin extends net.minecraft.client.gui.widget.EntryListWidget<EditGameRulesScreen.AbstractRuleWidget> {
|
||||
@Unique
|
||||
private final Map<CustomGameRuleCategory, List<EditGameRulesScreen.AbstractRuleWidget>> fabricCategories = new HashMap<>();
|
||||
|
||||
public RuleListWidgetMixin(MinecraftClient client, int width, int height, int top, int bottom, int itemHeight) {
|
||||
public EditGameRulesScreenRuleListWidgetMixin(MinecraftClient client, int width, int height, int top, int bottom, int itemHeight) {
|
||||
super(client, width, height, top, bottom, itemHeight);
|
||||
}
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
"compatibilityLevel": "JAVA_16",
|
||||
"client": [
|
||||
"EditGameRulesScreenAccessor",
|
||||
"RuleListWidgetMixin",
|
||||
"EditGameRulesScreenRuleListWidgetMixin",
|
||||
"RuleListWidgetVisitorMixin"
|
||||
],
|
||||
"injectors": {
|
||||
|
|
|
@ -31,7 +31,7 @@ import net.fabricmc.fabric.api.gamerule.v1.rule.DoubleRule;
|
|||
import net.fabricmc.fabric.api.gamerule.v1.rule.EnumRule;
|
||||
import net.fabricmc.fabric.impl.gamerule.EnumRuleType;
|
||||
import net.fabricmc.fabric.impl.gamerule.rule.BoundedIntRule;
|
||||
import net.fabricmc.fabric.mixin.gamerule.BooleanRuleAccessor;
|
||||
import net.fabricmc.fabric.mixin.gamerule.GameRulesBooleanRuleAccessor;
|
||||
|
||||
/**
|
||||
* A utility class containing factory methods to create game rule types.
|
||||
|
@ -70,7 +70,7 @@ public final class GameRuleFactory {
|
|||
* @return a boolean rule type
|
||||
*/
|
||||
public static GameRules.Type<GameRules.BooleanRule> createBooleanRule(boolean defaultValue, BiConsumer<MinecraftServer, GameRules.BooleanRule> changedCallback) {
|
||||
return BooleanRuleAccessor.invokeCreate(defaultValue, changedCallback);
|
||||
return GameRulesBooleanRuleAccessor.invokeCreate(defaultValue, changedCallback);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -24,7 +24,7 @@ import net.minecraft.world.GameRules;
|
|||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.gamerule.v1.GameRuleRegistry;
|
||||
import net.fabricmc.fabric.mixin.gamerule.IntRuleAccessor;
|
||||
import net.fabricmc.fabric.mixin.gamerule.GameRulesIntRuleAccessor;
|
||||
|
||||
public final class BoundedIntRule extends GameRules.IntRule {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(GameRuleRegistry.class);
|
||||
|
@ -47,7 +47,7 @@ public final class BoundedIntRule extends GameRules.IntRule {
|
|||
return;
|
||||
}
|
||||
|
||||
((IntRuleAccessor) (Object) this).setValue(i);
|
||||
((GameRulesIntRuleAccessor) (Object) this).setValue(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -60,7 +60,7 @@ public final class BoundedIntRule extends GameRules.IntRule {
|
|||
return false;
|
||||
}
|
||||
|
||||
((IntRuleAccessor) (Object) this).setValue(value);
|
||||
((GameRulesIntRuleAccessor) (Object) this).setValue(value);
|
||||
return true;
|
||||
} catch (NumberFormatException var3) {
|
||||
return false;
|
||||
|
@ -69,7 +69,7 @@ public final class BoundedIntRule extends GameRules.IntRule {
|
|||
|
||||
@Override
|
||||
protected GameRules.IntRule copy() {
|
||||
return new BoundedIntRule(this.type, ((IntRuleAccessor) (Object) this).getValue(), this.minimumValue, this.maximumValue);
|
||||
return new BoundedIntRule(this.type, ((GameRulesIntRuleAccessor) (Object) this).getValue(), this.minimumValue, this.maximumValue);
|
||||
}
|
||||
|
||||
private static int parseInt(String input) {
|
||||
|
|
|
@ -25,7 +25,7 @@ import net.minecraft.server.MinecraftServer;
|
|||
import net.minecraft.world.GameRules;
|
||||
|
||||
@Mixin(GameRules.BooleanRule.class)
|
||||
public interface BooleanRuleAccessor {
|
||||
public interface GameRulesBooleanRuleAccessor {
|
||||
@Invoker
|
||||
static GameRules.Type<GameRules.BooleanRule> invokeCreate(boolean initialValue, BiConsumer<MinecraftServer, GameRules.BooleanRule> changeCallback) {
|
||||
throw new AssertionError("This shouldn't happen!");
|
|
@ -22,7 +22,7 @@ import org.spongepowered.asm.mixin.gen.Accessor;
|
|||
import net.minecraft.world.GameRules;
|
||||
|
||||
@Mixin(GameRules.IntRule.class)
|
||||
public interface IntRuleAccessor {
|
||||
public interface GameRulesIntRuleAccessor {
|
||||
@Accessor
|
||||
int getValue();
|
||||
|
|
@ -26,7 +26,7 @@ import net.fabricmc.fabric.api.gamerule.v1.CustomGameRuleCategory;
|
|||
import net.fabricmc.fabric.impl.gamerule.RuleKeyExtensions;
|
||||
|
||||
@Mixin(GameRules.Key.class)
|
||||
public abstract class RuleKeyMixin implements RuleKeyExtensions {
|
||||
public abstract class GameRulesKeyMixin implements RuleKeyExtensions {
|
||||
@Unique
|
||||
@Nullable
|
||||
private CustomGameRuleCategory customCategory;
|
|
@ -3,12 +3,12 @@
|
|||
"package": "net.fabricmc.fabric.mixin.gamerule",
|
||||
"compatibilityLevel": "JAVA_16",
|
||||
"mixins": [
|
||||
"BooleanRuleAccessor",
|
||||
"GameRulesBooleanRuleAccessor",
|
||||
"GameRuleCommandAccessor",
|
||||
"GameRuleCommandVisitorMixin",
|
||||
"GameRulesAccessor",
|
||||
"IntRuleAccessor",
|
||||
"RuleKeyMixin"
|
||||
"GameRulesIntRuleAccessor",
|
||||
"GameRulesKeyMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
|
|
@ -35,8 +35,8 @@ import net.fabricmc.fabric.impl.item.group.CreativeGuiExtensions;
|
|||
import net.fabricmc.fabric.impl.item.group.FabricCreativeGuiComponents;
|
||||
|
||||
@Mixin(CreativeInventoryScreen.class)
|
||||
public abstract class MixinCreativePlayerInventoryGui extends AbstractInventoryScreen implements CreativeGuiExtensions {
|
||||
public MixinCreativePlayerInventoryGui(ScreenHandler container_1, PlayerInventory playerInventory_1, Text textComponent_1) {
|
||||
public abstract class CreativeInventoryScreenMixin extends AbstractInventoryScreen implements CreativeGuiExtensions {
|
||||
public CreativeInventoryScreenMixin(ScreenHandler container_1, PlayerInventory playerInventory_1, Text textComponent_1) {
|
||||
super(container_1, playerInventory_1, textComponent_1);
|
||||
}
|
||||
|
|
@ -27,7 +27,7 @@ import net.minecraft.item.ItemGroup;
|
|||
import net.fabricmc.fabric.impl.item.group.FabricCreativeGuiComponents;
|
||||
|
||||
@Mixin(ItemGroup.class)
|
||||
public abstract class MixinItemGroup {
|
||||
public abstract class ItemGroupMixin {
|
||||
@Shadow
|
||||
public abstract int getIndex();
|
||||
|
|
@ -3,8 +3,8 @@
|
|||
"package": "net.fabricmc.fabric.mixin.item.group.client",
|
||||
"compatibilityLevel": "JAVA_16",
|
||||
"client": [
|
||||
"MixinItemGroup",
|
||||
"MixinCreativePlayerInventoryGui"
|
||||
"ItemGroupMixin",
|
||||
"CreativeInventoryScreenMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
|
|
@ -26,7 +26,7 @@ import net.minecraft.item.ItemGroup;
|
|||
import net.fabricmc.fabric.impl.item.group.ItemGroupExtensions;
|
||||
|
||||
@Mixin(ItemGroup.class)
|
||||
public abstract class MixinItemGroup implements ItemGroupExtensions {
|
||||
public abstract class ItemGroupMixin implements ItemGroupExtensions {
|
||||
@Shadow
|
||||
@Final
|
||||
@Mutable
|
|
@ -3,7 +3,7 @@
|
|||
"package": "net.fabricmc.fabric.mixin.item.group",
|
||||
"compatibilityLevel": "JAVA_16",
|
||||
"mixins": [
|
||||
"MixinItemGroup"
|
||||
"ItemGroupMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
|
|
@ -20,7 +20,7 @@ import net.minecraft.client.option.KeyBinding;
|
|||
import net.minecraft.client.util.InputUtil;
|
||||
|
||||
import net.fabricmc.fabric.impl.client.keybinding.KeyBindingRegistryImpl;
|
||||
import net.fabricmc.fabric.mixin.client.keybinding.KeyCodeAccessor;
|
||||
import net.fabricmc.fabric.mixin.client.keybinding.KeyBindingAccessor;
|
||||
|
||||
/**
|
||||
* Helper for registering key bindings.
|
||||
|
@ -53,6 +53,6 @@ public final class KeyBindingHelper {
|
|||
* @return configured KeyCode
|
||||
*/
|
||||
public static InputUtil.Key getBoundKeyOf(KeyBinding keyBinding) {
|
||||
return ((KeyCodeAccessor) keyBinding).fabric_getBoundKey();
|
||||
return ((KeyBindingAccessor) keyBinding).fabric_getBoundKey();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ import net.minecraft.client.option.KeyBinding;
|
|||
import net.fabricmc.fabric.impl.client.keybinding.KeyBindingRegistryImpl;
|
||||
|
||||
@Mixin(GameOptions.class)
|
||||
public class MixinGameOptions {
|
||||
public class GameOptionsMixin {
|
||||
@Mutable
|
||||
@Final
|
||||
@Shadow
|
|
@ -22,6 +22,7 @@ import org.spongepowered.asm.mixin.Mixin;
|
|||
import org.spongepowered.asm.mixin.gen.Accessor;
|
||||
|
||||
import net.minecraft.client.option.KeyBinding;
|
||||
import net.minecraft.client.util.InputUtil;
|
||||
|
||||
@Mixin(KeyBinding.class)
|
||||
public interface KeyBindingAccessor {
|
||||
|
@ -29,4 +30,7 @@ public interface KeyBindingAccessor {
|
|||
static Map<String, Integer> fabric_getCategoryMap() {
|
||||
throw new AssertionError();
|
||||
}
|
||||
|
||||
@Accessor("boundKey")
|
||||
InputUtil.Key fabric_getBoundKey();
|
||||
}
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2016, 2017, 2018, 2019 FabricMC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package net.fabricmc.fabric.mixin.client.keybinding;
|
||||
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.gen.Accessor;
|
||||
|
||||
import net.minecraft.client.option.KeyBinding;
|
||||
import net.minecraft.client.util.InputUtil;
|
||||
|
||||
@Mixin(KeyBinding.class)
|
||||
public interface KeyCodeAccessor {
|
||||
@Accessor("boundKey")
|
||||
InputUtil.Key fabric_getBoundKey();
|
||||
}
|
|
@ -4,8 +4,7 @@
|
|||
"compatibilityLevel": "JAVA_16",
|
||||
"client": [
|
||||
"KeyBindingAccessor",
|
||||
"KeyCodeAccessor",
|
||||
"MixinGameOptions"
|
||||
"GameOptionsMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
|
|
@ -32,7 +32,7 @@ import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientEntityEvents;
|
|||
|
||||
@Environment(EnvType.CLIENT)
|
||||
@Mixin(targets = "net/minecraft/client/world/ClientWorld$ClientEntityHandler")
|
||||
abstract class ClientWorldEntityLoaderMixin {
|
||||
abstract class ClientWorldClientEntityHandlerMixin {
|
||||
// final synthetic Lnet/minecraft/client/world/ClientWorld; field_27735
|
||||
@SuppressWarnings("ShadowTarget")
|
||||
@Shadow
|
|
@ -5,7 +5,7 @@
|
|||
"client": [
|
||||
"ClientChunkManagerMixin",
|
||||
"ClientPlayNetworkHandlerMixin",
|
||||
"ClientWorldEntityLoaderMixin",
|
||||
"ClientWorldClientEntityHandlerMixin",
|
||||
"ClientWorldMixin",
|
||||
"MinecraftClientMixin",
|
||||
"WorldChunkMixin"
|
||||
|
|
|
@ -29,7 +29,7 @@ import net.minecraft.server.world.ServerWorld;
|
|||
import net.fabricmc.fabric.api.event.lifecycle.v1.ServerEntityEvents;
|
||||
|
||||
@Mixin(targets = "net/minecraft/server/world/ServerWorld$ServerEntityHandler")
|
||||
abstract class ServerWorldEntityLoaderMixin {
|
||||
abstract class ServerWorldServerEntityHandlerMixin {
|
||||
// final synthetic Lnet/minecraft/server/world/ServerWorld; field_26936
|
||||
@SuppressWarnings("ShadowTarget")
|
||||
@Shadow
|
|
@ -6,7 +6,7 @@
|
|||
"DataPackContentsMixin",
|
||||
"MinecraftServerMixin",
|
||||
"PlayerManagerMixin",
|
||||
"ServerWorldEntityLoaderMixin",
|
||||
"ServerWorldServerEntityHandlerMixin",
|
||||
"ServerWorldMixin",
|
||||
"ThreadedAnvilChunkStorageMixin",
|
||||
"WorldMixin"
|
||||
|
|
|
@ -28,7 +28,7 @@ import net.minecraft.util.Identifier;
|
|||
import net.fabricmc.fabric.impl.client.model.BakedModelManagerHooks;
|
||||
|
||||
@Mixin(BakedModelManager.class)
|
||||
public class MixinBakedModelManager implements BakedModelManagerHooks {
|
||||
public class BakedModelManagerMixin implements BakedModelManagerHooks {
|
||||
@Shadow
|
||||
private Map<Identifier, BakedModel> models;
|
||||
|
|
@ -36,7 +36,7 @@ import net.fabricmc.fabric.impl.client.model.ModelLoaderHooks;
|
|||
import net.fabricmc.fabric.impl.client.model.ModelLoadingRegistryImpl;
|
||||
|
||||
@Mixin(ModelLoader.class)
|
||||
public abstract class MixinModelLoader implements ModelLoaderHooks {
|
||||
public abstract class ModelLoaderMixin implements ModelLoaderHooks {
|
||||
// this is the first one
|
||||
@Shadow
|
||||
public static ModelIdentifier MISSING_ID;
|
|
@ -3,8 +3,8 @@
|
|||
"package": "net.fabricmc.fabric.mixin.client.model",
|
||||
"compatibilityLevel": "JAVA_16",
|
||||
"client": [
|
||||
"MixinBakedModelManager",
|
||||
"MixinModelLoader"
|
||||
"BakedModelManagerMixin",
|
||||
"ModelLoaderMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
|
|
@ -13,3 +13,7 @@ testDependencies(project, [
|
|||
loom {
|
||||
accessWidenerPath = file("src/main/resources/fabric-object-builder-api-v1.accesswidener")
|
||||
}
|
||||
|
||||
validateMixinNames {
|
||||
exclude "**/ModelPredicateProviderRegistrySpecificAccessor.class"
|
||||
}
|
||||
|
|
|
@ -27,12 +27,13 @@ import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
|
|||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.random.Random;
|
||||
import net.minecraft.util.registry.DefaultedRegistry;
|
||||
import net.minecraft.village.TradeOffer;
|
||||
import net.minecraft.util.math.random.Random;
|
||||
import net.minecraft.village.TradeOffers;
|
||||
|
||||
@Mixin(targets = "net/minecraft/village/TradeOffers$TypeAwareBuyForOneEmeraldFactory")
|
||||
public abstract class TypeAwareTradeMixin {
|
||||
@Mixin(TradeOffers.TypeAwareBuyForOneEmeraldFactory.class)
|
||||
public abstract class TradeOffersTypeAwareBuyForOneEmeraldFactoryMixin {
|
||||
/**
|
||||
* Vanilla will check the "VillagerType -> Item" map in the stream and throw an exception for villager types not specified in the map.
|
||||
* This breaks any and all custom villager types.
|
|
@ -6,6 +6,7 @@ accessible field net/minecraft/world/poi/PointOfInterestTypes POI_STAT
|
|||
accessible method net/minecraft/world/poi/PointOfInterestTypes register (Lnet/minecraft/util/registry/Registry;Lnet/minecraft/util/registry/RegistryKey;Ljava/util/Set;II)Lnet/minecraft/world/poi/PointOfInterestType;
|
||||
|
||||
extendable class net/minecraft/block/entity/BlockEntityType$BlockEntityFactory
|
||||
accessible class net/minecraft/village/TradeOffers$TypeAwareBuyForOneEmeraldFactory
|
||||
|
||||
accessible method net/minecraft/entity/SpawnRestriction register (Lnet/minecraft/entity/EntityType;Lnet/minecraft/entity/SpawnRestriction$Location;Lnet/minecraft/world/Heightmap$Type;Lnet/minecraft/entity/SpawnRestriction$SpawnPredicate;)V
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"DefaultAttributeRegistryMixin",
|
||||
"DetectorRailBlockMixin",
|
||||
"MaterialBuilderAccessor",
|
||||
"TypeAwareTradeMixin"
|
||||
"TradeOffersTypeAwareBuyForOneEmeraldFactoryMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
|
|
@ -9,3 +9,8 @@ moduleDependencies(project, [
|
|||
'fabric-api-base',
|
||||
'fabric-textures-v0'
|
||||
])
|
||||
|
||||
validateMixinNames {
|
||||
// Loom needs to handle inner mixins better
|
||||
exclude "**/ParticleManagerAccessor\$SimpleSpriteProviderAccessor.class"
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ import net.minecraft.client.particle.ParticleManager;
|
|||
import net.fabricmc.fabric.impl.client.particle.ParticleFactoryRegistryImpl;
|
||||
|
||||
@Mixin(ParticleManager.class)
|
||||
public abstract class MixinParticleManager {
|
||||
public abstract class ParticleManagerMixin {
|
||||
@Inject(method = "registerDefaultFactories()V", at = @At("RETURN"))
|
||||
private void onRegisterDefaultFactories(CallbackInfo info) {
|
||||
ParticleFactoryRegistryImpl.INSTANCE.initialize((ParticleManager) (Object) this);
|
|
@ -3,7 +3,7 @@
|
|||
"package": "net.fabricmc.fabric.mixin.client.particle",
|
||||
"compatibilityLevel": "JAVA_16",
|
||||
"client": [
|
||||
"MixinParticleManager",
|
||||
"ParticleManagerMixin",
|
||||
"ParticleManagerAccessor",
|
||||
"ParticleManagerAccessor$SimpleSpriteProviderAccessor"
|
||||
],
|
||||
|
|
|
@ -30,7 +30,7 @@ import net.minecraft.util.registry.Registry;
|
|||
import net.fabricmc.fabric.impl.registry.sync.trackers.IdListTracker;
|
||||
|
||||
@Mixin(BlockColors.class)
|
||||
public class MixinBlockColorMap {
|
||||
public class BlockColorsMixin {
|
||||
@Shadow
|
||||
private IdList<BlockColorProvider> providers;
|
||||
|
|
@ -30,7 +30,7 @@ import net.minecraft.util.registry.Registry;
|
|||
import net.fabricmc.fabric.impl.registry.sync.trackers.IdListTracker;
|
||||
|
||||
@Mixin(ItemColors.class)
|
||||
public class MixinItemColorMap {
|
||||
public class ItemColorsMixin {
|
||||
@Shadow
|
||||
private IdList<ItemColorProvider> providers;
|
||||
|
|
@ -32,7 +32,7 @@ import net.minecraft.util.registry.Registry;
|
|||
import net.fabricmc.fabric.impl.registry.sync.trackers.Int2ObjectMapTracker;
|
||||
|
||||
@Mixin(ItemModels.class)
|
||||
public class MixinItemModelMap {
|
||||
public class ItemModelsMixin {
|
||||
@Shadow
|
||||
public Int2ObjectMap<ModelIdentifier> modelIds;
|
||||
@Shadow
|
|
@ -33,9 +33,9 @@ import net.fabricmc.fabric.impl.registry.sync.RemapException;
|
|||
import net.fabricmc.fabric.impl.registry.sync.trackers.vanilla.BlockInitTracker;
|
||||
|
||||
@Mixin(MinecraftClient.class)
|
||||
public class MixinMinecraftClient {
|
||||
public class MinecraftClientMixin {
|
||||
@Unique
|
||||
private static Logger FABRIC_LOGGER = LoggerFactory.getLogger(MixinMinecraftClient.class);
|
||||
private static Logger FABRIC_LOGGER = LoggerFactory.getLogger(MinecraftClientMixin.class);
|
||||
|
||||
// Unmap the registry before loading a new SP/MP setup.
|
||||
@Inject(at = @At("RETURN"), method = "disconnect(Lnet/minecraft/client/gui/screen/Screen;)V")
|
|
@ -32,7 +32,7 @@ import net.minecraft.client.world.ClientWorld;
|
|||
import net.fabricmc.fabric.impl.registry.sync.trackers.Int2ObjectMapTracker;
|
||||
|
||||
@Mixin(ParticleManager.class)
|
||||
public class MixinParticleManager {
|
||||
public class ParticleManagerMixin {
|
||||
@Shadow
|
||||
private Int2ObjectMap<ParticleFactory<?>> factories;
|
||||
|
|
@ -3,11 +3,11 @@
|
|||
"package": "net.fabricmc.fabric.mixin.registry.sync.client",
|
||||
"compatibilityLevel": "JAVA_16",
|
||||
"client": [
|
||||
"MixinBlockColorMap",
|
||||
"MixinItemColorMap",
|
||||
"MixinItemModelMap",
|
||||
"MixinMinecraftClient",
|
||||
"MixinParticleManager"
|
||||
"BlockColorsMixin",
|
||||
"ItemColorsMixin",
|
||||
"ItemModelsMixin",
|
||||
"MinecraftClientMixin",
|
||||
"ParticleManagerMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
|
|
@ -27,7 +27,7 @@ import net.minecraft.util.registry.SimpleRegistry;
|
|||
import net.minecraft.util.registry.RegistryKey;
|
||||
|
||||
import net.fabricmc.fabric.impl.registry.sync.FabricRegistry;
|
||||
import net.fabricmc.fabric.mixin.registry.sync.AccessorRegistry;
|
||||
import net.fabricmc.fabric.mixin.registry.sync.RegistryAccessor;
|
||||
|
||||
/**
|
||||
* Used to create custom registries, with specified registry attributes.
|
||||
|
@ -107,7 +107,7 @@ public final class FabricRegistryBuilder<T, R extends MutableRegistry<T>> {
|
|||
fabricRegistry.build(attributes);
|
||||
|
||||
//noinspection unchecked
|
||||
AccessorRegistry.getROOT().add(((AccessorRegistry) registry).getRegistryKey(), registry, Lifecycle.stable());
|
||||
RegistryAccessor.getROOT().add(((RegistryAccessor) registry).getRegistryKey(), registry, Lifecycle.stable());
|
||||
|
||||
return registry;
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ import net.minecraft.util.registry.Registry;
|
|||
import net.minecraft.util.registry.RegistryKey;
|
||||
|
||||
import net.fabricmc.fabric.api.event.registry.RegistryEntryAddedCallback;
|
||||
import net.fabricmc.fabric.mixin.registry.sync.AccessorRegistry;
|
||||
import net.fabricmc.fabric.mixin.registry.sync.RegistryAccessor;
|
||||
|
||||
/**
|
||||
* Handles synchronising changes to the built-in registries into the dynamic registry manager's template manager,
|
||||
|
@ -51,7 +51,7 @@ public class DynamicRegistrySync {
|
|||
* are also added to the template for dynamic registry managers.
|
||||
*/
|
||||
private static <T> void setupSync(Registry<T> source, DynamicRegistryManager template) {
|
||||
@SuppressWarnings("unchecked") AccessorRegistry<T> sourceAccessor = (AccessorRegistry<T>) source;
|
||||
@SuppressWarnings("unchecked") RegistryAccessor<T> sourceAccessor = (RegistryAccessor<T>) source;
|
||||
RegistryKey<? extends Registry<T>> sourceKey = source.getKey();
|
||||
MutableRegistry<T> target = (MutableRegistry<T>) template.get(sourceKey);
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ import net.minecraft.util.math.MathHelper;
|
|||
import net.minecraft.util.registry.Registry;
|
||||
|
||||
import net.fabricmc.fabric.api.event.registry.RegistryEntryAddedCallback;
|
||||
import net.fabricmc.fabric.mixin.registry.sync.AccessorDebugChunkGenerator;
|
||||
import net.fabricmc.fabric.mixin.registry.sync.DebugChunkGeneratorAccessor;
|
||||
|
||||
public final class BlockInitTracker implements RegistryEntryAddedCallback<Block> {
|
||||
private final Registry<Block> registry;
|
||||
|
@ -55,8 +55,8 @@ public final class BlockInitTracker implements RegistryEntryAddedCallback<Block>
|
|||
final int xLength = MathHelper.ceil(MathHelper.sqrt(blockStateList.size()));
|
||||
final int zLength = MathHelper.ceil(blockStateList.size() / (float) xLength);
|
||||
|
||||
AccessorDebugChunkGenerator.setBLOCK_STATES(blockStateList);
|
||||
AccessorDebugChunkGenerator.setX_SIDE_LENGTH(xLength);
|
||||
AccessorDebugChunkGenerator.setZ_SIDE_LENGTH(zLength);
|
||||
DebugChunkGeneratorAccessor.setBLOCK_STATES(blockStateList);
|
||||
DebugChunkGeneratorAccessor.setX_SIDE_LENGTH(xLength);
|
||||
DebugChunkGeneratorAccessor.setZ_SIDE_LENGTH(zLength);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ import net.fabricmc.fabric.impl.registry.sync.trackers.vanilla.BlockInitTracker;
|
|||
import net.fabricmc.fabric.impl.registry.sync.trackers.vanilla.BlockItemTracker;
|
||||
|
||||
@Mixin(Bootstrap.class)
|
||||
public class MixinBootstrap {
|
||||
public class BootstrapMixin {
|
||||
@Inject(method = "setOutputStreams", at = @At("RETURN"))
|
||||
private static void initialize(CallbackInfo info) {
|
||||
// These seemingly pointless accesses are done to make sure each
|
|
@ -24,7 +24,7 @@ import org.spongepowered.asm.mixin.injection.Redirect;
|
|||
import net.minecraft.world.ChunkSerializer;
|
||||
|
||||
@Mixin(ChunkSerializer.class)
|
||||
public class MixinChunkSerializer {
|
||||
public class ChunkSerializerMixin {
|
||||
@Redirect(method = "readStructureReferences", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V"))
|
||||
private static void log(Logger logger, String msg, Object identifier, Object chunkPos) {
|
||||
// Drop to debug log level.
|
|
@ -26,7 +26,7 @@ import net.minecraft.block.BlockState;
|
|||
import net.minecraft.world.gen.chunk.DebugChunkGenerator;
|
||||
|
||||
@Mixin(DebugChunkGenerator.class)
|
||||
public interface AccessorDebugChunkGenerator {
|
||||
public interface DebugChunkGeneratorAccessor {
|
||||
@Accessor
|
||||
@Mutable
|
||||
static void setBLOCK_STATES(List<BlockState> blockStates) {
|
|
@ -28,7 +28,7 @@ import net.fabricmc.fabric.api.event.registry.DynamicRegistrySetupCallback;
|
|||
import net.fabricmc.fabric.impl.registry.sync.DynamicRegistrySync;
|
||||
|
||||
@Mixin(DynamicRegistryManager.class)
|
||||
public interface MixinDynamicRegistryManager {
|
||||
public interface DynamicRegistryManagerMixin {
|
||||
@Inject(method = "createAndLoad", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/dynamic/EntryLoader$Impl;<init>()V"), locals = LocalCapture.CAPTURE_FAILHARD)
|
||||
private static void onCreateImpl(CallbackInfoReturnable<DynamicRegistryManager.Mutable> cir, DynamicRegistryManager.Mutable registryManager) {
|
||||
DynamicRegistrySetupCallback.EVENT.invoker().onRegistrySetup(registryManager);
|
|
@ -31,7 +31,7 @@ import net.minecraft.util.collection.IdList;
|
|||
import net.fabricmc.fabric.impl.registry.sync.RemovableIdList;
|
||||
|
||||
@Mixin(IdList.class)
|
||||
public class MixinIdList<T> implements RemovableIdList<T> {
|
||||
public class IdListMixin<T> implements RemovableIdList<T> {
|
||||
@Shadow
|
||||
private int nextId;
|
||||
@Shadow
|
|
@ -49,7 +49,7 @@ import net.fabricmc.fabric.impl.registry.sync.RemapException;
|
|||
import net.fabricmc.fabric.impl.registry.sync.RemappableRegistry;
|
||||
|
||||
@Mixin(LevelStorage.Session.class)
|
||||
public class MixinLevelStorageSession {
|
||||
public class LevelStorageSessionMixin {
|
||||
@Unique
|
||||
private static final int FABRIC_ID_REGISTRY_BACKUPS = 3;
|
||||
@Unique
|
|
@ -32,9 +32,9 @@ import net.fabricmc.fabric.impl.registry.sync.trackers.vanilla.BlockInitTracker;
|
|||
import net.fabricmc.loader.api.FabricLoader;
|
||||
|
||||
@Mixin(MinecraftServer.class)
|
||||
public class MixinMinecraftServer {
|
||||
public class MinecraftServerMixin {
|
||||
@Unique
|
||||
private static Logger FABRIC_LOGGER = LoggerFactory.getLogger(MixinMinecraftServer.class);
|
||||
private static Logger FABRIC_LOGGER = LoggerFactory.getLogger(MinecraftServerMixin.class);
|
||||
|
||||
@Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/server/MinecraftServer;setupServer()Z"), method = "runServer")
|
||||
private void beforeSetupServer(CallbackInfo info) {
|
|
@ -1,75 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2016, 2017, 2018, 2019 FabricMC
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package net.fabricmc.fabric.mixin.registry.sync;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import com.mojang.serialization.Lifecycle;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.Unique;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.util.registry.RegistryKey;
|
||||
import net.minecraft.util.registry.SimpleRegistry;
|
||||
|
||||
import net.fabricmc.fabric.api.event.registry.RegistryAttribute;
|
||||
import net.fabricmc.fabric.api.event.registry.RegistryAttributeHolder;
|
||||
import net.fabricmc.fabric.impl.registry.sync.RegistrySyncManager;
|
||||
|
||||
@Mixin(SimpleRegistry.class)
|
||||
public abstract class MixinSimpleRegistry<T> extends Registry<T> {
|
||||
@Unique
|
||||
private static final Logger FARBIC_LOGGER = LoggerFactory.getLogger("FabricRegistrySync");
|
||||
|
||||
// Namespaces used by the vanilla game. "brigadier" is used by command argument type registry.
|
||||
// While Realms use "realms" namespace, it is irrelevant for Registry Sync.
|
||||
@Unique
|
||||
private static final Set<String> VANILLA_NAMESPACES = Set.of("minecraft", "brigadier");
|
||||
|
||||
protected MixinSimpleRegistry(RegistryKey<Registry<T>> arg, Lifecycle lifecycle) {
|
||||
super(arg, lifecycle);
|
||||
}
|
||||
|
||||
@Inject(method = "add", at = @At("RETURN"))
|
||||
private <V extends T> void add(RegistryKey<Registry<T>> registryKey, V entry, Lifecycle lifecycle, CallbackInfoReturnable<V> info) {
|
||||
onChange(registryKey);
|
||||
}
|
||||
|
||||
@Inject(method = "set", at = @At("RETURN"))
|
||||
private <V extends T> void set(int rawId, RegistryKey<Registry<T>> registryKey, V entry, Lifecycle lifecycle, CallbackInfoReturnable<V> info) {
|
||||
onChange(registryKey);
|
||||
}
|
||||
|
||||
@Unique
|
||||
private void onChange(RegistryKey<Registry<T>> registryKey) {
|
||||
if (RegistrySyncManager.postBootstrap || !VANILLA_NAMESPACES.contains(registryKey.getValue().getNamespace())) {
|
||||
RegistryAttributeHolder holder = RegistryAttributeHolder.get(this);
|
||||
|
||||
if (!holder.hasAttribute(RegistryAttribute.MODDED)) {
|
||||
Identifier id = getKey().getValue();
|
||||
FARBIC_LOGGER.debug("Registry {} has been marked as modded, registry entry {} was changed", id, registryKey.getValue());
|
||||
RegistryAttributeHolder.get(this).addAttribute(RegistryAttribute.MODDED);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -26,7 +26,7 @@ import net.minecraft.util.registry.Registry;
|
|||
import net.minecraft.util.registry.RegistryKey;
|
||||
|
||||
@Mixin(Registry.class)
|
||||
public interface AccessorRegistry<T> {
|
||||
public interface RegistryAccessor<T> {
|
||||
@Accessor()
|
||||
static MutableRegistry<MutableRegistry<?>> getROOT() {
|
||||
throw new UnsupportedOperationException();
|
|
@ -29,7 +29,7 @@ import net.fabricmc.fabric.api.event.registry.RegistryAttributeHolder;
|
|||
import net.fabricmc.fabric.impl.registry.sync.FabricRegistry;
|
||||
|
||||
@Mixin(Registry.class)
|
||||
public abstract class MixinRegistry<T> implements RegistryAttributeHolder, FabricRegistry {
|
||||
public abstract class RegistryMixin<T> implements RegistryAttributeHolder, FabricRegistry {
|
||||
@Unique
|
||||
private final EnumSet<RegistryAttribute> attributes = EnumSet.noneOf(RegistryAttribute.class);
|
||||
|
|
@ -21,6 +21,7 @@ import java.util.Comparator;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
|
||||
import com.google.common.collect.BiMap;
|
||||
import com.google.common.collect.HashBiMap;
|
||||
|
@ -43,24 +44,32 @@ import org.spongepowered.asm.mixin.injection.At;
|
|||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
import net.minecraft.util.registry.RegistryEntry;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.util.registry.RegistryEntry;
|
||||
import net.minecraft.util.registry.RegistryKey;
|
||||
import net.minecraft.util.registry.SimpleRegistry;
|
||||
|
||||
import net.fabricmc.fabric.api.event.Event;
|
||||
import net.fabricmc.fabric.api.event.EventFactory;
|
||||
import net.fabricmc.fabric.api.event.registry.RegistryAttribute;
|
||||
import net.fabricmc.fabric.api.event.registry.RegistryAttributeHolder;
|
||||
import net.fabricmc.fabric.api.event.registry.RegistryEntryAddedCallback;
|
||||
import net.fabricmc.fabric.api.event.registry.RegistryEntryRemovedCallback;
|
||||
import net.fabricmc.fabric.api.event.registry.RegistryIdRemapCallback;
|
||||
import net.fabricmc.fabric.impl.registry.sync.ListenableRegistry;
|
||||
import net.fabricmc.fabric.impl.registry.sync.RegistrySyncManager;
|
||||
import net.fabricmc.fabric.impl.registry.sync.RemapException;
|
||||
import net.fabricmc.fabric.impl.registry.sync.RemapStateImpl;
|
||||
import net.fabricmc.fabric.impl.registry.sync.RemappableRegistry;
|
||||
|
||||
@Mixin(SimpleRegistry.class)
|
||||
public abstract class MixinIdRegistry<T> extends Registry<T> implements RemappableRegistry, ListenableRegistry<T> {
|
||||
public abstract class SimpleRegistryMixin<T> extends Registry<T> implements RemappableRegistry, ListenableRegistry<T> {
|
||||
// Namespaces used by the vanilla game. "brigadier" is used by command argument type registry.
|
||||
// While Realms use "realms" namespace, it is irrelevant for Registry Sync.
|
||||
@Unique
|
||||
private static final Set<String> VANILLA_NAMESPACES = Set.of("minecraft", "brigadier");
|
||||
|
||||
@Shadow
|
||||
@Final
|
||||
private ObjectList<RegistryEntry.Reference<T>> rawIdToEntry;
|
||||
|
@ -83,9 +92,9 @@ public abstract class MixinIdRegistry<T> extends Registry<T> implements Remappab
|
|||
public abstract @Nullable T get(@Nullable Identifier id);
|
||||
|
||||
@Unique
|
||||
private static Logger FABRIC_LOGGER = LoggerFactory.getLogger(MixinIdRegistry.class);
|
||||
private static final Logger FABRIC_LOGGER = LoggerFactory.getLogger(SimpleRegistryMixin.class);
|
||||
|
||||
public MixinIdRegistry(RegistryKey<? extends Registry<T>> key, Lifecycle lifecycle) {
|
||||
public SimpleRegistryMixin(RegistryKey<? extends Registry<T>> key, Lifecycle lifecycle) {
|
||||
super(key, lifecycle);
|
||||
}
|
||||
|
||||
|
@ -140,6 +149,29 @@ public abstract class MixinIdRegistry<T> extends Registry<T> implements Remappab
|
|||
@Unique
|
||||
private boolean fabric_isObjectNew = false;
|
||||
|
||||
@Inject(method = "add", at = @At("RETURN"))
|
||||
private <V extends T> void add(RegistryKey<Registry<T>> registryKey, V entry, Lifecycle lifecycle, CallbackInfoReturnable<V> info) {
|
||||
onChange(registryKey);
|
||||
}
|
||||
|
||||
@Inject(method = "set", at = @At("RETURN"))
|
||||
private <V extends T> void set(int rawId, RegistryKey<Registry<T>> registryKey, V entry, Lifecycle lifecycle, CallbackInfoReturnable<V> info) {
|
||||
onChange(registryKey);
|
||||
}
|
||||
|
||||
@Unique
|
||||
private void onChange(RegistryKey<Registry<T>> registryKey) {
|
||||
if (RegistrySyncManager.postBootstrap || !VANILLA_NAMESPACES.contains(registryKey.getValue().getNamespace())) {
|
||||
RegistryAttributeHolder holder = RegistryAttributeHolder.get(this);
|
||||
|
||||
if (!holder.hasAttribute(RegistryAttribute.MODDED)) {
|
||||
Identifier id = getKey().getValue();
|
||||
FABRIC_LOGGER.debug("Registry {} has been marked as modded, registry entry {} was changed", id, registryKey.getValue());
|
||||
RegistryAttributeHolder.get(this).addAttribute(RegistryAttribute.MODDED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "set(ILnet/minecraft/util/registry/RegistryKey;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;Z)Lnet/minecraft/util/registry/RegistryEntry;", at = @At("HEAD"))
|
||||
public void setPre(int id, RegistryKey<T> registryId, T object, Lifecycle lifecycle, boolean checkDuplicateKeys, CallbackInfoReturnable<T> info) {
|
||||
int indexedEntriesId = entryToRawId.getInt(object);
|
|
@ -30,7 +30,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||
import net.minecraft.datafixer.fix.StructuresToConfiguredStructuresFix;
|
||||
|
||||
@Mixin(StructuresToConfiguredStructuresFix.class)
|
||||
public class MixinStructuresToConfiguredStructuresFix {
|
||||
public class StructuresToConfiguredStructuresFixMixin {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger("MixinStructuresToConfiguredStructuresFix");
|
||||
|
||||
/**
|
|
@ -3,18 +3,18 @@
|
|||
"package": "net.fabricmc.fabric.mixin.registry.sync",
|
||||
"compatibilityLevel": "JAVA_16",
|
||||
"mixins": [
|
||||
"AccessorDebugChunkGenerator",
|
||||
"AccessorRegistry",
|
||||
"MixinBootstrap",
|
||||
"MixinChunkSerializer",
|
||||
"MixinDynamicRegistryManager",
|
||||
"MixinIdList",
|
||||
"MixinIdRegistry",
|
||||
"MixinLevelStorageSession",
|
||||
"MixinRegistry",
|
||||
"MixinMinecraftServer",
|
||||
"MixinSimpleRegistry",
|
||||
"MixinStructuresToConfiguredStructuresFix"
|
||||
"DebugChunkGeneratorAccessor",
|
||||
"RegistryAccessor",
|
||||
"BootstrapMixin",
|
||||
"ChunkSerializerMixin",
|
||||
"DynamicRegistryManagerMixin",
|
||||
"IdListMixin",
|
||||
"SimpleRegistryMixin",
|
||||
"LevelStorageSessionMixin",
|
||||
"RegistryMixin",
|
||||
"MinecraftServerMixin",
|
||||
"SimpleRegistryMixin",
|
||||
"StructuresToConfiguredStructuresFixMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
|
|
@ -34,7 +34,7 @@ import net.fabricmc.fabric.api.renderer.v1.render.RenderContext;
|
|||
* Avoids instanceof checks and enables consistent code path for all baked models.
|
||||
*/
|
||||
@Mixin(BakedModel.class)
|
||||
public interface MixinBakedModel extends FabricBakedModel {
|
||||
public interface BakedModelMixin extends FabricBakedModel {
|
||||
@Override
|
||||
default boolean isVanillaAdapter() {
|
||||
return true;
|
|
@ -43,7 +43,7 @@ import net.fabricmc.fabric.api.renderer.v1.model.FabricBakedModel;
|
|||
import net.fabricmc.fabric.api.renderer.v1.render.RenderContext;
|
||||
|
||||
@Mixin(MultipartBakedModel.class)
|
||||
public class MixinMultipartBakedModel implements FabricBakedModel {
|
||||
public class MultipartBakedModelMixin implements FabricBakedModel {
|
||||
@Shadow
|
||||
@Final
|
||||
private List<Pair<Predicate<BlockState>, BakedModel>> components;
|
|
@ -31,7 +31,7 @@ import net.minecraft.util.Identifier;
|
|||
import net.fabricmc.fabric.impl.renderer.SpriteFinderImpl;
|
||||
|
||||
@Mixin(SpriteAtlasTexture.class)
|
||||
public class MixinSpriteAtlasTexture implements SpriteFinderImpl.SpriteFinderAccess {
|
||||
public class SpriteAtlasTextureMixin implements SpriteFinderImpl.SpriteFinderAccess {
|
||||
@Shadow
|
||||
private Map<Identifier, Sprite> sprites;
|
||||
|
|
@ -41,7 +41,7 @@ import net.fabricmc.fabric.api.renderer.v1.model.FabricBakedModel;
|
|||
import net.fabricmc.fabric.api.renderer.v1.render.RenderContext;
|
||||
|
||||
@Mixin(WeightedBakedModel.class)
|
||||
public class MixinWeightedBakedModel implements FabricBakedModel {
|
||||
public class WeightedBakedModelMixin implements FabricBakedModel {
|
||||
@Shadow
|
||||
@Final
|
||||
private int totalWeight;
|
|
@ -28,7 +28,7 @@ import net.minecraft.client.gui.hud.DebugHud;
|
|||
import net.fabricmc.fabric.api.renderer.v1.RendererAccess;
|
||||
|
||||
@Mixin(DebugHud.class)
|
||||
public class MixinDebugHud {
|
||||
public class DebugHudMixin {
|
||||
@Inject(at = @At("RETURN"), method = "getLeftText")
|
||||
protected void getLeftText(CallbackInfoReturnable<List<String>> info) {
|
||||
if (RendererAccess.INSTANCE.hasRenderer()) {
|
|
@ -3,7 +3,7 @@
|
|||
"package": "net.fabricmc.fabric.mixin.renderer.client.debughud",
|
||||
"compatibilityLevel": "JAVA_16",
|
||||
"client": [
|
||||
"MixinDebugHud"
|
||||
"DebugHudMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
"package": "net.fabricmc.fabric.mixin.renderer",
|
||||
"compatibilityLevel": "JAVA_16",
|
||||
"client": [
|
||||
"client.MixinBakedModel",
|
||||
"client.MixinMultipartBakedModel",
|
||||
"client.MixinWeightedBakedModel",
|
||||
"client.MixinSpriteAtlasTexture"
|
||||
"client.BakedModelMixin",
|
||||
"client.MultipartBakedModelMixin",
|
||||
"client.WeightedBakedModelMixin",
|
||||
"client.SpriteAtlasTextureMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
|
|
@ -36,7 +36,7 @@ import net.fabricmc.fabric.impl.client.indigo.renderer.aocalc.VanillaAoHelper;
|
|||
import net.fabricmc.fabric.impl.client.indigo.renderer.render.BlockRenderContext;
|
||||
|
||||
@Mixin(BlockModelRenderer.class)
|
||||
public abstract class MixinBlockModelRenderer {
|
||||
public abstract class BlockModelRendererMixin {
|
||||
@Unique
|
||||
private final ThreadLocal<BlockRenderContext> fabric_contexts = ThreadLocal.withInitial(BlockRenderContext::new);
|
||||
|
|
@ -66,7 +66,7 @@ import net.fabricmc.fabric.impl.client.indigo.renderer.render.TerrainRenderConte
|
|||
* (Though they can use these as an example if they wish.)
|
||||
*/
|
||||
@Mixin(BuiltChunk.RebuildTask.class)
|
||||
public abstract class MixinChunkRebuildTask {
|
||||
public abstract class ChunkBuilderBuiltChunkRebuildTaskMixin {
|
||||
@Final
|
||||
@Shadow
|
||||
BuiltChunk field_20839;
|
|
@ -25,7 +25,7 @@ import net.fabricmc.fabric.impl.client.indigo.renderer.accessor.AccessChunkRende
|
|||
import net.fabricmc.fabric.impl.client.indigo.renderer.render.TerrainRenderContext;
|
||||
|
||||
@Mixin(ChunkRendererRegion.class)
|
||||
public abstract class MixinChunkRendererRegion implements AccessChunkRendererRegion {
|
||||
public abstract class ChunkRendererRegionMixin implements AccessChunkRendererRegion {
|
||||
@Unique
|
||||
private TerrainRenderContext fabric_renderer;
|
||||
|
|
@ -38,7 +38,7 @@ import net.fabricmc.fabric.impl.client.indigo.renderer.render.ItemRenderContext;
|
|||
import net.fabricmc.fabric.impl.client.indigo.renderer.render.ItemRenderContext.VanillaQuadHandler;
|
||||
|
||||
@Mixin(ItemRenderer.class)
|
||||
public abstract class MixinItemRenderer {
|
||||
public abstract class ItemRendererMixin {
|
||||
@Final
|
||||
@Shadow
|
||||
private ItemColors colors;
|
|
@ -6,10 +6,10 @@
|
|||
"mixins": [
|
||||
],
|
||||
"client": [
|
||||
"MixinBlockModelRenderer",
|
||||
"MixinChunkRebuildTask",
|
||||
"MixinChunkRendererRegion",
|
||||
"MixinItemRenderer"
|
||||
"BlockModelRendererMixin",
|
||||
"ChunkBuilderBuiltChunkRebuildTaskMixin",
|
||||
"ChunkRendererRegionMixin",
|
||||
"ItemRendererMixin"
|
||||
],
|
||||
"injectors": {
|
||||
"defaultRequire": 1
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue