Java Code Examples for net.minecraftforge.fml.relauncher.SideOnly

The following are top voted examples for showing how to use net.minecraftforge.fml.relauncher.SideOnly. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: Clef   File: ItemInstrument.java   Source Code and License 6 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void addInformation(ItemStack is, @Nullable World worldIn, List<String> list, ITooltipFlag flag)
{
    NBTTagCompound tag = is.getTagCompound();
    if(tag != null)
    {
        Instrument instrument = InstrumentLibrary.getInstrumentByName(tag.getString("itemName"));
        if(instrument != null)
        {
            list.add(I18n.translateToLocal("item.clef.instrument." + instrument.info.itemName + ".desc"));
            list.add(I18n.translateToLocal(instrument.info.twoHanded && Clef.config.allowOneHandedTwoHandedInstrumentUse == 0 ? "clef.item.twoHanded" : "clef.item.oneHanded"));
            if(GuiScreen.isShiftKeyDown())
            {
                list.add("");
                list.add(I18n.translateToLocal("clef.item.packName") + ": " + instrument.packInfo.packName);
                list.add(I18n.translateToLocal("clef.item.itemName") + ": " + instrument.info.itemName);
            }
        }
    }
}
 
Example 2
Project: Device-Mod-Apps   File: Utils.java   Source Code and License 6 votes vote down vote up
@SideOnly(Side.CLIENT)
public static void pressUnicode(Robot r, int key_code) {
    r.keyPress(KeyEvent.VK_ALT);
    for(int i = 3; i >= 0; --i) {
        int numpad_kc = key_code / (int) (Math.pow(10, i)) % 10 + KeyEvent.VK_NUMPAD0;
        r.keyPress(numpad_kc);
        r.keyRelease(numpad_kc);
    }
    r.keyRelease(KeyEvent.VK_ALT);
}
 
Example 3
Project: CustomWorldGen   File: BlockFalling.java   Source Code and License 6 votes vote down vote up
@SideOnly(Side.CLIENT)
public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, Random rand)
{
    if (rand.nextInt(16) == 0)
    {
        BlockPos blockpos = pos.down();

        if (canFallThrough(worldIn.getBlockState(blockpos)))
        {
            double d0 = (double)((float)pos.getX() + rand.nextFloat());
            double d1 = (double)pos.getY() - 0.05D;
            double d2 = (double)((float)pos.getZ() + rand.nextFloat());
            worldIn.spawnParticle(EnumParticleTypes.FALLING_DUST, d0, d1, d2, 0.0D, 0.0D, 0.0D, new int[] {Block.getStateId(stateIn)});
        }
    }
}
 
Example 4
Project: CustomWorldGen   File: EntityArrow.java   Source Code and License 6 votes vote down vote up
/**
 * Updates the velocity of the entity to a new value.
 */
@SideOnly(Side.CLIENT)
public void setVelocity(double x, double y, double z)
{
    this.motionX = x;
    this.motionY = y;
    this.motionZ = z;

    if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
    {
        float f = MathHelper.sqrt_double(x * x + z * z);
        this.rotationPitch = (float)(MathHelper.atan2(y, (double)f) * (180D / Math.PI));
        this.rotationYaw = (float)(MathHelper.atan2(x, z) * (180D / Math.PI));
        this.prevRotationPitch = this.rotationPitch;
        this.prevRotationYaw = this.rotationYaw;
        this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
        this.ticksInGround = 0;
    }
}
 
Example 5
Project: CustomWorldGen   File: BlockLiquid.java   Source Code and License 6 votes vote down vote up
@SideOnly(Side.CLIENT)
public boolean shouldRenderSides(IBlockAccess blockAccess, BlockPos pos)
{
    for (int i = -1; i <= 1; ++i)
    {
        for (int j = -1; j <= 1; ++j)
        {
            IBlockState iblockstate = blockAccess.getBlockState(pos.add(i, 0, j));

            if (iblockstate.getMaterial() != this.blockMaterial && !iblockstate.isFullBlock())
            {
                return true;
            }
        }
    }

    return false;
}
 
