Jump to content

Choonster

Moderators
  • Posts

    5160
  • Joined

  • Last visited

  • Days Won

    76

Everything posted by Choonster

  1. It's still possible to register recipes from code, but they should be migrated to JSON where possible. If needed, you can create your own recipe, ingredient and condition factories to use from JSON. Now that recipes are managed by a registry, IRecipe implements IForgeRegistryEntry and instances can be registered in RegistryEvent.Register<IRecipe>.
  2. A ticking TileEntity or a TileEntity with a TESR are probably your best options here.
  3. Have you tried making an IIngredientFactory like I recommended? I just implemented one to do this here. I ended up using a custom Ingredient that never matches any ItemStack rather than using Ingredient.EMPTY; this is to prevent the Ingredient from matching an empty ItemStack when the conditions aren't met. I also added a recipe like your example that uses a compound ingredient consisting of an itemRubber ore ingredient and a conditional ingredient that matches Thermal Foundation's Rosin when Thermal Foundation is loaded.
  4. This should have been fixed by this commit (Forge 1.12-14.21.1.2423). Make sure you're using the latest version of Forge.
  5. If you're spawning particles through the World/RenderGlobal methods, they'll only spawn within 32 blocks (exclusive) of the player unless you tell it to ignore the range (by using a vanilla particle type that ignores range or by calling one of the overloads with an ignoreRange parameter). Block#randomDisplayTick will only be called for blocks that are within 32 blocks (exclusive) of the client player on every axis.
  6. Since particles only need to be spawned on the client, just check how far away the client player is from the block before spawning them.
  7. World Saved Data should be what you need. It can be attached per-dimension or per-save. Each side has its own copy of the data, syncing needs to be done manually.
  8. Is this data only used by the save it's attached to, or do you need to access the data of other saves?
  9. You're running a coremod built for Minecraft 1.8 or later on Minecraft 1.7.10 or earlier, which won't work. Which version of Minecraft are you trying to run? If it's 1.7.10 or earlier, you won't get any help here. If it's 1.8 or later, make sure you're running the right version from the launcher.
  10. By "world", do you mean a World object (i.e. a dimension), the map/saved game as a whole, or something else?
  11. RegistryEvent.Register<SoundEvent> is fired on both physical sides, not just the physical client. If the registry is empty on the server, something is wrong. Post your registration code.
  12. I can't reproduce this directly after installing Forge (because the installer downloads Forge), but I can reproduce it after deleting the Forge version from the libraries directory. As a work-around, try re-running the installer.
  13. Read the EAQ, it's linked at the top of this section of the forum. Please stop putting your text in code blocks and colouring it black, it makes it very difficult to read on the dark theme.
  14. That's not the correct URL for Forge 14.21.1.2443 Universal, the file has a -universal suffix before the extension. Which launcher are you using?
  15. I think you'll need to store the powered state in the block state or the TileEntity and use that on the client instead of using World#isBlockPowered directly. Look at BlockRedstoneLight for an example of this (though it unnecessarily uses two Blocks instead of a property).
  16. No it doesn't. If IGuiHandler#getServerGuiElement returns a non-null Container, FML will send a packet to the client telling it to open the specified GUI. It needs to be done on both physical sides. Proxies are for sided code, you don't need a "common" proxy. Anything that needs to be done on both physical sides should be done from your @Mod class (or a class called from it).
  17. The OP is asking about Forge's model animation system, not Vanilla's texture animation system. Unfortunately there's not much documentation on it.
  18. I have some IIngredientFactory implementations here, but none of them do what you're trying to achieve.
  19. If you want conditional ingredients, you'll need to create an IIngredientFactory and specify it in _factories.json. In the IIngredientFactory, you can use CraftingHelper.processConditions to check if the conditions are met. If they are, return an Ingredient instance for the specified item; if they aren't, return Ingredient.EMPTY (an Ingredient that never matches any ItemStack).
  20. An ItemMeshDefinition simply selects a model for an ItemStack, it doesn't combine or generate models itself. This needs to be done by the model. Look at ModelDynBucket or ItemLayerModel to see how they combine multiple textures into a model. I can't really help you with specifics, I can only point you to examples.
  21. Conditions only apply to the recipe, not to individual ingredients. You need to specify the conditions property in the top-level object.
  22. ItemMeshDefinition#getModelLocation is called every time the Item's model is rendered, but the ModelResourceLocations returned by it must be registered with ModelBakery.registerItemVariants at startup; so it can't load new models on-demand.
  23. ItemMeshDefinition is used to select a ModelResourceLocation based on any aspect of the ItemStack.
  24. The creative tab and particles are working on my machine:
  25. Are there any errors in the log?
×
×
  • Create New...

Important Information

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