mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-16 01:54:46 +00:00
[ci skip] spotlessApply with the new settings
This commit is contained in:
1 parent
a314fccd1b
commit
8f026dad8f
161 files changed
+14073
-12846
No files matched your search
@@ -12,6 +12,7 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import team.chisel.block.tileentity.TileEntityCarvableBeacon;
|
||||
import team.chisel.init.ChiselBlocks;
|
||||
|
||||
@@ -22,77 +23,78 @@ import com.cricketcraft.chisel.api.carving.IVariationInfo;
|
||||
|
||||
public class BlockCarvableBeacon extends BlockBeacon implements ICarvable {
|
||||
|
||||
public static int renderId;
|
||||
public static int renderId;
|
||||
|
||||
public CarvableHelper carverHelper;
|
||||
public CarvableHelper carverHelper;
|
||||
|
||||
public BlockCarvableBeacon() {
|
||||
super();
|
||||
setCreativeTab(ChiselTabs.tabOtherChiselBlocks);
|
||||
setLightLevel(5.0F);
|
||||
setBlockTextureName("beacon");
|
||||
carverHelper = new CarvableHelper(this);
|
||||
}
|
||||
public BlockCarvableBeacon() {
|
||||
super();
|
||||
setCreativeTab(ChiselTabs.tabOtherChiselBlocks);
|
||||
setLightLevel(5.0F);
|
||||
setBlockTextureName("beacon");
|
||||
carverHelper = new CarvableHelper(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityCarvableBeacon();
|
||||
}
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileEntityCarvableBeacon();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par5, float hitX, float hitY, float hitZ) {
|
||||
if (world.isRemote) {
|
||||
return true;
|
||||
} else {
|
||||
TileEntityCarvableBeacon tileentitybeacon = (TileEntityCarvableBeacon) world.getTileEntity(x, y, z);
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par5, float hitX,
|
||||
float hitY, float hitZ) {
|
||||
if (world.isRemote) {
|
||||
return true;
|
||||
} else {
|
||||
TileEntityCarvableBeacon tileentitybeacon = (TileEntityCarvableBeacon) world.getTileEntity(x, y, z);
|
||||
|
||||
if (tileentitybeacon != null) {
|
||||
player.func_146104_a(tileentitybeacon);
|
||||
}
|
||||
if (tileentitybeacon != null) {
|
||||
player.func_146104_a(tileentitybeacon);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs p_149666_2_, List list) {
|
||||
for (int i = 0; i < 16; i++) {
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
}
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs p_149666_2_, List list) {
|
||||
for (int i = 0; i < 16; i++) {
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
|
||||
return new ItemStack(ChiselBlocks.beacon, 1, world.getBlockMetadata(x, y, z));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int meta) {
|
||||
return meta;
|
||||
}
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
|
||||
return new ItemStack(ChiselBlocks.beacon, 1, world.getBlockMetadata(x, y, z));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return renderId;
|
||||
}
|
||||
@Override
|
||||
public int damageDropped(int meta) {
|
||||
return meta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
|
||||
super.onBlockPlacedBy(world, x, y, z, player, stack);
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return renderId;
|
||||
}
|
||||
|
||||
if (stack.hasDisplayName()) {
|
||||
((TileEntityCarvableBeacon) world.getTileEntity(x, y, z)).func_145999_a(stack.getDisplayName());
|
||||
}
|
||||
}
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
|
||||
super.onBlockPlacedBy(world, x, y, z, player, stack);
|
||||
|
||||
@Override
|
||||
public IVariationInfo getManager(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
return carverHelper.getVariation(metadata);
|
||||
}
|
||||
if (stack.hasDisplayName()) {
|
||||
((TileEntityCarvableBeacon) world.getTileEntity(x, y, z)).func_145999_a(stack.getDisplayName());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getManager(int meta) {
|
||||
return carverHelper.getVariation(meta);
|
||||
}
|
||||
@Override
|
||||
public IVariationInfo getManager(IBlockAccess world, int x, int y, int z, int metadata) {
|
||||
return carverHelper.getVariation(metadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IVariationInfo getManager(int meta) {
|
||||
return carverHelper.getVariation(meta);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user