當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。