Lots of compile fixes
This commit is contained in:
@@ -19,72 +19,12 @@
|
||||
package appeng.block.crafting;
|
||||
|
||||
|
||||
import net.minecraft.block.BlockStateContainer;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Direction;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockReader;
|
||||
import net.minecraftforge.common.property.ExtendedBlockState;
|
||||
import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
import net.minecraftforge.common.property.IUnlistedProperty;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import appeng.api.util.AEColor;
|
||||
import appeng.client.UnlistedProperty;
|
||||
import appeng.tile.crafting.TileCraftingMonitorTile;
|
||||
|
||||
|
||||
public class BlockCraftingMonitor extends BlockCraftingUnit
|
||||
public class BlockCraftingMonitor extends AbstractCraftingUnitBlock<TileCraftingMonitorTile>
|
||||
{
|
||||
|
||||
public static final UnlistedProperty<AEColor> COLOR = new UnlistedProperty<>( "color", AEColor.class );
|
||||
|
||||
public BlockCraftingMonitor()
|
||||
public BlockCraftingMonitor(Properties props)
|
||||
{
|
||||
super( CraftingUnitType.MONITOR );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState()
|
||||
{
|
||||
return new ExtendedBlockState( this, this.getAEStates(), new IUnlistedProperty[] {
|
||||
STATE,
|
||||
COLOR,
|
||||
FORWARD,
|
||||
UP
|
||||
} );
|
||||
}
|
||||
|
||||
@Override
|
||||
public IExtendedBlockState getExtendedState( BlockState state, IBlockReader world, BlockPos pos )
|
||||
{
|
||||
AEColor color = AEColor.TRANSPARENT;
|
||||
Direction forward = Direction.NORTH;
|
||||
Direction up = Direction.UP;
|
||||
|
||||
TileCraftingMonitorTile te = this.getTileEntity( world, pos );
|
||||
if( te != null )
|
||||
{
|
||||
color = te.getColor();
|
||||
forward = te.getForward();
|
||||
up = te.getUp();
|
||||
}
|
||||
|
||||
return super.getExtendedState( state, world, pos )
|
||||
.with( COLOR, color )
|
||||
.with( FORWARD, forward )
|
||||
.with( UP, up );
|
||||
}
|
||||
|
||||
@Override
|
||||
@OnlyIn( Dist.CLIENT )
|
||||
public void fillItemGroup(ItemGroup group, NonNullList<ItemStack> itemStacks)
|
||||
{
|
||||
itemStacks.add( new ItemStack( this, 1, 0 ) );
|
||||
super( props, CraftingUnitType.MONITOR );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user