Example 6
Project: UniversalRemote   File: ServerInjector.java   Source Code and License 6 votes vote down vote up
@SideOnly(Side.SERVER)
public static void InjectDedicated(MinecraftServer server)
{
	PlayerList playerList = server.getPlayerList();

	try {
		if (playerList instanceof DedicatedPlayerList)
		{
			server.setPlayerList(new HookedDedicatedPlayerList((DedicatedPlayerList)playerList));
		}
		else
		{
			// uh ho...
			Util.logger.error("Unable to inject custom PlayerList into server due to unknown type! PlayerList was of type {}.", playerList.getClass().toString());
		}
	} catch (IllegalAccessException | NoSuchFieldException | SecurityException e) {
		Util.logger.logException("Exception trying to inject custom PlayerList into server!", e);
	}
}
 
Example 7
Project: Mods   File: SpinToWin.java   Source Code and License 6 votes vote down vote up
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent eventArgs) {
	// TF2weapons.syncConfig();
	if (eventArgs.getModID().equals("rafradek_spin")) {
		syncConfig();
	}
}
 
Example 8
Project: BetterBeginningsReborn   File: ContainerCampfire.java   Source Code and License 6 votes vote down vote up
@SideOnly(Side.CLIENT)
public void updateProgressBar(int barId, int newValue)
{
	if (barId == 0)
	{
		tileEntity.cookTime = newValue;
	}
	if (barId == 1)
	{
		tileEntity.burnTime = newValue;
	}
	if (barId == 2)
	{
		tileEntity.currentItemBurnTime = newValue;
	}
	if (barId == 3)
	{
		tileEntity.decayTime = newValue;
	}
}
 
Example 9
Project: OpenFlexiTrack   File: DefaultSleeperType.java   Source Code and License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void render(float width) {
	//Render ties using current texture but with dynamic width.
	//This will cause stretching of the texture, but it ensures uniformity for all sizes.
	GL11.glBegin(GL11.GL_QUADS);
	renderTieBottom(width);
	renderTieTop(width);
	renderTieFront(width);
	renderTieRear(width);
	renderTieLeft(width);
	renderTieRight(width);
	GL11.glEnd();
}
 
Example 10
Project: ThermionicsWorld   File: BlockVarieties.java   Source Code and License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void getSubBlocks(CreativeTabs tab, NonNullList<ItemStack> list) {
	if (tab!=this.getCreativeTabToDisplayOn()) return;
	
    for (int i=0; i<16; i++) {
        list.add(new ItemStack(ItemBlock.getItemFromBlock(this), 1, i));
    }
}
 
Example 11
Project: Lithium-Forge   File: LithiumMod.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@EventHandler
public void init(FMLInitializationEvent event) {
	overlayRenderer = new LithiumOverlay();
	MinecraftForge.EVENT_BUS.register(NetworkEventHandler.INSTANCE);
	MinecraftForge.EVENT_BUS.register(overlayRenderer);
	network = NetworkRegistry.INSTANCE.newSimpleChannel(LithiumMod.CHANNELNAME);
	Handle.setPacketHandler(new PacketHandlerImpl());
	getSimpleNetworkWrapper().registerMessage(Handle.class, LithiumMessage.class, 0, Side.CLIENT);

}
 
Example 12
Project: CustomWorldGen   File: BlockStoneSlab.java   Source Code and License 5 votes vote down vote up
/**
 * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
 */
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item itemIn, CreativeTabs tab, List<ItemStack> list)
{
    if (itemIn != Item.getItemFromBlock(Blocks.DOUBLE_STONE_SLAB))
    {
        for (BlockStoneSlab.EnumType blockstoneslab$enumtype : BlockStoneSlab.EnumType.values())
        {
            if (blockstoneslab$enumtype != BlockStoneSlab.EnumType.WOOD)
            {
                list.add(new ItemStack(itemIn, 1, blockstoneslab$enumtype.getMetadata()));
            }
        }
    }
}
 
