fix: Remove deprecated blockItem netcode patch

This was already patched by ChunkAPI, updating to V2 revealed the conflict
This commit is contained in:
FalsePattern committed 2025-09-25 19:10:24 +02:00
1 parent f673dba88b
commit 860f2fb467
2 files changed
+1 -75

No files matched your search

@@ -1,73 +0,0 @@
/*
* EndlessIDs
*
* Copyright (C) 2022-2025 FalsePattern, The MEGA Team
* All Rights Reserved
*
* The above copyright notice, this permission notice and the words "MEGA"
* shall be included in all copies or substantial portions of the Software.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, only version 3 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.falsepattern.endlessids.mixin.mixins.client.blockitem.vanilla;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite;
import org.spongepowered.asm.mixin.Shadow;
import net.minecraft.block.Block;
import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.client.network.NetHandlerPlayClient;
import net.minecraft.network.play.server.S22PacketMultiBlockChange;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import java.io.IOException;
@SideOnly(Side.CLIENT)
@Mixin(NetHandlerPlayClient.class)
public abstract class NetHandlerPlayClientMixin {
@Shadow
private WorldClient clientWorldController;
/**
* @author FalsePattern
* @reason Ported code, TODO figure out a proper mixin for this (difficult)
*/
@Overwrite
public void handleMultiBlockChange(S22PacketMultiBlockChange packetIn) {
int chunkX = packetIn.func_148920_c().chunkXPos * 16;
int chunkZ = packetIn.func_148920_c().chunkZPos * 16;
if (packetIn.func_148921_d() != null) {
DataInputStream dataInput = new DataInputStream(new ByteArrayInputStream(packetIn.func_148921_d()));
try {
for (int var5 = 0; var5 < packetIn.func_148922_e(); ++var5) {
short pos = dataInput.readShort();
short idLSB = dataInput.readShort();
byte idMSB = dataInput.readByte();
int id = (idLSB & 0xFFFF) | ((idMSB & 0xFF) << 16);
int meta = dataInput.readShort() & 0xFFFF;
int x = pos >> 12 & 15;
int z = pos >> 8 & 15;
int y = pos & 255;
this.clientWorldController.func_147492_c(x + chunkX, y, z + chunkZ, Block.getBlockById(id), meta);
}
} catch (IOException ignored) {
}
}
}
}
@@ -425,8 +425,7 @@ public enum Mixin implements IMixins {
"blockitem.vanilla.S24PacketBlockActionMixin",
"blockitem.vanilla.StatListMixin",
"blockitem.vanilla.WorldMixin"),
client("blockitem.vanilla.NetHandlerPlayClientMixin",
"blockitem.vanilla.PlayerControllerMPMixin",
client("blockitem.vanilla.PlayerControllerMPMixin",
"blockitem.vanilla.RenderGlobalMixin")),
BlockItem_BlockPhysics(Phase.EARLY,