Major Refactoring of Bootstrap Code (#75)
- Refactored boostrap code: * Completely reworked item/block/tile registration. * Fixed server side startup. * Fixed server side startup. * More documentation. * More heavy cleanup * More cleanups. * Major refactoring of state mapping and fixes a lot of other issue related to item rendering. * Fixes sky chest item models (no item TESR). * Only use CachingRotatingBakedModel for tile entities automatically. Fix default rotation of quartz pillar for item model. * Used method reference instead of lambda for ItemMeshDefinition for multiparts. * Removed unnecessary IHasSpecialItemModel * Removed unused IconReg class. * Updated resource pack version.
This commit is contained in:
committed by
Sebastian Hartte
parent
66df324ef0
commit
6f2bbfab4c
@@ -19,25 +19,16 @@
|
||||
package appeng.block;
|
||||
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockStairs;
|
||||
|
||||
import appeng.core.features.AEBlockFeatureHandler;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.core.features.IAEFeature;
|
||||
import appeng.core.features.IFeatureHandler;
|
||||
|
||||
|
||||
public abstract class AEBaseStairBlock extends BlockStairs implements IAEFeature, IHasSpecialItemModel
|
||||
public abstract class AEBaseStairBlock extends BlockStairs
|
||||
{
|
||||
private final IFeatureHandler features;
|
||||
|
||||
protected AEBaseStairBlock( final Block block, final EnumSet<AEFeature> features, final String type )
|
||||
protected AEBaseStairBlock( final Block block, final String type )
|
||||
{
|
||||
super( block.getDefaultState() );
|
||||
|
||||
@@ -45,21 +36,15 @@ public abstract class AEBaseStairBlock extends BlockStairs implements IAEFeature
|
||||
Preconditions.checkNotNull( block.getUnlocalizedName() );
|
||||
Preconditions.checkArgument( block.getUnlocalizedName().length() > 0 );
|
||||
|
||||
this.features = new AEBlockFeatureHandler( features, this, Optional.of( type ) );
|
||||
|
||||
this.setUnlocalizedName( "stair." + type );
|
||||
this.setLightOpacity( 0 );
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFeatureHandler handler()
|
||||
public String toString()
|
||||
{
|
||||
return this.features;
|
||||
String regName = getRegistryName() != null ? getRegistryName().getResourcePath() : "unregistered";
|
||||
return getClass().getSimpleName() + "[" + regName + "]";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit()
|
||||
{
|
||||
// Override to do stuff
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user