-
Posts
5160 -
Joined
-
Last visited
-
Days Won
76
Everything posted by Choonster
-
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>.
-
A ticking TileEntity or a TileEntity with a TESR are probably your best options here.
-
[1.12] How to disable some mod recipe files via config file
Choonster replied to Razor's topic in Modder Support
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. -
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.
-
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.
-
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.
-
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.
-
Is this data only used by the save it's attached to, or do you need to access the data of other saves?
-
By "world", do you mean a World object (i.e. a dimension), the map/saved game as a whole, or something else?
-
[1.12] ForgeRegistries.SOUND_EVENTS gets reset?
Choonster replied to OreCruncher's topic in Modder Support
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. -
[SOLVED] CAN NOT download files from file server
Choonster replied to CosPotato's topic in Support & Bug Reports
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. -
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.
-
[SOLVED] CAN NOT download files from file server
Choonster replied to CosPotato's topic in Support & Bug Reports
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? -
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).
-
[1.12] Custom gui doesn't work on server only
Choonster replied to DragonFerocity's topic in Modder Support
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). -
[1.12] Any detailed Information on Block Animation?
Choonster replied to 28Smiles's topic in Modder Support
The OP is asking about Forge's model animation system, not Vanilla's texture animation system. Unfortunately there's not much documentation on it. -
[1.12] How to disable some mod recipe files via config file
Choonster replied to Razor's topic in Modder Support
I have some IIngredientFactory implementations here, but none of them do what you're trying to achieve. -
[1.12] How to disable some mod recipe files via config file
Choonster replied to Razor's topic in Modder Support
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). -
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.
-
[1.12] How to disable some mod recipe files via config file
Choonster replied to Razor's topic in Modder Support
Conditions only apply to the recipe, not to individual ingredients. You need to specify the conditions property in the top-level object. -
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.
-
ItemMeshDefinition is used to select a ModelResourceLocation based on any aspect of the ItemStack.
-
The creative tab and particles are working on my machine:
-
Are there any errors in the log?