Skip to content

Commit

Permalink
Fixed Aquaculture loot not being added to vanilla loot tables
Browse files Browse the repository at this point in the history
Removed Jellyfish as edible
  • Loading branch information
GirafiStudios committed Oct 9, 2020
1 parent d4f450b commit 6c6cbfb
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
minecraft_version=1.15.2
forge_version=31.2.21
forge_version=31.2.45
mappings=20200621-1.15.1
mod_version=2.0.20
mod_version=2.0.21
jei_version=6.0.2.6

org.gradle.jvmargs=-Xmx4G
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public class AquaItems {
public static final Item TAMBAQUI = FishRegistry.register(new FishItem(), "tambaqui", FishType.LARGE);
public static final Item BROWN_SHROOMA = FishRegistry.register(new FishItem(), "brown_shrooma", FishType.SMALL);
public static final Item RED_SHROOMA = FishRegistry.register(new FishItem(), "red_shrooma", FishType.SMALL);
public static final Item JELLYFISH = FishRegistry.register(new FishItem(), "jellyfish", FishType.JELLYFISH);
public static final Item JELLYFISH = FishRegistry.register(new SimpleItem(), "jellyfish", FishType.JELLYFISH);
public static final Item RED_GROUPER = FishRegistry.register(new FishItem(), "red_grouper");
public static final Item TUNA = FishRegistry.register(new FishItem(), "tuna", FishType.LARGE);
public static final Item FROG = register(new SimpleItem(), "frog");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
import net.minecraftforge.event.LootTableLoadEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.ObfuscationReflectionHelper;

import java.util.List;

@Mod.EventBusSubscriber(modid = Aquaculture.MOD_ID)
public class AquaLootTables {
Expand Down Expand Up @@ -55,9 +58,15 @@ private static LootEntry getInjectEntry(ResourceLocation location, int weight, i
}

private static void addEntry(LootPool pool, LootEntry entry) {
/*if (pool.lootEntries.stream().anyMatch(e -> e == entry)) {
throw new RuntimeException("Attempted to add a duplicate entry to pool: " + entry);
try {
List<LootEntry> lootEntries = (List<LootEntry>) ObfuscationReflectionHelper.findField(LootPool.class, "field_186453_a").get(pool);
if (lootEntries.stream().anyMatch(e -> e == entry)) {
throw new RuntimeException("Attempted to add a duplicate entry to pool: " + entry);
}
lootEntries.add(entry);
} catch (IllegalAccessException e) {
Aquaculture.LOG.error("Error occurred when attempting to add a new entry, to the fishing loot table");
e.printStackTrace();
}
pool.lootEntries.add(entry);*/
}
}

0 comments on commit 6c6cbfb

Please sign in to comment.