Sky chest

This commit is contained in:
xsun2001 2017-08-13 21:47:30 +08:00
parent 107fc55165
commit 9c7e22b914

View file

@ -22,6 +22,7 @@ package appeng.block.storage;
import appeng.api.AEApi; import appeng.api.AEApi;
import appeng.block.AEBaseTileBlock; import appeng.block.AEBaseTileBlock;
import appeng.client.render.blocks.RenderBlockSkyChest; import appeng.client.render.blocks.RenderBlockSkyChest;
import appeng.core.features.AEFeature;
import appeng.core.sync.GuiBridge; import appeng.core.sync.GuiBridge;
import appeng.helpers.ICustomCollision; import appeng.helpers.ICustomCollision;
import appeng.tile.storage.TileSkyChest; import appeng.tile.storage.TileSkyChest;
@ -44,6 +45,7 @@ import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection; import net.minecraftforge.common.util.ForgeDirection;
import java.util.Collections; import java.util.Collections;
import java.util.EnumSet;
import java.util.List; import java.util.List;
@ -54,16 +56,7 @@ public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
private static final double AABB_OFFSET_SIDES = 0; private static final double AABB_OFFSET_SIDES = 0;
private static final double AABB_OFFSET_TOP = .125d; private static final double AABB_OFFSET_TOP = .125d;
public BlockSkyChest()
public enum SkyChestType
{
STONE, BLOCK
}
public final SkyChestType type;
public BlockSkyChest( final SkyChestType type )
{ {
super( Material.rock ); super( Material.rock );
this.setTileEntity( TileSkyChest.class ); this.setTileEntity( TileSkyChest.class );
@ -71,7 +64,7 @@ public class BlockSkyChest extends AEBaseTileBlock implements ICustomCollision
this.lightOpacity = 0; this.lightOpacity = 0;
this.setHardness( 50 ); this.setHardness( 50 );
this.blockResistance = 150.0f; this.blockResistance = 150.0f;
this.type = type; this.setFeature( EnumSet.of( AEFeature.Core, AEFeature.SkyStoneChests ) );
} }
@Override @Override