mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 00:38:35 +01:00
Fix a crash issue with the smiley cloud when the world is weird
Closes #688
This commit is contained in:
parent
cca76e5020
commit
ba9a7a5016
1 changed files with 14 additions and 11 deletions
|
@ -10,6 +10,7 @@
|
|||
|
||||
package de.ellpeck.actuallyadditions.mod.blocks.render;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.misc.cloud.ISmileyCloudEasterEgg;
|
||||
import de.ellpeck.actuallyadditions.mod.misc.cloud.SmileyCloudEasterEggs;
|
||||
import de.ellpeck.actuallyadditions.mod.misc.special.RenderSpecial;
|
||||
|
@ -49,18 +50,20 @@ public class RenderSmileyCloud extends TileEntitySpecialRenderer{
|
|||
if(triggerName != null && theCloud.name != null){
|
||||
if(triggerName.equalsIgnoreCase(theCloud.name)){
|
||||
GlStateManager.pushMatrix();
|
||||
IBlockState state = theCloud.getWorld().getBlockState(theCloud.getPos());
|
||||
|
||||
switch(state.getValue(BlockHorizontal.FACING)){
|
||||
case NORTH:
|
||||
GlStateManager.rotate(180, 0, 1, 0);
|
||||
break;
|
||||
case EAST:
|
||||
GlStateManager.rotate(270, 0, 1, 0);
|
||||
break;
|
||||
case WEST:
|
||||
GlStateManager.rotate(90, 0, 1, 0);
|
||||
break;
|
||||
IBlockState state = theCloud.getWorld().getBlockState(theCloud.getPos());
|
||||
if(state.getBlock() == InitBlocks.blockSmileyCloud){
|
||||
switch(state.getValue(BlockHorizontal.FACING)){
|
||||
case NORTH:
|
||||
GlStateManager.rotate(180, 0, 1, 0);
|
||||
break;
|
||||
case EAST:
|
||||
GlStateManager.rotate(270, 0, 1, 0);
|
||||
break;
|
||||
case WEST:
|
||||
GlStateManager.rotate(90, 0, 1, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
cloud.renderExtra(0.0625F);
|
||||
|
|
Loading…
Reference in a new issue