mirror of
https://github.com/GTMEGA/EndlessIDs.git
synced 2026-11-12 04:57:31 +00:00
PlayerControllerMP
This commit is contained in:
4 files changed
+18
-22
No files matched your search
@@ -8,7 +8,6 @@ import com.falsepattern.endlessids.asm.transformer.UndergroundBiomesOreUBifier;
|
||||
import com.falsepattern.endlessids.asm.transformer.CofhBlockHelper;
|
||||
import com.falsepattern.endlessids.asm.transformer.FmlRegistry;
|
||||
import com.falsepattern.endlessids.asm.transformer.VanillaItemInWorldManager;
|
||||
import com.falsepattern.endlessids.asm.transformer.VanillaPlayerControllerMP;
|
||||
import java.util.Map;
|
||||
|
||||
public enum ClassEdit
|
||||
@@ -26,7 +25,7 @@ public enum ClassEdit
|
||||
//VanillaS24PacketBlockActivation(new VanillaS24PacketBlockActivation(), new String[] { "net.minecraft.network.play.server.S24PacketBlockAction" }),
|
||||
//VanillaS26PacketMapChunkBulk(new VanillaS26PacketMapChunkBulk(), new String[] { "net.minecraft.network.play.server.S26PacketMapChunkBulk" }),
|
||||
//VanillaRenderGlobal(new VanillaRenderGlobal(), new String[] { "net.minecraft.client.renderer.RenderGlobal" }),
|
||||
VanillaPlayerControllerMP(new VanillaPlayerControllerMP(), new String[] { "net.minecraft.client.multiplayer.PlayerControllerMP" }),
|
||||
//VanillaPlayerControllerMP(new VanillaPlayerControllerMP(), new String[] { "net.minecraft.client.multiplayer.PlayerControllerMP" }),
|
||||
VanillaItemInWorldManager(new VanillaItemInWorldManager(), new String[] { "net.minecraft.server.management.ItemInWorldManager" }),
|
||||
//VanillaWorld(new VanillaWorld(), new String[] { "net.minecraft.world.World" }),
|
||||
FmlRegistry(new FmlRegistry(), new String[] { "cpw.mods.fml.common.registry.GameData", "cpw.mods.fml.common.registry.FMLControlledNamespacedRegistry" }),
|
||||
|
||||
-20
@@ -1,20 +0,0 @@
|
||||
package com.falsepattern.endlessids.asm.transformer;
|
||||
|
||||
import org.objectweb.asm.tree.MethodNode;
|
||||
import com.falsepattern.endlessids.asm.AsmUtil;
|
||||
import com.falsepattern.endlessids.asm.Name;
|
||||
import org.objectweb.asm.tree.ClassNode;
|
||||
import com.falsepattern.endlessids.asm.IClassNodeTransformer;
|
||||
|
||||
public class VanillaPlayerControllerMP implements IClassNodeTransformer
|
||||
{
|
||||
public VanillaPlayerControllerMP() {
|
||||
super();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void transform(final ClassNode cn, final boolean obfuscated) {
|
||||
final MethodNode method = AsmUtil.findMethod(cn, Name.playerControllerMP_onPlayerDestroyBlock);
|
||||
AsmUtil.transformInlinedSizeMethod(cn, method, 12, 16);
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.falsepattern.endlessids.mixin.mixins.common;
|
||||
|
||||
import net.minecraft.client.multiplayer.PlayerControllerMP;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.Constant;
|
||||
import org.spongepowered.asm.mixin.injection.ModifyConstant;
|
||||
|
||||
@Mixin(PlayerControllerMP.class)
|
||||
public abstract class PlayerControllerMPMixin {
|
||||
@ModifyConstant(method = "onPlayerDestroyBlock",
|
||||
constant = @Constant(intValue = 12, ordinal = 0),
|
||||
require = 1)
|
||||
private int extend1(int constant) {
|
||||
return 16;
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,7 @@ public enum Mixin {
|
||||
S22PacketMultiBlockChangeMixin(builder(Side.COMMON).mixin("S22PacketMultiBlockChangeMixin")),
|
||||
S24PacketBlockActionMixin(builder(Side.COMMON).mixin("S24PacketBlockActionMixin")),
|
||||
S26PacketMapChunkBulkMixin(builder(Side.COMMON).mixin("S26PacketMapChunkBulkMixin")),
|
||||
PlayerControllerMPMixin(builder(Side.COMMON).mixin("PlayerControllerMPMixin")),
|
||||
NetHandlerPlayClientMixin(builder(Side.CLIENT).mixin("NetHandlerPlayClientMixin")),
|
||||
RenderGlobalMixin(builder(Side.CLIENT).mixin("RenderGlobalMixin")),
|
||||
;
|
||||
|
||||
Reference in new issue
Block a user