patcher -> silent

This commit is contained in:
kirillsaint 2023-07-03 15:40:59 +06:00
parent 31d6483c72
commit 3576395d83
21 changed files with 29 additions and 29 deletions

View File

@ -23,7 +23,7 @@ public class BlockModelRendererAmbientOcclusionFaceMixin {
//#endif
)
)
private boolean patcher$betterSmoothLighting(Block block) {
private boolean silent$betterSmoothLighting(Block block) {
//#if MC==10809
return !block.isVisuallyOpaque() || block.getLightOpacity() == 0;
//#else

View File

@ -16,7 +16,7 @@ public class C17PacketCustomPayloadMixin {
private PacketBuffer data;
@Inject(method = "processPacket(Lnet/minecraft/network/play/INetHandlerPlayServer;)V", at = @At("TAIL"))
private void patcher$releaseData(INetHandlerPlayServer handler, CallbackInfo ci) {
private void silent$releaseData(INetHandlerPlayServer handler, CallbackInfo ci) {
if (this.data != null) {
this.data.release();
}

View File

@ -23,7 +23,7 @@ public class EffectRendererMixin {
target = "Lnet/minecraft/client/particle/EntityFX;renderParticle(Lnet/minecraft/client/renderer/WorldRenderer;Lnet/minecraft/entity/Entity;FFFFFF)V"
)
)
private void patcher$cullParticles(
private void silent$cullParticles(
EntityFX instance, WorldRenderer worldRendererIn, Entity entityIn, float partialTicks,
float rotationX, float rotationZ, float rotationYZ, float rotationXY, float rotationXZ
) {
@ -36,7 +36,7 @@ public class EffectRendererMixin {
method = "updateEffectAlphaLayer",
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/particle/EffectRenderer;tickParticle(Lnet/minecraft/client/particle/EntityFX;)V", shift = At.Shift.AFTER)
)
private EntityFX patcher$checkIfCulled(EntityFX entityFX) {
private EntityFX silent$checkIfCulled(EntityFX entityFX) {
if (ParticleCulling.camera != null) {
((EntityFXExt) entityFX).setCullState(ParticleCulling.camera.isBoundingBoxInFrustum(
//#if MC==10809

View File

@ -18,7 +18,7 @@ import java.util.Iterator;
public class EntityLivingBaseMixin {
@Inject(method = "updatePotionEffects", at = @At(value = "INVOKE", target = "Lnet/minecraft/potion/PotionEffect;onUpdate(Lnet/minecraft/entity/EntityLivingBase;)Z"),
locals = LocalCapture.CAPTURE_FAILSOFT, cancellable = true)
private void patcher$checkPotionEffect(CallbackInfo ci,
private void silent$checkPotionEffect(CallbackInfo ci,
//#if MC==10809
Iterator<Integer> iterator, Integer integer,
//#else

View File

@ -19,7 +19,7 @@ public class EntityPacketsMixin {
cancellable = true,
remap = false
)
private void patcher$addNullCheck(World worldIn, CallbackInfoReturnable<Entity> cir) {
private void silent$addNullCheck(World worldIn, CallbackInfoReturnable<Entity> cir) {
if (worldIn == null) {
cir.setReturnValue(null);
}

View File

@ -10,7 +10,7 @@ import org.spongepowered.asm.mixin.injection.Redirect;
public class EntityXPOrbMixin {
//#if MC==10809
@Redirect(method = "onUpdate", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/player/EntityPlayer;getEyeHeight()F"))
private float patcher$lowerHeight(EntityPlayer entityPlayer) {
private float silent$lowerHeight(EntityPlayer entityPlayer) {
return (float) (entityPlayer.getEyeHeight() / 2.0D);
}
//#endif

View File

@ -13,7 +13,7 @@ public class GuiGameOverMixin {
@Shadow private int enableButtonsTimer;
@Inject(method = "initGui", at = @At("HEAD"))
private void patcher$allowClickable(CallbackInfo ci) {
private void silent$allowClickable(CallbackInfo ci) {
this.enableButtonsTimer = 0;
}
//#endif

View File

@ -11,12 +11,12 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(targets = "net.minecraft.client.gui.GuiScreenOptionsSounds$Button")
public class GuiScreenOptionsSoundsMixin {
@Redirect(method = "mouseDragged(Lnet/minecraft/client/Minecraft;II)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/settings/GameSettings;saveOptions()V"))
private void patcher$cancelSaving(GameSettings instance) {
private void silent$cancelSaving(GameSettings instance) {
// no-op
}
@Inject(method = "mouseReleased(II)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/audio/SoundHandler;playSound(Lnet/minecraft/client/audio/ISound;)V"))
private void patcher$save(int mouseX, int mouseY, CallbackInfo ci) {
private void silent$save(int mouseX, int mouseY, CallbackInfo ci) {
Minecraft.getMinecraft().gameSettings.saveOptions();
}
}

View File

@ -12,7 +12,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(GuiScreenResourcePacks.class)
public class GuiScreenResourcePacksMixin {
@Inject(method = "actionPerformed", at = @At(value = "INVOKE", target = "Ljava/util/Collections;reverse(Ljava/util/List;)V", remap = false))
private void patcher$clearHandles(CallbackInfo ci) {
private void silent$clearHandles(CallbackInfo ci) {
ResourcePackRepository repository = Minecraft.getMinecraft().getResourcePackRepository();
for (ResourcePackRepository.Entry entry : repository.getRepositoryEntries()) {
IResourcePack current = repository.getResourcePackInstance();

View File

@ -10,7 +10,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(LayerWitherAura.class)
public class LayerWitherAuraMixin {
@Inject(method = "doRenderLayer(Lnet/minecraft/entity/boss/EntityWither;FFFFFFF)V", at = @At("TAIL"))
private void patcher$fixDepth(CallbackInfo ci) {
private void silent$fixDepth(CallbackInfo ci) {
GlStateManager.depthMask(true);
}
}

View File

@ -13,7 +13,7 @@ public class MinecraftServerMixin {
at = @At(value = "INVOKE", target = "Lnet/minecraft/network/ServerStatusResponse;setFavicon(Ljava/lang/String;)V", shift = At.Shift.AFTER),
ordinal = 1
)
private ByteBuf patcher$releaseByteBuf(ByteBuf buf1) {
private ByteBuf silent$releaseByteBuf(ByteBuf buf1) {
buf1.release();
return buf1;
}

View File

@ -36,7 +36,7 @@ public class NetHandlerPlayClientMixin {
//#if MC==10809
@Inject(method = "handleResourcePack", at = @At("HEAD"), cancellable = true)
private void patcher$resourceExploitFix(S48PacketResourcePackSend packetIn, CallbackInfo ci) {
private void silent$resourceExploitFix(S48PacketResourcePackSend packetIn, CallbackInfo ci) {
if (!NetHandlerPlayClientHook.validateResourcePackUrl((NetHandlerPlayClient) (Object) this, packetIn)) {
ci.cancel();
}
@ -46,7 +46,7 @@ public class NetHandlerPlayClientMixin {
slice = @Slice(from = @At(value = "CONSTANT", args = "stringValue=Unable to locate sign at ", ordinal = 0)),
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/entity/EntityPlayerSP;addChatMessage(Lnet/minecraft/util/IChatComponent;)V", ordinal = 0)
)
private void patcher$removeDebugMessage(EntityPlayerSP instance, IChatComponent component) {
private void silent$removeDebugMessage(EntityPlayerSP instance, IChatComponent component) {
// No-op
}
//#endif

View File

@ -14,7 +14,7 @@ public class NodeProcessorMixin {
@Shadow protected IBlockAccess blockaccess;
@Inject(method = "postProcess", at = @At("HEAD"))
private void patcher$cleanupBlockAccess(CallbackInfo ci) {
private void silent$cleanupBlockAccess(CallbackInfo ci) {
this.blockaccess = null;
}
//#endif

View File

@ -11,7 +11,7 @@ import org.spongepowered.asm.mixin.injection.Redirect;
public class PacketThreadUtilMixin {
@SuppressWarnings({"rawtypes", "unchecked"})
@Redirect(method = "run", at = @At(value = "INVOKE", target = "Lnet/minecraft/network/Packet;processPacket(Lnet/minecraft/network/INetHandler;)V"))
private void patcher$ignorePacketsFromClosedConnections(Packet packet, INetHandler handler) {
private void silent$ignorePacketsFromClosedConnections(Packet packet, INetHandler handler) {
if (handler instanceof NetHandlerPlayClient) {
if (((NetHandlerPlayClient) handler).getNetworkManager().isChannelOpen()) {
packet.processPacket(handler);

View File

@ -34,7 +34,7 @@ public class RenderGlobalMixin {
}
@ModifyVariable(method = "getVisibleFacings", name = "visgraph", at = @At(value = "STORE", ordinal = 0))
private VisGraph patcher$setLimitScan(VisGraph visgraph) {
private VisGraph silent$setLimitScan(VisGraph visgraph) {
((VisGraphExt) visgraph).silent$setLimitScan(true);
return visgraph;
}

View File

@ -16,7 +16,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(RenderItemFrame.class)
public class RenderItemFrameMixin {
@Inject(method = "doRender(Lnet/minecraft/entity/item/EntityItemFrame;DDDFF)V", at = @At("HEAD"), cancellable = true)
private void patcher$cancelRender(EntityItemFrame entity, double x, double y, double z, float entityYaw, float partialTicks, CallbackInfo ci) {
private void silent$cancelRender(EntityItemFrame entity, double x, double y, double z, float entityYaw, float partialTicks, CallbackInfo ci) {
if (Client.getInstance().getSettingsManager().getSettingByClass(FPSBoostMod.class, "Hide Item Frames").getValBoolean()) {
ci.cancel();
return;

View File

@ -15,7 +15,7 @@ public class S3FPacketCustomPayloadMixin {
@Shadow private PacketBuffer data;
@Inject(method = "processPacket(Lnet/minecraft/network/play/INetHandlerPlayClient;)V", at = @At("TAIL"))
private void patcher$releaseData(INetHandlerPlayClient handler, CallbackInfo ci) {
private void silent$releaseData(INetHandlerPlayClient handler, CallbackInfo ci) {
if (this.data != null) {
this.data.release();
}

View File

@ -18,34 +18,34 @@ public abstract class ScoreboardMixin {
@Shadow public abstract ScorePlayerTeam getTeam(String p_96508_1_);
@Inject(method = "removeTeam", at = @At("HEAD"), cancellable = true)
private void patcher$checkIfTeamIsNull(ScorePlayerTeam team, CallbackInfo ci) {
private void silent$checkIfTeamIsNull(ScorePlayerTeam team, CallbackInfo ci) {
if (team == null) ci.cancel();
}
@Redirect(method = "removeTeam", at = @At(value = "INVOKE", target = "Ljava/util/Map;remove(Ljava/lang/Object;)Ljava/lang/Object;", ordinal = 0, remap = false))
private <K, V> V patcher$checkIfRegisteredNameIsNull(Map<K, V> instance, K o) {
private <K, V> V silent$checkIfRegisteredNameIsNull(Map<K, V> instance, K o) {
if (o != null) return instance.remove(o);
return null;
}
@Inject(method = "removeObjective", at = @At("HEAD"), cancellable = true)
private void patcher$checkIfObjectiveIsNull(ScoreObjective objective, CallbackInfo ci) {
private void silent$checkIfObjectiveIsNull(ScoreObjective objective, CallbackInfo ci) {
if (objective == null) ci.cancel();
}
@Redirect(method = "removeObjective", at = @At(value = "INVOKE", target = "Ljava/util/Map;remove(Ljava/lang/Object;)Ljava/lang/Object;", ordinal = 0, remap = false))
private <K, V> V patcher$checkIfNameIsNull(Map<K, V> instance, K o) {
private <K, V> V silent$checkIfNameIsNull(Map<K, V> instance, K o) {
if (o != null) return instance.remove(o);
return null;
}
@Inject(method = "createTeam", at = @At(value = "CONSTANT", args = "stringValue=A team with the name '"), cancellable = true)
private void patcher$returnExistingTeam(String name, CallbackInfoReturnable<ScorePlayerTeam> cir) {
private void silent$returnExistingTeam(String name, CallbackInfoReturnable<ScorePlayerTeam> cir) {
cir.setReturnValue(this.getTeam(name));
}
@Inject(method = "removePlayerFromTeam", at = @At(value = "CONSTANT", args = "stringValue=Player is either on another team or not on any team. Cannot remove from team '"), cancellable = true)
private void patcher$silenceException(CallbackInfo ci) {
private void silent$silenceException(CallbackInfo ci) {
ci.cancel();
}
}

View File

@ -53,7 +53,7 @@ public abstract class SoundManagerMixin {
slice = @Slice(from = @At(value = "CONSTANT", args = "stringValue=Unable to play unknown soundEvent: {}", ordinal = 0)),
at = @At(value = "INVOKE", target = "Lorg/apache/logging/log4j/Logger;warn(Lorg/apache/logging/log4j/Marker;Ljava/lang/String;[Ljava/lang/Object;)V", ordinal = 0, remap = false)
)
private void patcher$silenceWarning(Logger instance, Marker marker, String s, Object[] objects) {
private void silent$silenceWarning(Logger instance, Marker marker, String s, Object[] objects) {
// No-op
}
}

View File

@ -22,7 +22,7 @@ public class TileEntitySkullRendererMixin {
//#if MC==10809
@Inject(method = "renderSkull", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/model/ModelBase;render(Lnet/minecraft/entity/Entity;FFFFFF)V"))
private void patcher$enableBlending(CallbackInfo ci) {
private void silent$enableBlending(CallbackInfo ci) {
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, GL11.GL_ONE, GL11.GL_ZERO);
}

View File

@ -16,7 +16,7 @@ public class VertexBufferMixin {
// inject at INVOKE rather than HEAD as OptiFine changes this method for its Render Regions option
@Inject(method = "bufferData", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/vertex/VertexBuffer;bindBuffer()V"), cancellable = true)
private void patcher$ignoreRemovedBuffers(ByteBuffer byteBuffer, CallbackInfo ci) {
private void silent$ignoreRemovedBuffers(ByteBuffer byteBuffer, CallbackInfo ci) {
if (this.glBufferId == -1) {
ci.cancel();
}