当前位置: 首页>>代码示例>>Java>>正文


Java Side.CLIENT属性代码示例

本文整理汇总了Java中net.minecraftforge.fml.relauncher.Side.CLIENT属性的典型用法代码示例。如果您正苦于以下问题:Java Side.CLIENT属性的具体用法?Java Side.CLIENT怎么用?Java Side.CLIENT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在net.minecraftforge.fml.relauncher.Side的用法示例。


在下文中一共展示了Side.CLIENT属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setupIfTiersClient

@SideOnly(Side.CLIENT)
public void setupIfTiersClient()
{
    registerTierClient(0, new IfTier.TabletData(GuiDrawableRegistry.paperEntry, false, Utils.gRL("textures/gui/if_tablet/0.png"), Colors.WHITE, Colors.BLACK)
    {
        IGuiDrawable done = GuiDrawableRegistry.paperEntryCompleted;
        @Override
        @SideOnly(Side.CLIENT)
        public IGuiDrawable getEntryBackground(IfEntry entry, int currentSteps)
        {
            if(currentSteps < entry.getSteps().size())
                return super.getEntryBackground(entry, currentSteps);
            else
                return done;
        }
    }, Utils.gRL("models/wall_if_tablet/0"), Utils.gRL("if_tablet/0"));
    registerTierClient(1, new IfTier.TabletData(GuiDrawableRegistry.runes, true, Utils.gRL("textures/gui/if_tablet/1.png"), Colors.LIGHTGREEN_100, Colors.GREEN_900), Utils.gRL("models/wall_if_tablet/1"), Utils.gRL("if_tablet/1"));
    registerTierClient(2, new IfTier.TabletData(GuiDrawableRegistry.runes, true, Utils.gRL("textures/gui/if_tablet/2.png"), Colors.LIGHTGREEN_100, Colors.GREEN_900), Utils.gRL("models/wall_if_tablet/2"), Utils.gRL("if_tablet/2"));
}
 
开发者ID:PearXTeam,项目名称:PurificatiMagicae,代码行数:19,代码来源:IfRegistry.java

示例2: addInformation

