mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-12 16:37:38 +00:00
Fixed smoke particles on redstone torches (bugged in vanilla) Added functions for world and coordinates on parts to clean code Added more placement and world interaction events Properly distinguished converted tiles Fixed tick scheduler to remain in better sync with vanilla
29 lines
880 B
Java
29 lines
880 B
Java
package codechicken.multipart.minecraft;
|
|
|
|
import net.minecraft.entity.player.EntityPlayerMP;
|
|
import net.minecraft.network.NetServerHandler;
|
|
import net.minecraft.world.World;
|
|
import codechicken.core.packet.PacketCustom;
|
|
import codechicken.core.packet.PacketCustom.IServerPacketHandler;
|
|
|
|
public class McMultipartSPH implements IServerPacketHandler
|
|
{
|
|
public static Object channel = MinecraftMultipartMod.instance;
|
|
|
|
@Override
|
|
public void handlePacket(PacketCustom packet, NetServerHandler nethandler, EntityPlayerMP sender)
|
|
{
|
|
switch(packet.getType())
|
|
{
|
|
case 1:
|
|
EventHandler.place(sender, sender.worldObj);
|
|
break;
|
|
}
|
|
}
|
|
|
|
public static void spawnBurnoutSmoke(World world, int x, int y, int z)
|
|
{
|
|
new PacketCustom(channel, 1).writeCoord(x, y, z).sendToChunk(world, x>>4, z>>4);
|
|
}
|
|
}
|