Example 13
Project: CustomWorldGen   File: ForgeNetworkHandler.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
private static void addClientHandlers()
{
    FMLEmbeddedChannel clientChannel = channelPair.get(Side.CLIENT);
    String handlerName = clientChannel.findChannelHandlerNameForType(ForgeRuntimeCodec.class);
    clientChannel.pipeline().addAfter(handlerName, "DimensionHandler", new DimensionMessageHandler());
    clientChannel.pipeline().addAfter(handlerName, "FluidIdRegistryHandler", new FluidIdRegistryMessageHandler());
}
 
Example 14
Project: Randores2   File: RandoresClientListener.java   Source Code and License 5 votes vote down vote up
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void onModelLoad(ModelRegistryEvent ev) {
    RandoresBlocks.registerModels();
    RandoresItems.registerModels();
    CraftingBlocks.registerModels();
    CraftingItems.registerModels();
}
 
Example 15
Project: CustomWorldGen   File: ChunkCache.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public int getLightFor(EnumSkyBlock p_175628_1_, BlockPos pos)
{
    if (pos.getY() >= 0 && pos.getY() < 256)
    {
        int i = (pos.getX() >> 4) - this.chunkX;
        int j = (pos.getZ() >> 4) - this.chunkZ;
        if (i < 0 || i >= chunkArray.length || j < 0 || j >= chunkArray[i].length) return p_175628_1_.defaultLightValue;
        return this.chunkArray[i][j].getLightFor(p_175628_1_, pos);
    }
    else
    {
        return p_175628_1_.defaultLightValue;
    }
}
 
Example 16
Project: Adventurers-Toolbox   File: Toolbox.java   Source Code and License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public ItemStack getTabIconItem() {
	ItemStack stack = new ItemStack(ModItems.pickaxe);
	NBTTagCompound tag = new NBTTagCompound();
	tag.setString(IHeadTool.HEAD_TAG, "iron");
	tag.setString(IHaftTool.HAFT_TAG, "wood");
	tag.setString(IHandleTool.HANDLE_TAG, "leather");
	tag.setString(IAdornedTool.ADORNMENT_TAG, "diamond");
	stack.setTagCompound(tag);
	return stack;
}
 
Example 17
Project: PurificatiMagicae   File: IfRegistry.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public void setupJei()
{
    for(IfEntry entr : entries)
    {
        for(IIfPage p : entr.getPages())
        {
            if(p instanceof IfPageCrafting)
            {
                for(Supplied<CraftingControl> sup : ((IfPageCrafting) p).getCrafts())
                    sup.supply();
            }
        }
    }
}
 
Example 18
Project: CustomWorldGen   File: EntityFishHook.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public EntityFishHook(World worldIn, double x, double y, double z, EntityPlayer anglerIn)
{
    this(worldIn);
    this.setPosition(x, y, z);
    this.ignoreFrustumCheck = true;
    this.angler = anglerIn;
    anglerIn.fishEntity = this;
}
 
