mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-20 12:19:46 +00:00
Lots of blocks
This commit is contained in:
1 parent
a268149d73
commit
5cc6879ecb
128 files changed
+684
-446
No files matched your search
@@ -13,6 +13,7 @@ package vazkii.botania.common.block;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
@@ -21,7 +22,10 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumBlockRenderType;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.crafting.IInfusionStabiliser;
|
||||
import vazkii.botania.api.lexicon.ILexiconable;
|
||||
@@ -39,18 +43,23 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
@Optional.Interface(modid = "Thaumcraft", iface = "thaumcraft.api.crafting.IInfusionStabiliser", striprefs = true)
|
||||
public class BlockPylon extends BlockMod implements ILexiconable, IInfusionStabiliser {
|
||||
|
||||
private static final AxisAlignedBB AABB = new AxisAlignedBB(0.125, 0, 0.125, 0.875, 21.0/16, 0.875);
|
||||
|
||||
public BlockPylon() {
|
||||
super(Material.iron);
|
||||
setHardness(5.5F);
|
||||
setStepSound(soundTypeMetal);
|
||||
setSoundType(SoundType.METAL);
|
||||
setUnlocalizedName(LibBlockNames.PYLON);
|
||||
setLightLevel(0.5F);
|
||||
|
||||
float f = 1F / 16F * 2F;
|
||||
setBlockBounds(f, 0F, f, 1F - f, 1F / 16F * 21F, 1F - f);
|
||||
setDefaultState(blockState.getBaseState().withProperty(BotaniaStateProps.PYLON_VARIANT, PylonVariant.MANA));
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess world, BlockPos pos) {
|
||||
return AABB;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockStateContainer createBlockState() {
|
||||
return new BlockStateContainer(this, BotaniaStateProps.PYLON_VARIANT);
|
||||
@@ -102,8 +111,8 @@ public class BlockPylon extends BlockMod implements ILexiconable, IInfusionStabi
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return 2;
|
||||
public EnumBlockRenderType getRenderType(IBlockState state) {
|
||||
return EnumBlockRenderType.ENTITYBLOCK_ANIMATED;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user