mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-11 15:57:55 +00:00
tank
This commit is contained in:
1 parent
99f8e98017
commit
482298021e
25 files changed
+1010
-174
No files matched your search
@@ -1,5 +1,9 @@
|
||||
package com.glodblock.github.loader;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.network.Packet;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.glodblock.github.FluidCraft;
|
||||
import com.glodblock.github.network.*;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -47,4 +51,12 @@ public class ChannelLoader implements Runnable {
|
||||
FluidCraft.proxy.netHandler
|
||||
.registerMessage(new SPacketSetItemAmount.Handler(), SPacketSetItemAmount.class, id++, Side.CLIENT);
|
||||
}
|
||||
|
||||
public static void sendPacketToAllPlayers(Packet packet, World world) {
|
||||
for (Object player : world.playerEntities) {
|
||||
if (player instanceof EntityPlayerMP) {
|
||||
((EntityPlayerMP) player).playerNetServerHandler.sendPacket(packet);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user