use of cpw.mods.fml.relauncher.SideOnly in project BetterStorage by copygirl.
the class TileLockableDoor method registerBlockIcons.
@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
iconUpper = iconRegister.registerIcon("door_iron_upper");
iconLower = iconRegister.registerIcon("door_iron_lower");
iconUpperFlipped = new IconFlipped(iconUpper, true, false);
iconLowerFlipped = new IconFlipped(iconLower, true, false);
blockIcon = iconUpper;
}
use of cpw.mods.fml.relauncher.SideOnly in project MineFactoryReloaded by powercrystals.
the class ItemSafariNet method addInformation.
@Override
@SideOnly(Side.CLIENT)
@SuppressWarnings({ "unchecked", "rawtypes" })
public void addInformation(ItemStack stack, EntityPlayer player, List infoList, boolean advancedTooltips) {
if (stack.getTagCompound() == null) {
return;
}
if (stack.itemID == MineFactoryReloadedCore.safariNetJailerItem.itemID) {
infoList.add("Released creatures don't despawn normally");
}
if (stack.getTagCompound().getBoolean("hide")) {
infoList.add("It is a mystery");
} else {
// See Entity.getEntityName()
infoList.add(StatCollector.translateToLocal("entity." + stack.getTagCompound().getString("id") + ".name"));
Class c = (Class) EntityList.stringToClassMapping.get(stack.getTagCompound().getString("id"));
if (c == null) {
return;
}
for (ISafariNetHandler handler : MFRRegistry.getSafariNetHandlers()) {
if (handler.validFor().isAssignableFrom(c)) {
handler.addInformation(stack, player, infoList, advancedTooltips);
}
}
}
}
use of cpw.mods.fml.relauncher.SideOnly in project MineFactoryReloaded by powercrystals.
the class ItemBlockFactoryMachine method addInformation.
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List info, boolean par4) {
NBTTagCompound c = stack.getTagCompound();
if (getBlockID() == Machine.DeepStorageUnit.getBlockId() && stack.getItemDamage() == Machine.DeepStorageUnit.getMeta() && c != null) {
int storedId = c.getInteger("storedId");
int storedMeta = c.getInteger("storedMeta");
int storedQuantity = c.getInteger("storedQuantity");
if (storedId > 0 & storedQuantity > 0) {
ItemStack storedItem = new ItemStack(storedId, 1, storedMeta);
info.add("Contains " + storedQuantity + " " + Item.itemsList[storedId].getItemDisplayName(storedItem) + " (" + storedId + ":" + storedMeta + ")");
} else {
// info.add("Empty");
}
} else if (getBlockID() == Machine.BioFuelGenerator.getBlockId() && stack.getItemDamage() == Machine.BioFuelGenerator.getMeta()) {
info.add("Produces MJ only.");
}
}
use of cpw.mods.fml.relauncher.SideOnly in project MineFactoryReloaded by powercrystals.
the class ItemBlockRedNetLogic method getSubItems.
@SuppressWarnings({ "rawtypes", "unchecked" })
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(int itemId, CreativeTabs creativeTab, List subTypes) {
subTypes.add(new ItemStack(itemId, 1, 0));
subTypes.add(manual);
}
use of cpw.mods.fml.relauncher.SideOnly in project MineFactoryReloaded by powercrystals.
the class WorldServerProxy method finishSetup.
@Override
@SideOnly(Side.CLIENT)
protected void finishSetup() {
ArrayList<String> q = new ArrayList<String>();
// forge-added, no reobf
q.add("finishSetup");
// q.addAll(Arrays.asList(ObfuscationReflectionHelper.remapFieldNames("net.minecraft.world.World", new String[]{""})));
Method callable = ReflectionHelper.findMethod(World.class, this.proxiedWorld, q.toArray(new String[q.size()]));
try {
callable.invoke(this.proxiedWorld);
} catch (Throwable e) {
}
}
Aggregations