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
@@ -20,16 +20,11 @@ package appeng.block.storage;
|
||||
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -39,24 +34,19 @@ import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.block.IHasSpecialItemModel;
|
||||
import appeng.client.render.tesr.SkyChestTESR;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.core.sync.GuiBridge;
|
||||
import appeng.helpers.ICustomCollision;
|
||||
import appeng.tile.storage.TileSkyChest;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
||||
public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision, IHasSpecialItemModel
|
||||
public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
|
||||
{
|
||||
|
||||
public static enum SkyChestType
|
||||
public enum SkyChestType
|
||||
{
|
||||
STONE, BLOCK
|
||||
};
|
||||
@@ -65,7 +55,7 @@ public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision,
|
||||
|
||||
public BlockSkyChest( final SkyChestType type )
|
||||
{
|
||||
super( Material.ROCK, Optional.of( type.name() ) );
|
||||
super( Material.ROCK );
|
||||
this.setTileEntity( TileSkyChest.class );
|
||||
this.setOpaque( this.setFullSize( false ) );
|
||||
this.lightOpacity = 0;
|
||||
@@ -73,7 +63,6 @@ public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision,
|
||||
this.setHardness( 50 );
|
||||
this.blockResistance = 150.0f;
|
||||
this.type = type;
|
||||
this.setFeature( EnumSet.of( AEFeature.Core, AEFeature.SkyStoneChests ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -81,20 +70,8 @@ public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision,
|
||||
{
|
||||
return EnumBlockRenderType.ENTITYBLOCK_ANIMATED;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly( Side.CLIENT )
|
||||
public TileEntitySpecialRenderer<TileSkyChest> getTESR()
|
||||
{
|
||||
return new SkyChestTESR();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasItemTESR()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user