More Rendering fixes

This commit is contained in:
Sebastian Hartte
2020-06-08 18:35:27 +02:00
parent 679ea1c332
commit b2afa0398c
44 changed files with 427 additions and 276 deletions
@@ -69,9 +69,6 @@ import appeng.util.SettingsFrom;
public abstract class AEBaseTileBlock<T extends AEBaseTile> extends AEBaseBlock
{
public static final ModelProperty<Direction> FORWARD = new ModelProperty<>();
public static final ModelProperty<Direction> UP = new ModelProperty<>();
@Nonnull
private Class<T> tileEntityClass;
@Nonnull
@@ -23,7 +23,6 @@ import appeng.container.ContainerOpener;
import appeng.container.implementations.ContainerCraftingCPU;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.state.BooleanProperty;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.state.StateContainer;
@@ -48,6 +47,7 @@ public abstract class AbstractCraftingUnitBlock<T extends TileCraftingTile> exte
{
super( props );
this.type = type;
this.setDefaultState(getDefaultState().with(FORMED, false).with(POWERED, false));
}
@Override
@@ -45,6 +45,7 @@ public class BlockMolecularAssembler extends AEBaseTileBlock<TileMolecularAssemb
public BlockMolecularAssembler(Block.Properties props)
{
super( props );
setDefaultState(getDefaultState().with(POWERED, false));
}
@Override
@@ -53,19 +54,10 @@ public class BlockMolecularAssembler extends AEBaseTileBlock<TileMolecularAssemb
builder.add(POWERED);
}
// FIXME: This apparently was used to update block states purely client-side... this wont work anymore :|
// FIXME @Override
// FIXME public BlockState getActualState( BlockState state, IBlockReader worldIn, BlockPos pos )
// FIXME {
// FIXME boolean powered = false;
// FIXME TileMolecularAssembler te = this.getTileEntity( worldIn, pos );
// FIXME if( te != null )
// FIXME {
// FIXME powered = te.isPowered();
// FIXME }
// FIXME
// FIXME return super.getActualState( state, worldIn, pos ).with( POWERED, powered );
// FIXME }
@Override
protected BlockState updateBlockStateFromTileEntity(BlockState currentState, TileMolecularAssembler te) {
return currentState.with(POWERED, te.isPowered());
}
@Override
public ActionResultType onBlockActivated(BlockState state, World w, BlockPos pos, PlayerEntity p, Hand hand, BlockRayTraceResult hit) {
@@ -31,6 +31,5 @@ public class DriveRendering extends BlockRenderingCustomizer
public void customize( IBlockRendering rendering, IItemRendering itemRendering )
{
rendering.renderType(RenderType.getCutout());
// FIXME rendering.builtInModel( "models/block/builtin/drive", new DriveModel() );
}
}