1.15 port
This commit is contained in:
@@ -26,14 +26,14 @@ import java.util.List;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.block.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
|
||||
import appeng.block.crafting.BlockCraftingUnit;
|
||||
@@ -65,7 +65,7 @@ abstract class CraftingCubeBakedModel implements IBakedModel
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BakedQuad> getQuads( @Nullable IBlockState state, @Nullable EnumFacing side, long rand )
|
||||
public List<BakedQuad> getQuads( @Nullable BlockState state, @Nullable Direction side, long rand )
|
||||
{
|
||||
|
||||
if( side == null )
|
||||
@@ -73,7 +73,7 @@ abstract class CraftingCubeBakedModel implements IBakedModel
|
||||
return Collections.emptyList(); // No generic quads for this model
|
||||
}
|
||||
|
||||
EnumSet<EnumFacing> connections = getConnections( state );
|
||||
EnumSet<Direction> connections = getConnections( state );
|
||||
|
||||
List<BakedQuad> quads = new ArrayList<>();
|
||||
CubeBuilder builder = new CubeBuilder( this.format, quads );
|
||||
@@ -84,14 +84,14 @@ abstract class CraftingCubeBakedModel implements IBakedModel
|
||||
this.addRing( builder, side, connections );
|
||||
|
||||
// Calculate the bounds of the "inner" block that is framed by the border drawn above
|
||||
float x2 = connections.contains( EnumFacing.EAST ) ? 16 : 13.01f;
|
||||
float x1 = connections.contains( EnumFacing.WEST ) ? 0 : 2.99f;
|
||||
float x2 = connections.contains( Direction.EAST ) ? 16 : 13.01f;
|
||||
float x1 = connections.contains( Direction.WEST ) ? 0 : 2.99f;
|
||||
|
||||
float y2 = connections.contains( EnumFacing.UP ) ? 16 : 13.01f;
|
||||
float y1 = connections.contains( EnumFacing.DOWN ) ? 0 : 2.99f;
|
||||
float y2 = connections.contains( Direction.UP ) ? 16 : 13.01f;
|
||||
float y1 = connections.contains( Direction.DOWN ) ? 0 : 2.99f;
|
||||
|
||||
float z2 = connections.contains( EnumFacing.SOUTH ) ? 16 : 13.01f;
|
||||
float z1 = connections.contains( EnumFacing.NORTH ) ? 0 : 2.99f;
|
||||
float z2 = connections.contains( Direction.SOUTH ) ? 16 : 13.01f;
|
||||
float z1 = connections.contains( Direction.NORTH ) ? 0 : 2.99f;
|
||||
|
||||
// On the axis of the side that we're currently drawing, extend the dimensions
|
||||
// out to the outer face of the block
|
||||
@@ -119,21 +119,21 @@ abstract class CraftingCubeBakedModel implements IBakedModel
|
||||
return quads;
|
||||
}
|
||||
|
||||
private void addRing( CubeBuilder builder, @Nullable EnumFacing side, EnumSet<EnumFacing> connections )
|
||||
private void addRing( CubeBuilder builder, @Nullable Direction side, EnumSet<Direction> connections )
|
||||
{
|
||||
// Fill in the corners
|
||||
builder.setTexture( this.ringCorner );
|
||||
this.addCornerCap( builder, connections, side, EnumFacing.UP, EnumFacing.EAST, EnumFacing.NORTH );
|
||||
this.addCornerCap( builder, connections, side, EnumFacing.UP, EnumFacing.EAST, EnumFacing.SOUTH );
|
||||
this.addCornerCap( builder, connections, side, EnumFacing.UP, EnumFacing.WEST, EnumFacing.NORTH );
|
||||
this.addCornerCap( builder, connections, side, EnumFacing.UP, EnumFacing.WEST, EnumFacing.SOUTH );
|
||||
this.addCornerCap( builder, connections, side, EnumFacing.DOWN, EnumFacing.EAST, EnumFacing.NORTH );
|
||||
this.addCornerCap( builder, connections, side, EnumFacing.DOWN, EnumFacing.EAST, EnumFacing.SOUTH );
|
||||
this.addCornerCap( builder, connections, side, EnumFacing.DOWN, EnumFacing.WEST, EnumFacing.NORTH );
|
||||
this.addCornerCap( builder, connections, side, EnumFacing.DOWN, EnumFacing.WEST, EnumFacing.SOUTH );
|
||||
this.addCornerCap( builder, connections, side, Direction.UP, Direction.EAST, Direction.NORTH );
|
||||
this.addCornerCap( builder, connections, side, Direction.UP, Direction.EAST, Direction.SOUTH );
|
||||
this.addCornerCap( builder, connections, side, Direction.UP, Direction.WEST, Direction.NORTH );
|
||||
this.addCornerCap( builder, connections, side, Direction.UP, Direction.WEST, Direction.SOUTH );
|
||||
this.addCornerCap( builder, connections, side, Direction.DOWN, Direction.EAST, Direction.NORTH );
|
||||
this.addCornerCap( builder, connections, side, Direction.DOWN, Direction.EAST, Direction.SOUTH );
|
||||
this.addCornerCap( builder, connections, side, Direction.DOWN, Direction.WEST, Direction.NORTH );
|
||||
this.addCornerCap( builder, connections, side, Direction.DOWN, Direction.WEST, Direction.SOUTH );
|
||||
|
||||
// Fill in the remaining stripes of the face
|
||||
for( EnumFacing a : EnumFacing.values() )
|
||||
for( Direction a : Direction.values() )
|
||||
{
|
||||
if( a == side || a == side.getOpposite() )
|
||||
{
|
||||
@@ -141,11 +141,11 @@ abstract class CraftingCubeBakedModel implements IBakedModel
|
||||
}
|
||||
|
||||
// Select the horizontal or vertical ring texture depending on which side we're filling in
|
||||
if( ( side.getAxis() != EnumFacing.Axis.Y ) && ( a == EnumFacing.NORTH || a == EnumFacing.EAST || a == EnumFacing.WEST || a == EnumFacing.SOUTH ) )
|
||||
if( ( side.getAxis() != Direction.Axis.Y ) && ( a == Direction.NORTH || a == Direction.EAST || a == Direction.WEST || a == Direction.SOUTH ) )
|
||||
{
|
||||
builder.setTexture( this.ringVer );
|
||||
}
|
||||
else if( side.getAxis() == EnumFacing.Axis.Y && ( a == EnumFacing.EAST || a == EnumFacing.WEST ) )
|
||||
else if( side.getAxis() == Direction.Axis.Y && ( a == Direction.EAST || a == Direction.WEST ) )
|
||||
{
|
||||
builder.setTexture( this.ringVer );
|
||||
}
|
||||
@@ -194,8 +194,8 @@ abstract class CraftingCubeBakedModel implements IBakedModel
|
||||
// drawn in those directions. Since a corner is drawn if the three touching faces dont have adjacent
|
||||
// crafting cube blocks, we'd have to check for a, side, and the perpendicular direction. But in this
|
||||
// block, we've already checked for side (due to face culling) and a (see above).
|
||||
EnumFacing perpendicular = a.rotateAround( side.getAxis() );
|
||||
for( EnumFacing cornerCandidate : EnumSet.of( perpendicular, perpendicular.getOpposite() ) )
|
||||
Direction perpendicular = a.rotateAround( side.getAxis() );
|
||||
for( Direction cornerCandidate : EnumSet.of( perpendicular, perpendicular.getOpposite() ) )
|
||||
{
|
||||
if( !connections.contains( cornerCandidate ) )
|
||||
{
|
||||
@@ -232,7 +232,7 @@ abstract class CraftingCubeBakedModel implements IBakedModel
|
||||
/**
|
||||
* Adds a 3x3x3 corner cap to the cube builder if there are no adjacent crafting cubes on that corner.
|
||||
*/
|
||||
private void addCornerCap( CubeBuilder builder, EnumSet<EnumFacing> connections, EnumFacing side, EnumFacing down, EnumFacing west, EnumFacing north )
|
||||
private void addCornerCap( CubeBuilder builder, EnumSet<Direction> connections, Direction side, Direction down, Direction west, Direction north )
|
||||
{
|
||||
if( connections.contains( down ) || connections.contains( west ) || connections.contains( north ) )
|
||||
{
|
||||
@@ -245,35 +245,35 @@ abstract class CraftingCubeBakedModel implements IBakedModel
|
||||
return;
|
||||
}
|
||||
|
||||
float x1 = ( west == EnumFacing.WEST ? 0 : 13 );
|
||||
float y1 = ( down == EnumFacing.DOWN ? 0 : 13 );
|
||||
float z1 = ( north == EnumFacing.NORTH ? 0 : 13 );
|
||||
float x2 = ( west == EnumFacing.WEST ? 3 : 16 );
|
||||
float y2 = ( down == EnumFacing.DOWN ? 3 : 16 );
|
||||
float z2 = ( north == EnumFacing.NORTH ? 3 : 16 );
|
||||
float x1 = ( west == Direction.WEST ? 0 : 13 );
|
||||
float y1 = ( down == Direction.DOWN ? 0 : 13 );
|
||||
float z1 = ( north == Direction.NORTH ? 0 : 13 );
|
||||
float x2 = ( west == Direction.WEST ? 3 : 16 );
|
||||
float y2 = ( down == Direction.DOWN ? 3 : 16 );
|
||||
float z2 = ( north == Direction.NORTH ? 3 : 16 );
|
||||
builder.addCube( x1, y1, z1, x2, y2, z2 );
|
||||
}
|
||||
|
||||
// Retrieve the cube connection state from the block state
|
||||
// If none is present, just assume there are no adjacent crafting cube blocks
|
||||
private static EnumSet<EnumFacing> getConnections( @Nullable IBlockState state )
|
||||
private static EnumSet<Direction> getConnections( @Nullable BlockState state )
|
||||
{
|
||||
if( !( state instanceof IExtendedBlockState ) )
|
||||
{
|
||||
return EnumSet.noneOf( EnumFacing.class );
|
||||
return EnumSet.noneOf( Direction.class );
|
||||
}
|
||||
|
||||
IExtendedBlockState extState = (IExtendedBlockState) state;
|
||||
CraftingCubeState cubeState = extState.getValue( BlockCraftingUnit.STATE );
|
||||
if( cubeState == null )
|
||||
{
|
||||
return EnumSet.noneOf( EnumFacing.class );
|
||||
return EnumSet.noneOf( Direction.class );
|
||||
}
|
||||
|
||||
return cubeState.getConnections();
|
||||
}
|
||||
|
||||
protected abstract void addInnerCube( EnumFacing facing, IBlockState state, CubeBuilder builder, float x1, float y1, float z1, float x2, float y2, float z2 );
|
||||
protected abstract void addInnerCube( Direction facing, BlockState state, CubeBuilder builder, float x1, float y1, float z1, float x2, float y2, float z2 );
|
||||
|
||||
@Override
|
||||
public boolean isAmbientOcclusion()
|
||||
|
||||
@@ -23,11 +23,11 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import appeng.block.crafting.BlockCraftingUnit;
|
||||
import appeng.bootstrap.BlockRenderingCustomizer;
|
||||
@@ -53,7 +53,7 @@ public class CraftingCubeRendering extends BlockRenderingCustomizer
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
@OnlyIn( Dist.CLIENT )
|
||||
public void customize( IBlockRendering rendering, IItemRendering itemRendering )
|
||||
{
|
||||
ResourceLocation baseName = new ResourceLocation( AppEng.MOD_ID, this.registryName );
|
||||
@@ -82,10 +82,10 @@ public class CraftingCubeRendering extends BlockRenderingCustomizer
|
||||
|
||||
}
|
||||
|
||||
private Map<IBlockState, ModelResourceLocation> mapState( Block block, ModelResourceLocation defaultModel, ModelResourceLocation formedModel )
|
||||
private Map<BlockState, ModelResourceLocation> mapState( Block block, ModelResourceLocation defaultModel, ModelResourceLocation formedModel )
|
||||
{
|
||||
Map<IBlockState, ModelResourceLocation> result = new HashMap<>();
|
||||
for( IBlockState state : block.getBlockState().getValidStates() )
|
||||
Map<BlockState, ModelResourceLocation> result = new HashMap<>();
|
||||
for( BlockState state : block.getBlockState().getValidStates() )
|
||||
{
|
||||
if( state.getValue( BlockCraftingUnit.FORMED ) )
|
||||
{
|
||||
|
||||
@@ -21,7 +21,7 @@ package appeng.client.render.crafting;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
|
||||
|
||||
/**
|
||||
@@ -31,14 +31,14 @@ public final class CraftingCubeState
|
||||
{
|
||||
|
||||
// Contains information on which sides of the block are connected to other parts of a formed crafting cube
|
||||
private final EnumSet<EnumFacing> connections;
|
||||
private final EnumSet<Direction> connections;
|
||||
|
||||
public CraftingCubeState( EnumSet<EnumFacing> connections )
|
||||
public CraftingCubeState( EnumSet<Direction> connections )
|
||||
{
|
||||
this.connections = connections;
|
||||
}
|
||||
|
||||
public EnumSet<EnumFacing> getConnections()
|
||||
public EnumSet<Direction> getConnections()
|
||||
{
|
||||
return this.connections;
|
||||
}
|
||||
|
||||
@@ -21,9 +21,9 @@ package appeng.client.render.crafting;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.client.render.TesrRenderHelper;
|
||||
@@ -33,7 +33,7 @@ import appeng.tile.crafting.TileCraftingMonitorTile;
|
||||
/**
|
||||
* Renders the item currently being crafted
|
||||
*/
|
||||
@SideOnly( Side.CLIENT )
|
||||
@OnlyIn( Dist.CLIENT )
|
||||
public class CraftingMonitorTESR extends TileEntitySpecialRenderer<TileCraftingMonitorTile>
|
||||
{
|
||||
|
||||
@@ -45,7 +45,7 @@ public class CraftingMonitorTESR extends TileEntitySpecialRenderer<TileCraftingM
|
||||
return;
|
||||
}
|
||||
|
||||
EnumFacing facing = te.getForward();
|
||||
Direction facing = te.getForward();
|
||||
|
||||
IAEItemStack jobProgress = te.getJobProgress();
|
||||
if( jobProgress != null )
|
||||
|
||||
@@ -12,17 +12,17 @@ import com.google.common.collect.ImmutableMap;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.block.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.model.BakedQuad;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
|
||||
import net.minecraft.client.renderer.block.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.PerspectiveMapWrapper;
|
||||
import net.minecraftforge.common.model.TRSRTransformation;
|
||||
@@ -53,7 +53,7 @@ class ItemEncodedPatternBakedModel implements IBakedModel
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BakedQuad> getQuads( @Nullable IBlockState state, @Nullable EnumFacing side, long rand )
|
||||
public List<BakedQuad> getQuads( @Nullable BlockState state, @Nullable Direction side, long rand )
|
||||
{
|
||||
return this.baseModel.getQuads( state, side, rand );
|
||||
}
|
||||
@@ -157,7 +157,7 @@ class ItemEncodedPatternBakedModel implements IBakedModel
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BakedQuad> getQuads( @Nullable IBlockState state, @Nullable EnumFacing side, long rand )
|
||||
public List<BakedQuad> getQuads( @Nullable BlockState state, @Nullable Direction side, long rand )
|
||||
{
|
||||
// This may be called for items on the ground, in which case we will always fall back to the pattern
|
||||
return ItemEncodedPatternBakedModel.this.baseModel.getQuads( state, side, rand );
|
||||
@@ -220,7 +220,7 @@ class ItemEncodedPatternBakedModel implements IBakedModel
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBakedModel handleItemState( IBakedModel originalModel, ItemStack stack, World world, EntityLivingBase entity )
|
||||
public IBakedModel handleItemState( IBakedModel originalModel, ItemStack stack, World world, LivingEntity entity )
|
||||
{
|
||||
boolean shiftHeld = Keyboard.isKeyDown( Keyboard.KEY_LSHIFT ) || Keyboard.isKeyDown( Keyboard.KEY_RSHIFT );
|
||||
if( shiftHeld )
|
||||
@@ -229,7 +229,7 @@ class ItemEncodedPatternBakedModel implements IBakedModel
|
||||
ItemStack output = iep.getOutput( stack );
|
||||
if( !output.isEmpty() )
|
||||
{
|
||||
IBakedModel realModel = Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getItemModel( output );
|
||||
IBakedModel realModel = Minecraft.getInstance().getRenderItem().getItemModelMesher().getItemModel( output );
|
||||
// Give the item model a chance to handle the overrides as well
|
||||
realModel = realModel.getOverrides().handleItemState( realModel, output, world, entity );
|
||||
return new ShiftHoldingModelWrapper( realModel );
|
||||
|
||||
@@ -4,8 +4,8 @@ package appeng.client.render.crafting;
|
||||
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import appeng.bootstrap.IItemRendering;
|
||||
import appeng.bootstrap.ItemRenderingCustomizer;
|
||||
@@ -18,7 +18,7 @@ public class ItemEncodedPatternRendering extends ItemRenderingCustomizer
|
||||
private static final ResourceLocation MODEL = new ResourceLocation( AppEng.MOD_ID, "builtin/encoded_pattern" );
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
@OnlyIn( Dist.CLIENT )
|
||||
public void customize( IItemRendering rendering )
|
||||
{
|
||||
rendering.builtInModel( "models/item/builtin/encoded_pattern", new ItemEncodedPatternModel() );
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
package appeng.client.render.crafting;
|
||||
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
|
||||
import appeng.block.crafting.BlockCraftingUnit;
|
||||
import appeng.client.render.cablebus.CubeBuilder;
|
||||
@@ -47,7 +47,7 @@ class LightBakedModel extends CraftingCubeBakedModel
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addInnerCube( EnumFacing facing, IBlockState state, CubeBuilder builder, float x1, float y1, float z1, float x2, float y2, float z2 )
|
||||
protected void addInnerCube( Direction facing, BlockState state, CubeBuilder builder, float x1, float y1, float z1, float x2, float y2, float z2 )
|
||||
{
|
||||
builder.setTexture( this.baseTexture );
|
||||
builder.addCube( x1, y1, z1, x2, y2, z2 );
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
package appeng.client.render.crafting;
|
||||
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
|
||||
import appeng.api.util.AEColor;
|
||||
@@ -61,9 +61,9 @@ class MonitorBakedModel extends CraftingCubeBakedModel
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addInnerCube( EnumFacing side, IBlockState state, CubeBuilder builder, float x1, float y1, float z1, float x2, float y2, float z2 )
|
||||
protected void addInnerCube( Direction side, BlockState state, CubeBuilder builder, float x1, float y1, float z1, float x2, float y2, float z2 )
|
||||
{
|
||||
EnumFacing forward = getForward( state );
|
||||
Direction forward = getForward( state );
|
||||
|
||||
// For sides other than the front, use the chassis texture
|
||||
if( side != forward )
|
||||
@@ -96,7 +96,7 @@ class MonitorBakedModel extends CraftingCubeBakedModel
|
||||
|
||||
}
|
||||
|
||||
private static AEColor getColor( IBlockState state )
|
||||
private static AEColor getColor( BlockState state )
|
||||
{
|
||||
if( state instanceof IExtendedBlockState )
|
||||
{
|
||||
@@ -111,18 +111,18 @@ class MonitorBakedModel extends CraftingCubeBakedModel
|
||||
return AEColor.TRANSPARENT;
|
||||
}
|
||||
|
||||
private static EnumFacing getForward( IBlockState state )
|
||||
private static Direction getForward( BlockState state )
|
||||
{
|
||||
if( state instanceof IExtendedBlockState )
|
||||
{
|
||||
IExtendedBlockState extState = (IExtendedBlockState) state;
|
||||
EnumFacing forward = extState.getValue( BlockCraftingMonitor.FORWARD );
|
||||
Direction forward = extState.getValue( BlockCraftingMonitor.FORWARD );
|
||||
if( forward != null )
|
||||
{
|
||||
return forward;
|
||||
}
|
||||
}
|
||||
|
||||
return EnumFacing.NORTH;
|
||||
return Direction.NORTH;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,10 +19,10 @@
|
||||
package appeng.client.render.crafting;
|
||||
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Direction;
|
||||
|
||||
import appeng.client.render.cablebus.CubeBuilder;
|
||||
|
||||
@@ -42,7 +42,7 @@ class UnitBakedModel extends CraftingCubeBakedModel
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addInnerCube( EnumFacing facing, IBlockState state, CubeBuilder builder, float x1, float y1, float z1, float x2, float y2, float z2 )
|
||||
protected void addInnerCube( Direction facing, BlockState state, CubeBuilder builder, float x1, float y1, float z1, float x2, float y2, float z2 )
|
||||
{
|
||||
builder.setTexture( this.unitTexture );
|
||||
builder.addCube( x1, y1, z1, x2, y2, z2 );
|
||||
|
||||
Reference in New Issue
Block a user