Example 19
Project: Mods   File: BlockAmmoFurnace.java   Source Code and License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
@SuppressWarnings("incomplete-switch")
public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, Random rand) {
	if (stateIn.getValue(BURNING)) {
		EnumFacing enumfacing = stateIn.getValue(FACING);
		double d0 = pos.getX() + 0.5D;
		double d1 = pos.getY() + rand.nextDouble() * 6.0D / 16.0D;
		double d2 = pos.getZ() + 0.5D;
		double d3 = 0.52D;
		double d4 = rand.nextDouble() * 0.6D - 0.3D;

		if (rand.nextDouble() < 0.1D)
			worldIn.playSound(pos.getX() + 0.5D, pos.getY(), pos.getZ() + 0.5D,
					SoundEvents.BLOCK_FURNACE_FIRE_CRACKLE, SoundCategory.BLOCKS, 1.0F, 1.0F, false);

		switch (enumfacing) {
		case WEST:
			worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 - 0.52D, d1, d2 + d4, 0.0D, 0.0D, 0.0D,
					new int[0]);
			worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 - 0.52D, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
			break;
		case EAST:
			worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + 0.52D, d1, d2 + d4, 0.0D, 0.0D, 0.0D,
					new int[0]);
			worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + 0.52D, d1, d2 + d4, 0.0D, 0.0D, 0.0D, new int[0]);
			break;
		case NORTH:
			worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d4, d1, d2 - 0.52D, 0.0D, 0.0D, 0.0D,
					new int[0]);
			worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d4, d1, d2 - 0.52D, 0.0D, 0.0D, 0.0D, new int[0]);
			break;
		case SOUTH:
			worldIn.spawnParticle(EnumParticleTypes.SMOKE_NORMAL, d0 + d4, d1, d2 + 0.52D, 0.0D, 0.0D, 0.0D,
					new int[0]);
			worldIn.spawnParticle(EnumParticleTypes.FLAME, d0 + d4, d1, d2 + 0.52D, 0.0D, 0.0D, 0.0D, new int[0]);
		}
	}
}
 
Example 20
Project: ExPetrum   File: BlockVegetation.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void getSubBlocks(CreativeTabs tab, NonNullList<ItemStack> list)
{
	for (int i = 0; i < 4; ++i)
	{
		list.add(new ItemStack(this, 1, i));
	}
}
 
Example 21
Project: DankNull   File: ItemDankNullPanel.java   Source Code and License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, NonNullList<ItemStack> subItems) {
	//if (isInCreativeTab(tab)) {
	for (int i = 0; i < 6; i++) {
		subItems.add(new ItemStack(item, 1, i));
	}
	//}
}
 
Example 22
Project: Thermionics   File: Thermionics.java   Source Code and License 5 votes vote down vote up
@SubscribeEvent
@SideOnly(Side.CLIENT)
public void onFovModifier(EntityViewRenderEvent.FOVModifier event) {
	if (event.getEntity() instanceof EntityLivingBase) {
		EntityLivingBase living = (EntityLivingBase)event.getEntity();
		if (living.getActivePotionEffect(Thermionics.POTION_EFFORTLESS_SPEED)!=null) {
			event.setFOV( Minecraft.getMinecraft().gameSettings.fovSetting );
		}
	}
}
 
Example 23
Project: CustomWorldGen   File: BlockDoublePlant.java   Source Code and License 5 votes vote down vote up
/**
 * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
 */
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item itemIn, CreativeTabs tab, List<ItemStack> list)
{
    for (BlockDoublePlant.EnumPlantType blockdoubleplant$enumplanttype : BlockDoublePlant.EnumPlantType.values())
    {
        list.add(new ItemStack(itemIn, 1, blockdoubleplant$enumplanttype.getMeta()));
    }
}
 
Example 24
Project: CustomWorldGen   File: BlockCarpet.java   Source Code and License 5 votes vote down vote up
/**
 * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
 */
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item itemIn, CreativeTabs tab, List<ItemStack> list)
{
    for (int i = 0; i < 16; ++i)
    {
        list.add(new ItemStack(itemIn, 1, i));
    }
}
 
Example 25
Project: ExPetrum   File: BlockWorkedBoulder.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void getSubBlocks(CreativeTabs tab, NonNullList<ItemStack> list)
{
	for (int i = 0; i < EnumRockClass.values().length; ++i)
	{
		list.add(new ItemStack(this, 1, i));
	}
}
 
