Jump to content

ScootMcShoot

Members
  • Posts

    15
  • Joined

  • Last visited

ScootMcShoot's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. entities/summmoned_zombie entities\summoned_zombie Oh. Well that's embarassing. But uh thanks for the help.
  2. I removed the colon, but it still doesn't work...
  3. Ok, I changed it back. So I've been making my resource locations incorrectly? Is that why I've been getting missing textures? I've been following examples online, and I can't find anything wrong with them.
  4. Yes, the file is visible in Eclipse. I just added the full directory to the builder .id: public static final Set<EntityEntry> SET_ENTITIES = ImmutableSet.of( EntityEntryBuilder.create() .entity(EntitySummonedZombie.class) .id(new ResourceLocation("scootsnm", ":textures/entities/summmoned_zombie/summoned_zombie.png"), 0) .name("summoned_zombie") .tracker(64, 1, false) .build() ); Same problem, although now I get this message whenever I load the world:
  5. Here is the directory where the image is located, copy and pasted from my file explorer: C:\Users\mccur\Desktop\Minecraft Modding\ScootsNecromancyMod\src\main\resources\assets\scootsnm\textures\entities\summoned_zombie I don't see any issues with it. I also attached a screenshot of the file in the directory. For the purposes of this post, I took the zombie.png from the 1.12.2.jar, renamed it summoned_zombie.png, and put it in the same directory to be absolutely sure that there was nothing wrong in the image format of my original file: this still returns a missing texture in-game.
  6. I made a new entity called SummonedZombie that inherits most of the normal zombie's code. Everything works except for the missing texture on my SummonedZombie model in-game (shows as purple and black). I've checked the directory and file names many times, I don't see anything wrong with them. Could someone please tell me what I'm doing wrong? Thanks.
  7. Oh my god it finally works and I'm so happy. So for some reason the comparison in isInput using the .getCompoundTag() method didn't work, but luckily I found another method .areItemStackTagsEqual() that solves my issue perfectly. Posting my updated code in case anyone else has the same problem. package com.ScootMcShoot.scootsnecromancymod.init.recipes; import javax.annotation.Nonnull; import com.ScootMcShoot.scootsnecromancymod.init.ModItems; import net.minecraft.init.Items; import net.minecraft.init.PotionTypes; import net.minecraft.item.ItemStack; import net.minecraft.potion.PotionUtils; import net.minecraftforge.common.brewing.AbstractBrewingRecipe; import net.minecraftforge.common.brewing.BrewingRecipeRegistry; import net.minecraftforge.common.brewing.IBrewingRecipe; import net.minecraftforge.oredict.OreDictionary; /* This class allows BrewingRecipeRegistry to accept NBT data assuming the input and ingredient are added to this class, * which fixes a bug that allowed any potion type (including water bottles), regardless of what was set in the recipe, * to be brewed into the resulting potion. */ public class FixedAbstractBrewingRecipe extends AbstractBrewingRecipe { public FixedAbstractBrewingRecipe (ItemStack input, ItemStack ingredient, ItemStack output) { super(input, ingredient, output); } @Override public boolean isIngredient(ItemStack ingredient) { if (ingredient.getItem() == ModItems.ESSENCE_OF_UNDEATH) return true; else return false; } @Override public boolean isInput(@Nonnull ItemStack stack) { if (stack.areItemStackTagsEqual(stack, (PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.AWKWARD)))) return OreDictionary.itemMatches(this.getInput(), stack, false); else return false; } } package com.ScootMcShoot.scootsnecromancymod.init; import javax.annotation.Nonnull; import com.ScootMcShoot.scootsnecromancymod.init.recipes.FixedAbstractBrewingRecipe; import net.minecraft.init.Items; import net.minecraft.init.PotionTypes; import net.minecraft.item.ItemStack; import net.minecraft.potion.PotionUtils; import net.minecraftforge.common.brewing.BrewingRecipeRegistry; public class ModRecipes { public static void init() { // Brewing Recipes // Ink of Innervation ItemStack input = PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.AWKWARD); ItemStack ingredient = new ItemStack(ModItems.ESSENCE_OF_UNDEATH); ItemStack output = new ItemStack(ModItems.INK_OF_INNERVATION); BrewingRecipeRegistry.addRecipe(new FixedAbstractBrewingRecipe(input, ingredient, output)); } } Thank you so much for your help everyone, I feel like I learned a lot.
  8. Doesn't work. There's an error at BrewingRecipeRegistry.addRecipe(MyCustomRecipe); that says "MyCustomRecipe cannot be resolved to a variable" and it doesn't give me the option to import it. package com.ScootMcShoot.scootsnecromancymod.init.recipes; import javax.annotation.Nonnull; import com.ScootMcShoot.scootsnecromancymod.init.ModItems; import net.minecraft.init.Items; import net.minecraft.init.PotionTypes; import net.minecraft.item.ItemStack; import net.minecraft.potion.PotionUtils; import net.minecraftforge.common.brewing.AbstractBrewingRecipe; import net.minecraftforge.common.brewing.BrewingRecipeRegistry; import net.minecraftforge.common.brewing.IBrewingRecipe; import net.minecraftforge.oredict.OreDictionary; public class MyCustomRecipe extends AbstractBrewingRecipe { public MyCustomRecipe (ItemStack input, ItemStack ingredient, ItemStack output) { super(input = PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.AWKWARD), ingredient = new ItemStack(ModItems.ESSENCE_OF_UNDEATH), output = new ItemStack(ModItems.INK_OF_INNERVATION)); } @Override public boolean isIngredient(ItemStack ingredient) { return false; } @Override public boolean isInput(@Nonnull ItemStack stack) { if (stack.getTagCompound() == (PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.AWKWARD)).getTagCompound()) return OreDictionary.itemMatches(this.getInput(), stack, false); else return false; } } package com.ScootMcShoot.scootsnecromancymod.init; import javax.annotation.Nonnull; import com.ScootMcShoot.scootsnecromancymod.init.recipes.MyCustomRecipe; import net.minecraft.item.ItemStack; import net.minecraftforge.common.brewing.BrewingRecipeRegistry; public class ModRecipes { public static void init() { BrewingRecipeRegistry.addRecipe(MyCustomRecipe); } }
  9. How am I supposed to extend public static void init() { BrewingRecipeRegistry.addRecipe(PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.AWKWARD), new ItemStack(ModItems.ESSENCE_OF_UNDEATH), new ItemStack(ModItems.INK_OF_INNERVATION));  } with AbstractBrewingRecipe? All I have is that statement, but it's not a class, and I can't extend it if it's not a class. Therefore I assumed you meant I needed to make a new class for my recipe, but like both of us said, that changes nothing. Please don't repeat what you said again for the third time, that doesn't help me. Thank you for your patience.
  10. Ok then, I made a new class for my recipe. Although the code is essentially the same, and nothing new happened, so I don't see what the point of that was. package com.ScootMcShoot.scootsnecromancymod.init; import javax.annotation.Nonnull; import net.minecraft.init.Items; import net.minecraft.init.PotionTypes; import net.minecraft.item.ItemStack; import net.minecraft.potion.PotionUtils; import net.minecraftforge.common.brewing.AbstractBrewingRecipe; import net.minecraftforge.common.brewing.BrewingRecipeRegistry; import net.minecraftforge.oredict.OreDictionary; public class BrewingRecipeInk extends AbstractBrewingRecipe { protected BrewingRecipeInk(ItemStack input, Object ingredient, ItemStack output) { super(input, ingredient, output); } public static void init() { BrewingRecipeRegistry.addRecipe(PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.AWKWARD), new ItemStack(ModItems.ESSENCE_OF_UNDEATH), new ItemStack(ModItems.INK_OF_INNERVATION)); } @Override public boolean isIngredient(ItemStack ingredient) { return false; } @Override public boolean isInput(@Nonnull ItemStack stack) { if (stack.getTagCompound() == (PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.AWKWARD)).getTagCompound()) return OreDictionary.itemMatches(this.getInput(), stack, false); else return false; } } If you could be as specific as possible with what I need to do that would be greatly appreciated.
  11. Alright, so I added some code to isInput to account for nbt data... except it didn't change anything. In fact, randomly switching around the boolean values for isIngredient and isInput doesn't cause any changes whatsoever for the recipe in-game. Maybe I'm just a clueless noob, but i feel thoroughly stumped right now. Does anyone know what I'm doing wrong? package com.ScootMcShoot.scootsnecromancymod.init; import javax.annotation.Nonnull; import net.minecraft.init.Items; import net.minecraft.init.PotionTypes; import net.minecraft.item.ItemStack; import net.minecraft.potion.PotionUtils; import net.minecraftforge.common.brewing.AbstractBrewingRecipe; import net.minecraftforge.common.brewing.BrewingRecipeRegistry; import net.minecraftforge.oredict.OreDictionary; public class ModRecipes extends AbstractBrewingRecipe { protected ModRecipes(ItemStack input, Object ingredient, ItemStack output) { super(input, ingredient, output); } public static void Init() { BrewingRecipeRegistry.addRecipe(PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.AWKWARD), new ItemStack(ModItems.ESSENCE_OF_UNDEATH), new ItemStack(ModItems.INK_OF_INNERVATION)); } @Override public boolean isIngredient(ItemStack ingredient) { return false; } @Override public boolean isInput(@Nonnull ItemStack stack) { if (stack.getTagCompound() == (PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.AWKWARD)).getTagCompound()) return OreDictionary.itemMatches(this.getInput(), stack, false); else return false; } }
  12. Ok so I found a previous thread about this same issue, except the person didn't explicitly state in code how to remedy this issue. He said he "extended AbstractBrewingRecipe and overrode isInput so the stack comparison is nbt and meta data sensitive". @Override public boolean isInput(@Nonnull ItemStack stack) { return OreDictionary.itemMatches(this.getInput(), stack, false); } This is the code in question. How would I manipulate this to allow nbt/meta data?
  13. Oh, whoops. I forgot to initialize ModRecipes in main.java.... thanks for reminding me: @EventHandler public static void init(FMLInitializationEvent event) { ModRecipes.Init(); } Now everything ALMOST works perfectly; except now when I brew the recipe in-game, every single type of potion will work in the recipe, not just awkward potions. Any ideas how to fix this?
  14. I'm new to modding and I'm trying to make a brewing recipe that takes an "essence of undeath" and awkward potions to make "ink of innervation" items, but when I try this in-game I can't even place the essence in the brewing stand. What am I doing wrong? public class ModRecipes { public static void Init() { BrewingRecipeRegistry.addRecipe(PotionUtils.addPotionToItemStack(new ItemStack(Items.POTIONITEM), PotionTypes.AWKWARD), new ItemStack(ModItems.ESSENCE_OF_UNDEATH), new ItemStack(ModItems.INK_OF_INNERVATION)); } }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.