diff --git a/codechicken/lib/packet/PacketCustom.java b/codechicken/lib/packet/PacketCustom.java index 5d4e531..463454d 100644 --- a/codechicken/lib/packet/PacketCustom.java +++ b/codechicken/lib/packet/PacketCustom.java @@ -34,6 +34,7 @@ import net.minecraft.network.Packet; import net.minecraft.network.play.INetHandlerPlayClient; import net.minecraft.network.play.INetHandlerPlayServer; import net.minecraft.server.MinecraftServer; +import net.minecraft.server.management.PlayerManager; import net.minecraft.server.management.PlayerManager.PlayerInstance; import net.minecraft.world.World; import net.minecraft.world.WorldServer; @@ -523,9 +524,15 @@ public final class PacketCustom implements MCDataInput, MCDataOutput } public static void sendToChunk(Packet packet, World world, int chunkX, int chunkZ) { + PlayerManager playerManager = ((WorldServer)world).getPlayerManager(); + for (EntityPlayerMP player : (List) MinecraftServer.getServer().getConfigurationManager().playerEntityList) + if(playerManager.isPlayerWatchingChunk(player, chunkX, chunkZ)) + sendToPlayer(packet, player); + + /* Commented until forge accepts access tranformer request PlayerInstance p = ((WorldServer) world).getPlayerManager().getOrCreateChunkWatcher(chunkX, chunkZ, false); if (p != null) - p.sendToAllPlayersWatchingChunk(packet); + p.sendToAllPlayersWatchingChunk(packet);*/ } public void sendToOps() { diff --git a/codechicken/lib/render/TextureSpecial.java b/codechicken/lib/render/TextureSpecial.java index 5d2ee55..777749a 100644 --- a/codechicken/lib/render/TextureSpecial.java +++ b/codechicken/lib/render/TextureSpecial.java @@ -65,7 +65,6 @@ public class TextureSpecial extends TextureAtlasSprite implements IIconSelfRegis if (textureFX != null) { textureFX.update(); if (textureFX.changed()) - //TextureUtil.uploadTextureSub(0, textureFX.imageData, width, height, originX, originY, false, false, false); not accessible TextureUtil.uploadTextureMipmap(new int[][]{textureFX.imageData}, width, height, originX, originY, false, false); } }