Jump to content

cjs07

Members
  • Posts

    12
  • Joined

  • Last visited

Everything posted by cjs07

  1. So would I have to define my recipes using a custom version of the ShapedRecipe and ShapelessRecipe class in order to associate the recipe with a research and be able to check it?
  2. It's kinda based on the player. Each player would have their own set of crafting recipes based on the research they have completed. So it's not a property of the player that can be obtained through an instance of a player. The recipes that are available are based on the researches that the player has completed. So, for example, if a research correlates to the recipe for diamond pickaxe, a player who has completed the research would be able to craft it, but a player who has not completed the research would not be able to. How do you expect to store this data if not with the player? Its associated with the player, not stored within the player. So players are associated with their completed researches in a Map object or something similar, since unless I'm mistaken, there is no way to store it directly within the PlayerEntity class.
  3. It's kinda based on the player. Each player would have their own set of crafting recipes based on the research they have completed. So it's not a property of the player that can be obtained through an instance of a player. The recipes that are available are based on the researches that the player has completed. So, for example, if a research correlates to the recipe for diamond pickaxe, a player who has completed the research would be able to craft it, but a player who has not completed the research would not be able to.
  4. 1. For that tutorial, would every recipe have to be a separate class that implements IRecipe? Or is there a simpler way to compress multiple recipes into a single class? 2. The property I would be looking for is not a property of the player, so would the best way to check for a match be to create use a Map<Player, List<IRecipe>> to map what players have access to which recipes? 3. Would it be a similar process for smelting recipes?
  5. Use my own crafting handler in place of the default CraftingManager class. So a class very similar to the CraftingManager except it has the ability to determine of the item is craftable based upon the research that has been completed the by the player attempting to craft.
  6. Is it possible to make the vanilla crafting table use a custom handler? And if so, how?
  7. Is there any way to add a crafting/smelting recipe for a single player as opposed to globally for all players? I'm working on a research system that progressively unlocks crafting recipes as research is completed, but using GameRegistry.add... seems to apply globally to all players.
  8. Thanks for all your help! The gui works great now!
  9. Ok so that fixed the problem with the inventory items jumping from slot to slot. Now there's just the problem of the slot in the gui becoming the same as the first slot in the hotbar and vice-versa, but it does not result in duplication. Any ideas on how to fix that?
  10. So, since they are exactly the same, does it matter which one should I use? And should it be called by the client or server version of onBlockActivated?
  11. Do I have to call FMLNetworkHandker.openGui(...) in the same if block as player.openGui(...)? Because I thought the onBlockActivated method got called once by the client and once by the server, and you call player.openGui when it's called by the client, and FMLNetworkHandler.openGui when it's called by the server. Is that incorrect?
  12. So I have a GUI, a Container, a TileEntity, a Block, and everything works well until I attempt to place items into the GUI. To clarify, when I click to interact with the block, the GUI opens, and all the slots appear in the appropriate locations. However, when I go to move an item from within my inventory, just after it is clicked it returns to the slot from which it came. Shift clicking makes the item appear in both the GUI slot and the first slot of my hotbar. It then proceeds to return to the slot from which it came. Additionally, if the GUI is opened with an item in the first hotbar slot it appears in the GUI slot. Removing it from either slot removes it from the other as well, but it returns to both upon returning to the original slot. The GUI that the problem occurs with is the one for the Combustion Generator. Relevant files contain GeneratorCombustion in the file name. It may be three separate issues but I suspect that they are caused by the same problem in the code or very similar problems. All the files can be found in the GitHub repository I linked at the bottom of the post. Thanks in advance for any help you may be able to give. If you need a built copy of the mod in order to better understand the issue, or any other files, just ask for them. I will be glad to provide them. Note that the code is very similar to the Vanilla furnace code as the block I am creating functions almost exactly the same as the fuel slot in the furnace. GitHub Repository: https://github.com/cjs07/ChemistryCraft/tree/master
×
×
  • Create New...

Important Information

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