mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-21 04:22:32 +00:00
Merge remote-tracking branch 'origin/mc-1.12' into 1.12
This commit is contained in:
commit
debde28aba
4 files changed
+33
-7
No files matched your search
@@ -150,8 +150,11 @@ public class ModuleApiculture extends BlankForestryModule {
|
||||
private static HiveRegistry hiveRegistry;
|
||||
|
||||
public static String beekeepingMode = "NORMAL";
|
||||
//TODO: Add to config
|
||||
public static final int ticksPerBeeWorkCycle = 550;
|
||||
|
||||
public static int ticksPerBeeWorkCycle = 550;
|
||||
|
||||
public static boolean hivesDamageOnPeaceful = false;
|
||||
|
||||
public static int maxFlowersSpawnedPerHive = 20;
|
||||
@Nullable
|
||||
public static VillagerRegistry.VillagerProfession villagerApiarist;
|
||||
@@ -265,6 +268,10 @@ public class ModuleApiculture extends BlankForestryModule {
|
||||
|
||||
String[] blacklist = config.getStringListLocalized("species", "blacklist", Constants.EMPTY_STRINGS);
|
||||
parseBeeBlacklist(blacklist);
|
||||
|
||||
ticksPerBeeWorkCycle = config.getIntLocalized("beekeeping", "ticks.work", 550, 250, 850);
|
||||
|
||||
hivesDamageOnPeaceful = config.getBooleanLocalized("beekeeping", "hivedamage.peaceful", false);
|
||||
|
||||
config.save();
|
||||
|
||||
|
||||
@@ -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,22 @@ 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)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFlammable(IBlockAccess world, BlockPos pos, EnumFacing face)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFireSpreadSpeed(IBlockAccess world, BlockPos pos, EnumFacing face)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
@@ -63,6 +63,8 @@ import forestry.apiculture.WorldgenBeekeepingLogic;
|
||||
import forestry.apiculture.blocks.BlockBeeHives;
|
||||
import forestry.apiculture.genetics.BeeDefinition;
|
||||
import forestry.apiculture.genetics.alleles.AlleleEffect;
|
||||
import forestry.apiculture.network.packets.PacketActiveUpdate;
|
||||
import forestry.apiculture.ModuleApiculture;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.inventory.InventoryAdapter;
|
||||
import forestry.core.network.packets.PacketActiveUpdate;
|
||||
@@ -125,7 +127,7 @@ public class TileHive extends TileEntity implements ITickable, IHiveTile, IActiv
|
||||
if (tickHelper.updateOnInterval(angry ? 10 : 200)) {
|
||||
if (calmTime == 0) {
|
||||
if (canWork) {
|
||||
if(world.getWorldInfo().getDifficulty() != EnumDifficulty.PEACEFUL) {
|
||||
if(world.getWorldInfo().getDifficulty() != EnumDifficulty.PEACEFUL || ModuleApiculture.hivesDamageOnPeaceful) {
|
||||
AxisAlignedBB boundingBox = AlleleEffect.getBounding(getContainedBee().getGenome(), this);
|
||||
List<EntityLivingBase> entities = world.getEntitiesWithinAABB(EntityLivingBase.class, boundingBox, beeTargetPredicate);
|
||||
if (!entities.isEmpty()) {
|
||||
|
||||
@@ -145,9 +145,7 @@ public enum HiveDescription implements IHiveDescription {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postGen(World world, Random rand, BlockPos pos) {
|
||||
|
||||
}
|
||||
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