Compare commits

..
3 Commits
Author SHA1 Message Date
miozune 10df035419 Fix BOP Turnip Seeds extracted into 0mB of Seed Oil (#39)
* Fix BOP Turnip Seeds extracted into 0mB of Seed Oil

* Use `GameRegistry#findItemStack`
2022-10-25 19:54:42 +02:00
Jakub 5f622686f3 Fix typo (#38) 2022-10-21 22:57:06 +02:00
Glease fce7efd59a fix potential memory leak (#36) 2022-10-19 08:50:23 +01:00
3 changed files with 13 additions and 7 deletions

No files matched your search

@@ -20,6 +20,7 @@ import forestry.api.genetics.IMutation;
import forestry.api.genetics.ISpeciesRoot;
import forestry.core.network.packets.PacketGenomeTrackerSync;
import forestry.core.proxy.Proxies;
import java.lang.ref.WeakReference;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
@@ -57,7 +58,7 @@ public abstract class BreedingTracker extends WorldSavedData implements IBreedin
private GameProfile username;
@Nullable
private World world;
private WeakReference<World> world;
protected BreedingTracker(String s) {
super(s);
@@ -68,7 +69,7 @@ public abstract class BreedingTracker extends WorldSavedData implements IBreedin
}
public void setWorld(@Nullable World world) {
this.world = world;
this.world = new WeakReference<>(world);
}
@Override
@@ -113,6 +114,7 @@ public abstract class BreedingTracker extends WorldSavedData implements IBreedin
Collection<String> discoveredSpecies,
Collection<String> discoveredMutations,
Collection<String> researchedMutations) {
World world = this.world != null ? this.world.get() : null;
if (world != null && username != null && username.getName() != null) {
EntityPlayer player = world.getPlayerEntityByName(username.getName());
if (player instanceof EntityPlayerMP && !(player instanceof FakePlayer)) {
@@ -126,10 +126,6 @@ public class PluginBiomesOPlenty extends ForestryPlugin {
Farmables.farmables
.get(FarmableReference.Vegetables.get())
.add(new FarmableGenericCrop(boPTurnipSeedStack, boPTurnip, 7));
if (PluginManager.Module.FACTORY.isEnabled()) {
RecipeManagers.squeezerManager.addRecipe(
10, new ItemStack[] {boPTurnipSeedStack}, Fluids.SEEDOIL.getFluid(amount));
}
}
Farmables.farmables.get(FarmableReference.Orchard.get()).add(new FarmableBasicFruit(boPTurnip, 7));
@@ -171,6 +167,14 @@ public class PluginBiomesOPlenty extends ForestryPlugin {
RecipeManagers.squeezerManager.addRecipe(
10, new ItemStack[] {persimmon}, Fluids.JUICE.getFluid(200), mulch, 20);
}
ItemStack boPTurnipSeedStack = GameRegistry.findItemStack(BoP, "turnipSeeds", 1);
if (boPTurnipSeedStack != null) {
if (PluginManager.Module.FACTORY.isEnabled()) {
RecipeManagers.squeezerManager.addRecipe(
10, new ItemStack[] {boPTurnipSeedStack}, Fluids.SEEDOIL.getFluid(amount));
}
}
}
private static void addFlowers() {
@@ -764,7 +764,7 @@ neiintegration.handler.forestry.fabricator.worth=Worth:
# JUBILANCE
################
for.jubilance.climate=Needs preffered climate
for.jubilance.climate=Needs preferred climate
for.jubilance.hermit=Will not produce if there are any other living creatures nearby
for.jubilance.resource=Requires %s as foundation