Jump to content

nexusrightsi

Members
  • Posts

    153
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Recent Profile Visitors

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

nexusrightsi's Achievements

Creeper Killer

Creeper Killer (4/8)

0

Reputation

  1. Alright, well thank you. That is at least one issue out of the way, I didn't know that they unsupported/removed ExtendedProperties in 1.9 and beyond since I've been stuck in 1.7.10 for so long. I still prefer 1.7.10 though I still like to hear any suggestions on the schematic to code tool if there are any for 1.8 and beyond. I googled but only found the older and very outdated ones as said above, I'm not looking forward to manually setting all 426k blocks from my schematic
  2. Hey there, I know this is not really a question for this forum topic but I figured that I might as well try since I have no clue where else it could go. Back in the day there used to be a tool that converted .schematics to code in .java, although I can't seem to find an updated version for 1.8 and beyond. I would have changed it all manually myself if my schematic didn't contain 400k+ blocks. So yes... its quite the issue I have on my hands. now the second question is actually related to modding support, I don't have any code done for it yet as I'm trying to figure out the kinks of how to do this properly. So here is the question, I want to implement crafting depending on the players research. Take thaumcraft for example where the player first has to discover all the elements and researches in order to craft the corresponding items/blocks. What would be the best way of going on about doing this, I was thinking of using the player properties way however I doubt syncing lots of variables would be the way to go, besides the obvious limited datawatchers for the player?
  3. So... I noticed that for some reason both onItemUse and onItemRightClick aren't being called like at all, I put a println() at the start of both methods and nothing is being printed in the console... this is what my methods currently look like till I fixed the issue: http://pastebin.com/dXbNq2Vd for the record, I also tried printing before the isRemote checks to see if those were the issues but they weren't
  4. After some sleep I decided to browse through the code again looking for the issue, first thing first I instantly noticed the issue... apparently I forgot to change the amount of columns in the for loops in both "boolean matches" and "checkMatch". It's all working properly now, thank you and sorry for the inconvenience. I really should stop trying to problem solve when tired as heck
  5. I've tried multiple variations now and still not working, I reverted back to using the posted code.
  6. So... i've been trying to figure this out all day, I had the bright idea to use vanilla's code for this idea where I'd make a custom shaped crafting system 3x5 in this case. Technically it should work but its not picking up either the recipe or the result for it. container: http://pastebin.com/WCBEueNi crafting manager: http://pastebin.com/pDxYbKUu result slot: http://pastebin.com/QRcfcbYR Recipe: http://pastebin.com/2amngN2b this is how I register the crafting recipe: AssemblyTableCraftingManager.getInstance().addRecipe(new ItemStack(BlockHandler.compostBin, 1), new Object[] {"P P", "P P", "P P", "P P", "PPP", 'P', Blocks.IRON_BLOCK}); Yes, the recipe is actually being called since i've got multiple regular crafting recipes in the same method that do work. I really can't find the issue as to what is causing the problem...
  7. Okay... that was random, without me changing absolutely anything it decided to work... my code is being haunted, I need an exorcist to cleanse my project please!
  8. @Mod(modid = Reference.MOD_ID, version = Reference.VERSION) public class NagaCore { @Instance(Reference.MOD_ID) public static NagaCore instance; /* * Sets the proxies up for usage. */ @SidedProxy( clientSide = Reference.CLIENT_PROXY_LOCATION, serverSide = Reference.COMMON_PROXY_LOCATION) public static CommonProxy proxy; public static CreativeTabs tabBlocks = new CreativeTabNFOBlocks("nfo_blocks"); public static CreativeTabs tabItems = new CreativeTabNFOItems("nfo_items"); /* * This loads in all the given methods upon the start of the game, commonly used for important systems such as packets, handlers and other * important stuff. * take note of the hierarchy in which order everything is getting loaded into the game. */ @EventHandler public void preInit(FMLPreInitializationEvent event) { proxy.preInit(); BlockHandler.BlockInit(); ItemHandler.ItemInit(); ItemHandler.registerRecipes(); ItemHandler.registerOreItems(); } /* * This loads in all the given methods upon the start of the game, commonly used for blocks, items and varius other things. * take note of the hierarchy in which order everything is getting loaded into the game. */ @EventHandler public void init(FMLInitializationEvent event) { proxy.init(); } /* * This loads in all the given methods upon the start of the game, commonly used for Gui's and stuff that are allowed to be initialized * at the very end of the minecraft boot up. * take note of the hierarchy in which order everything is getting loaded into the game. */ @EventHandler public void postInit(FMLPostInitializationEvent event) { proxy.postInit(); RecipeHandler.removeRecipes(); } } I try to keep this as clean as possible that is why I try to move everything into the proxy but sadly i can't do that for the items and blocks. They will crash the game when I do that
  9. I have no clue what is going on right now... I switched the call of removeRecipes() from the proxy post init to the main class post init not that that should matter in the slightest... However the method isn't even being called...
  10. In my proxy.PostInit() which is being called in the post init of the main class.
  11. Its pretty much the solution koekkie came up, scratch that. Its just a copy and paste. public class RecipeHandler { public static void removeRecipes() { /* * Items */ removeRecipes(new ItemStack(Items.DIAMOND_HOE)); removeRecipes(new ItemStack(Items.IRON_HOE)); removeRecipes(new ItemStack(Items.GOLDEN_HOE)); removeRecipes(new ItemStack(Items.STONE_HOE)); //recipe.removeRecipes(new ItemStack(Items.DYE, 0, 15)); /* * Blocks */ //recipe.RemoveRecipe(new ItemStack(Block.workbench)); } private static void removeRecipes(ItemStack stack) { Iterator<IRecipe> recipes = CraftingManager.getInstance().getRecipeList().iterator(); while (recipes.hasNext()) { ItemStack output = recipes.next().getRecipeOutput(); if (output.isItemEqual(stack)) { recipes.remove(); } } }
  12. Quite unfortunate that neither solutions work though, the recipe is still there for some reason...
  13. Diesieben please, your last comment made me facepalm so hard Why the frig did I want this code... when its just as easy as CraftingManager.getInstance().getRecipeList().removeIf(stack -> stack.getItem() == Items.STICK); You sir, ruined my day! nah just kidding. Thank you for the easy solution though, less code is always better and if I can slim it down to a mere line who am I to moan!
  14. All that had do be done was change both resultItem.stackSize = 1; and recipeResult.stackSize = 1; to this: .setCount(1); Before anyone asks, yes I am most certainly calling the method that removes the recipes from my post init. I posted this in a new reply since it wouldn't allowe me to post this in the original post...
×
×
  • Create New...

Important Information

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