Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

CyberPunkBln

Members
  • Posts

    34
  • Joined

  • Last visited

Everything posted by CyberPunkBln

  1. Hello, completly fail at my side. Now i have the IConditionFactory ready but are completly useless why i can only deactivate ore activate the hole recipe and do this only for a clean minecraft-log :). That is only what i have found https://gist.github.com/LexManos/2a11d4f7aa9d680d861dae4faf9dcfa6 thats an inspiration, but i can only say what Ingredient should it be when a mod is present, but when i have 2 mods and what use of both mod-ingredients in my multi-recipe. but if when i have no mod, can i use Ingredient.EMPTY with constants? Fuuh good old times, before 1.12 i have an Condition for GameRegistry:) ;). ps: I think my big big problem is that thermalfoundation and industrialforgoing will make her Rubber-Products not as ore.itemPlastic, then i would have no problems
  2. Hi, nevertheless thx, nevertheless i can sniff some ideas. so i have grabed github and no one use this so as i need it, but at the moment i use my mod in my own modpack and there are all two mods. Hopefully a guy foudn this thread there have made this too in her mod:).
  3. Ah okay, but how can i make an item-recipe that use and OR-Condition? Can i only make an JSON-Recipe for an item that binded on one Condition? When i use conditions in the top-level object how can i say to forge use 2 possible ingredients when both mods are present, use 1 possible ingredient when only 1 mod are present or ignore the recipe when non mod are present? I will bind the IConditionFacrory to an true boolean if the Config says Yes and the Mod are present. (Yes i know not perfectly my code but how i say i code with system.out.println it is importent for me:)). I will try to love the new JSON-Recipe System, i hope you can forgive me if you see that i cannot good handle with JSON-Logik but i learn every second:). If-Conditions are in my blood, but i understand that the json-system is not only performance technically good its prefend bugs and error before i can made an item in minecraft.
  4. Hello, i have some additional questions to the condition system. 1. When i use System.out.println in IConditionFactory must it be shown in the console output? 2. Is it possible to call an condition everywhere in the json-recipe like so: { "type": "minecraft:crafting_shaped", "pattern": [ " C ", "C C", "CCC" ], "key": { "C": [ { "type": "forge:ore_dict", "ore": "itemRubber" }, { "conditions": [ { "type" : "mod_loaded", "mod" : "thermalfoundation" } ], "item": "thermalfoundation:material", "data": 832 } ] }, "result": { "item": "schopcraft:enh_canteen", "data": 0, "nbt": { "canteen_type": 0 } } } I cannot confirm this why i don't receive an console output from my variables that i combine and mix in my IConditionFactory-Class and the json interpreter says that ingredient are not exists. { "conditions": { "mod_allowed" : "net.test.config.ConditionFactoryModExists" } } And now my crappy IConditionFActory-Class: public class ConditionFactoryModExists implements IConditionFactory { @Override public BooleanSupplier parse(JsonContext context, JsonObject json) { // Loader.isModLoaded("Railcraft"); String key = JsonUtils.getString(json , "mod"); boolean value = JsonUtils.getBoolean(json , "value", true); //return () -> ApiUtils.isExistingOreName(key) == value; System.out.println ("Condition Key:" + key); return () -> Loader.isModLoaded(key); } } Yes i know crappy but without an system.out.println i don't have the ability to bugfix oldscool and when the triggering an factory not show an console ouput i have only an error-free json-parser output and then i must test with mod and without if it functioned. thx
  5. I have it "ingredients": [ [ { "item": "minecraft:1", "data": 0 }, { "item": "minecraft:2", "data": 0 }, ], [ { "item": "minecraft:3", "data": 0 }, { "item": "minecraft:4", "data": 0 } ] ], thx great problem solved
  6. ah okay i have looked in the 1.12.jar and have an example-recipe for testing, but that is difference the shapeless logic but i hope i can convert shaped to shapeless
  7. Ah i understand. I have think that i must made every recipes/item in a root-array but now i understand i must it make as an ingredient-array like so,as an crappy example: "type": "minecraft:crafting_shapeless", "ingredients": [ { [ "item": "minecraft:somewhat0", "data": 0 ], [ "item": "minecraft:somewhat1", "data": 0 ] }, { [ "item": "minecraft:somewhat2", "data": 0 ], [ "item": "minecraft:somewhat3", "data": 0 ] } first recipe somewhat0+somewhat1 or the other somewhat2+somewhat3 right?
  8. Hello, i have read that i must make more than one recipe, when i want wildcard metadate in json-recipes. But how can i made an JSON Recipe for multiple Recipes? Or are JSON-Recipes only for one receipe for one item. Must i use the Gameregistry for that reason or can i do that with JSON-Recipes? thx
  9. Yes i will only pull out water from the raincollector. At the moment i use the cauldron.
  10. Ah i understand so i must find all TileEntitys that has an IFluidHandler and interact with them TitleEntity?
  11. Yes thx a good Overview. Now i gradle load the forestry-api. Now i can look in the api, where i can get the block raincollector:). Hmm i think about the fact, that i must code for every mod that brings an tank with, give it no forge special dictonary for tanks that hold water as an fluid? An tank dictonary?
  12. Do you have a tip how i can receive the depencies informations? I found nothing with google for the right lines for 1.12.
  13. I have cleaned the Cache for a fresh start. Now i try to use the Forestry Repo.
  14. Cool i have set this in my build.gradle repositories { maven { name 'Forestry Repo' url "http://maven.ic2.player.to/" } } And after a setupDecompWorkspace i have the api in my build dir, wonderful. Now can dive deep in the forestry api, fuh:) very complex things there for an right click on an raincollector:). thx Sorry was my own copy of forestry in the build folder oh ... but he has definitivly download something after running ... was this the right build.gradle options?
  15. Cool, but how can i use this at buildtime? I mean how can i set up my enviroment to use a mod at buildtime? Is this a simple ClassPath-Thing? When i have the jar of the mod in my ClassPath?
  16. Hello, no i don't want a modpack, i want the possibility to use other blocks and items from other mods, that other guys use with my mod. I think i have forgot to say that i have written my own mod,or? I search only a tip how i can 2 functions implement with the new forge 1.12 version. 1. Check if a mod is present at build- and runtime in a modpack. When i build my mod no other mod are present and this will i simulate and i want that my mod functioned without the other mods. 2. When the check was true, i want make a condition and implement new functions in my own mod, but only when the other mod is present. At the moment i can only use Vanilla-Mods at buildtime. Actually i only want to use and interact with the Raincollector from Forestry in my mod as a simple Block.cauldron, as an example. Interoperability with other mods are the next thing in my mod and need a little bit help how i can implement this in a Gradle-Forge-Enviroment. thx
  17. Hello, i have only a little problem. I will use some Items and Blocks in my own mod. I will not write an mod for an mod. How can i simply use other mods items and blocks? I will only check if the mod in the modpack is present and then use items and blocks. Is there an easy installation guide out there. The old wiki links from forge are gone and in the new Docs i dont find any information about that. Is it so simple that i only must define an respository in gradle.build? I want to use some Blocks from the newest build of Forestry but only want an depencies on the minecraft version only (the block is in all 1.12 versions). But copy all .class from forestry_1.12-5.4.3.146-api to the forge-dev-dir are crappy or? Thx
  18. Great its functioned and i have all my NBT-Data Problems solved. My hack from my first answer on my post itself is at the momet fully usable, but i know it gives other and better methods that i will learn the next days. At the moment i test this on my real modpack. @Override public void onCreated(ItemStack stack, World worldIn, EntityPlayer playerIn) { if (!stack.hasTagCompound()) { stack.setTagCompound(new NBTTagCompound()); NBTTagCompound nbt = stack.getTagCompound(); nbt.setInteger ("canteen_uses",ModConfig.plastic_durability); } } But i think in the next hours i put all my functions in util-classes i study your code very intrested. Object Orientated is one thing, the right structure the other.
  19. Hi, oh no what a failure , i have this failure in another part and have say, not two times. But this with the != and == i make at a rolling band. Thanx, i have was thinking "this cannot be, only when i refer on an not existend object it can be a null pingter exception in this matter. Yes wonderful i was started with clean code (iam mainly a php coder, with that oop knowledge for years, and now i pull my old j2me knowledge for this, but when i read forum threads it give darker minecraft mod-dev times:)) and i have make an code with an Item/Subitem where the metatag was taken for durability and main-texture, after hours i have seen only a Tool with Durability or an with SubItems not both. But then nbt-tags was the Resolution for my problem that Items with subitems and setMaxDamage don't have SubTextures, but nbt-tags are very very usefull. And every looks at the moment good and the in my mind comes, uh i have forgot to test the furnace and what happends with my Config-Vars in nbt-tags in json-recipes. Cool Thanx a lot, i go and test first with the right condition set:).
  20. Yes when i want to write ro an already smelted item i became an null pointer exception. @Override public void onCreated(ItemStack stack, World worldIn, EntityPlayer playerIn) { NBTTagCompound nbt = stack.getTagCompound(); if (nbt != null) { nbt.setInteger ("durability",ModConfig.plastic_durability); System.out.println ("NO NBT"); } else { System.out.println ("NBT"); nbt.setInteger ("durability",ModConfig.plastic_durability); } } The console output says me that the nbt set and when i take the item from the furnace /ct nbt says No NBT. Are this two events one onCreated for the smelted item and one onCreated for taking the item? Can it be that the result ItemStack and the Ingredient Item Stack will be called in this Event? I'm confused, how can use the result ItemStack to attach nbt-data on? I think onCreated are my last chance. So i must make an Transferitem that comes from the furnace and will be made right after burning with a shapeless recipe.
  21. Yes i have read wrong, my fault. GameRegistry make an instance of FurnaceRecipes . And gives it an option set the nbt-data after smelting? I mean @Override public void onCreated(ItemStack stack, World worldIn, EntityPlayer playerIn) ist the wrongest way or? When i cannot gives an Item after the smelting an nbt-data hours of coding are for nothing .
  22. Hello, thx this will me help. @Choonster I use GameRegistry.addSmelting(new ItemStack(this, 1, 3), new ItemStack(this, 1, 4), 0); for registry Smelting Recipes why i can use an ItemStack with MetaData. And after the Smelting the Item all NBT are lost. Should i use FurnaceRecipes, should this preserve my nbt-data?
  23. Hi, thx for that help. I will use first nbt-data without an variable. A custom ingredient, can you explain this? Where i must define this custom ingredient? And another crossside question with the smelting recipes. How can i made smelting recipes that only accept items with an specific nbt-data (can i expand the StackObject with nbt-data?))? And how can i set nbt-data after smelting done? All my smelted items will be smelted without nbt-data?
  24. Short and Dirty Hack :), i have found a short hack, but this can not be reason:(. When the Item become duranility lost i change the MetaData to one Int higher and then all functioned and the Items will not be used in the Recipes, why the Recipes uses the MetaDatas. Also one count above the registered subitems. But how i say this can not be the reason and it must be possible to use nbt-data in crafting- and smelting-recipes and with an config-variables. I found this Dirty Hack functioned to well:).
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.