/**
 * allows items to add custom lines of information to the mouseover description
 */
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced)
{
    MapData mapdata = this.getMapData(stack, playerIn.worldObj);

    if (advanced)
    {
        if (mapdata == null)
        {
            tooltip.add("Unknown map");
        }
        else
        {
            tooltip.add("Scaling at 1:" + (1 << mapdata.scale));
            tooltip.add("(Level " + mapdata.scale + "/" + 4 + ")");
        }
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:21,代码来源:ItemMap.java

示例3: setVelocity

/**
 * 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.rotationYaw = (float)(MathHelper.atan2(x, z) * (180D / Math.PI));
        this.rotationPitch = (float)(MathHelper.atan2(y, (double)f) * (180D / Math.PI));
        this.prevRotationYaw = this.rotationYaw;
        this.prevRotationPitch = this.rotationPitch;
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:19,代码来源:EntityFireworkRocket.java

示例4: getMaxRenderSize

@Override
@SideOnly(Side.CLIENT)
public int getMaxRenderSize() {
    int max = 0;
    for (AbstractDamageablePart part : this)
        max = Math.max(max, (int) (part.getMaxHealth() + part.getAbsorption() + 0.9999F));
    return (int) (((max + 1) / 2F) * 9);
}
 
开发者ID:ichttt,项目名称:FirstAid,代码行数:8,代码来源:PlayerDamageModel.java

示例5: onMessage

@Override
public IMessage onMessage(final MessageBiomeChange message, final MessageContext ctx)
{
    if(ctx.side != Side.CLIENT)
    {
        System.err.println("MessageBiomeChange received on wrong side:" + ctx.side);
        return null;
    }

    Minecraft minecraft = Minecraft.getMinecraft();
    final WorldClient worldClient = minecraft.world;
    minecraft.addScheduledTask(() -> processMessage(message, ctx, worldClient));
    return null;
}
 
开发者ID:Lumaceon,项目名称:CraftingParadiseMod,代码行数:14,代码来源:HandlerBiomeChange.java

示例6: format

/**
 * Formats a given stat for human consumption.
 */
@SideOnly(Side.CLIENT)
public String format(int number)
{
    double d0 = (double)number / 100.0D;
    double d1 = d0 / 1000.0D;
    return d1 > 0.5D ? StatBase.decimalFormat.format(d1) + " km" : (d0 > 0.5D ? StatBase.decimalFormat.format(d0) + " m" : number + " cm");
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:10,代码来源:StatBase.java

示例7: shouldSideBeRendered

@Override
@SideOnly(Side.CLIENT)
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos,
		EnumFacing side) {
	return true;
}
 
开发者ID:the-realest-stu,项目名称:Etheric,代码行数:6,代码来源:BlockPipe.java

示例8: getItemStackDisplayName

@Override
@SideOnly(Side.CLIENT)
public String getItemStackDisplayName(ItemStack stack)
{
	return color + I18n.format(this.getUnlocalizedName(stack) + ".name").trim();
}
 
开发者ID:raphydaphy,项目名称:ArcaneMagic,代码行数:6,代码来源:ItemBase.java

示例9: getClientThreadListener

@SideOnly(Side.CLIENT)
public static IThreadListener getClientThreadListener() {
	return Minecraft.getMinecraft();
}
 
开发者ID:blay09,项目名称:HardcoreRevival,代码行数:4,代码来源:NetworkHandler.java

示例10: getTabIndex

@SideOnly(Side.CLIENT)
public int getTabIndex()
{
    return this.tabIndex;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:5,代码来源:CreativeTabs.java

示例11: getHeadPitch

@SideOnly(Side.CLIENT)
public byte getHeadPitch()
{
    return this.headPitch;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:5,代码来源:SPacketSpawnMob.java

示例12: renderHUD

@SideOnly(Side.CLIENT)
@Override
public void renderHUD(int x, int y, Minecraft mc, int amplifier) {
	//NO-OP
}
 
开发者ID:Um-Mitternacht,项目名称:Bewitchment,代码行数:5,代码来源:WolfsbaneBrew.java

示例13: getGui

@Override
@SideOnly(Side.CLIENT)
public GuiScreen getGui(GuiRemoteEditor guiRemote) {
    return new GuiRemoteDropdown(this, guiRemote);
}
 
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:5,代码来源:ActionWidgetDropdown.java

示例14: getYaw

@SideOnly(Side.CLIENT)
public float getYaw()
{
    return this.yaw;
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:5,代码来源:SPacketMoveVehicle.java

示例15: getPosOffset

@SideOnly(Side.CLIENT)
public Vec3d getPosOffset(double x, double y, double z, double offset)
{
    int i = MathHelper.floor_double(x);
    int j = MathHelper.floor_double(y);
    int k = MathHelper.floor_double(z);

    if (BlockRailBase.isRailBlock(this.worldObj, new BlockPos(i, j - 1, k)))
    {
        --j;
    }

    IBlockState iblockstate = this.worldObj.getBlockState(new BlockPos(i, j, k));

    if (BlockRailBase.isRailBlock(iblockstate))
    {
        BlockRailBase.EnumRailDirection blockrailbase$enumraildirection = (BlockRailBase.EnumRailDirection)iblockstate.getValue(((BlockRailBase)iblockstate.getBlock()).getShapeProperty());
        y = (double)j;

        if (blockrailbase$enumraildirection.isAscending())
        {
            y = (double)(j + 1);
        }

        int[][] aint = MATRIX[blockrailbase$enumraildirection.getMetadata()];
        double d0 = (double)(aint[1][0] - aint[0][0]);
        double d1 = (double)(aint[1][2] - aint[0][2]);
        double d2 = Math.sqrt(d0 * d0 + d1 * d1);
        d0 = d0 / d2;
        d1 = d1 / d2;
        x = x + d0 * offset;
        z = z + d1 * offset;

        if (aint[0][1] != 0 && MathHelper.floor_double(x) - i == aint[0][0] && MathHelper.floor_double(z) - k == aint[0][2])
        {
            y += (double)aint[0][1];
        }
        else if (aint[1][1] != 0 && MathHelper.floor_double(x) - i == aint[1][0] && MathHelper.floor_double(z) - k == aint[1][2])
        {
            y += (double)aint[1][1];
        }

        return this.getPos(x, y, z);
    }
    else
    {
        return null;
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:49,代码来源:EntityMinecart.java


注:本文中的net.minecraftforge.fml.relauncher.Side.CLIENT属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。