Everything posted by Draco18s
-
[1.10] Custom ItemBlock class?
Ah, thank you. I knew there was something in the code that did it already, I just couldn't track it down. I knew I could get the list of states simply by iterating through the metadata values, but that was unclean (not all blocks will have 16 states, etc.) and still didn't help translate that into a "prop=v;prop2=x" type string. The state mapper though. Muuuch more useful. StateMapperBase b = new DefaultStateMapper(); ImmutableList<IBlockState> values = block.getBlockState().getValidStates(); for(IBlockState state : values) { String variant = b.getPropertyString(state.getProperties()); int metadata = block.getMetaFromState(state); //register variant with metadata }
-
[1.10.2] VertexBuffer / Tessellator
You need to disable GL11.GL_LIGHTING, if I recall correctly.
-
[1.10] Custom ItemBlock class?
Awesome, that got things working. Much happy. Mostly my problem came down to not knowing what "<variant>" was supposed to be in diesieben07's explanation (the name, the value, a combination?). Now I'm just on a way to generalize this into a method to take in a block (and an arbitrary list of IProperties?) and loop through the variant list without doing it manually per-block. Doing one property was easy, it's getting the arbitrary list of them that'll be difficult.
-
[1.10] Custom ItemBlock class?
Thanks Choonster. The example definitely helps, too. I have a dentist appointment in about 20 minutes, so I'll poke around some more afterwards.
-
A question about Blockstates(1.10.2)
Don't forget blocks like the piston head or the portal block.
-
Incorrect Documentaion on Blockstate JSON Files.
Done. https://github.com/MinecraftForge/Documentation/compare/master...Draco18s:patch-1
-
Why do I have a bunch of jar files in the project build project?
That could be.
-
[1.10] Custom ItemBlock class?
I have a blockstate file that specifies the variants: Note that each variant is defined by a very generic "overlay_n" texture. This is so that I can change ores by changing one thing between two files: the base texture. I want to do this with my items. How? I do not want to end up with 176 virtually identical json files. I didn't have to do it for the block, I don't want to do it for the item. Thank you for linking the Forge documentation on blockstates, but it still doesn't answer the question of how do I use this for an item?
-
[1.10] Custom ItemBlock class?
AFAICT, this means I need a separate model file for each variant: every example I can find (vanilla, tutorials, other mods on github) all have a separate model file for each meta-variation. Earlier you said I didn't need it and could in fact use the blockstate json file I already had. So how do I do that?
-
[1.8.9/1.9.0] Issues with block and item textures not loading after backport.
The name morefuelsmod-1.8.9:pelletBlock has been registered twice
-
Why do I have a bunch of jar files in the project build project?
The tutorial you're watching might have all of those files hidden under a "Referenced Libraries" folder that the tutorial author never expanded. Sometimes I end up with this folder, sometimes I do not. I haven't figured out why yet.
-
[1.10] Custom ItemBlock class?
This hasn't helped any. :\ ModelBakery.registerItemVariants(item, new ModelResourceLocation(item.getRegistryName(), "inventory")); results in using the single default variant texture. ModelBakery.registerItemVariants(item, new ModelResourceLocation(item.getRegistryName(), "ore_density")); results in purple squares. Also do I do this before, after, or instead of ModelLoader.setCustomMeshDefinition?
-
[1.10] Custom ItemBlock class?
I....think I'm going to need an example of using it.
-
How Do I Dispense A Custom Throwable Entity? (1.10.2)
// TODO Auto-generated method stub return null;
-
[1.10] Custom ItemBlock class?
No, don't do that. If you have a blockstate json it must be in /blockstates/. Post the full error. This was the error (not relevant anymore, see other section). Was for the same code above. You could call setCustomModelResourceLocation for all of them or use a ItemMeshDefinition, which is basically a callback for "give me the model for this ItemStack". Using an ItemMeshDefinition has mostly made things much better. Probably the single thing I've done that hasn't made things worse before making them better. I've got item models, but they don't show the variant textures. They all show the default texture.
-
How Do I Dispense A Custom Throwable Entity? (1.10.2)
You need to reference it like this: GuruItems.EarthOrb That's your class and it's static item reference field.
-
[1.8][Solved] Event Handlers, adding chicken tempt item
You're passing a class reference for your event handler, the Forge event bus doesn't accept static references (until build 2014, and even then your handler method isn't static). You need to pass new ChickenFollowHandler() instead.
-
[1.10] Custom ItemBlock class?
Can't figure out how to point it at the existing BlockState json, but I did get an error trying to load a file inside /models/item so I copied the json to that location. Now there's no errors but I still have untextured, unscaled blocks. Correction: the item that shows up in the creative inventory has a completely nill model (100% invisible) but using pickBlock results in a missing texture cube. ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(),"ore_density")); where `item` is the custom item block instance. I assume this is because I've only set the custom model for metadata 0. How do I get all possible metadata values from an arbitrary block so I'm not writing special-case code for every block? Obviously in this instance it would be 0-15, but that isn't always the case. Also, invisible item.
-
[1.10] Custom ItemBlock class?
Then I am not understanding how to specify the variant.
-
[1.8.9/1.9.0] Issues with block and item textures not loading after backport.
All I can say is that the error says this:
-
How Do I Dispense A Custom Throwable Entity? (1.10.2)
guru.tbe.item.ItemEarthOrb is a package and a class, it is not an Object. You need to do "new ItemEarthOrb()" or reference one that already exists.
-
[1.10] Custom ItemBlock class?
I see. Ok then. Next question: Do I seriously need to have a separate JSON file for every item model variant? I'm going to have 16 variants for one block and I'm going to easily end up with 11 of these blocks (iron, gold, diamond, copper, tin, aluminum, lead, nickel, osmium, silver, uranium). For blocks this was easy: 1 base model file and 1 blockstate file declaring the 16 variants (each variant changing a single texture). For items it looks like I need a whole file just to declare that texture.
-
[1.10] Custom ItemBlock class?
Ah, need to set the custom model location for the item too. Of course.
-
[1.8.9/1.9.0] Issues with block and item textures not loading after backport.
You don't have an inventory variant in your blockstate file
-
[1.10] Custom ItemBlock class?
I found this thread, but there isn't enough information to be sure I've done things correctly. Assuming my ItemBlock class is ItemOreBlock extends ItemBlock : What is the name of the json file? Where is the json file supposed to be located? How to I register my block? Because nothing I've tried works. Current: oreIron = new BlockHardOreBase(); oreIron.setRegistryName("hardiron"); oreIron.setUnlocalizedName(oreIron.getRegistryName().toString()); ItemBlock ib = new ItemOreBlock(oreIron); ib.setRegistryName("hardiron"); GameRegistry.register(oreIron); GameRegistry.register(ib); Which gives me flat, 2D "missing texture" items.
IPS spam blocked by CleanTalk.