use of cpw.mods.fml.relauncher.SideOnly in project PneumaticCraft by MineMaarten.
the class MainHelmetHandler method getAnimatedStat.
@Override
@SideOnly(Side.CLIENT)
public IGuiAnimatedStat getAnimatedStat() {
if (powerStat == null) {
Minecraft minecraft = Minecraft.getMinecraft();
ScaledResolution sr = new ScaledResolution(minecraft, minecraft.displayWidth, minecraft.displayHeight);
powerStat = new GuiAnimatedStat(null, "Helmet Pressure: ", "", powerStatX != -1 ? powerStatX : sr.getScaledWidth() - 2, powerStatY, 0x3000AA00, null, powerStatLeftSided);
powerStat.setMinDimensionsAndReset(0, 0);
powerStat.openWindow();
}
return powerStat;
}
use of cpw.mods.fml.relauncher.SideOnly in project PneumaticCraft by MineMaarten.
the class BlockPneumaticCraft method addInformation.
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List curInfo, boolean extraInfo) {
if (PneumaticCraft.proxy.isSneakingInGui()) {
TileEntity te = createNewTileEntity(player.worldObj, 0);
if (te instanceof TileEntityPneumaticBase) {
float pressure = ((TileEntityPneumaticBase) te).DANGER_PRESSURE;
curInfo.add(EnumChatFormatting.YELLOW + I18n.format("gui.tooltip.maxPressure", pressure));
}
}
String info = "gui.tab.info." + stack.getUnlocalizedName();
String translatedInfo = I18n.format(info);
if (!translatedInfo.equals(info)) {
if (PneumaticCraft.proxy.isSneakingInGui()) {
translatedInfo = EnumChatFormatting.AQUA + translatedInfo.substring(2);
if (!Loader.isModLoaded(ModIds.IGWMOD))
translatedInfo += " \\n \\n" + I18n.format("gui.tab.info.assistIGW");
curInfo.addAll(PneumaticCraftUtils.convertStringIntoList(translatedInfo, 60));
} else {
curInfo.add(EnumChatFormatting.AQUA + I18n.format("gui.tooltip.sneakForInfo"));
}
}
}
use of cpw.mods.fml.relauncher.SideOnly in project PneumaticCraft by MineMaarten.
the class BlockPressureTube method randomDisplayTick.
@Override
@SideOnly(Side.CLIENT)
public /**
* A randomly called display update to be able to add particles or other items for display
*/
void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) {
TileEntity te = par1World.getTileEntity(par2, par3, par4);
if (te instanceof TileEntityPressureTube) {
TileEntityPressureTube tePt = (TileEntityPressureTube) te;
int l = 0;
for (TubeModule module : tePt.modules) if (module != null)
l = Math.max(l, module.getRedstoneLevel());
if (l > 0) {
// for(int i = 0; i < 4; i++){
double d0 = par2 + 0.5D + (par5Random.nextFloat() - 0.5D) * 0.5D;
double d1 = par3 + 0.5D + (par5Random.nextFloat() - 0.5D) * 0.5D;
double d2 = par4 + 0.5D + (par5Random.nextFloat() - 0.5D) * 0.5D;
float f = l / 15.0F;
float f1 = f * 0.6F + 0.4F;
float f2 = f * f * 0.7F - 0.5F;
float f3 = f * f * 0.6F - 0.7F;
if (f2 < 0.0F) {
f2 = 0.0F;
}
if (f3 < 0.0F) {
f3 = 0.0F;
}
// PacketDispatcher.sendPacketToAllPlayers(PacketHandlerPneumaticCraft.spawnParticle("reddust",
// d0, d1, d2, (double)f1, (double)f2, (double)f3));
par1World.spawnParticle("reddust", d0, d1, d2, f1, f2, f3);
// }
}
}
}
use of cpw.mods.fml.relauncher.SideOnly in project PneumaticCraft by MineMaarten.
the class RenderProgressingLine method render.
@SideOnly(Side.CLIENT)
public void render() {
Tessellator tess = Tessellator.instance;
tess.startDrawing(GL11.GL_LINES);
tess.addVertex(startX, startY, startZ);
tess.addVertex(startX + (endX - startX) * progress, startY + (endY - startY) * progress, startZ + (endZ - startZ) * progress);
tess.draw();
}
use of cpw.mods.fml.relauncher.SideOnly in project PneumaticCraft by MineMaarten.
the class ItemPneumaticArmor method getSubItems.
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item par1, CreativeTabs tab, List subItems) {
subItems.add(new ItemStack(this));
ItemStack chargedStack = new ItemStack(this);
addAir(chargedStack, PneumaticValues.PNEUMATIC_HELMET_VOLUME * 10);
subItems.add(chargedStack);
}
Aggregations