resurrected basic library functionalities
This commit is contained in:
parent
d8c4d5db14
commit
5c5819f28d
10 changed files with 116 additions and 244 deletions
|
@ -12,9 +12,7 @@ import java.io.File;
|
|||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
|
@ -348,16 +346,6 @@ public class BuildCraftBuilders extends BuildCraftMod {
|
|||
InterModComms.processIMC(event);
|
||||
}
|
||||
|
||||
public static ItemStack getBptItemStack(Item item, int damage, String name) {
|
||||
ItemStack stack = new ItemStack(item, 1, damage);
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
if (name != null && !"".equals(name)) {
|
||||
nbt.setString("BptName", name);
|
||||
stack.setTagCompound(nbt);
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void ServerStop(FMLServerStoppingEvent event) {
|
||||
TilePathMarker.clearAvailableMarkersList();
|
||||
|
|
|
@ -46,7 +46,6 @@ public abstract class ItemBlueprint extends ItemBuildCraft {
|
|||
return stack;
|
||||
}
|
||||
|
||||
|
||||
public static BlueprintBase getBlueprint(ItemStack stack) {
|
||||
if (stack == null) {
|
||||
return null;
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
package buildcraft.builders;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
@ -23,13 +24,13 @@ public class ItemBlueprintStandard extends ItemBlueprint {
|
|||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int damage) {
|
||||
if (damage == 0) {
|
||||
public IIcon getIconIndex(ItemStack stack) {
|
||||
if (getBlueprint(stack) == null) {
|
||||
return cleanBlueprint;
|
||||
} else {
|
||||
return usedBlueprint;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
package buildcraft.builders;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
@ -42,14 +40,15 @@ public class TileBlueprintLibrary extends TileBuildCraft implements IInventory {
|
|||
@NetworkData
|
||||
public String owner = "";
|
||||
|
||||
private ArrayList<BlueprintBase> currentPage;
|
||||
public ArrayList<BlueprintId> currentPage;
|
||||
|
||||
public LinkedList <String> currentBlueprint = new LinkedList <String> ();
|
||||
|
||||
int selected = -1;
|
||||
public int selected = -1;
|
||||
boolean locked = false;
|
||||
|
||||
public EntityPlayer uploadingPlayer = null;
|
||||
public EntityPlayer downloadingPlayer = null;
|
||||
|
||||
int pageId = 0;
|
||||
|
||||
public TileBlueprintLibrary() {
|
||||
|
||||
|
@ -59,90 +58,18 @@ public class TileBlueprintLibrary extends TileBuildCraft implements IInventory {
|
|||
public void initialize() {
|
||||
super.initialize();
|
||||
|
||||
if (!worldObj.isRemote) {
|
||||
setCurrentPage(getNextPage(null));
|
||||
if (worldObj.isRemote) {
|
||||
setCurrentPage(BuildCraftBuilders.clientDB.getPage (0));
|
||||
}
|
||||
}
|
||||
|
||||
public ArrayList<BlueprintBase> getNextPage(String after) {
|
||||
/*ArrayList<BlueprintBase> result = new ArrayList<BlueprintBase>();
|
||||
|
||||
BptPlayerIndex index = BuildCraftBuilders.getPlayerIndex(BuildersProxy.getOwner(this));
|
||||
|
||||
String it = after;
|
||||
|
||||
while (result.size() < BuildCraftBuilders.LIBRARY_PAGE_SIZE) {
|
||||
it = index.nextBpt(it);
|
||||
|
||||
if (it == null) {
|
||||
break;
|
||||
}
|
||||
|
||||
BlueprintBase bpt = BuildCraftBuilders.getBptRootIndex().getBluePrint(it);
|
||||
|
||||
if (bpt != null) {
|
||||
result.add(bpt);
|
||||
}
|
||||
}
|
||||
|
||||
return result;*/
|
||||
return null;
|
||||
}
|
||||
|
||||
public ArrayList<BlueprintBase> getPrevPage(String before) {
|
||||
/*ArrayList<BlueprintBase> result = new ArrayList<BlueprintBase>();
|
||||
|
||||
BptPlayerIndex index = BuildCraftBuilders.getPlayerIndex(BuildersProxy.getOwner(this));
|
||||
|
||||
String it = before;
|
||||
|
||||
while (result.size() < BuildCraftBuilders.LIBRARY_PAGE_SIZE) {
|
||||
it = index.prevBpt(it);
|
||||
|
||||
if (it == null) {
|
||||
break;
|
||||
}
|
||||
|
||||
BlueprintBase bpt = BuildCraftBuilders.getBptRootIndex().getBluePrint(it);
|
||||
|
||||
if (bpt != null) {
|
||||
result.add(bpt);
|
||||
}
|
||||
}
|
||||
|
||||
return result;*/
|
||||
return null;
|
||||
}
|
||||
|
||||
public void updateCurrentNames() {
|
||||
currentBlueprint.clear();
|
||||
List <BlueprintId> ids = BuildCraftBuilders.clientDB.getPage(0, 12);
|
||||
|
||||
for (BlueprintId id : ids) {
|
||||
currentBlueprint.add(id.name);
|
||||
}
|
||||
}
|
||||
|
||||
public ArrayList<BlueprintBase> getCurrentPage() {
|
||||
public ArrayList<BlueprintId> getCurrentPage() {
|
||||
return currentPage;
|
||||
}
|
||||
|
||||
public void setCurrentPage(ArrayList<BlueprintBase> newPage) {
|
||||
public void setCurrentPage(ArrayList<BlueprintId> newPage) {
|
||||
currentPage = newPage;
|
||||
selected = -1;
|
||||
updateCurrentNames();
|
||||
}
|
||||
|
||||
public void setCurrentPage(boolean nextPage) {
|
||||
/*int index = 0;
|
||||
if (nextPage) {
|
||||
index = currentPage.size() - 1;
|
||||
}
|
||||
if (currentPage.size() > 0) {
|
||||
setCurrentPage(getNextPage(currentPage.get(index).file.getName()));
|
||||
} else {
|
||||
setCurrentPage(getNextPage(null));
|
||||
}*/
|
||||
}
|
||||
|
||||
public void deleteSelectedBpt() {
|
||||
|
@ -191,8 +118,9 @@ public class TileBlueprintLibrary extends TileBuildCraft implements IInventory {
|
|||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int i, int j) {
|
||||
if (stack[i] == null)
|
||||
if (stack[i] == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ItemStack res = stack[i].splitStack(j);
|
||||
|
||||
|
@ -226,8 +154,10 @@ public class TileBlueprintLibrary extends TileBuildCraft implements IInventory {
|
|||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int slot) {
|
||||
if (stack[slot] == null)
|
||||
if (stack[slot] == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
ItemStack toReturn = stack[slot];
|
||||
stack[slot] = null;
|
||||
return toReturn;
|
||||
|
@ -286,43 +216,55 @@ public class TileBlueprintLibrary extends TileBuildCraft implements IInventory {
|
|||
BlueprintBase bpt = ItemBlueprint.getBlueprint(stack [1]);
|
||||
|
||||
if (bpt != null && uploadingPlayer != null) {
|
||||
RPCHandler.rpcPlayer(this, "receiveBlueprint", uploadingPlayer, bpt);
|
||||
RPCHandler.rpcPlayer(this, "downloadBlueprintToClient", uploadingPlayer, bpt);
|
||||
uploadingPlayer = null;
|
||||
|
||||
//BptPlayerIndex index = BuildCraftBuilders.getPlayerIndex(BuildersProxy.getOwner(this));
|
||||
|
||||
/*try {
|
||||
//index.addBlueprint(bpt.file);
|
||||
setCurrentPage(true);
|
||||
setCurrentPage(false);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
if (progressOut == 100 && stack[3] == null) {
|
||||
if (selected > -1 && selected < currentPage.size()) {
|
||||
BlueprintBase bpt = currentPage.get(selected);
|
||||
setInventorySlotContents(3, BuildCraftBuilders.getBptItemStack(
|
||||
stack[2].getItem(), 0, bpt.id.name));
|
||||
} else {
|
||||
setInventorySlotContents(3, BuildCraftBuilders.getBptItemStack(
|
||||
stack[2].getItem(), 0, null));
|
||||
}
|
||||
|
||||
setInventorySlotContents(2, null);
|
||||
RPCHandler.rpcPlayer(this, "requestSelectedBlueprint",
|
||||
downloadingPlayer);
|
||||
progressOut = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@RPC (RPCSide.CLIENT)
|
||||
public void receiveBlueprint (BlueprintBase bpt) {
|
||||
BuildCraftBuilders.clientDB.add(bpt);
|
||||
updateCurrentNames();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasCustomInventoryName() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@RPC (RPCSide.CLIENT)
|
||||
public void requestSelectedBlueprint () {
|
||||
if (selected > -1 && selected < currentPage.size()) {
|
||||
RPCHandler.rpcServer(this, "uploadBlueprintToServer",
|
||||
BuildCraftBuilders.clientDB
|
||||
.get(currentPage.get(selected)));
|
||||
} else {
|
||||
RPCHandler.rpcServer(this, "uploadBlueprintToServer", (Object) null);
|
||||
}
|
||||
}
|
||||
|
||||
@RPC (RPCSide.SERVER)
|
||||
public void uploadBlueprintToServer (BlueprintBase bpt) {
|
||||
if (bpt != null) {
|
||||
BuildCraftBuilders.serverDB.add(bpt);
|
||||
setInventorySlotContents(3, ItemBlueprint.getBlueprintItem(bpt));
|
||||
} else {
|
||||
setInventorySlotContents(3, stack [2]);
|
||||
}
|
||||
|
||||
setInventorySlotContents(2, null);
|
||||
|
||||
downloadingPlayer = null;
|
||||
}
|
||||
|
||||
@RPC (RPCSide.CLIENT)
|
||||
public void downloadBlueprintToClient (BlueprintBase bpt) {
|
||||
BuildCraftBuilders.clientDB.add(bpt);
|
||||
setCurrentPage(BuildCraftBuilders.clientDB.getPage (pageId));
|
||||
}
|
||||
|
||||
public void selectBlueprint (int index) {
|
||||
selected = index;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ import java.io.FilenameFilter;
|
|||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
@ -39,10 +38,11 @@ public class BlueprintDatabase {
|
|||
private final int bufferSize = 8192;
|
||||
private final String fileExt = ".bpt";
|
||||
private File blueprintFolder;
|
||||
private final static int PAGE_SIZE = 12;
|
||||
|
||||
private Set <BlueprintId> blueprintIds = new TreeSet<BlueprintId> ();
|
||||
private BlueprintId [] pages = new BlueprintId [0];
|
||||
|
||||
//private Map<BlueprintId, BlueprintMeta> blueprintMetas = new HashMap<BlueprintId, BlueprintMeta>();
|
||||
private Map<BlueprintId, BlueprintBase> loadedBlueprints = new WeakHashMap<BlueprintId, BlueprintBase>();
|
||||
|
||||
/**
|
||||
|
@ -57,36 +57,7 @@ public class BlueprintDatabase {
|
|||
blueprintFolder.mkdirs();
|
||||
}
|
||||
|
||||
loadIndex(); // TODO: load index in a thread
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a list of blueprint on a given page.
|
||||
*
|
||||
* FIXME: This returns blueprints in no particular order. We probably want
|
||||
* to have an ordered list of blueprint instead
|
||||
*/
|
||||
public List <BlueprintId> getPage (int pageId, int pageSize) {
|
||||
List <BlueprintId> result = new ArrayList<BlueprintId>();
|
||||
|
||||
int start = pageId * pageSize;
|
||||
int stop = (pageId + 1) * pageSize;
|
||||
|
||||
int i = 0;
|
||||
|
||||
for (BlueprintId id : blueprintIds) {
|
||||
i++;
|
||||
|
||||
if (i >= stop) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (i >= start) {
|
||||
result.add (id);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
loadIndex();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -118,6 +89,7 @@ public class BlueprintDatabase {
|
|||
|
||||
if (!blueprintIds.contains(id)) {
|
||||
blueprintIds.add(id);
|
||||
pages = blueprintIds.toArray(pages);
|
||||
}
|
||||
|
||||
if (!loadedBlueprints.containsKey(id)) {
|
||||
|
@ -178,12 +150,14 @@ public class BlueprintDatabase {
|
|||
|
||||
BlueprintId id = new BlueprintId();
|
||||
id.name = prefix;
|
||||
id.uniqueId = BlueprintId.toBytes (suffix);
|
||||
id.uniqueId = BlueprintId.toBytes (suffix.replaceAll(".bpt", ""));
|
||||
|
||||
if (!blueprintIds.contains(id)) {
|
||||
blueprintIds.add(id);
|
||||
}
|
||||
}
|
||||
|
||||
pages = blueprintIds.toArray(pages);
|
||||
}
|
||||
|
||||
private BlueprintBase load(final BlueprintId id) {
|
||||
|
@ -211,4 +185,22 @@ public class BlueprintDatabase {
|
|||
|
||||
return null;
|
||||
}
|
||||
|
||||
public ArrayList<BlueprintId> getPage (int pageId) {
|
||||
ArrayList<BlueprintId> result = new ArrayList<BlueprintId>();
|
||||
|
||||
if (pageId < 0) {
|
||||
return result;
|
||||
}
|
||||
|
||||
for (int i = pageId * PAGE_SIZE; i < pageId * PAGE_SIZE + PAGE_SIZE; ++i) {
|
||||
if (i < pages.length) {
|
||||
result.add(pages [i]);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
*/
|
||||
package buildcraft.builders.gui;
|
||||
|
||||
import buildcraft.builders.TileBlueprintLibrary;
|
||||
import buildcraft.core.gui.BuildCraftContainer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import buildcraft.builders.TileBlueprintLibrary;
|
||||
import buildcraft.core.gui.BuildCraftContainer;
|
||||
|
||||
public class ContainerBlueprintLibrary extends BuildCraftContainer {
|
||||
|
||||
|
@ -48,19 +48,21 @@ public class ContainerBlueprintLibrary extends BuildCraftContainer {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack slotClick(int slotNum, int mouseButton, int modifier, EntityPlayer player) {
|
||||
if (slotNum != 0) {
|
||||
return super.slotClick(slotNum, mouseButton, modifier, player);
|
||||
} else {
|
||||
// This record in the library the last player that activated the
|
||||
// upload slot
|
||||
// When downloading or uploading a blueprint, the server needs to know
|
||||
// who requested it. The way to do it so far is by recording the last
|
||||
// player that clicks on the slots. To be improved if the method is
|
||||
// not robust enough (e.g. what if the player is not logged anymore?
|
||||
// is that robust against race conditions? etc.)
|
||||
|
||||
if (slotNum == 0) {
|
||||
library.uploadingPlayer = player;
|
||||
|
||||
return super.slotClick(slotNum, mouseButton, modifier, player);
|
||||
} else if (slotNum == 2){
|
||||
library.downloadingPlayer = player;
|
||||
}
|
||||
|
||||
|
||||
return super.slotClick(slotNum, mouseButton, modifier, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -16,19 +16,19 @@ import org.lwjgl.opengl.GL11;
|
|||
|
||||
import buildcraft.BuildCraftBuilders;
|
||||
import buildcraft.builders.TileBlueprintLibrary;
|
||||
import buildcraft.builders.blueprints.BlueprintId;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.gui.GuiBuildCraft;
|
||||
import buildcraft.core.utils.StringUtils;
|
||||
|
||||
public class GuiBlueprintLibrary extends GuiBuildCraft {
|
||||
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation("buildcraft", DefaultProps.TEXTURE_PATH_GUI + "/library_rw.png");
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation(
|
||||
"buildcraft", DefaultProps.TEXTURE_PATH_GUI + "/library_rw.png");
|
||||
EntityPlayer player;
|
||||
TileBlueprintLibrary library;
|
||||
ContainerBlueprintLibrary container;
|
||||
boolean computeInput;
|
||||
//BptPlayerIndex index;
|
||||
|
||||
public GuiBlueprintLibrary(EntityPlayer player, TileBlueprintLibrary library) {
|
||||
super(new ContainerBlueprintLibrary(player, library), library, TEXTURE);
|
||||
this.player = player;
|
||||
|
@ -37,9 +37,6 @@ public class GuiBlueprintLibrary extends GuiBuildCraft {
|
|||
|
||||
this.library = library;
|
||||
container = (ContainerBlueprintLibrary) inventorySlots;
|
||||
|
||||
//index = BuildCraftBuilders.getPlayerIndex(player.getDisplayName());
|
||||
library.updateCurrentNames();
|
||||
}
|
||||
|
||||
private GuiButton nextPageButton;
|
||||
|
@ -81,20 +78,18 @@ public class GuiBlueprintLibrary extends GuiBuildCraft {
|
|||
fontRendererObj.drawString(title, getCenteredOffset(title), 6, 0x404040);
|
||||
|
||||
int c = 0;
|
||||
for (String bpt : library.currentBlueprint) {
|
||||
//String name = currentNames[i];
|
||||
|
||||
String name = bpt;
|
||||
for (BlueprintId bpt : library.currentPage) {
|
||||
String name = bpt.name;
|
||||
|
||||
if (name.length() > BuildCraftBuilders.MAX_BLUEPRINTS_NAME_SIZE) {
|
||||
name = name.substring(0, BuildCraftBuilders.MAX_BLUEPRINTS_NAME_SIZE);
|
||||
}
|
||||
|
||||
/*if (i == library.selected) {
|
||||
if (c == library.selected) {
|
||||
int l1 = 8;
|
||||
int i2 = 24;
|
||||
drawGradientRect(l1, i2 + 9 * c, l1 + 88, i2 + 9 * (c + 1), 0x80ffffff, 0x80ffffff);
|
||||
}*/
|
||||
}
|
||||
|
||||
fontRendererObj.drawString(name, 9, 25 + 9 * c, 0x404040);
|
||||
c++;
|
||||
|
@ -156,13 +151,9 @@ public class GuiBlueprintLibrary extends GuiBuildCraft {
|
|||
int ySlot = (y - 24) / 9;
|
||||
|
||||
if (ySlot >= 0 && ySlot <= 11) {
|
||||
/*if (ySlot < library.currentNames.length) {
|
||||
PacketPayloadArrays payload = new PacketPayloadArrays();
|
||||
payload.intPayload = new int[]{ySlot};
|
||||
PacketLibraryAction packet = new PacketLibraryAction(PacketIds.LIBRARY_SELECT, library.xCoord, library.yCoord, library.zCoord);
|
||||
packet.actionId = ySlot;
|
||||
CoreProxy.proxy.sendToServer(packet.getPacket());
|
||||
}*/
|
||||
if (ySlot < library.currentPage.size()) {
|
||||
library.selectBlueprint(ySlot);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
/**
|
||||
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
|
||||
* http://www.mod-buildcraft.com
|
||||
*
|
||||
* BuildCraft is distributed under the terms of the Minecraft Mod Public
|
||||
* License 1.0, or MMPL. Please check the contents of the license located in
|
||||
* http://www.mod-buildcraft.com/MMPL-1.0.txt
|
||||
*/
|
||||
package buildcraft.builders.network;
|
||||
|
||||
import buildcraft.core.network.PacketCoordinates;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
public class PacketLibraryAction extends PacketCoordinates {
|
||||
|
||||
public int actionId;
|
||||
|
||||
public PacketLibraryAction() {
|
||||
}
|
||||
|
||||
public PacketLibraryAction(int packetId, int x, int y, int z) {
|
||||
super(packetId, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeData(ByteBuf data) {
|
||||
data.writeInt(actionId);
|
||||
super.writeData(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readData(ByteBuf data) {
|
||||
actionId = data.readInt();
|
||||
super.readData(data);
|
||||
}
|
||||
}
|
|
@ -10,7 +10,6 @@ package buildcraft.core.network;
|
|||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import buildcraft.builders.network.PacketLibraryAction;
|
||||
import buildcraft.transport.network.PacketFluidUpdate;
|
||||
import buildcraft.transport.network.PacketGateExpansionMap;
|
||||
import buildcraft.transport.network.PacketPipeTransportItemStack;
|
||||
|
@ -26,19 +25,18 @@ public class BuildCraftChannelHandler extends FMLIndexedMessageToMessageCodec<Bu
|
|||
addDiscriminator(1, PacketTileState.class);
|
||||
addDiscriminator(2, PacketCoordinates.class);
|
||||
addDiscriminator(3, PacketFluidUpdate.class);
|
||||
addDiscriminator(4, PacketLibraryAction.class);
|
||||
addDiscriminator(5, PacketNBT.class);
|
||||
addDiscriminator(6, PacketPowerUpdate.class);
|
||||
addDiscriminator(7, PacketSlotChange.class);
|
||||
addDiscriminator(8, PacketGateExpansionMap.class);
|
||||
addDiscriminator(9, PacketGuiReturn.class);
|
||||
addDiscriminator(10, PacketGuiWidget.class);
|
||||
addDiscriminator(11, PacketPipeTransportItemStack.class);
|
||||
addDiscriminator(12, PacketPipeTransportItemStackRequest.class);
|
||||
addDiscriminator(13, PacketPipeTransportTraveler.class);
|
||||
addDiscriminator(14, PacketUpdate.class);
|
||||
addDiscriminator(15, PacketRPCTile.class);
|
||||
addDiscriminator(16, PacketRPCPipe.class);
|
||||
addDiscriminator(4, PacketNBT.class);
|
||||
addDiscriminator(5, PacketPowerUpdate.class);
|
||||
addDiscriminator(6, PacketSlotChange.class);
|
||||
addDiscriminator(7, PacketGateExpansionMap.class);
|
||||
addDiscriminator(8, PacketGuiReturn.class);
|
||||
addDiscriminator(9, PacketGuiWidget.class);
|
||||
addDiscriminator(10, PacketPipeTransportItemStack.class);
|
||||
addDiscriminator(11, PacketPipeTransportItemStackRequest.class);
|
||||
addDiscriminator(12, PacketPipeTransportTraveler.class);
|
||||
addDiscriminator(13, PacketUpdate.class);
|
||||
addDiscriminator(14, PacketRPCTile.class);
|
||||
addDiscriminator(15, PacketRPCPipe.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -38,7 +38,6 @@ public class PacketIds {
|
|||
public static final int REFINERY_FILTER_SET = 50;
|
||||
|
||||
public static final int ARCHITECT_NAME = 60;
|
||||
public static final int LIBRARY_SELECT = 62;
|
||||
|
||||
public static final int ADVANCED_WORKBENCH_SETSLOT = 70;
|
||||
public static final int SELECTION_ADVANCED_WORKBENCH = 71;
|
||||
|
|
Loading…
Add table
Reference in a new issue