public static BraceBase syncBraceBaseFromNBT(NBTTagCompound nbt, World world, int id) { BraceBase base = BB_DataLists.getWorldData(world).getBraceBaseByID(id); if (base != null) { mitoLogger.info("syncsync33 " + ((Brace) base).texture.ordinal()); base.readFromNBT(nbt); mitoLogger.info("syncsync34 " + ((Brace) base).texture.ordinal()); } else { PacketHandler.INSTANCE.sendToAll(new BB_PacketProcessor(Mode.DELETE, base)); mitoLogger.warn("Skipping Entity with id " + nbt.getString("id")); } return base; }
public static BraceBase createBraceBaseFromNBT(NBTTagCompound nbt, World world, int id) { BraceBase iobj = null; Class oclass = null; try { if (nbt.getString("id") == null) { mitoLogger.info("id is null"); } else { // mitoLogger.info("id is " + nbt.getString("id")); } oclass = (Class) stringToClassMapping.get(nbt.getString("id")); if (oclass == null) { // mitoLogger.info("class is null"); } if (oclass != null) { iobj = (BraceBase) oclass.getConstructor(new Class[] {World.class}).newInstance(new Object[] {world}); if (id != -1) { iobj.BBID = id; } } } catch (Exception exception) { exception.printStackTrace(); } if (iobj != null) { try { iobj.readFromNBT(nbt); } catch (Exception e) { FMLLog.log( Level.ERROR, e, "An Entity %s(%s) has thrown an exception during loading, its state cannot be restored. Report this to the mod author", nbt.getString("id"), oclass.getName()); iobj = null; } } else { mitoLogger.warn("Skipping Entity with id " + nbt.getString("id")); } return iobj; }
public static BB_Render getBraceBaseRender(BraceBase p_75621_0_) { return classToRenderMapping.get(p_75621_0_.getClass()); }
/** Gets the string representation of a specific entity. */ public static String getBraceBaseString(BraceBase p_75621_0_) { return classToStringMapping.get(p_75621_0_.getClass()); }