Everything posted by Draco18s
-
Adding projects to Gradle
From the MDK gradle file...
-
[1.10] Custom ItemBlock class?
One last question: Any way to do something similar with regular items? All I'm seeing are these predicate overrides which point to alternate model jsons. Its fine if not, just would've been nice.
-
[1.9.4]Teleporting player using onEntityWalking
Point. However, that's only true when the classes are not related at all. For cases where you're taking a generic object and downcasting to a more specific one, where it will sometimes be valid, then that won't throw a pre-compile error. eg String s = "hello"; Object o = s; Integer i = (Integer) o;
-
[1.9.4]Teleporting player using onEntityWalking
Writing code that does a cast will always compile. It's when it tries to cast something and it can't be that it will crash. There's no syntax error with what you've written, but there is a fundamental problem that will cause runtime exceptions.
-
How Do I Dispense A Custom Throwable Entity? (1.10.2)
Github for Windows isn't completely terrible, but yeah: I would recommend using something else.
-
[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:
IPS spam blocked by CleanTalk.