Fixed invalid Orientation.
Improved Logging for render mismatch.
This commit is contained in:
parent
0bfded7bbf
commit
b86fb56999
|
@ -21,6 +21,7 @@ import appeng.block.AEBaseBlock;
|
|||
import appeng.core.WorldSettings;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.helpers.LocationRotation;
|
||||
import appeng.helpers.NullRotation;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
@ -80,7 +81,7 @@ public class BlockSkyStone extends AEBaseBlock implements IOrientableBlock
|
|||
{
|
||||
if ( w.getBlockMetadata( x, y, z ) == 0 )
|
||||
return new LocationRotation( w, x, y, z );
|
||||
return null;
|
||||
return new NullRotation();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,6 +21,7 @@ public class WorldRender implements ISimpleBlockRenderingHandler
|
|||
private RenderBlocks renderer = new RenderBlocks();
|
||||
final int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||
public static final WorldRender instance = new WorldRender();
|
||||
boolean hasErrored = false;
|
||||
|
||||
public HashMap<AEBaseBlock, BaseBlockRender> blockRenders = new HashMap();
|
||||
|
||||
|
@ -72,7 +73,13 @@ public class WorldRender implements ISimpleBlockRenderingHandler
|
|||
}
|
||||
else
|
||||
{
|
||||
AELog.severe( "Invalid render: " + item.getUnlocalizedName() + " as ae block" );
|
||||
if ( !hasErrored )
|
||||
{
|
||||
hasErrored = true;
|
||||
AELog.severe( "Invalid render - item/block mismatch" );
|
||||
AELog.severe( " item: " + item.getUnlocalizedName() );
|
||||
AELog.severe( " block: " + blk.getUnlocalizedName() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
36
helpers/NullRotation.java
Normal file
36
helpers/NullRotation.java
Normal file
|
@ -0,0 +1,36 @@
|
|||
package appeng.helpers;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import appeng.api.util.IOrientable;
|
||||
|
||||
public class NullRotation implements IOrientable
|
||||
{
|
||||
|
||||
public NullRotation() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOrientation(ForgeDirection Forward, ForgeDirection Up)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection getUp()
|
||||
{
|
||||
return ForgeDirection.UP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection getForward()
|
||||
{
|
||||
return ForgeDirection.SOUTH;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeRotated()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -497,7 +497,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
|||
if ( newDef.item.isDamageable() )
|
||||
newDef.damageValue = newDef.dspDamage;
|
||||
|
||||
newDef.tagCompound = newDef.lowTag;
|
||||
newDef.tagCompound = AEItemDef.lowTag;
|
||||
newDef.reHash();
|
||||
return bottom;
|
||||
}
|
||||
|
@ -527,7 +527,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
|||
if ( newDef.item.isDamageable() )
|
||||
newDef.damageValue = top.def.dspDamage;
|
||||
|
||||
newDef.tagCompound = newDef.highTag;
|
||||
newDef.tagCompound = AEItemDef.highTag;
|
||||
newDef.reHash();
|
||||
return top;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue