Fix lexicon, other bugs

This commit is contained in:
Vincent Lee committed 2020-03-30 22:33:09 -05:00
1 parent af9b77e0ea
commit 55c67c799f
49 files changed
+123 -120

No files matched your search

@@ -1,10 +1,10 @@
{
"type": "botania:petal_apothecary",
"output": {
"item": "minecraft:player_head",
"tag": {
"nbt": {
"SkullOwner": "Vazkii"
}
},
"item": "minecraft:player_head"
},
"ingredients": [
{
@@ -148,7 +148,7 @@ public class RecipePetals implements IRecipe<RecipeWrapper> {
for (Ingredient input : recipe.getIngredients()) {
input.write(buf);
}
buf.writeItemStack(recipe.getRecipeOutput());
buf.writeItemStack(recipe.getRecipeOutput(), false);
}
}
@@ -25,6 +25,7 @@ import net.minecraft.tags.Tag;
import net.minecraft.util.JSONUtils;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.registries.ForgeRegistries;
import vazkii.botania.common.core.helper.ItemNBTHelper;
import java.util.Collections;
import java.util.List;
@@ -80,8 +81,8 @@ public abstract class StateIngredient implements Predicate<BlockState> {
*/
public static JsonObject serializeBlockState(BlockState state) {
CompoundNBT nbt = NBTUtil.writeBlockState(state);
renameTag(nbt, "Name", "name");
renameTag(nbt, "Properties", "properties");
ItemNBTHelper.renameTag(nbt, "Name", "name");
ItemNBTHelper.renameTag(nbt, "Properties", "properties");
Dynamic<INBT> dyn = new Dynamic<>(NBTDynamicOps.INSTANCE, nbt);
return dyn.convert(JsonOps.INSTANCE).getValue().getAsJsonObject();
}
@@ -91,8 +92,8 @@ public abstract class StateIngredient implements Predicate<BlockState> {
*/
public static BlockState readBlockState(JsonObject object) {
CompoundNBT nbt = (CompoundNBT) new Dynamic<>(JsonOps.INSTANCE, object).convert(NBTDynamicOps.INSTANCE).getValue();
renameTag(nbt, "name", "Name");
renameTag(nbt, "properties", "Properties");
ItemNBTHelper.renameTag(nbt, "name", "Name");
ItemNBTHelper.renameTag(nbt, "properties", "Properties");
String name = nbt.getString("Name");
ResourceLocation id = ResourceLocation.tryCreate(name);
if (id == null || !ForgeRegistries.BLOCKS.containsKey(id)) {
@@ -101,14 +102,6 @@ public abstract class StateIngredient implements Predicate<BlockState> {
return NBTUtil.readBlockState(nbt);
}
private static void renameTag(CompoundNBT nbt, String oldName, String newName) {
INBT tag = nbt.get(oldName);
if (tag != null) {
nbt.remove(oldName);
nbt.put(newName, tag);
}
}
public abstract JsonObject serialize();
public abstract void write(PacketBuffer buffer);
@@ -8,16 +8,19 @@
*/
package vazkii.botania.client.patchouli.processor;
import net.minecraft.client.Minecraft;
import net.minecraft.util.ResourceLocation;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.recipe.RecipeRuneAltar;
import vazkii.botania.common.crafting.ModRecipeTypes;
import vazkii.patchouli.api.IVariableProvider;
public class RunicAltarProcessor extends PetalApothecaryProcessor {
@Override
public void setup(IVariableProvider<String> variables) {
this.recipe = null; //BotaniaAPI.runeAltarRecipes.get(new ResourceLocation(variables.get("recipe")));
ResourceLocation id = new ResourceLocation(variables.get("recipe"));
this.recipe = Minecraft.getInstance().world.getRecipeManager().getRecipes(ModRecipeTypes.RUNE_TYPE).get(id);
}
@Override
@@ -162,8 +162,8 @@ public final class ItemNBTHelper {
nbt.putByte("count", c);
}
nbt.remove("Count");
nbt.put("item", nbt.get("id"));
nbt.remove("id");
renameTag(nbt, "id", "item");
renameTag(nbt, "tag", "nbt");
Dynamic<INBT> dyn = new Dynamic<>(NBTDynamicOps.INSTANCE, nbt);
return dyn.convert(JsonOps.INSTANCE).getValue().getAsJsonObject();
}
@@ -212,4 +212,11 @@ public final class ItemNBTHelper {
return true;
}
public static void renameTag(CompoundNBT nbt, String oldName, String newName) {
INBT tag = nbt.get(oldName);
if (tag != null) {
nbt.remove(oldName);
nbt.put(newName, tag);
}
}
}
@@ -29,7 +29,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.pureDaisy3",
"recipe": "botania:pure_daisy"
"recipe": "botania:petal_apothecary/pure_daisy"
}
],
"extra_recipe_mappings": {
@@ -40,4 +40,4 @@
"minecraft:blue_ice": 1,
"minecraft:obsidian": 1
}
}
}
@@ -38,82 +38,82 @@
{
"type": "runic_altar",
"text": "botania.page.runeAltar4",
"recipe": "botania:water"
"recipe": "botania:runic_altar/water"
},
{
"type": "runic_altar",
"text": "botania.page.runeAltar5",
"recipe": "botania:earth"
"recipe": "botania:runic_altar/earth"
},
{
"type": "runic_altar",
"text": "botania.page.runeAltar6",
"recipe": "botania:air"
"recipe": "botania:runic_altar/air"
},
{
"type": "runic_altar",
"text": "botania.page.runeAltar7",
"recipe": "botania:fire"
"recipe": "botania:runic_altar/fire"
},
{
"type": "runic_altar",
"text": "botania.page.runeAltar8",
"recipe": "botania:spring"
"recipe": "botania:runic_altar/spring"
},
{
"type": "runic_altar",
"text": "botania.page.runeAltar9",
"recipe": "botania:summer"
"recipe": "botania:runic_altar/summer"
},
{
"type": "runic_altar",
"text": "botania.page.runeAltar10",
"recipe": "botania:autumn"
"recipe": "botania:runic_altar/autumn"
},
{
"type": "runic_altar",
"text": "botania.page.runeAltar11",
"recipe": "botania:winter"
"recipe": "botania:runic_altar/winter"
},
{
"type": "runic_altar",
"text": "botania.page.runeAltar12",
"recipe": "botania:mana"
"recipe": "botania:runic_altar/mana"
},
{
"type": "runic_altar",
"text": "botania.page.runeAltar13",
"recipe": "botania:lust"
"recipe": "botania:runic_altar/lust"
},
{
"type": "runic_altar",
"text": "botania.page.runeAltar14",
"recipe": "botania:gluttony"
"recipe": "botania:runic_altar/gluttony"
},
{
"type": "runic_altar",
"text": "botania.page.runeAltar15",
"recipe": "botania:greed"
"recipe": "botania:runic_altar/greed"
},
{
"type": "runic_altar",
"text": "botania.page.runeAltar16",
"recipe": "botania:sloth"
"recipe": "botania:runic_altar/sloth"
},
{
"type": "runic_altar",
"text": "botania.page.runeAltar17",
"recipe": "botania:wrath"
"recipe": "botania:runic_altar/wrath"
},
{
"type": "runic_altar",
"text": "botania.page.runeAltar18",
"recipe": "botania:envy"
"recipe": "botania:runic_altar/envy"
},
{
"type": "runic_altar",
"text": "botania.page.runeAltar19",
"recipe": "botania:pride"
"recipe": "botania:runic_altar/pride"
}
]
}
}
@@ -11,7 +11,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.agricarnation1",
"recipe": "botania:agricarnation"
"recipe": "botania:petal_apothecary/agricarnation"
}
]
}
}
@@ -11,7 +11,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.bellethorne1",
"recipe": "botania:bellethorn"
"recipe": "botania:petal_apothecary/bellethorn"
}
]
}
}
@@ -11,7 +11,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.bergamute1",
"recipe": "botania:bergamute"
"recipe": "botania:petal_apothecary/bergamute"
}
]
}
}
@@ -12,7 +12,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.bubbell1",
"recipe": "botania:bubbell"
"recipe": "botania:petal_apothecary/bubbell"
}
]
}
}
@@ -11,7 +11,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.clayconia1",
"recipe": "botania:clayconia"
"recipe": "botania:petal_apothecary/clayconia"
}
]
}
}
@@ -11,7 +11,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.daffomill1",
"recipe": "botania:daffomill"
"recipe": "botania:petal_apothecary/daffomill"
}
]
}
}
@@ -11,7 +11,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.dreadthorne1",
"recipe": "botania:dreadthorn"
"recipe": "botania:petal_apothecary/dreadthorn"
}
]
}
}
@@ -11,7 +11,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.exoflame1",
"recipe": "botania:exoflame"
"recipe": "botania:petal_apothecary/exoflame"
}
]
}
}
@@ -11,7 +11,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.fallenKanade1",
"recipe": "botania:fallen_kanade"
"recipe": "botania:petal_apothecary/fallen_kanade"
}
]
}
}
@@ -12,7 +12,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.heiseiDream1",
"recipe": "botania:heisei_dream"
"recipe": "botania:petal_apothecary/heisei_dream"
}
]
}
}
@@ -15,7 +15,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.hopperhock2",
"recipe": "botania:hopperhock"
"recipe": "botania:petal_apothecary/hopperhock"
}
]
}
}
@@ -11,7 +11,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.hyacidus1",
"recipe": "botania:hyacidus"
"recipe": "botania:petal_apothecary/hyacidus"
}
]
}
}
@@ -11,11 +11,11 @@
{
"type": "petal_apothecary",
"text": "botania.page.jadedAmaranthus1",
"recipe": "botania:jaded_amaranthus"
"recipe": "botania:petal_apothecary/jaded_amaranthus"
},
{
"type": "text",
"text": "botania.page.jadedAmaranthus2"
}
]
}
}
@@ -11,7 +11,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.jiyuulia1",
"recipe": "botania:jiyuulia"
"recipe": "botania:petal_apothecary/jiyuulia"
}
]
}
}
@@ -12,7 +12,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.loonium1",
"recipe": "botania:loonium"
"recipe": "botania:petal_apothecary/loonium"
}
]
}
}
@@ -19,7 +19,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.marimorphosis2",
"recipe": "botania:marimorphosis"
"recipe": "botania:petal_apothecary/marimorphosis"
},
{
"type": "crafting_multi",
@@ -11,7 +11,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.medumone1",
"recipe": "botania:medumone"
"recipe": "botania:petal_apothecary/medumone"
}
]
}
}
@@ -13,7 +13,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.orechid1",
"recipe": "botania:orechid"
"recipe": "botania:petal_apothecary/orechid"
}
]
}
}
@@ -13,7 +13,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.orechid1",
"recipe": "botania:orechid"
"recipe": "botania:petal_apothecary/orechid"
}
]
}
}
@@ -12,7 +12,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.orechidIgnem1",
"recipe": "botania:orechid_ignem"
"recipe": "botania:petal_apothecary/orechid_ignem"
}
]
}
}
@@ -11,7 +11,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.pollidisiac1",
"recipe": "botania:pollidisiac"
"recipe": "botania:petal_apothecary/pollidisiac"
}
]
}
}
@@ -15,7 +15,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.rannuncarpus2",
"recipe": "botania:rannuncarpus"
"recipe": "botania:petal_apothecary/rannuncarpus"
}
]
}
}
@@ -11,7 +11,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.solegnolia1",
"recipe": "botania:solegnolia"
"recipe": "botania:petal_apothecary/solegnolia"
}
]
}
}
@@ -20,7 +20,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.spectranthemum3",
"recipe": "botania:spectranthemum"
"recipe": "botania:petal_apothecary/spectranthemum"
}
]
}
}
@@ -11,7 +11,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.tangleberrie1",
"recipe": "botania:tangleberrie"
"recipe": "botania:petal_apothecary/tangleberrie"
}
]
}
}
@@ -11,7 +11,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.tigerseye1",
"recipe": "botania:tigerseye"
"recipe": "botania:petal_apothecary/tigerseye"
}
]
}
}
@@ -11,7 +11,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.vinculotus1",
"recipe": "botania:vinculotus"
"recipe": "botania:petal_apothecary/vinculotus"
}
]
}
}
@@ -11,7 +11,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.arcanerose1",
"recipe": "botania:rosa_arcana"
"recipe": "botania:petal_apothecary/rosa_arcana"
}
]
}
}
@@ -44,7 +44,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.dandelifeon8",
"recipe": "botania:dandelifeon"
"recipe": "botania:petal_apothecary/dandelifeon"
},
{
"type": "crafting",
@@ -52,4 +52,4 @@
"recipe": "botania:cell_block"
}
]
}
}
@@ -20,7 +20,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.endoflame2",
"recipe": "botania:endoflame"
"recipe": "botania:petal_apothecary/endoflame"
}
]
}
}
@@ -11,7 +11,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.entropinnyum1",
"recipe": "botania:entropinnyum"
"recipe": "botania:petal_apothecary/entropinnyum"
}
]
}
}
@@ -19,7 +19,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.gourmaryllis3",
"recipe": "botania:gourmaryllis"
"recipe": "botania:petal_apothecary/gourmaryllis"
}
]
}
}
@@ -12,7 +12,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.hydroangeas1",
"recipe": "botania:hydroangeas"
"recipe": "botania:petal_apothecary/hydroangeas"
}
]
}
@@ -12,7 +12,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.kekimurus1",
"recipe": "botania:kekimurus"
"recipe": "botania:petal_apothecary/kekimurus"
}
]
}
}
@@ -15,7 +15,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.munchdew2",
"recipe": "botania:munchdew"
"recipe": "botania:petal_apothecary/munchdew"
}
]
}
}
@@ -11,7 +11,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.narslimmus1",
"recipe": "botania:narslimmus"
"recipe": "botania:petal_apothecary/narslimmus"
}
]
}
}
@@ -12,7 +12,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.rafflowsia1",
"recipe": "botania:rafflowsia"
"recipe": "botania:petal_apothecary/rafflowsia"
}
]
}
}
@@ -16,7 +16,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.shulk_me_not2",
"recipe": "botania:shulk_me_not"
"recipe": "botania:petal_apothecary/shulk_me_not"
}
]
}
}
@@ -20,7 +20,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.spectrolus2",
"recipe": "botania:spectrolus"
"recipe": "botania:petal_apothecary/spectrolus"
}
]
}
}
@@ -19,7 +19,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.thermalily1",
"recipe": "botania:thermalily"
"recipe": "botania:petal_apothecary/thermalily"
}
]
}
}
@@ -12,7 +12,7 @@
{
"type": "petal_apothecary",
"text": "botania.page.manastar1",
"recipe": "botania:manastar"
"recipe": "botania:petal_apothecary/manastar"
}
]
}
}
@@ -16,7 +16,7 @@
{
"type": "runic_altar",
"text": "botania.page.headCreating1",
"recipe": "botania:head"
"recipe": "botania:runic_altar/head"
}
]
}
}