mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-15 17:44:55 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
09756f21fd | ||
|
|
a06c4bd1dc | ||
|
|
bb477f0dfb | ||
|
|
0b86b3df8f | ||
|
|
edd5357008 | ||
|
|
dfb4e04f4a | ||
|
|
45c0375387 | ||
|
|
5e4cfa5112 | ||
|
|
086b53e4a3 | ||
|
|
fbb5612b8c | ||
|
|
c3c471ab33 | ||
|
|
67ddc252aa | ||
|
|
59945a8961 | ||
|
|
bbabb967b1 |
No files matched your search
+2
-2
@@ -1,5 +1,5 @@
|
||||
mcversion=1.10
|
||||
forgeversion=12.18.0.1984-1.10.0
|
||||
forgeversion=12.18.0.1989-1.10.0
|
||||
mcp_mappings=snapshot_20160525
|
||||
|
||||
jei_version=3.7.0.+
|
||||
@@ -7,4 +7,4 @@ ic2_version=2.5.5-ex19
|
||||
|
||||
version_major=5
|
||||
version_minor=1
|
||||
version_patch=3
|
||||
version_patch=5
|
||||
+1
-1
Submodule lang updated: a5a5f41bd7...2d88011e4a.
@@ -50,7 +50,7 @@ import forestry.plugins.PluginManager;
|
||||
version = Constants.VERSION,
|
||||
guiFactory = "forestry.core.config.ForestryGuiConfigFactory",
|
||||
acceptedMinecraftVersions = "[1.10]",
|
||||
dependencies = "required-after:Forge@[12.18.0.1984,);"
|
||||
dependencies = "required-after:Forge@[12.18.0.1989,);"
|
||||
+ "after:JEI@[3.7.0,);")
|
||||
public class Forestry {
|
||||
|
||||
|
||||
@@ -239,9 +239,11 @@ public class BeekeepingLogic implements IBeekeepingLogic, IStreamable {
|
||||
|
||||
@Override
|
||||
public void clearCachedValues() {
|
||||
hasFlowersCache.clear();
|
||||
queenCanWorkCache.clear();
|
||||
canWork();
|
||||
if (!housing.getWorldObj().isRemote) {
|
||||
hasFlowersCache.clear();
|
||||
queenCanWorkCache.clear();
|
||||
canWork();
|
||||
}
|
||||
}
|
||||
|
||||
private void queenWorkTick(IBee queen) {
|
||||
|
||||
@@ -57,7 +57,7 @@ public class ItemHiveFrame extends ItemForestry implements IHiveFrame {
|
||||
super.addInformation(stack, playerIn, tooltip, advanced);
|
||||
beeModifier.addInformation(stack, playerIn, tooltip, advanced);
|
||||
if (!stack.isItemDamaged()) {
|
||||
tooltip.add(Translator.translateToLocalFormatted("item.for.frame.durability", stack.getMaxDamage()));
|
||||
tooltip.add(Translator.translateToLocalFormatted("item.for.durability", stack.getMaxDamage()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ import forestry.api.genetics.ISaplingTranslator;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import forestry.api.storage.ICrateRegistry;
|
||||
import forestry.api.storage.StorageManager;
|
||||
import forestry.arboriculture.blocks.BlockForestryLeaves;
|
||||
import forestry.arboriculture.blocks.BlockPile;
|
||||
import forestry.arboriculture.blocks.BlockRegistryArboriculture;
|
||||
import forestry.arboriculture.blocks.log.BlockArbLog;
|
||||
@@ -49,6 +50,7 @@ import forestry.arboriculture.genetics.alleles.AlleleFruit;
|
||||
import forestry.arboriculture.genetics.alleles.AlleleGrowth;
|
||||
import forestry.arboriculture.genetics.alleles.AlleleLeafEffect;
|
||||
import forestry.arboriculture.items.ItemCharcoal;
|
||||
import forestry.arboriculture.items.ItemGrafter;
|
||||
import forestry.arboriculture.items.ItemRegistryArboriculture;
|
||||
import forestry.arboriculture.models.TextureLeaves;
|
||||
import forestry.arboriculture.network.PacketRegistryArboriculture;
|
||||
@@ -79,12 +81,16 @@ import net.minecraft.block.BlockNewLeaf;
|
||||
import net.minecraft.block.BlockOldLeaf;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.passive.EntityVillager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.world.BlockEvent;
|
||||
import net.minecraftforge.fml.common.IFuelHandler;
|
||||
import net.minecraftforge.fml.common.SidedProxy;
|
||||
import net.minecraftforge.fml.common.event.FMLInterModComms.IMCMessage;
|
||||
@@ -546,4 +552,31 @@ public class PluginArboriculture extends BlankForestryPlugin {
|
||||
alleleFruit.getProvider().registerSprites();
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onHarvestDropsEvent(BlockEvent.HarvestDropsEvent event) {
|
||||
IBlockState state = event.getState();
|
||||
Block block = state.getBlock();
|
||||
if (block instanceof BlockLeaves && !(block instanceof BlockForestryLeaves)) {
|
||||
EntityPlayer player = event.getHarvester();
|
||||
if (player != null) {
|
||||
ItemStack harvestingTool = player.getHeldItemMainhand();
|
||||
if (harvestingTool != null && harvestingTool.getItem() instanceof ItemGrafter) {
|
||||
if (event.getDrops().isEmpty()) {
|
||||
World world = event.getWorld();
|
||||
Item itemDropped = block.getItemDropped(state, world.rand, 3);
|
||||
if (itemDropped != null) {
|
||||
event.getDrops().add(new ItemStack(itemDropped, 1, block.damageDropped(state)));
|
||||
}
|
||||
}
|
||||
|
||||
harvestingTool.damageItem(1, player);
|
||||
if (harvestingTool.stackSize <= 0) {
|
||||
net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(player, harvestingTool, EnumHand.MAIN_HAND);
|
||||
player.setHeldItem(EnumHand.MAIN_HAND, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,29 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import forestry.api.arboriculture.EnumGermlingType;
|
||||
import forestry.api.arboriculture.IToolGrafter;
|
||||
import forestry.api.arboriculture.ITree;
|
||||
import forestry.api.arboriculture.TreeManager;
|
||||
import forestry.api.core.IItemModelRegister;
|
||||
import forestry.api.core.IModelManager;
|
||||
import forestry.api.core.IToolScoop;
|
||||
import forestry.api.core.Tabs;
|
||||
import forestry.api.lepidopterology.ButterflyManager;
|
||||
import forestry.api.lepidopterology.EnumFlutterType;
|
||||
import forestry.api.lepidopterology.IButterfly;
|
||||
import forestry.arboriculture.LeafDecayHelper;
|
||||
import forestry.arboriculture.PluginArboriculture;
|
||||
import forestry.arboriculture.genetics.TreeDefinition;
|
||||
import forestry.arboriculture.tiles.TileLeaves;
|
||||
import forestry.core.blocks.IColoredBlock;
|
||||
import forestry.core.blocks.propertys.UnlistedBlockAccess;
|
||||
import forestry.core.blocks.propertys.UnlistedBlockPos;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.tiles.TileUtil;
|
||||
import forestry.core.utils.BlockUtil;
|
||||
import forestry.core.utils.ItemStackUtil;
|
||||
import net.minecraft.block.BlockLeaves;
|
||||
import net.minecraft.block.BlockPlanks;
|
||||
import net.minecraft.block.IGrowable;
|
||||
@@ -40,9 +63,6 @@ import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.common.property.ExtendedBlockState;
|
||||
import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
@@ -50,29 +70,6 @@ import net.minecraftforge.common.property.IUnlistedProperty;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.api.arboriculture.EnumGermlingType;
|
||||
import forestry.api.arboriculture.IToolGrafter;
|
||||
import forestry.api.arboriculture.ITree;
|
||||
import forestry.api.arboriculture.TreeManager;
|
||||
import forestry.api.core.IItemModelRegister;
|
||||
import forestry.api.core.IModelManager;
|
||||
import forestry.api.core.IToolScoop;
|
||||
import forestry.api.core.Tabs;
|
||||
import forestry.api.lepidopterology.ButterflyManager;
|
||||
import forestry.api.lepidopterology.EnumFlutterType;
|
||||
import forestry.api.lepidopterology.IButterfly;
|
||||
import forestry.arboriculture.LeafDecayHelper;
|
||||
import forestry.arboriculture.PluginArboriculture;
|
||||
import forestry.arboriculture.genetics.TreeDefinition;
|
||||
import forestry.arboriculture.tiles.TileLeaves;
|
||||
import forestry.core.blocks.IColoredBlock;
|
||||
import forestry.core.blocks.propertys.UnlistedBlockAccess;
|
||||
import forestry.core.blocks.propertys.UnlistedBlockPos;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.tiles.TileUtil;
|
||||
import forestry.core.utils.BlockUtil;
|
||||
import forestry.core.utils.ItemStackUtil;
|
||||
|
||||
public class BlockForestryLeaves extends BlockLeaves implements ITileEntityProvider, IGrowable, IItemModelRegister, IColoredBlock {
|
||||
|
||||
public BlockForestryLeaves() {
|
||||
@@ -137,17 +134,16 @@ public class BlockForestryLeaves extends BlockLeaves implements ITileEntityProvi
|
||||
int fortune = EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, player.getActiveItemStack());
|
||||
float saplingModifier = 1.0f;
|
||||
|
||||
if (!world.isRemote) {
|
||||
ItemStack held = player.inventory.getCurrentItem();
|
||||
if (held != null && held.getItem() instanceof IToolGrafter) {
|
||||
saplingModifier = ((IToolGrafter) held.getItem()).getSaplingModifier(held, world, player, pos);
|
||||
held.damageItem(1, player);
|
||||
if (held.stackSize <= 0) {
|
||||
net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(player, held, EnumHand.MAIN_HAND);
|
||||
player.setHeldItem(EnumHand.MAIN_HAND, null);
|
||||
}
|
||||
ItemStack held = player.inventory.getCurrentItem();
|
||||
if (held != null && held.getItem() instanceof IToolGrafter) {
|
||||
saplingModifier = ((IToolGrafter) held.getItem()).getSaplingModifier(held, world, player, pos);
|
||||
held.damageItem(1, player);
|
||||
if (held.stackSize <= 0) {
|
||||
net.minecraftforge.event.ForgeEventFactory.onPlayerDestroyItem(player, held, EnumHand.MAIN_HAND);
|
||||
player.setHeldItem(EnumHand.MAIN_HAND, null);
|
||||
}
|
||||
}
|
||||
|
||||
GameProfile playerProfile = player.getGameProfile();
|
||||
List<ItemStack> leafDrops = getLeafDrop(world, playerProfile, pos, saplingModifier, fortune);
|
||||
drops.set(leafDrops);
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
******************************************************************************/
|
||||
package forestry.arboriculture.items;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import forestry.core.utils.Translator;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockLeaves;
|
||||
import net.minecraft.block.material.Material;
|
||||
@@ -34,6 +37,14 @@ public class ItemGrafter extends ItemForestryTool implements IToolGrafter {
|
||||
setEfficiencyOnProperMaterial(4.0f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced) {
|
||||
super.addInformation(stack, playerIn, tooltip, advanced);
|
||||
if (!stack.isItemDamaged()) {
|
||||
tooltip.add(Translator.translateToLocalFormatted("item.for.uses", stack.getMaxDamage() + 1));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHarvestBlock(IBlockState state, ItemStack stack) {
|
||||
Block block = state.getBlock();
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
******************************************************************************/
|
||||
package forestry.arboriculture.items;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import forestry.api.arboriculture.EnumGermlingType;
|
||||
@@ -28,8 +30,12 @@ public class ItemRegistryArboriculture extends ItemRegistry {
|
||||
OreDictionary.registerOre(OreDictUtil.TREE_SAPLING, sapling.getWildcard());
|
||||
|
||||
pollenFertile = registerItem(new ItemGermlingGE(EnumGermlingType.POLLEN), "pollenFertile");
|
||||
|
||||
charcoal = registerItem(new ItemCharcoal(), "charcoal");
|
||||
grafter = registerItem(new ItemGrafter(4), "grafter");
|
||||
registerOreDict(OreDictUtil.CHARCOAL, new ItemStack(charcoal, 1, OreDictionary.WILDCARD_VALUE));
|
||||
registerOreDict(OreDictUtil.CHARCOAL, new ItemStack(Items.COAL, 1, 1));
|
||||
|
||||
grafter = registerItem(new ItemGrafter(9), "grafter");
|
||||
grafterProven = registerItem(new ItemGrafter(149), "grafterProven");
|
||||
}
|
||||
}
|
||||
@@ -10,18 +10,14 @@
|
||||
******************************************************************************/
|
||||
package forestry.arboriculture.worldgen;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.world.ITreeGenData;
|
||||
import forestry.core.worldgen.WorldGenHelper;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class WorldGenBalsa extends WorldGenTree {
|
||||
|
||||
@@ -31,7 +27,8 @@ public class WorldGenBalsa extends WorldGenTree {
|
||||
|
||||
@Override
|
||||
protected void generateLeaves(World world, Random rand, TreeBlockTypeLeaf leaf, List<BlockPos> branchEnds, BlockPos startPos) {
|
||||
BlockPos.MutableBlockPos leafCenter = new BlockPos.MutableBlockPos(startPos.add(0, height, 0));
|
||||
BlockPos topPos = startPos.add(0, height + 1, 0);
|
||||
BlockPos.MutableBlockPos leafCenter = new BlockPos.MutableBlockPos(topPos);
|
||||
float leafRadius = (girth - 1.0f) / 2.0f;
|
||||
|
||||
WorldGenHelper.addBlock(world, leafCenter, leaf, WorldGenHelper.EnumReplaceMode.AIR);
|
||||
@@ -44,7 +41,7 @@ public class WorldGenBalsa extends WorldGenTree {
|
||||
leafCenter.move(EnumFacing.DOWN);
|
||||
}
|
||||
|
||||
while (leafCenter.getY() > 6) {
|
||||
while (leafCenter.getY() > topPos.getY() - 6) {
|
||||
WorldGenHelper.generateCylinderFromPos(world, leaf, leafCenter, leafRadius + girth, 1, WorldGenHelper.EnumReplaceMode.SOFT);
|
||||
leafCenter.move(EnumFacing.DOWN);
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ public class OreDictUtil {
|
||||
public static final String DOOR_WOOD = "doorWood";
|
||||
public static final String TRAPDOOR_WOOD = "trapdoorWood";
|
||||
public static final String TREE_LEAVES = "treeLeaves";
|
||||
public static final String CHARCOAL = "itemCharcoal";
|
||||
|
||||
public static final String EMPTIED_LETTER_ORE_DICT = "emptiedLetter";
|
||||
|
||||
|
||||
@@ -270,6 +270,7 @@ public class PluginFactory extends BlankForestryPlugin {
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{new ItemStack(Items.WHEAT_SEEDS)}, seedOil);
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{new ItemStack(Items.PUMPKIN_SEEDS)}, seedOil);
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{new ItemStack(Items.MELON_SEEDS)}, seedOil);
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{new ItemStack(Items.BEETROOT_SEEDS)}, seedOil);
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{PluginCore.items.phosphor.getItemStack(2), new ItemStack(Blocks.COBBLESTONE)}, new FluidStack(FluidRegistry.LAVA, 1600));
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{new ItemStack(Blocks.CACTUS)}, new FluidStack(FluidRegistry.WATER, 500));
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{new ItemStack(Items.SNOWBALL), PluginCore.items.craftingMaterial.getIceShard(4)}, Fluids.ICE.getFluid(4000));
|
||||
|
||||
@@ -33,7 +33,7 @@ import forestry.lepidopterology.genetics.alleles.AlleleButterflyCocoon;
|
||||
|
||||
public enum MothDefinition implements IButterflyDefinition {
|
||||
Brimstone(ButterflyBranchDefinition.Opisthograptis, "brimstone", "luteolata", new Color(0xffea40), true, 1.0f),
|
||||
LatticedHeath(ButterflyBranchDefinition.Chiasmia, "latticeHeath", "clathrata", new Color(0xf2f0be), true, 0.5f) {
|
||||
LatticedHeath(ButterflyBranchDefinition.Chiasmia, "latticedHeath", "clathrata", new Color(0xf2f0be), true, 0.5f) {
|
||||
@Override
|
||||
protected void setAlleles(IAllele[] alleles) {
|
||||
AlleleHelper.instance.set(alleles, EnumButterflyChromosome.SIZE, EnumAllele.Size.SMALLEST);
|
||||
|
||||
@@ -15,8 +15,8 @@ import javax.annotation.Nullable;
|
||||
public enum BackpackMode {
|
||||
NORMAL(null),
|
||||
LOCKED("for.storage.backpack.mode.locked"),
|
||||
RECEIVE("for.storage.backpack.mode.locked"),
|
||||
RESUPPLY("for.storage.backpack.mode.locked");
|
||||
RECEIVE("for.storage.backpack.mode.receiving"),
|
||||
RESUPPLY("for.storage.backpack.mode.resupply");
|
||||
|
||||
@Nullable
|
||||
private final String unlocalizedInfo;
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 850 B After Width: | Height: | Size: 296 B |
Binary file not shown.
|
Before Width: | Height: | Size: 394 B After Width: | Height: | Size: 277 B |
Binary file not shown.
|
Before Width: | Height: | Size: 199 B After Width: | Height: | Size: 202 B |
Reference in new issue
Block a user