mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-22 21: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
@@ -26,6 +26,7 @@ import net.minecraft.item.EnumDyeColor;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
@@ -83,7 +84,7 @@ public class BlockFloatingSpecialFlower extends BlockFloatingFlower implements I
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightValue(IBlockAccess world, BlockPos pos) {
|
||||
public int getLightValue(IBlockState state, IBlockAccess world, BlockPos pos) {
|
||||
TileEntity tile = world.getTileEntity(pos);
|
||||
int currentLight = tile instanceof TileSpecialFlower ? ((TileSpecialFlower) tile).getLightValue() : -1;
|
||||
if(currentLight == -1)
|
||||
@@ -92,32 +93,32 @@ public class BlockFloatingSpecialFlower extends BlockFloatingFlower implements I
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasComparatorInputOverride() {
|
||||
public boolean hasComparatorInputOverride(IBlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getComparatorInputOverride(World world, BlockPos pos) {
|
||||
public int getComparatorInputOverride(IBlockState state, World world, BlockPos pos) {
|
||||
return ((TileSpecialFlower) world.getTileEntity(pos)).getComparatorInputOverride();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWeakPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
|
||||
public int getWeakPower(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side) {
|
||||
return ((TileSpecialFlower) world.getTileEntity(pos)).getPowerLevel(side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStrongPower(IBlockAccess world, BlockPos pos, IBlockState state, EnumFacing side) {
|
||||
return getWeakPower(world, pos, state, side);
|
||||
public int getStrongPower(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side) {
|
||||
return getWeakPower(state, world, pos, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canProvidePower() {
|
||||
public boolean canProvidePower(IBlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void randomDisplayTick(World par1World, BlockPos pos, IBlockState state, Random par5Random) {
|
||||
public void randomDisplayTick(IBlockState state, World par1World, BlockPos pos, Random par5Random) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@@ -131,9 +132,8 @@ public class BlockFloatingSpecialFlower extends BlockFloatingFlower implements I
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(RayTraceResult target, World world, BlockPos pos, EntityPlayer player) {
|
||||
public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) {
|
||||
String name = ((TileSpecialFlower) world.getTileEntity(pos)).subTileName;
|
||||
IBlockState state = world.getBlockState(pos);
|
||||
return ItemBlockSpecialFlower.ofType(new ItemStack(state.getBlock()), name);
|
||||
}
|
||||
|
||||
@@ -177,8 +177,8 @@ public class BlockFloatingSpecialFlower extends BlockFloatingFlower implements I
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumFacing side, float hitX, float hitY, float hitZ) {
|
||||
return ((TileSpecialFlower) world.getTileEntity(pos)).onBlockActivated(world, pos, state, player, side, hitX, hitY, hitZ) || super.onBlockActivated(world, pos, state, player, side, hitX, hitY, hitZ);
|
||||
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, ItemStack stack, EnumFacing side, float hitX, float hitY, float hitZ) {
|
||||
return ((TileSpecialFlower) world.getTileEntity(pos)).onBlockActivated(world, pos, state, player, hand, stack, side, hitX, hitY, hitZ) || super.onBlockActivated(world, pos, state, player, hand, stack, side, hitX, hitY, hitZ);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user