Example 26
Project: Industrial-Foregoing   File: ContributorsCatEarsRender.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public void spookyScarySkeletons() {
    IBakedModel pumpkin = Minecraft.getMinecraft().getBlockRendererDispatcher().getModelForState(Minecraft.getMinecraft().world.getTotalWorldTime() % 200 < 100 ? Blocks.LIT_PUMPKIN.getDefaultState() : Blocks.PUMPKIN.getDefaultState());
    GlStateManager.rotate(90, 0, -1, 0);
    GlStateManager.translate(0.08, 0.485, -0.1);
    GlStateManager.scale(2 / 16D, 3 / 16D, 2 / 16D);

    Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelRenderer().renderModelBrightnessColor(pumpkin, 0.5f, 255, 255, 255);
    GlStateManager.translate(-0.08 * 28, 0, 0);
    Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelRenderer().renderModelBrightnessColor(pumpkin, 0.5f, 255, 255, 255);
}
 
Example 27
Project: PurificatiMagicae   File: BlockCrystal.java   Source Code and License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos, Random rand)
{
    if (rand.nextInt(2) == 0)
    {
        ParticleEngine.addParticle(new ParticleCrystal(pos.getX() + rand.nextFloat(), pos.getY() + 1.5f, pos.getZ() + rand.nextFloat(), SipUtils.getSipInBlock(worldIn, pos), 100));
    }
}
 
Example 28
Project: pnc-repressurized   File: ItemMinigun.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
private void suppressSwitchAnimation() {
    Minecraft mc = Minecraft.getMinecraft();
    ItemRenderer renderer = mc.entityRenderer.itemRenderer;
    renderer.updateEquippedItem();
    renderer.equippedProgressMainHand = 1;
    renderer.prevEquippedProgressMainHand = 1;
}
 
Example 29
Project: needtobreath   File: PurifierBlock.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void addInformation(ItemStack itemStack, World player, List<String> list, ITooltipFlag whatIsThis) {
    super.addInformation(itemStack, player, list, whatIsThis);

    if (Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) {
        list.add(TextFormatting.WHITE + "This machine cleans air");
        list.add(TextFormatting.WHITE + "using power and coal or charcoal");
        list.add(TextFormatting.WHITE + "Works best in closed area!");
    } else {
        list.add(TextFormatting.WHITE + NeedToBreathe.SHIFT_MESSAGE);
    }
}
 
Example 30
Project: CustomWorldGen   File: EntityFishHook.java   Source Code and License 5 votes vote down vote up
/**
 * Updates the velocity of the entity to a new value.
 */
@SideOnly(Side.CLIENT)
public void setVelocity(double x, double y, double z)
{
    this.motionX = x;
    this.motionY = y;
    this.motionZ = z;
    this.clientMotionX = this.motionX;
    this.clientMotionY = this.motionY;
    this.clientMotionZ = this.motionZ;
}
 
Example 31
Project: CustomWorldGen   File: EntityBoat.java   Source Code and License 5 votes vote down vote up
/**
 * Set the position and rotation values directly without any clamping.
 */
@SideOnly(Side.CLIENT)
public void setPositionAndRotationDirect(double x, double y, double z, float yaw, float pitch, int posRotationIncrements, boolean teleport)
{
    this.boatPitch = x;
    this.lerpY = y;
    this.lerpZ = z;
    this.boatYaw = (double)yaw;
    this.lerpXRot = (double)pitch;
    this.lerpSteps = 10;
}
 
Example 32
Project: ExPetrum   File: BlockCattail.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void getSubBlocks(CreativeTabs tab, NonNullList<ItemStack> list)
{
	for (int i = 0; i < EnumDirtClass.values().length; ++i)
	{
		list.add(new ItemStack(this, 1, i));
	}
}
 
Example 33
Project: Solar   File: ItemBlockBaked.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void registerModel() {
	Block block = Block.getBlockFromItem(this);
	//noinspection ConstantConditions
	ModelHandler.registerModel(this, 0, ResourceLibrary.getModel(block.getRegistryName().getResourcePath() + '_', ""));
}
 
