Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.mrzorse.startrek.packets;
- import net.minecraft.world.World;
- import com.mrzorse.startrek.tileentity.tileentities.TileEntityTransportInterlock;
- import cpw.mods.fml.common.network.simpleimpl.IMessage;
- import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
- import cpw.mods.fml.common.network.simpleimpl.MessageContext;
- public class InterlockHandler implements IMessageHandler<InterlockPacket, IMessage> {
- private String bp;
- @Override
- public IMessage onMessage(InterlockPacket message, MessageContext ctx) {
- String command = message.text.toString();
- String[] finalcommand = command.split(" ");
- String id = finalcommand[0];
- int x = Integer.valueOf(finalcommand[1]);
- int y = Integer.valueOf(finalcommand[2]);
- int z = Integer.valueOf(finalcommand[3]);
- World world = ctx.getServerHandler().playerEntity.worldObj;
- TileEntityTransportInterlock tinterlock = (TileEntityTransportInterlock) world.getTileEntity(x, y, z);
- tinterlock.id = id.toString();
- return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement