minecraft { version = "1.8.9-11.15.1.2318-1.8.9" runDir = "run" mappings = "stable_20" }
private static class PatchClickBlock extends MethodVisitor { public PatchClickBlock(MethodVisitor mv) { super(Opcodes.ASM4, mv); } fast block place mod 1.8.9
This mod removes the delay between placing blocks, allowing you to place them as fast as you can click (limited only by the server’s entity-action rate). It uses to patch the client-side PlayerControllerMP class, which is the most reliable method for 1.8.9. Project Structure FastBlockPlace/ ├── src/main/java/com/example/fastblockplace/ │ ├── FastBlockPlaceMod.java │ ├── Transformer.java │ └── Plugin.java └── src/main/resources/ └── mcmod.info 1. FastBlockPlaceMod.java – Core Mod Class package com.example.fastblockplace; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import org.apache.logging.log4j.Logger; minecraft { version = "1
import java.util.logging.Logger;
@Override public void visitFieldInsn(int opcode, String owner, String name, String desc) { // Skip storing the 4 into blockHitDelay if (opcode == Opcodes.PUTFIELD && name.equals("blockHitDelay")) { LOGGER.info("Patched: prevented blockHitDelay assignment"); return; } super.visitFieldInsn(opcode, owner, name, desc); } } } package com.example.fastblockplace; import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin; import java.util.Map; FastBlockPlaceMod
private byte[] patchPlayerControllerMP(byte[] classBytes) { ClassReader cr = new ClassReader(classBytes); ClassWriter cw = new ClassWriter(cr, ClassWriter.COMPUTE_MAXS); ClassVisitor cv = new ClassVisitor(Opcodes.ASM4, cw) { @Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions); if (name.equals("clickBlock") && desc.equals("(Lnet/minecraft/util/BlockPos;Lnet/minecraft/util/EnumFacing;)Z")) { LOGGER.info("Found clickBlock method – removing block hit delay"); return new PatchClickBlock(mv); } return mv; } }; cr.accept(cv, 0); return cw.toByteArray(); }
jar { manifest { attributes( 'FMLCorePlugin': 'com.example.fastblockplace.Plugin', 'FMLCorePluginContainsFMLMod': 'true', 'FMLAT': 'fastblockplace_at.cfg' ) } }