本文整理匯總了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"));
}
示例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 + ")");
}
}
}
示例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;
}
}
示例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);
}
示例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;
}
示例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");
}
示例7: shouldSideBeRendered
@Override
@SideOnly(Side.CLIENT)
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos,
EnumFacing side) {
return true;
}
示例8: getItemStackDisplayName
@Override
@SideOnly(Side.CLIENT)
public String getItemStackDisplayName(ItemStack stack)
{
return color + I18n.format(this.getUnlocalizedName(stack) + ".name").trim();
}
示例9: getClientThreadListener
@SideOnly(Side.CLIENT)
public static IThreadListener getClientThreadListener() {
return Minecraft.getMinecraft();
}
示例10: getTabIndex
@SideOnly(Side.CLIENT)
public int getTabIndex()
{
return this.tabIndex;
}
示例11: getHeadPitch
@SideOnly(Side.CLIENT)
public byte getHeadPitch()
{
return this.headPitch;
}
示例12: renderHUD
@SideOnly(Side.CLIENT)
@Override
public void renderHUD(int x, int y, Minecraft mc, int amplifier) {
//NO-OP
}
示例13: getGui
@Override
@SideOnly(Side.CLIENT)
public GuiScreen getGui(GuiRemoteEditor guiRemote) {
return new GuiRemoteDropdown(this, guiRemote);
}
示例14: getYaw
@SideOnly(Side.CLIENT)
public float getYaw()
{
return this.yaw;
}
示例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;
}
}