Skip to content

Commit

Permalink
fix(mixin): removeBats mixin problems
Browse files Browse the repository at this point in the history
  • Loading branch information
OptiJava committed Jul 10, 2024
1 parent d4c704c commit 868579a
Showing 2 changed files with 28 additions and 14 deletions.
Original file line number Diff line number Diff line change
@@ -21,12 +21,12 @@ public class MinecraftServer_Mixin {

@Inject(
method = "runServer",
//#if MC >= 12004
//$$ at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", shift = At.Shift.AFTER),
//#if MC >= 11800
//$$ at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V")
//#else
at = @At(value = "INVOKE", target = "Lorg/apache/logging/log4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V", shift = At.Shift.AFTER),
//#endif
at = @At(value = "INVOKE", target = "Lorg/apache/logging/log4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;Ljava/lang/Object;)V"),
remap = false
//#endif
)
private void injectRunServer(CallbackInfo ci) {
// reference: carpet logger `tps`
34 changes: 24 additions & 10 deletions src/main/resources/opt-carpet-addition.mixins.json
Original file line number Diff line number Diff line change
@@ -8,9 +8,7 @@
"compatibilityLevel": "JAVA_16",
//#endif
"mixins": [
"logger.HUDController_Mixin",
"logger.blockUpdate.LoggerRegistry_Mixin",
"logger.blockUpdate.World_Mixin",
//#if MC < 11900
"logger.updateSuppression.World_Mixin",
"rule.async.MinecraftServer_Mixin",
"rule.async.optimizePlayerConnect.EntityTrackerEntry_Mixin",
@@ -20,23 +18,39 @@
"rule.async.optimizePlayerConnect.World_Mixin",
"rule.async.optimizeTeleport.ServerPlayerEntity_Mixin",
"rule.async.optimizeTeleport.ServerPlayNetworkHandler_Mixin",
"rule.disabledUpdateSuppressionErrorStackTrace.ThreadExecutor_Mixin",
"rule.dropperCrashFix.DispenserBlock_Mixin",
"rule.dropperCrashFix.DropperBlock_Mixin",
//#if MC >= 11800
//$$ "rule.disabledUpdateSuppressionErrorStackTrace.NetworkThreadUtils_Mixin",
//#endif
//#endif
"logger.HUDController_Mixin",
"rule.cceSuppressionCrashFix.MinecraftServer_Mixin",
"rule.cceSuppressionCrashFix.ShulkerBoxBlock_Mixin",
"rule.commandLogger.CommandManager_Mixin",
"rule.customItemDiscardTime.ItemEntity_Mixin",
"rule.disabledEnderManPickupGoal.EnderManEntity_Mixin",
"rule.disabledEnderManPlaceBlockGoal.EndermanEntity_Mixin",
"rule.disabledEntityTick.ServerWorld_Mixin",
"rule.disabledLayEggs.ChickenEntity_Mixin",
"rule.disabledNetherPortalSpawn.NetherPortalBlock_Mixin",
"rule.disabledUpdateSuppressionErrorStackTrace.ThreadExecutor_Mixin",
"rule.dropperCrashFix.DispenserBlock_Mixin",
"rule.dropperCrashFix.DropperBlock_Mixin",
"rule.optimizeFakePlayerSpawn.EntityPlayerMPFake_Mixin",
"rule.optimizeFakePlayerSpawn.PlayerCommand_Mixin",
"rule.printTpsInfoWhenCantKeepUp.MinecraftServer_Mixin",
"rule.removeAllCurseOfBindingArmorWhenPlayerDeadInWall.ServerPlayerEntity_Mixin",
"rule.removeBats.BatEntity_Mixin"
//#if MC >= 12000
//$$ "rule.disallowRedstoneWireConnectsToOpenTrapdoor.RedstoneWireBlock_Mixin",
//#endif
//#if MC >= 11900
//$$ "logger.blockUpdate.SimpleNeighborUpdater_Mixin",
//$$ "logger.blockUpdate.ChainRestrictedNeighborUpdater_Mixin",
//#endif
//#if MC <= 11900
"logger.blockUpdate.World_Mixin",
//#endif
"rule.customItemDiscardTime.ItemEntity_Mixin",
"logger.blockUpdate.LoggerRegistry_Mixin",
"rule.removeBats.BatEntity_Mixin",
"rule.printTpsInfoWhenCantKeepUp.MinecraftServer_Mixin"
],
"client": [
"rule.unescapeChatMessage.ChatMessageC2SPacket_Mixin",
@@ -47,4 +61,4 @@
"injectors": {
"defaultRequire": 1
}
}
}

0 comments on commit 868579a

Please sign in to comment.