-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2f867e6
commit 14f261a
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
fabric/src/main/java/net/tonimatasdev/packetfixerfabric/mixin/SizePrependerMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package net.tonimatasdev.packetfixerfabric.mixin; | ||
|
||
import net.minecraft.network.SizePrepender; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.Constant; | ||
import org.spongepowered.asm.mixin.injection.ModifyConstant; | ||
|
||
@Mixin(SizePrepender.class) | ||
public class SizePrependerMixin { | ||
@ModifyConstant(method = "encode(Lio/netty/channel/ChannelHandlerContext;Lio/netty/buffer/ByteBuf;Lio/netty/buffer/ByteBuf;)V", constant = @Constant(intValue = 3)) | ||
private int newSize(int value) { | ||
return 8; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
fabric/src/main/java/net/tonimatasdev/packetfixerfabric/mixin/SplitterHandlerMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package net.tonimatasdev.packetfixerfabric.mixin; | ||
|
||
import net.minecraft.network.SplitterHandler; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.Constant; | ||
import org.spongepowered.asm.mixin.injection.ModifyConstant; | ||
|
||
@Mixin(SplitterHandler.class) | ||
public class SplitterHandlerMixin { | ||
@ModifyConstant(method = "decode(Lio/netty/channel/ChannelHandlerContext;Lio/netty/buffer/ByteBuf;Ljava/util/List;)V", constant = @Constant(intValue = 3)) | ||
private int newSize(int value) { | ||
return 8; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters