Even more nulls

This commit is contained in:
Vincent Lee committed 2017-01-08 14:04:49 -06:00
1 parent d17b7b57f3
commit 2d615eae19
4 files changed
+5 -5

No files matched your search

@@ -81,7 +81,7 @@ public final class BaubleRenderHandler implements LayerRenderer<EntityPlayer> {
if(item instanceof ICosmeticAttachable) {
ICosmeticAttachable attachable = (ICosmeticAttachable) item;
ItemStack cosmetic = attachable.getCosmeticItem(stack);
if(cosmetic != null) {
if(!cosmetic.isEmpty()) {
GlStateManager.pushMatrix();
GL11.glColor3ub((byte) 255, (byte) 255, (byte) 255); // Some of the baubles use this so we must restore it manually as well
GlStateManager.color(1F, 1F, 1F, 1F);
@@ -56,7 +56,7 @@ public final class BlockHighlightRenderHandler {
BlockPos bPos = pos.getBlockPos();
ItemStack stackHeld = PlayerHelper.getFirstHeldItem(mc.player, ModItems.twigWand);
if(stackHeld != null && ItemTwigWand.getBindMode(stackHeld)) {
if(!stackHeld.isEmpty() && ItemTwigWand.getBindMode(stackHeld)) {
BlockPos coords = ItemTwigWand.getBoundTile(stackHeld);
if(coords.getY() != -1)
bPos = coords;
@@ -349,7 +349,7 @@ public final class HUDHandler {
profiler.startSection("crystalCube");
ItemStack target = tile.getRequestTarget();
if(target != null) {
if(!target.isEmpty()) {
String s1 = target.getDisplayName();
String s2 = tile.getItemCount() + "x";
int strlen = Math.max(mc.fontRendererObj.getStringWidth(s1), mc.fontRendererObj.getStringWidth(s2));
@@ -269,8 +269,8 @@ public class RenderTileTinyPotato extends TileEntitySpecialRenderer<TileTinyPota
mc.renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
renderBlock(Blocks.CAKE);
} else if (ContributorFancinessHandler.flowerMap != null && ContributorFancinessHandler.flowerMap.containsKey(name)) {
ItemStack icon = ContributorFancinessHandler.flowerMap.get(name);
if (icon != null) {
ItemStack icon = ContributorFancinessHandler.flowerMap.getOrDefault(name, ItemStack.EMPTY);
if (!icon.isEmpty()) {
mc.renderEngine.bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE);
GlStateManager.rotate(180F, 1F, 0F, 0F);
GlStateManager.rotate(180F, 0F, 1F, 0F);