use of net.minecraft.block.BlockPane in project LogisticsPipes by RS485.
the class ItemStackRenderer method renderInWorld.
public void renderInWorld() {
assert renderManager != null;
assert renderItem != null;
assert scaleX != 0.0F;
assert scaleY != 0.0F;
assert scaleZ != 0.0F;
if (entityitem == null || !ItemStack.areItemStacksEqual(entityitem.getEntityItem(), itemstack)) {
if (itemstack == null) {
throw new RuntimeException("No EntityItem and no ItemStack, I do not know what to render!");
} else {
if (worldObj == null) {
throw new NullPointerException("World object is null");
}
entityitem = new EntityItem(worldObj, 0.0D, 0.0D, 0.0D, itemstack);
entityitem.getEntityItem().stackSize = 1;
entityitem.hoverStart = 0.0F;
}
}
boolean changeColor = renderItem.renderWithColor != renderInColor;
if (changeColor) {
renderItem.renderWithColor = renderInColor;
}
Item item = itemstack.getItem();
if (item instanceof ItemBlock) {
Block block = ((ItemBlock) item).field_150939_a;
if (block instanceof BlockPane) {
GL11.glScalef(0.5F, 0.5F, 0.5F);
}
} else if (item == LogisticsPipes.logisticsRequestTable) {
GL11.glScalef(0.5F, 0.5F, 0.5F);
}
renderManager.renderEntityWithPosYaw(entityitem, posX, posY, zLevel, 0.0F, partialTickTime);
if (changeColor) {
renderItem.renderWithColor = !renderInColor;
}
}
use of net.minecraft.block.BlockPane in project BetterWithAddons by DaedalusGame.
the class BlockModPane method canConnectTo.
public boolean canConnectTo(IBlockAccess world, BlockPos pos, EnumFacing facing) {
IBlockState state = world.getBlockState(pos);
Block block = state.getBlock();
return !(block instanceof BlockPane) && block == this || state.isOpaqueCube() || block.isSideSolid(state, world, pos, facing.getOpposite()) || compatiblePanes.contains(block);
}
Aggregations