-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sat SMP fix, missile textures, crafting recipes
- Loading branch information
Showing
21 changed files
with
130 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
package com.hbm.packet; | ||
|
||
import com.hbm.items.tool.ItemSatInterface; | ||
import com.hbm.saveddata.SatelliteSaveStructure; | ||
import com.hbm.saveddata.SatelliteSaveStructure.SatelliteType; | ||
import com.hbm.saveddata.SatelliteSavedData; | ||
import com.hbm.tileentity.machine.TileEntityMachineRadar; | ||
|
||
import cpw.mods.fml.common.network.simpleimpl.IMessage; | ||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler; | ||
import cpw.mods.fml.common.network.simpleimpl.MessageContext; | ||
import cpw.mods.fml.relauncher.Side; | ||
import cpw.mods.fml.relauncher.SideOnly; | ||
import io.netty.buffer.ByteBuf; | ||
import net.minecraft.client.Minecraft; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.tileentity.TileEntity; | ||
|
||
public class SatPanelPacket implements IMessage { | ||
|
||
int id; | ||
int dim; | ||
SatelliteType type; | ||
long lastOp; | ||
|
||
public SatPanelPacket() { | ||
|
||
} | ||
|
||
public SatPanelPacket(SatelliteSaveStructure sat) { | ||
id = sat.satelliteID; | ||
dim = sat.satDim; | ||
type = sat.satelliteType; | ||
lastOp = sat.lastOp; | ||
} | ||
|
||
@Override | ||
public void fromBytes(ByteBuf buf) { | ||
id = buf.readInt(); | ||
dim = buf.readInt(); | ||
type = SatelliteType.getEnum(buf.readInt()); | ||
lastOp = buf.readLong(); | ||
} | ||
|
||
@Override | ||
public void toBytes(ByteBuf buf) { | ||
buf.writeInt(id); | ||
buf.writeInt(dim); | ||
buf.writeInt(type.getID()); | ||
buf.writeLong(lastOp); | ||
} | ||
|
||
public static class Handler implements IMessageHandler<SatPanelPacket, IMessage> { | ||
|
||
@Override | ||
@SideOnly(Side.CLIENT) | ||
public IMessage onMessage(SatPanelPacket m, MessageContext ctx) { | ||
|
||
EntityPlayer p = Minecraft.getMinecraft().thePlayer; | ||
|
||
try { | ||
|
||
if(ItemSatInterface.satData == null) { | ||
ItemSatInterface.satData = new SatelliteSavedData(p.worldObj); | ||
} | ||
|
||
SatelliteSaveStructure sat = new SatelliteSaveStructure(m.id, m.type, m.dim); | ||
sat.lastOp = m.lastOp; | ||
ItemSatInterface.satData.satellites.add(sat); | ||
|
||
ItemSatInterface.satData.satCount = ItemSatInterface.satData.satellites.size(); | ||
|
||
} catch (Exception x) { | ||
} | ||
return null; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters