mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 08:48:34 +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;
|
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.ISmileyCloudEasterEgg;
|
||||||
import de.ellpeck.actuallyadditions.mod.misc.cloud.SmileyCloudEasterEggs;
|
import de.ellpeck.actuallyadditions.mod.misc.cloud.SmileyCloudEasterEggs;
|
||||||
import de.ellpeck.actuallyadditions.mod.misc.special.RenderSpecial;
|
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 != null && theCloud.name != null){
|
||||||
if(triggerName.equalsIgnoreCase(theCloud.name)){
|
if(triggerName.equalsIgnoreCase(theCloud.name)){
|
||||||
GlStateManager.pushMatrix();
|
GlStateManager.pushMatrix();
|
||||||
IBlockState state = theCloud.getWorld().getBlockState(theCloud.getPos());
|
|
||||||
|
|
||||||
switch(state.getValue(BlockHorizontal.FACING)){
|
IBlockState state = theCloud.getWorld().getBlockState(theCloud.getPos());
|
||||||
case NORTH:
|
if(state.getBlock() == InitBlocks.blockSmileyCloud){
|
||||||
GlStateManager.rotate(180, 0, 1, 0);
|
switch(state.getValue(BlockHorizontal.FACING)){
|
||||||
break;
|
case NORTH:
|
||||||
case EAST:
|
GlStateManager.rotate(180, 0, 1, 0);
|
||||||
GlStateManager.rotate(270, 0, 1, 0);
|
break;
|
||||||
break;
|
case EAST:
|
||||||
case WEST:
|
GlStateManager.rotate(270, 0, 1, 0);
|
||||||
GlStateManager.rotate(90, 0, 1, 0);
|
break;
|
||||||
break;
|
case WEST:
|
||||||
|
GlStateManager.rotate(90, 0, 1, 0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cloud.renderExtra(0.0625F);
|
cloud.renderExtra(0.0625F);
|
||||||
|
|
Loading…
Reference in a new issue