aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/moe/ymc/acron/mixin/LivingEntityMixin.java
diff options
context:
space:
mode:
authorTrumeet <yuuta@yuuta.moe>2022-07-20 16:40:02 -0700
committerTrumeet <yuuta@yuuta.moe>2022-07-20 16:40:02 -0700
commitda14a17298c67d83e6da4732f47304954acc26fc (patch)
tree82c3eccf003b0e26b877461909c7b0466f0f276d /src/main/java/moe/ymc/acron/mixin/LivingEntityMixin.java
parent52eecba0bcc3da94acbb10f12e0354c302637584 (diff)
downloadacron-da14a17298c67d83e6da4732f47304954acc26fc.tar
acron-da14a17298c67d83e6da4732f47304954acc26fc.tar.gz
acron-da14a17298c67d83e6da4732f47304954acc26fc.tar.bz2
acron-da14a17298c67d83e6da4732f47304954acc26fc.zip
Fix LOGGER conflict
java.lang.IllegalAccessError: class net.minecraft.entity.mob.ZombieVillagerEntity tried to access private field net.minecraft.entity.LivingEntity.LOGGER (net.minecraft.entity.mob.ZombieVillagerEntity and net.minecraft.entity.LivingEntity are in unnamed module of loader net.fabricmc.loader.impl.launch.knot.KnotClassLoader @3e77a1ed) at net.minecraft.entity.mob.ZombieVillagerEntity.writeCustomDataToNbt(ZombieVillagerEntity.java:83) at net.minecraft.entity.Entity.writeNbt(Entity.java:1506) at net.minecraft.entity.Entity.saveSelfNbt(Entity.java:1447) at net.minecraft.entity.Entity.saveNbt(Entity.java:1455) at net.minecraft.world.storage.EntityChunkDataAccess.method_31734(EntityChunkDataAccess.java:102) at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1625) at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762) at net.minecraft.world.storage.EntityChunkDataAccess.writeChunkData(EntityChunkDataAccess.java:100) at net.minecraft.server.world.ServerEntityManager.trySave(ServerEntityManager.java:248) at net.minecraft.server.world.ServerEntityManager.method_31846(ServerEntityManager.java:314) at it.unimi.dsi.fastutil.longs.LongIterable.forEach(LongIterable.java:74) at net.minecraft.server.world.ServerEntityManager.save(ServerEntityManager.java:308) at net.minecraft.server.world.ServerWorld.save(ServerWorld.java:600) at net.minecraft.server.MinecraftServer.save(MinecraftServer.java:577) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:823) at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:685) at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:290) at java.base/java.lang.Thread.run(Thread.java:833) Signed-off-by: Trumeet <yuuta@yuuta.moe>
Diffstat (limited to 'src/main/java/moe/ymc/acron/mixin/LivingEntityMixin.java')
-rw-r--r--src/main/java/moe/ymc/acron/mixin/LivingEntityMixin.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/moe/ymc/acron/mixin/LivingEntityMixin.java b/src/main/java/moe/ymc/acron/mixin/LivingEntityMixin.java
index 41807f2..9e16569 100644
--- a/src/main/java/moe/ymc/acron/mixin/LivingEntityMixin.java
+++ b/src/main/java/moe/ymc/acron/mixin/LivingEntityMixin.java
@@ -18,7 +18,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(LivingEntity.class)
public abstract class LivingEntityMixin extends net.minecraft.entity.Entity {
- private static final Logger LOGGER = LogManager.getLogger();
+ private static final Logger AC_LOGGER = LogManager.getLogger();
@Shadow public abstract DamageTracker getDamageTracker();
@@ -33,7 +33,7 @@ public abstract class LivingEntityMixin extends net.minecraft.entity.Entity {
// before it does anything else.
@Inject(at = @At("HEAD"), method = "onDeath")
public void onDeath(DamageSource source, CallbackInfo ci) {
- LOGGER.debug("onDeath[{}]",
+ AC_LOGGER.debug("onDeath[{}]",
getUuid());
EventQueue.enqueue(new EventEntityDeath(new Entity(this),
getDamageTracker().getDeathMessage().getString()));