mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-21 12:32:23 +00:00
Add some support for magical crops beta naming (likely missing some nonvanilla crops)
This commit is contained in:
1 parent
19c13abd45
commit
1daa7d243f
1 file changed
+47
@@ -136,6 +136,43 @@ public class PluginMagicalCrops extends ForestryPlugin {
|
||||
"SugarCane"
|
||||
);
|
||||
|
||||
ImmutableList<String> betaSeeds = ImmutableList.of(
|
||||
"Air",
|
||||
"Blaze",
|
||||
"Bronze",
|
||||
"Chicken",
|
||||
"Coal",
|
||||
"Copper",
|
||||
"Cow",
|
||||
"Creeper",
|
||||
"Diamond",
|
||||
"Dye",
|
||||
"Earth",
|
||||
"Emerald",
|
||||
"Enderman",
|
||||
"Experience",
|
||||
"Fire",
|
||||
"Ghast",
|
||||
"Glowstone",
|
||||
"Gold",
|
||||
"Iron",
|
||||
"Lapis",
|
||||
"Minicio",
|
||||
"Nature",
|
||||
"Nether",
|
||||
"Obsidian",
|
||||
"Pig",
|
||||
"Quartz",
|
||||
"Redstone",
|
||||
"Sheep",
|
||||
"Skeleton",
|
||||
"Slime",
|
||||
"Spider",
|
||||
"Tin",
|
||||
"Water",
|
||||
"Wither"
|
||||
);
|
||||
|
||||
int seedAmount = GameMode.getGameMode().getIntegerSetting("squeezer.liquid.seed");
|
||||
|
||||
for (String magicSeedName : magicSeeds) {
|
||||
@@ -161,6 +198,9 @@ public class PluginMagicalCrops extends ForestryPlugin {
|
||||
for (String seedName : seeds) {
|
||||
addRecipes("_Seeds", "_Crop", seedName, seedAmount);
|
||||
}
|
||||
for (String seedName : betaSeeds) {
|
||||
addBetaRecipes("Seeds", "Crop", seedName);
|
||||
}
|
||||
|
||||
Item cropProduce = GameRegistry.findItem(MagCrop, MagCrop + "_CropProduce");
|
||||
if (cropProduce != null) {
|
||||
@@ -181,4 +221,11 @@ public class PluginMagicalCrops extends ForestryPlugin {
|
||||
Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(seed, crop, 7));
|
||||
}
|
||||
}
|
||||
private static void addBetaRecipes(String seedSuffix, String cropSuffix, String name) {
|
||||
ItemStack seed = GameRegistry.findItemStack(MagCrop, MagCrop +"_"+ name + seedSuffix, 1);
|
||||
Block crop = GameRegistry.findBlock(MagCrop, MagCrop + "_" + name + cropSuffix);
|
||||
if (seed != null && crop != null && Config.isMagicalCropsSupportEnabled()) {
|
||||
Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(seed, crop, 7));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user