Removed old rendering system
Removed old rendering system. Some parts may be left over, but they won't affect testing. 1.10-R todo tag marks things to do with rendering.
This commit is contained in:
@@ -28,12 +28,8 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
import appeng.api.util.ModelGenerator;
|
||||
|
||||
|
||||
/**
|
||||
@@ -57,28 +53,6 @@ public interface IFacadePart
|
||||
*/
|
||||
void getBoxes( IPartCollisionHelper ch, Entity e );
|
||||
|
||||
/**
|
||||
* render the part.
|
||||
*
|
||||
* @param pos pos of part
|
||||
* @param instance render helper
|
||||
* @param renderer renderer
|
||||
* @param fc face container
|
||||
* @param busBounds bounding box
|
||||
* @param renderStilt if to render stilt
|
||||
*/
|
||||
@SideOnly( Side.CLIENT )
|
||||
void renderStatic( BlockPos pos, IPartRenderHelper instance, ModelGenerator renderer, IFacadeContainer fc, AxisAlignedBB busBounds, boolean renderStilt );
|
||||
|
||||
/**
|
||||
* render the part in inventory.
|
||||
*
|
||||
* @param instance render helper
|
||||
* @param renderer renderer
|
||||
*/
|
||||
@SideOnly( Side.CLIENT )
|
||||
void renderInventory( IPartRenderHelper instance, ModelGenerator renderer );
|
||||
|
||||
/**
|
||||
* @return side the facade is in
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,6 @@ import java.util.Random;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -41,12 +40,9 @@ import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.util.AEPartLocation;
|
||||
import appeng.api.util.ModelGenerator;
|
||||
|
||||
|
||||
public interface IPart extends IBoxProvider
|
||||
@@ -66,50 +62,6 @@ public interface IPart extends IBoxProvider
|
||||
*/
|
||||
ItemStack getItemStack( PartItemStack type );
|
||||
|
||||
/**
|
||||
* render item form for inventory, or entity.
|
||||
*
|
||||
* GL Available
|
||||
*
|
||||
* @param rh helper
|
||||
* @param renderer renderer
|
||||
*/
|
||||
@SideOnly( Side.CLIENT )
|
||||
void renderInventory( IPartRenderHelper rh, ModelGenerator renderer );
|
||||
|
||||
/**
|
||||
* render world renderer ( preferred )
|
||||
*
|
||||
* GL is NOT Available
|
||||
*
|
||||
* @param pos pos of block
|
||||
* @param rh helper
|
||||
* @param renderer renderer
|
||||
*/
|
||||
@SideOnly( Side.CLIENT )
|
||||
void renderStatic( BlockPos pos, IPartRenderHelper rh, ModelGenerator renderer );
|
||||
|
||||
/**
|
||||
* render TESR.
|
||||
*
|
||||
* GL Available
|
||||
*
|
||||
* @param x x coord
|
||||
* @param y y coord
|
||||
* @param z z coord
|
||||
* @param rh helper
|
||||
* @param renderer renderer
|
||||
*/
|
||||
@SideOnly( Side.CLIENT )
|
||||
void renderDynamic( double x, double y, double z, IPartRenderHelper rh, ModelGenerator renderer );
|
||||
|
||||
/**
|
||||
* @return the Block sheet icon used when rendering the breaking particles, return null to use the ItemStack
|
||||
* texture.
|
||||
*/
|
||||
@SideOnly( Side.CLIENT )
|
||||
TextureAtlasSprite getBreakingTexture( ModelGenerator renderer );
|
||||
|
||||
/**
|
||||
* return true only if your part require dynamic rendering, must be consistent.
|
||||
*
|
||||
|
||||
@@ -61,11 +61,6 @@ public interface IPartHelper
|
||||
*/
|
||||
boolean registerNewLayer( String string, String layerInterface );
|
||||
|
||||
/**
|
||||
* Register IBusItem with renderer
|
||||
*/
|
||||
void setItemBusRenderer( IPartItem i );
|
||||
|
||||
/**
|
||||
* use in use item, to try and place a IBusItem
|
||||
*
|
||||
|
||||
@@ -28,9 +28,9 @@ import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
|
||||
//@formatter:off
|
||||
|
||||
|
||||
/**
|
||||
* This is a pretty basic requirement, once you implement the interface, and createPartFromItemStack
|
||||
*
|
||||
@@ -46,7 +46,7 @@ import net.minecraft.item.ItemStack;
|
||||
* {
|
||||
* return 0;
|
||||
* }
|
||||
*
|
||||
*
|
||||
* {@literal @}Override
|
||||
* public boolean onItemUse(ItemStack is, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
|
||||
* {
|
||||
@@ -67,4 +67,4 @@ public interface IPartItem
|
||||
*/
|
||||
@Nullable
|
||||
IPart createPartFromItemStack( ItemStack is );
|
||||
}
|
||||
}
|
||||
@@ -1,182 +0,0 @@
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2013 AlgorithmX2
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package appeng.api.parts;
|
||||
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import appeng.api.util.IAESprite;
|
||||
import appeng.api.util.ModelGenerator;
|
||||
|
||||
|
||||
public interface IPartRenderHelper
|
||||
{
|
||||
/**
|
||||
* sets the Render Helpers Block Bounds. 0.0 - 16.0 block coords.
|
||||
*
|
||||
* No complaints about the size, I like using pixels :P
|
||||
*
|
||||
* @param minX minimal x bound
|
||||
* @param minY minimal y bound
|
||||
* @param minZ minimal z bound
|
||||
* @param maxX maximal x bound
|
||||
* @param maxY maximal y bound
|
||||
* @param maxZ maximal z bound
|
||||
*/
|
||||
void setBounds( float minX, float minY, float minZ, float maxX, float maxY, float maxZ );
|
||||
|
||||
/**
|
||||
* static renderer
|
||||
*
|
||||
* render a single face.
|
||||
*
|
||||
* @param pos POSITION of part
|
||||
* @param ico icon of part
|
||||
* @param face direction its facing
|
||||
* @param renderer renderer of part
|
||||
*/
|
||||
@SideOnly( Side.CLIENT )
|
||||
void renderFace( BlockPos pos, IAESprite ico, EnumFacing face, ModelGenerator renderer );
|
||||
|
||||
/**
|
||||
* static renderer
|
||||
*
|
||||
* render a box with a cut out box in the center.
|
||||
*
|
||||
* @param pos pos of part
|
||||
* @param ico icon of part
|
||||
* @param face face of part
|
||||
* @param edgeThickness thickness of the edge
|
||||
* @param renderer renderer
|
||||
*/
|
||||
@SideOnly( Side.CLIENT )
|
||||
void renderFaceCutout( BlockPos pos, IAESprite ico, EnumFacing face, float edgeThickness, ModelGenerator renderer );
|
||||
|
||||
/**
|
||||
* static renderer
|
||||
*
|
||||
* render a block of specified bounds.
|
||||
*
|
||||
* @param pos pos of block
|
||||
* @param renderer renderer
|
||||
*/
|
||||
@SideOnly( Side.CLIENT )
|
||||
void renderBlock( BlockPos pos, ModelGenerator renderer );
|
||||
|
||||
/**
|
||||
* render a single face in inventory renderer.
|
||||
*
|
||||
* @param IIcon icon of part
|
||||
* @param direction face of part
|
||||
* @param renderer renderer
|
||||
*/
|
||||
@SideOnly( Side.CLIENT )
|
||||
void renderInventoryFace( IAESprite IIcon, EnumFacing direction, ModelGenerator renderer );
|
||||
|
||||
/**
|
||||
* render a box in inventory renderer.
|
||||
*
|
||||
* @param renderer renderer
|
||||
*/
|
||||
@SideOnly( Side.CLIENT )
|
||||
void renderInventoryBox( ModelGenerator renderer );
|
||||
|
||||
/**
|
||||
* inventory, and static renderer.
|
||||
*
|
||||
* set unique icons for each side of the block.
|
||||
*
|
||||
* @param down down face
|
||||
* @param up up face
|
||||
* @param north north face
|
||||
* @param south south face
|
||||
* @param west west face
|
||||
* @param east east face
|
||||
*/
|
||||
void setTexture( IAESprite down, IAESprite up, IAESprite north, IAESprite south, IAESprite west, IAESprite east );
|
||||
|
||||
/**
|
||||
* inventory, and static renderer.
|
||||
*
|
||||
* set all sides to a single TextureAtlasSprite.
|
||||
*
|
||||
* @param ico to be set icon
|
||||
*/
|
||||
void setTexture( IAESprite ico );
|
||||
|
||||
/**
|
||||
* configure the color multiplier for the inventory renderer.
|
||||
*
|
||||
* @param whiteVariant color multiplier
|
||||
*/
|
||||
void setInvColor( int whiteVariant );
|
||||
|
||||
/**
|
||||
* @return the block used for rendering, might need it for some reason...
|
||||
*/
|
||||
Block getBlock();
|
||||
|
||||
/**
|
||||
* @return the east vector in world directions, rather then renderer
|
||||
*/
|
||||
EnumFacing getWorldX();
|
||||
|
||||
/**
|
||||
* @return the up vector in world directions, rather then renderer.
|
||||
*/
|
||||
EnumFacing getWorldY();
|
||||
|
||||
/**
|
||||
* @return the forward vector in world directions, rather then renderer.
|
||||
*/
|
||||
EnumFacing getWorldZ();
|
||||
|
||||
/**
|
||||
* render a block using the current renderer state.
|
||||
*
|
||||
* @param pos pos of part
|
||||
* @param renderer renderer of part
|
||||
*/
|
||||
void renderBlockCurrentBounds( BlockPos pos, ModelGenerator renderer );
|
||||
|
||||
/**
|
||||
* allow you to enable your part to render during the alpha pass or the standard pass.
|
||||
*
|
||||
* @param pass render pass
|
||||
*/
|
||||
void renderForPass( int pass );
|
||||
|
||||
/**
|
||||
* Set which faces to render, remember to set back to ALL when you are done.
|
||||
*
|
||||
* @param complementOf sides to render
|
||||
*/
|
||||
void setFacesToRender( EnumSet<EnumFacing> complementOf );
|
||||
}
|
||||
@@ -26,11 +26,8 @@ package appeng.api.storage;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import appeng.api.implementations.tiles.IChestOrDrive;
|
||||
import appeng.api.util.IAESprite;
|
||||
|
||||
|
||||
/**
|
||||
@@ -61,30 +58,6 @@ public interface ICellHandler
|
||||
*/
|
||||
IMEInventoryHandler getCellInventory( ItemStack is, ISaveProvider host, StorageChannel channel );
|
||||
|
||||
/**
|
||||
* @return the ME Chest texture for light pixels this storage cell type, should be 10x10 with 3px of transparent
|
||||
* padding on a 16x16 texture, null is valid if your cell cannot be used in the ME Chest. refer to the
|
||||
* assets for examples.
|
||||
*/
|
||||
@SideOnly( Side.CLIENT )
|
||||
IAESprite getTopTexture_Light();
|
||||
|
||||
/**
|
||||
* @return the ME Chest texture for medium pixels this storage cell type, should be 10x10 with 3px of transparent
|
||||
* padding on a 16x16 texture, null is valid if your cell cannot be used in the ME Chest. refer to the
|
||||
* assets for examples.
|
||||
*/
|
||||
@SideOnly( Side.CLIENT )
|
||||
IAESprite getTopTexture_Medium();
|
||||
|
||||
/**
|
||||
* @return the ME Chest texture for dark pixels this storage cell type, should be 10x10 with 3px of transparent
|
||||
* padding on a 16x16 texture, null is valid if your cell cannot be used in the ME Chest. refer to the
|
||||
* assets for examples.
|
||||
*/
|
||||
@SideOnly( Side.CLIENT )
|
||||
IAESprite getTopTexture_Dark();
|
||||
|
||||
/**
|
||||
* Called when the storage cell is planed in an ME Chest and the user tries to open the terminal side, if your item
|
||||
* is not available via ME Chests simply tell the user they can't use it, or something, other wise you should open
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
|
||||
package appeng.api.util;
|
||||
|
||||
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
|
||||
|
||||
public interface IAESprite
|
||||
{
|
||||
|
||||
int getIconWidth();
|
||||
|
||||
int getIconHeight();
|
||||
|
||||
float getMaxU();
|
||||
|
||||
float getInterpolatedU( double px );
|
||||
|
||||
float getMinV();
|
||||
|
||||
float getMaxV();
|
||||
|
||||
String getIconName();
|
||||
|
||||
float getInterpolatedV( double px );
|
||||
|
||||
float getMinU();
|
||||
|
||||
TextureAtlasSprite getAtlas();
|
||||
|
||||
}
|
||||
@@ -1,119 +0,0 @@
|
||||
package appeng.api.util;
|
||||
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
|
||||
/**
|
||||
* This is a helper to render stuff in 1.8.+
|
||||
*
|
||||
* This is required by all blocks which require a better renderer than the in house default renderer
|
||||
*
|
||||
* @author thatsIch
|
||||
* @version rv3 - 16.02.2016
|
||||
* @since rv3 - 16.02.2016
|
||||
*/
|
||||
public interface ModelGenerator
|
||||
{
|
||||
int setUvRotateBottom( int i );
|
||||
|
||||
int setUvRotateTop( int i );
|
||||
|
||||
int setUvRotateEast( int i );
|
||||
|
||||
int setUvRotateWest( int i );
|
||||
|
||||
int setUvRotateNorth( int i );
|
||||
|
||||
int setUvRotateSouth( int i );
|
||||
|
||||
IAESprite[] getIcon( IBlockState iBlockState );
|
||||
|
||||
IAESprite getOverrideBlockTexture();
|
||||
|
||||
IBlockAccess getBlockAccess();
|
||||
|
||||
void setBlockAccess( IBlockAccess theWorld );
|
||||
|
||||
void setRenderAllFaces( boolean b );
|
||||
|
||||
void setOverrideBlockTexture( IAESprite o );
|
||||
|
||||
void setFlipTexture( boolean b );
|
||||
|
||||
void setRenderBoundsFromBlock( IBlockState state, @Nullable BlockPos pos );
|
||||
|
||||
void setRenderBounds( double v, double v1, double v2, double v3, double v4, double v5 );
|
||||
|
||||
boolean renderStandardBlock( Block block, BlockPos pos );
|
||||
|
||||
void setRenderFaces( EnumSet<EnumFacing> faces );
|
||||
|
||||
void setNormal( float v, float v1, float v2 );
|
||||
|
||||
void setColorOpaque_I( int color );
|
||||
|
||||
void setRenderMinX( double min );
|
||||
|
||||
void setRenderMinY( double min );
|
||||
|
||||
void setRenderMinZ( double min );
|
||||
|
||||
void setRenderMaxX( double max );
|
||||
|
||||
void setRenderMaxY( double max );
|
||||
|
||||
void setRenderMaxZ( double max );
|
||||
|
||||
void addVertexWithUV( EnumFacing face, double v, double v1, double v2, double interpolatedU, double interpolatedV );
|
||||
|
||||
void renderFaceZNeg( Block block, BlockPos pos, IAESprite ico );
|
||||
|
||||
void renderFaceZPos( Block block, BlockPos pos, IAESprite ico );
|
||||
|
||||
void renderFaceXPos( Block block, BlockPos pos, IAESprite ico );
|
||||
|
||||
void renderFaceXNeg( Block block, BlockPos pos, IAESprite ico );
|
||||
|
||||
void renderFaceYPos( Block block, BlockPos pos, IAESprite ico );
|
||||
|
||||
void renderFaceYNeg( Block block, BlockPos pos, IAESprite ico );
|
||||
|
||||
void setTranslation( int i, int i1, int i2 );
|
||||
|
||||
IAESprite getIcon( ItemStack itemStack );
|
||||
|
||||
void setBrightness( int i );
|
||||
|
||||
void setColorOpaque_F( float v, float v1, float v2 );
|
||||
|
||||
boolean isAlphaPass();
|
||||
|
||||
void setColorRGBA_F( int i, int i1, int i2, float v );
|
||||
|
||||
double getRenderMinX();
|
||||
|
||||
double getRenderMaxX();
|
||||
|
||||
double getRenderMinY();
|
||||
|
||||
double getRenderMaxY();
|
||||
|
||||
double getRenderMinZ();
|
||||
|
||||
double getRenderMaxZ();
|
||||
|
||||
void finalizeModel( boolean b );
|
||||
|
||||
IBakedModel getOutput();
|
||||
}
|
||||
Reference in New Issue
Block a user