Fix Crash When using Debug Blocks.
Register Quartz/Fluix Blocks with BC Facades.
This commit is contained in:
@@ -32,6 +32,7 @@ import appeng.client.render.BaseBlockRender;
|
|||||||
import appeng.client.render.BlockRenderInfo;
|
import appeng.client.render.BlockRenderInfo;
|
||||||
import appeng.client.render.WorldRender;
|
import appeng.client.render.WorldRender;
|
||||||
import appeng.client.texture.FlipableIcon;
|
import appeng.client.texture.FlipableIcon;
|
||||||
|
import appeng.client.texture.MissingIcon;
|
||||||
import appeng.core.features.AEFeature;
|
import appeng.core.features.AEFeature;
|
||||||
import appeng.core.features.AEFeatureHandler;
|
import appeng.core.features.AEFeatureHandler;
|
||||||
import appeng.core.features.IAEFeature;
|
import appeng.core.features.IAEFeature;
|
||||||
@@ -134,6 +135,13 @@ public class AEBaseBlock extends BlockContainer implements IAEFeature
|
|||||||
info.updateIcons( bottomIcon, topIcon, northIcon, southIcon, eastIcon, westIcon );
|
info.updateIcons( bottomIcon, topIcon, northIcon, southIcon, eastIcon, westIcon );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void registerNoIcons()
|
||||||
|
{
|
||||||
|
BlockRenderInfo info = getRendererInstance();
|
||||||
|
FlipableIcon i = new FlipableIcon( new MissingIcon() );
|
||||||
|
info.updateIcons( i, i, i, i, i, i );
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int direction, int metadata)
|
public IIcon getIcon(int direction, int metadata)
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
package appeng.client.render;
|
package appeng.client.render;
|
||||||
|
|
||||||
import appeng.client.texture.FlipableIcon;
|
|
||||||
import appeng.client.texture.TmpFlipableIcon;
|
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
import appeng.client.texture.FlipableIcon;
|
||||||
|
import appeng.client.texture.TmpFlipableIcon;
|
||||||
|
|
||||||
public class BlockRenderInfo
|
public class BlockRenderInfo
|
||||||
{
|
{
|
||||||
@@ -29,8 +29,7 @@ public class BlockRenderInfo
|
|||||||
private FlipableIcon eastIcon = null;
|
private FlipableIcon eastIcon = null;
|
||||||
private FlipableIcon westIcon = null;
|
private FlipableIcon westIcon = null;
|
||||||
|
|
||||||
public void updateIcons(FlipableIcon Bottom, FlipableIcon Top, FlipableIcon North, FlipableIcon South, FlipableIcon East,
|
public void updateIcons(FlipableIcon Bottom, FlipableIcon Top, FlipableIcon North, FlipableIcon South, FlipableIcon East, FlipableIcon West)
|
||||||
FlipableIcon West)
|
|
||||||
{
|
{
|
||||||
topIcon = Top;
|
topIcon = Top;
|
||||||
bottomIcon = Bottom;
|
bottomIcon = Bottom;
|
||||||
@@ -57,8 +56,7 @@ public class BlockRenderInfo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTemporaryRenderIcons(IIcon nTopIcon, IIcon nBottomIcon, IIcon nSouthIcon, IIcon nNorthIcon, IIcon nEastIcon,
|
public void setTemporaryRenderIcons(IIcon nTopIcon, IIcon nBottomIcon, IIcon nSouthIcon, IIcon nNorthIcon, IIcon nEastIcon, IIcon nWestIcon)
|
||||||
IIcon nWestIcon)
|
|
||||||
{
|
{
|
||||||
tmpTopIcon.setOriginal( nTopIcon == null ? getTexture( ForgeDirection.UP ) : nTopIcon );
|
tmpTopIcon.setOriginal( nTopIcon == null ? getTexture( ForgeDirection.UP ) : nTopIcon );
|
||||||
tmpBottomIcon.setOriginal( nBottomIcon == null ? getTexture( ForgeDirection.DOWN ) : nBottomIcon );
|
tmpBottomIcon.setOriginal( nBottomIcon == null ? getTexture( ForgeDirection.DOWN ) : nBottomIcon );
|
||||||
@@ -115,8 +113,7 @@ public class BlockRenderInfo
|
|||||||
|
|
||||||
public boolean isValid()
|
public boolean isValid()
|
||||||
{
|
{
|
||||||
return topIcon != null && bottomIcon != null && southIcon != null && northIcon != null && eastIcon != null
|
return topIcon != null && bottomIcon != null && southIcon != null && northIcon != null && eastIcon != null && westIcon != null;
|
||||||
&& westIcon != null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package appeng.client.texture;
|
||||||
|
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
|
||||||
|
public class MissingIcon implements IIcon
|
||||||
|
{
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getIconWidth()
|
||||||
|
{
|
||||||
|
return ExtraTextures.getMissing().getIconWidth();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getIconHeight()
|
||||||
|
{
|
||||||
|
return ExtraTextures.getMissing().getIconHeight();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getMinU()
|
||||||
|
{
|
||||||
|
return ExtraTextures.getMissing().getMinU();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getMaxU()
|
||||||
|
{
|
||||||
|
return ExtraTextures.getMissing().getMaxU();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getInterpolatedU(double var1)
|
||||||
|
{
|
||||||
|
return ExtraTextures.getMissing().getInterpolatedU( var1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getMinV()
|
||||||
|
{
|
||||||
|
return ExtraTextures.getMissing().getMinV();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getMaxV()
|
||||||
|
{
|
||||||
|
return ExtraTextures.getMissing().getMaxV();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getInterpolatedV(double var1)
|
||||||
|
{
|
||||||
|
return ExtraTextures.getMissing().getInterpolatedV( var1 );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getIconName()
|
||||||
|
{
|
||||||
|
return ExtraTextures.getMissing().getIconName();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -32,7 +32,7 @@ public class BlockChunkloader extends AEBaseBlock implements LoadingCallback
|
|||||||
@Override
|
@Override
|
||||||
public void registerBlockIcons(IIconRegister iconRegistry)
|
public void registerBlockIcons(IIconRegister iconRegistry)
|
||||||
{
|
{
|
||||||
return;
|
registerNoIcons();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public class BlockItemGen extends AEBaseBlock
|
|||||||
@Override
|
@Override
|
||||||
public void registerBlockIcons(IIconRegister iconRegistry)
|
public void registerBlockIcons(IIconRegister iconRegistry)
|
||||||
{
|
{
|
||||||
return;
|
registerNoIcons();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import net.minecraft.util.IIcon;
|
|||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
import appeng.api.AEApi;
|
import appeng.api.AEApi;
|
||||||
import appeng.api.config.TunnelType;
|
import appeng.api.config.TunnelType;
|
||||||
|
import appeng.api.definitions.Blocks;
|
||||||
import appeng.api.features.IP2PTunnelRegistry;
|
import appeng.api.features.IP2PTunnelRegistry;
|
||||||
import appeng.api.parts.IFacadePart;
|
import appeng.api.parts.IFacadePart;
|
||||||
import appeng.facade.FacadePart;
|
import appeng.facade.FacadePart;
|
||||||
@@ -187,6 +188,13 @@ public class BC extends BaseModule implements IBC
|
|||||||
{
|
{
|
||||||
registerPowerP2P();
|
registerPowerP2P();
|
||||||
registerItemP2P();
|
registerItemP2P();
|
||||||
|
|
||||||
|
Blocks b = AEApi.instance().blocks();
|
||||||
|
addFacade( b.blockFluix.stack( 1 ) );
|
||||||
|
addFacade( b.blockQuartz.stack( 1 ) );
|
||||||
|
addFacade( b.blockQuartzChiseled.stack( 1 ) );
|
||||||
|
addFacade( b.blockQuartzPiller.stack( 1 ) );
|
||||||
|
|
||||||
registerLiquidsP2P();
|
registerLiquidsP2P();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user