Example 34
Project: ObsidianSuite   File: WavefrontObject.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public void tessellatePart(Tessellator tessellator, String partName) {
    for (GroupObject groupObject : groupObjects)
    {
        if (partName.equalsIgnoreCase(groupObject.name))
        {
            groupObject.render(tessellator.getBuffer());
        }
    }
}
 
Example 35
Project: CustomWorldGen   File: ChunkCache.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public int getCombinedLight(BlockPos pos, int lightValue)
{
    int i = this.getLightForExt(EnumSkyBlock.SKY, pos);
    int j = this.getLightForExt(EnumSkyBlock.BLOCK, pos);

    if (j < lightValue)
    {
        j = lightValue;
    }

    return i << 20 | j << 4;
}
 
Example 36
Project: Randores2   File: RandoresDefineByDataRequestHandler.java   Source Code and License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public IMessage onMessage(RandoresDefineByDataRequest message, MessageContext ctx) {
    Minecraft.getMinecraft().addScheduledTask(() -> {
        Randores.debug("Received define-by-data request from server: " + message.getDefinition().getName());
        World world = Minecraft.getMinecraft().world;
        RandoresWorldData data = RandoresWorldData.getSimply(world);
        data.getCache().add(message.getDefinition());
        data.markDirty();
    });
    return null;
}
 
Example 37
Project: pnc-repressurized   File: ItemMachineUpgrade.java   Source Code and License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, World world, List<String> infoList, ITooltipFlag par4) {
    if (PneumaticCraftRepressurized.proxy.isSneakingInGui()) {
        infoList.add(I18n.format("gui.tooltip.item.upgrade.usedIn"));
        PneumaticRegistry.getInstance().getItemRegistry().addTooltip(this, infoList);
    } else {
        infoList.add(I18n.format("gui.tooltip.item.upgrade.shiftMessage"));
    }
    super.addInformation(stack, world, infoList, par4);
}
 
Example 38
Project: TechReborn3   File: TechRebornCreativeTab.java   Source Code and License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public ItemStack getTabIconItem() {
	return new ItemStack(ItemWrench.wrench);
}
 
Example 39
Project: CustomWorldGen   File: EntityWolf.java   Source Code and License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public float getTailRotation()
{
    return this.isAngry() ? 1.5393804F : (this.isTamed() ? (0.55F - (this.getMaxHealth() - ((Float)this.dataManager.get(DATA_HEALTH_ID)).floatValue()) * 0.02F) * (float)Math.PI : ((float)Math.PI / 5F));
}
 
Example 40
Project: Bewitchment   File: BewitchmentCreativeTabs.java   Source Code and License 4 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public ItemStack getTabIconItem() {
	return getIconItemStack();
}
 
Example 41
Project: pnc-repressurized   File: TileEntityPneumaticDoor.java   Source Code and License 4 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public AxisAlignedBB getRenderBoundingBox() {
    return new AxisAlignedBB(getPos().getX(), getPos().getY(), getPos().getZ(), getPos().getX() + 1, getPos().getY() + 2, getPos().getZ() + 1);
}
 
Example 42
Project: CustomWorldGen   File: CPacketUpdateSign.java   Source Code and License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public CPacketUpdateSign(BlockPos posIn, ITextComponent[] linesIn)
{
    this.pos = posIn;
    this.lines = new String[] {linesIn[0].getUnformattedText(), linesIn[1].getUnformattedText(), linesIn[2].getUnformattedText(), linesIn[3].getUnformattedText()};
}
 
Example 43
Project: GeneralLaymansAestheticSpyingScreen   File: BlockGlass.java   Source Code and License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public void openGui(TileEntityGlassWireless master)
{
    FMLClientHandler.instance().displayGuiScreen(Minecraft.getMinecraft().player, new GuiProjectorSetter(master));
}
 
Example 44
Project: Bewitchment   File: BlockCauldron.java   Source Code and License 4 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void registerModel() {
	ModelHandler.registerModel(this, 0);
}
 
Example 45
Project: MineCamera   File: EntityLoader.java   Source Code and License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
private static <T extends Entity> void registerEntityRender(Class<T> entityClass,
		Class<? extends Render<T>> render) {
	RenderingRegistry.registerEntityRenderingHandler(entityClass, new EntityRenderFactory<T>(render));
}
 
Example 46
Project: CustomWorldGen   File: SPacketEntity.java   Source Code and License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public byte getPitch()
{
    return this.pitch;
}
 
Example 47
Project: CustomWorldGen   File: ContainerFurnace.java   Source Code and License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public void updateProgressBar(int id, int data)
{
    this.tileFurnace.setField(id, data);
}
 
Example 48
Project: CustomWorldGen   File: TileEntity.java   Source Code and License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public double getMaxRenderDistanceSquared()
{
    return 4096.0D;
}
 
Example 49
Project: harshencastle   File: BaseHarshenLeaves.java   Source Code and License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer()
{
    return  BlockRenderLayer.CUTOUT_MIPPED;
}
 
Example 50
Project: CustomWorldGen   File: SPacketSpawnMob.java   Source Code and License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public byte getHeadPitch()
{
    return this.headPitch;
}
 
Example 51
Project: Bewitchment   File: ItemHorseshoe.java   Source Code and License 4 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, @Nullable World player, List<String> tooltip, ITooltipFlag advanced) {
	tooltip.add(TextFormatting.AQUA + I18n.format("witch.tooltip." + getNameInefficiently(stack) + "_description.name"));
}
 
Example 52
Project: Solar   File: ItemMechanicalTranslocator.java   Source Code and License 4 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, @Nullable World worldIn, List<String> tooltip, ITooltipFlag flagIn) {
	getKey(stack).ifPresent(uuid -> TooltipBuilder.inline().condition(SHIFT_KEY_DOWN)
			.ifPresent(builder -> getInfo(builder, uuid)).apply().build(tooltip));
}
 
Example 53
Project: CustomWorldGen   File: SPacketSpawnMob.java   Source Code and License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public int getVelocityX()
{
    return this.velocityX;
}
 
Example 54
Project: BetterThanWeagles   File: ItemJellyBean.java   Source Code and License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public void initModel()
{
	ModelLoader.setCustomModelResourceLocation(this, 0, new ModelResourceLocation(getRegistryName(), "inventory"));
}
 
Example 55
Project: ThisMod   File: ItemModItem.java   Source Code and License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public boolean hasEffect(ItemStack stack) {
    return super.hasEffect(stack);
}
 
Example 56
Project: CustomWorldGen   File: EntityItem.java   Source Code and License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public int getAge()
{
    return this.age;
}
 
Example 57
Project: Bewitchment   File: OvercoatBrew.java   Source Code and License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void renderHUD(int x, int y, Minecraft mc, int amplifier) {
	render(x, y, mc, 15);
}
 
Example 58
Project: Bewitchment   File: BlockMod.java   Source Code and License 4 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void registerModel() {
	ModelHandler.registerModel(this, 0);
}
 
Example 59
Project: Metalworks   File: InterfaceBlastFurnace.java   Source Code and License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public GuiEnergyBar getEnergyBar(TileBlastFurnace tile, GuiMachine<TileBlastFurnace> gui, EntityPlayer player, int guiLeft, int guiTop) {
    return new GuiEnergyBar(guiLeft + 11, guiTop + 11, false);
}
 
Example 60
Project: pnc-repressurized   File: TubeModule.java   Source Code and License 4 votes vote down vote up
@SideOnly(Side.CLIENT)
public void doExtraRendering() {
}