mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-22 04:52:26 +00:00
Fix hive flammability
Hive placed in the overworld burned whereas hive placed in nether did not in my tests. Hopefully this works better.
This commit is contained in:
1 parent
7a0dde1140
commit
b5b4ff2de6
2 files changed
+29
-8
No files matched your search
@@ -25,6 +25,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumBlockRenderType;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
@@ -39,6 +40,7 @@ import forestry.api.apiculture.IBee;
|
||||
import forestry.api.apiculture.IHiveDrop;
|
||||
import forestry.api.apiculture.IHiveTile;
|
||||
import forestry.api.apiculture.hives.IHiveRegistry.HiveType;
|
||||
import forestry.api.core.BiomeHelper;
|
||||
import forestry.api.core.IItemModelRegister;
|
||||
import forestry.api.core.IModelManager;
|
||||
import forestry.api.core.Tabs;
|
||||
@@ -197,5 +199,30 @@ public class BlockBeeHives extends BlockContainer implements IItemModelRegister,
|
||||
public String getNameFromMeta(int meta) {
|
||||
return HiveType.VALUES[meta].getName();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getFlammability(IBlockAccess world, BlockPos pos, EnumFacing face)
|
||||
{
|
||||
if(!BiomeHelper.isBiomeHellish(world.getBiome(pos)))
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFlammable(IBlockAccess world, BlockPos pos, EnumFacing face)
|
||||
{
|
||||
return !BiomeHelper.isBiomeHellish(world.getBiome(pos));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFireSpreadSpeed(IBlockAccess world, BlockPos pos, EnumFacing face)
|
||||
{
|
||||
if(!BiomeHelper.isBiomeHellish(world.getBiome(pos)))
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -145,13 +145,7 @@ public enum HiveDescription implements IHiveDescription {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postGen(World world, Random rand, BlockPos pos) {
|
||||
if(isGoodBiome(world.getBiome(pos)))
|
||||
{
|
||||
Blocks.FIRE.setFireInfo(world.getBlockState(pos).getBlock(), 5, 5);
|
||||
}
|
||||
|
||||
}
|
||||
public void postGen(World world, Random rand, BlockPos pos) {}
|
||||
|
||||
protected static void postGenFlowers(World world, Random rand, BlockPos hivePos, List<IBlockState> flowerStates) {
|
||||
int plantedCount = 0;
|
||||
|
||||
Reference in new issue
Block a user