Everything posted by Draco18s
-
Register multiple models for a single block [1.12]
If a system ever says it can't find a file, but you know it's there, always always always look for typos.
-
Register multiple models for a single block [1.12]
Look close. Also ModelLoader.setCustomModelResourceLocation(item, meta, block.getRegistryName(), variant) is sufficient.
-
Register multiple models for a single block [1.12]
No, that's controlled by the IBlockState implementation. The blockstate file is only used to determine the block's model for rendering. If Minecraft can't load the blockstate file, it will throw several errors, which are they themselves captured and add on another error. Hence multiple "Caused by..." lines. The originator in this case is the missing file. Show a screenshot of the directory in a File Explorer window.
-
Register multiple models for a single block [1.12]
Caused by: java.io.FileNotFoundException: crl:blockstates/colored_redstone_lamp.json
-
[1.12] Fluid properties don't seem to be working
Make a pull request.
- [1.12] Change block registry names [SOLVED]
-
[1.12] Fluid properties don't seem to be working
setNoPushMobility() prevents pistons from pushing it. If you want your custom material to push players around like water, you need to replicate the behavior found in the Entity classes (it's kind of split) into an entity tick event handler.
-
[1.12] Fluid properties don't seem to be working
You haven't set the block's material to Material.WATER. Without that you don't get any of the standard water behaviors, as they aren't controlled by the block or fluid, but by the Entity class.
-
[1.12] Change block registry names [SOLVED]
There's an event for this, MissingMappingEvent? Something like that. You don't change the registry name at runtime, you just give it the new name and then when the event is fired (which will be fired for any missing mapping) you can hook in go "oh, that name, that's X now" and Forge will update the old stuff to the new.
-
[1.11.2][Solved] Item NBT data does not update on gui button click
You don't. You use a container, the container specifies the slots and the gui screen (the super class) uses the supplied container to draw them.
-
[1.10] Item texture questions
Sure, I get that. I haven't done anything with dynamic text, so I can't offer any insights. For me and what I was trying to do, I actually wanted all of those models so that more could be supplied outside my own mod. One of my companion mods does this: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/resources/assets/harderfarming/models/item/mold_butcherknife.json Different mod (albeit using the same base library), that has a model and texture for that item without needing to do anything other than supply the recipe for that particular combination. The IRecipe is supplied by the library, but because it's just NBT data, it would be possible for another mod to create the item without using my library.
-
[1.10] Item texture questions
For reference, here's an example of using ItemMeshDefinition: https://github.com/Draco18s/ReasonableRealism/blob/master/src/main/java/com/draco18s/industry/item/ItemCastingMold.java#L80 The item selects between different "states" based on a template item: it gets that template item's name, strips off some unnessessary bits (it uses them elsewhere, so they're still saved), and then looks for an item model based on that name. Those different models then supply a different texture.
-
[1.11.2][Solved] Item NBT data does not update on gui button click
In one direction. As Choonster said, the server controls the state of the game and item NBT is considered "state information." So yes, NBT is updated automatically and the server's copy overwrites the client's.
-
Resource filtering on mod info file?
- [1.10.2] NullPointerExeption whilst adding preset/default server to a ServerList
- Resource filtering on mod info file?
Top of the file: version = "XXX" group= "YYY" archivesBaseName = "ZZZ"- Resource filtering on mod info file?
It's handled by the gradle compile process.- "Glow" around blocks
https://www.khronos.org/opengl/wiki/Primitive#Quads- "Glow" around blocks
3D glow is just achieved by drawing lines using quads.- [1.10.2] NullPointerExeption whilst adding preset/default server to a ServerList
- 1.12 GUI background too bright.
or super.drawGuiContainerBackgroundLayer(...)- All the things I need to make a mod that depends on other mods
Those ones are used by Forge to determine the load order. Not putting that may lead to your mod loading before your dependency, which would be bad.- All the things I need to make a mod that depends on other mods
Yes, both use the modid where I put the ellipses and would be equivalent to required-after. The mcmod.info file is not actually used by Forge for the most part, but is supposed to contain the same info as the @mod header so that websites like Curse can read the information.- I want to increase the bounding box for my model
You can't exceed 1x1.5x1, that's effectively a hard limit imposed by Minecraft, any larger and you will get unexpected behavior.- All the things I need to make a mod that depends on other mods
Only if you want to either: a) test in the development environment b) using an exposed API You need to add dependencies = "required-after:..." or dependencies = "after:..." depending on hard or soft dependencies ("after" just loads your mod later, "required-after" means that the other mod MUST be present or your mod can't load). Technically, nothing, but you should add a "dependencies": ["..."] for any hard dependencies If your not using an exposed API, nothing. Otherwise find and follow the directions in the dependencies block. The former uses if(Loader.isModLoaded(...)) to control logic (e.g. recipes) of itself. The latter uses API calls. For example: this. See above The @Optional annotation can allow you to move a hard-dependency to a soft-dependency. The only example I have is from 1.7.10 and I think the package changed.
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.