use of cpw.mods.fml.relauncher.SideOnly in project PneumaticCraft by MineMaarten.
the class Minigun method render.
@SideOnly(Side.CLIENT)
public void render(double x, double y, double z, double gunRadius) {
if (isMinigunActivated() && getMinigunSpeed() == MAX_GUN_SPEED && gunAimedAtTarget && attackTarget != null) {
GL11.glPushMatrix();
GL11.glScaled(1, 1, 1);
GL11.glTranslated(-x, -y, -z);
GL11.glDisable(GL11.GL_TEXTURE_2D);
// GL11.glDisable(GL11.GL_LIGHTING);
RenderUtils.glColorHex(0xFF000000 | getAmmoColor());
for (int i = 0; i < 5; i++) {
Vec3 vec = Vec3.createVectorHelper(attackTarget.posX - x, attackTarget.posY - y, attackTarget.posZ - z).normalize();
minigunFire.startX = x + vec.xCoord * gunRadius;
minigunFire.startY = y + vec.yCoord * gunRadius;
minigunFire.startZ = z + vec.zCoord * gunRadius;
minigunFire.endX = attackTarget.posX + rand.nextDouble() - 0.5;
minigunFire.endY = attackTarget.posY + attackTarget.height / 2 + rand.nextDouble() - 0.5;
minigunFire.endZ = attackTarget.posZ + rand.nextDouble() - 0.5;
minigunFire.render();
}
GL11.glColor4d(1, 1, 1, 1);
// GL11.glEnable(GL11.GL_LIGHTING);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glPopMatrix();
}
}
use of cpw.mods.fml.relauncher.SideOnly in project PneumaticCraft by MineMaarten.
the class ItemGunAmmo method addInformation.
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List infoList, boolean extraInfo) {
infoList.add(I18n.format("gui.tooltip.gunAmmo.combineWithPotion"));
ItemStack potion = getPotion(stack);
if (potion != null) {
potion.getItem().addInformation(potion, player, infoList, extraInfo);
if (infoList.size() > 2)
infoList.set(2, I18n.format("gui.tooltip.gunAmmo") + " " + infoList.get(2));
}
super.addInformation(stack, player, infoList, extraInfo);
}
use of cpw.mods.fml.relauncher.SideOnly in project Minechem by iopleke.
the class MoleculeItem method addInformation.
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add("\u00A79" + getFormulaWithSubscript(itemstack));
RadiationEnum radioactivity = RadiationInfo.getRadioactivity(itemstack);
String radioactivityColor = radioactivity.getColour();
String radioactiveName = MinechemUtil.getLocalString("element.property." + radioactivity.name(), true);
String timeLeft = "";
if (RadiationInfo.getRadioactivity(itemstack) != RadiationEnum.stable && itemstack.getTagCompound() != null) {
long worldTime = player.worldObj.getTotalWorldTime();
timeLeft = TimeHelper.getTimeFromTicks(RadiationInfo.getRadioactivity(itemstack).getLife() - (worldTime - itemstack.getTagCompound().getLong("decayStart")));
}
list.add(radioactivityColor + radioactiveName + (timeLeft.equals("") ? "" : " (" + timeLeft + ")"));
list.add(getRoomState(itemstack));
MoleculeEnum molecule = MoleculeEnum.getById(itemstack.getItemDamage());
if (PharmacologyEffectRegistry.hasEffect(molecule) && Settings.displayMoleculeEffects) {
if (PolytoolHelper.getTypeFromElement(ElementItem.getElement(itemstack), 1) != null) {
// Polytool Detail
if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) {
for (PharmacologyEffect effect : PharmacologyEffectRegistry.getEffects(molecule)) {
list.add(effect.getColour() + effect.toString());
}
} else {
list.add(EnumColour.DARK_GREEN + MinechemUtil.getLocalString("effect.information", true));
}
}
}
}
use of cpw.mods.fml.relauncher.SideOnly in project PneumaticCraft by MineMaarten.
the class ProgWidgetBlockCondition method getOptionWindow.
@Override
@SideOnly(Side.CLIENT)
public GuiScreen getOptionWindow(GuiProgrammer guiProgrammer) {
return new GuiProgWidgetCondition(this, guiProgrammer) {
@Override
public void initGui() {
super.initGui();
addWidget(new GuiCheckBox(500, guiLeft + 5, guiTop + 60, 0xFF000000, I18n.format("gui.progWidget.conditionBlock.checkForAir")).setChecked(checkingForAir).setTooltip(I18n.format("gui.progWidget.conditionBlock.checkForAir.tooltip")));
addWidget(new GuiCheckBox(501, guiLeft + 5, guiTop + 72, 0xFF000000, I18n.format("gui.progWidget.conditionBlock.checkForLiquids")).setChecked(checkingForLiquids).setTooltip(I18n.format("gui.progWidget.conditionBlock.checkForLiquids.tooltip")));
}
@Override
protected boolean requiresNumber() {
return false;
}
@Override
protected boolean isSidedWidget() {
return false;
}
@Override
public void actionPerformed(IGuiWidget widget) {
if (widget.getID() == 500)
checkingForAir = !checkingForAir;
if (widget.getID() == 501)
checkingForLiquids = !checkingForLiquids;
else
super.actionPerformed(widget);
}
};
}
use of cpw.mods.fml.relauncher.SideOnly in project ArsMagica2 by Mithion.
the class BlockManaBattery method getSubBlocks.
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List) {
ItemStack stack = new ItemStack(this);
par3List.add(stack);
for (PowerTypes type : PowerTypes.all()) {
stack = new ItemStack(this, 1, type.ID());
stack.stackTagCompound = new NBTTagCompound();
stack.stackTagCompound.setFloat("mana_battery_charge", new TileEntityManaBattery().getCapacity());
stack.stackTagCompound.setInteger("mana_battery_powertype", type.ID());
par3List.add(stack);
}
}
Aggregations