use of cpw.mods.fml.relauncher.SideOnly in project Armourers-Workshop by RiskyKen.
the class TileEntitySkinnable method getRenderBoundingBox.
@SideOnly(Side.CLIENT)
@Override
public AxisAlignedBB getRenderBoundingBox() {
if (renderBounds == null) {
if (hasSkin()) {
Skin skin = getSkin(getSkinPointer());
if (skin != null) {
if (SkinProperties.PROP_BLOCK_MULTIBLOCK.getValue(skin.getProperties())) {
renderBounds = AxisAlignedBB.getBoundingBox(xCoord - 1, yCoord, zCoord - 1, xCoord + 2, yCoord + 3, zCoord + 2);
ForgeDirection dir = getRotation().getOpposite();
renderBounds.offset(dir.offsetX, 0, dir.offsetZ);
} else {
renderBounds = AxisAlignedBB.getBoundingBox(xCoord, yCoord, zCoord, xCoord + 1, yCoord + 1, zCoord + 1);
}
} else {
return AxisAlignedBB.getBoundingBox(xCoord, yCoord, zCoord, xCoord + 1, yCoord + 1, zCoord + 1);
}
} else {
return AxisAlignedBB.getBoundingBox(xCoord, yCoord, zCoord, xCoord + 1, yCoord + 1, zCoord + 1);
}
}
return renderBounds;
}
use of cpw.mods.fml.relauncher.SideOnly in project Armourers-Workshop by RiskyKen.
the class TileEntityHologramProjector method getRenderBoundingBox.
@SideOnly(Side.CLIENT)
@Override
public AxisAlignedBB getRenderBoundingBox() {
AxisAlignedBB bb = AxisAlignedBB.getBoundingBox(-2, -2, -2, 3, 3, 3);
ForgeDirection dir = ForgeDirection.getOrientation(getBlockMetadata());
bb.offset(xCoord, yCoord, zCoord);
float scale = 0.0625F;
switch(dir) {
case UP:
bb.offset(offsetX * scale, offsetY * scale, offsetZ * scale);
break;
case DOWN:
bb.offset(-offsetX * scale, -offsetY * scale, offsetZ * scale);
break;
case EAST:
bb.offset(offsetY * scale, -offsetX * scale, offsetZ * scale);
break;
case WEST:
bb.offset(-offsetY * scale, offsetX * scale, offsetZ * scale);
break;
case NORTH:
bb.offset(-offsetX * scale, -offsetZ * scale, -offsetY * scale);
break;
case SOUTH:
bb.offset(-offsetX * scale, offsetZ * scale, offsetY * scale);
break;
default:
break;
}
return bb;
}
use of cpw.mods.fml.relauncher.SideOnly in project Armourers-Workshop by RiskyKen.
the class TileEntityMannequin method setupFakePlayer.
@SideOnly(Side.CLIENT)
private void setupFakePlayer() {
if (fakePlayer != null) {
return;
}
fakePlayer = new MannequinFakePlayer(worldObj, new GameProfile(null, "[Mannequin]"));
fakePlayer.posX = xCoord;
fakePlayer.posY = yCoord;
fakePlayer.posZ = zCoord;
fakePlayer.prevPosX = xCoord;
fakePlayer.prevPosY = yCoord;
fakePlayer.prevPosZ = zCoord;
}
use of cpw.mods.fml.relauncher.SideOnly in project Armourers-Workshop by RiskyKen.
the class TileEntityArmourer method getRenderBoundingBox.
@SideOnly(Side.CLIENT)
@Override
public AxisAlignedBB getRenderBoundingBox() {
AxisAlignedBB bb = super.getRenderBoundingBox();
bb = AxisAlignedBB.getBoundingBox(xCoord - 15, yCoord - 10, zCoord - 46, xCoord + 30, yCoord + 40 + 23, zCoord + 35);
return bb;
}
use of cpw.mods.fml.relauncher.SideOnly in project Armourers-Workshop by RiskyKen.
the class BlockMannequin method randomDisplayTick.
@SideOnly(Side.CLIENT)
@Override
public void randomDisplayTick(World world, int x, int y, int z, Random random) {
if (isTopOfMannequin(world, x, y, z)) {
if (isValentins) {
if (random.nextFloat() * 100 > 75) {
world.spawnParticle("heart", x + 0.2D + random.nextFloat() * 0.6F, y + 1D, z + 0.2D + random.nextFloat() * 0.6F, 0, 0, 0);
}
}
TileEntityMannequin te = getMannequinTileEntity(world, x, y, z);
if (te != null && te.isRenderExtras()) {
Contributor contributor = Contributors.INSTANCE.getContributor(te.getGameProfile());
if (contributor != null & te.isVisible()) {
for (int i = 0; i < 4; i++) {
EntityFX entityfx = new EntitySpellParticleFX(world, x - 1 + random.nextFloat() * 3F, y - 1D, z - 1 + random.nextFloat() * 3F, 0, 0, 0);
((EntitySpellParticleFX) entityfx).setBaseSpellTextureIndex(144);
entityfx.setRBGColorF((float) (contributor.r & 0xFF) / 255F, (float) (contributor.g & 0xFF) / 255F, (float) (contributor.b & 0xFF) / 255F);
Minecraft.getMinecraft().effectRenderer.addEffect(entityfx);
}
}
}
}
}
Aggregations