Jump to content

Maideniles

Members
  • Posts

    31
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Maideniles's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I have an item which takes durability damage in the crafting table after each crafting. I have it registered in the ore dictionary using the WILDCARD_VALUE. When I use the item in a shaped recipe, the item takes durability damage and is reusable just as it's supposed to be. But if I make a shapeless recipe, it becomes completely useless after only being used once. Can someone help me figure out where I goofed up with this? Thank you. The item class: public class ItemMortarAndPestle extends Item { private Item containerItem; public ItemMortarAndPestle(String name) { setUnlocalizedName(name); setRegistryName(name); setMaxStackSize(1); setMaxDamage(64); setNoRepair(); } @Override public boolean hasContainerItem() { return true; } @Override public ItemStack getContainerItem(ItemStack itemStack) { return itemStack.getItemDamage() < itemStack.getMaxDamage() ? new ItemStack(itemStack.getItem(), 1, itemStack.getItemDamage() + 1) : ItemStack.EMPTY; } } The item's Ore Dictionary registry entry: OreDictionary.registerOre("mortar_and_pestle", new ItemStack(ItemInit.mortar_n_pestle, 1, OreDictionary.WILDCARD_VALUE)); And lastly, an example of a shapeless recipe in which the item is used: (This example stops working after one use) { "type": "minecraft:crafting_shapeless", "ingredients": [ { "item": "maidensmaterials:amethyst_chunk" }, { "type": "forge:ore_dict", "ore": "mortar_and_pestle" } ], "result": { "item": "maidensmaterials:amethyst_fragments", "count": 8 } }
  2. I was afraid that was why I couldn't get it to work. There's a method in the ItemPotion code, but that does nothing for me since this is a potion and there doesn't seem to be a way to register an ItemPotion...well, that I can find, anyway. lol How does one do a Pull Request? And thanks for the quick reply
  3. I'm sorry, I guess I didn't word my question as well as I thought I did. I mean the inventory texture of the potion bottle--the way that it glows, like an enchanted item. I want to get rid of it, if possible, so that my potion just has a plain texture. Everything else about my potions code works--the brewing recipes, etc. I just don't like the shiny overlay. How can I send it packing? As you requested-- here's my code, and a couple of screenshots of what I want. And yes, I'm aware I haven't done the status icon texture yet. I haven't decided what I want it to be yet, so I will come back to it later. Potions Registry: public class PotionTypeRegistry { public static final PotionType GREEN_THUMB = new PotionType("green_thumb", new PotionEffect[] {new PotionEffect(TreeMod.GREEN_THUMB, 230)}).setRegistryName("green_thumb"); public static final PotionType GATHERER = new PotionType("gatherer", new PotionEffect[] {new PotionEffect(TreeMod.GATHERER, 260)}).setRegistryName("gatherer"); public static void registerPotionTypes() { ForgeRegistries.POTION_TYPES.register(GATHERER); ForgeRegistries.POTION_TYPES.register(GREEN_THUMB); //---Recipes---// PotionHelper.addMix(PotionTypes.MUNDANE, Items.GOLD_NUGGET, GATHERER); PotionHelper.addMix(GATHERER, ItemInit.FLORAL_ESSENCE, GREEN_THUMB); } } Green Thumb potion: public class PotionGreenThumb extends Potion { public PotionGreenThumb() { super(false, 65460); setPotionName("effect.green_thumb"); setRegistryName(new ResourceLocation(Reference.MODID + ":" + "green_thumb")); } } Gatherer Potion: public class PotionGatherer extends Potion { public PotionGatherer() { super(false, 16776960); setPotionName("effect.gatherer"); setRegistryName(new ResourceLocation(Reference.MODID + ":" + "gatherer")); } } What I DON'T want: http://tinypic.com/r/2cdd7ow/9 What I DO want: http://tinypic.com/r/2rz28g3/9
  4. I've made some custom potions and I would like to remove the annoying glowing texture from them. How can I do that?
  5. I hope I'm not resurrecting a dead thread, since it's only been a couple months, but I think I can help you. If you use a json recipe for your crafting, it allows you to get the NBT data for potions. Here's an example for you: { "type": "minecraft:crafting_shaped", "pattern": [ "PPP", "PBP", "PPP" ], "key": { "P": { "item": "minecraft:potion", "data":0 }, "B": { "item": "minecraft:bucket" } }, "result": { "item": "minecraft:water_bucket", "count": 1 } } I hope this helps. Moreover, I hope you already found the answer you needed and I'm just late to the party, but maybe it can help the next person who sees this.
  6. What does your log say? I'm somewhat new at this myself-- not new to java, but to modding. I'm going to just guess here that your blockstate is missing the variants you declared in the BlockLeaf class-- ' check_decay' and 'decayable'. Try adding those to your blockstate and see if it doesn't help. Example: "check_decay=true,decayable=true,variant=apple": { "model:" "tm:leaves_apple"} You'll want to have a true and false for each of the leaf-specific variants. And I can vouch for Jabelar's tutorial. I just recently did some trees myself, and I had started out with following a youtube tutorial. But I got really stuck and I found Jabelar's tree tutorial and it helped me figure out where I went wrong. Also, I recommend following the advice given about going with the flat method rather than variants. I switched mine around as suggested, and it made it much easier to understand. I hope this is helpful to you, and I hope you get your trees working.
  7. True, true. But as someone who is still trying to figure out how JSON works, I'm unsure where I call the data for each of the multiple models that make up the door blockstate. Do they get added in the layer values, or in the referenced types?
  8. Forgive me, i am new to the json scene. When i learned java it was 20 years ago and back then json wasn't a thing yet, neither was minecraft, of course. Lol. I did make a couple of attempts at it already, but i obviously didn't do it right because my json code wouldnt validate. After several failed attempts and consulting with a couple of other modders i know, I thought perhaps it isn't feasible. Which brought me here. How would you recommend doing this?
  9. I had a block I made that had solid and transparent parts, and was rendering all kinds of crazy. Thanks to the folks in here I was able to get it working correctly using the forge multi-layer blockstate. My question is this...can the same method/principle be applied to a door? My goal is to make a door with a window inside it that has a texture similar to stained glass, rather than just be clear (cutout). Using a texture with some transparent parts on the regular door model gives much the same result as I had with my previous block--choppy textures, parts look like they are gone, etc. Using a custom model made with cubes that have a transparent texture applied to them gives even worse results. So is it possible to fix this using the forge multi-layer blockstate, like it fixed the other block?
  10. Disregard my last question--I got it! Woot! It took me looking once again over what I had seen as examples, versus what I was using in my blockstate, to realize where I went wrong. I had incorrectly been using paths to separate blockstates (that didn't exist) inside the "Base", "Solid", and "Translucent " values. All I needed was to have it's own blockstate, with the type. (I hope I am referring to these by their right names) So I put my "mff:backsplash" blockstate into each of the Solid, Base and Translucent values, with a # to refer to the corresponding variant types, then I defined each type with the appropriate models for "base" and "translucent". Bingo. My block appears exactly as I wanted it to, with no funky textures. Thank you so much for your help.
  11. Earlier you answered yes, when I asked this: So would this be the right way to do it? (Forgive the odd formatting, please--the editor isn't letting me fix it.) "custom": [{ //variant type named custom "Base": {"model": "mff:backsplash_base"}, //variant value named Base with a model override "Solid": {"model": "mff:backsplash_base"}, //variant value named Solid with a model override "Translucent": {"model": "mff:backsplash_bricks"} //variant value named Translucent with a model override }],
  12. which part are you saying yes to in my first question? the making 2 more block classes, or the part where I reference each model in "base" or "transparent" values?
  13. Okay, so I have 3 more questions. 1. Do I need to make 2 more block class files, one for each part of the backsplash block? Or is it enough to have the variant type "custom", with the three variant values "Base", "Solid" and "Translucent" reference just the two block models, backsplash_base and backsplash_bricks? 2. How do I add the variant type "facing" to this? My BlockBacksplash class file extends a custom block called BlockFurnishing, in which I have the facing properties, but I am unsure how to call these properties in the blockstates file, as a single block. Is it as simple as putting the blockstate into the "north": {}, etc. value, instead of the "model": {}, etc. value? 3. Do I have to add a "normal": {} variant type to this? I remember seeing the console giving an error at one point that "normal" was missing, so I am also unsure about this. Thank you for all of your help so far. I feel like I am starting to understand it a bit better and I am one step closer to success.
×
×
  • Create New...

Important Information

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