
RANKSHANK
Members-
Posts
305 -
Joined
-
Last visited
Everything posted by RANKSHANK
-
If you're going to encapsulate the recipe creation like that you may as well just use variable args and array iteration. public static void add(Item output, Object... recipe){ GameRegistry.addShapedRecipe(new ItemStack(output), recipe); } makes for more dynamic usage. then iterate through an {Output, Synth} array to register everything. No unnecessary additional methods, and it'll force you to keep all of your similar recipes in a few lines of code. May just be a personal thing but I like forcing myself to put things in specific places so that when I'm programming while drinking/ tired I don't end up with quite as much spaghetti code. for(Item[][] o : { {Content.kingdom_key, Content.heart}, {Content.otherKey, Content.otherIngredient}}) add(new ItemStack(o[0]), "AAA", "ABA", "AAA", 'A', o[1], 'B', Content.wooden_key); Either way var args will make your add() method a bit more accessible since it'll handle 'making' the array for you But yes we need more than a few snippets of your registration methods to know whats going wrong here
-
[1.8] Drawing enchantment glint over a regular quad
RANKSHANK replied to TheNuclearDuck's topic in Modder Support
Not directly a solution, but the error on the additional quads sounds like an undersized UV area. I've messed around previously with the Glint for a shield esque overlay and when its UV coords aren't displaced enough you get gaps akin to what you've described because it 'zooms' in on the textures. -
[1.8] [CLOSED] Get the actual location of the mod's 'assets' folder.
RANKSHANK replied to mGamer426's topic in Modder Support
Why wouldn't you output to a different folder? Create an output location that you want and access it with an IResourcePack. This will also allow you to 'hotswap' (guessing you'll have to force the ResourceManagers to reload unless you're feeling rather fancy) models in an out with something like a whitelist for the file contents (contained models). I don't really see the merits of a secondary application launch, either wrap it up inside of a gui in minecraft or create a standalone, as you've mentioned dual launching applications is a PITA -
No where near my IDE but aren't you supposed to be setting blockstates as opposed to raw blocks?
-
Ahh that makes sense... It's going to be an excavation since AFAIK Items only have correlation to ModelResourceLocations which contain the texture references. It's worsened by the fact that every Item can have multiple TextureAtlasSprites associated with it in a single ModelResourceLocation for any given metadata/nbt. You could run through the texture map during TextureStitchEvent.Post and average out the loaded sprites there, but you'll probably have to parse through the loaded models to access their corresponding items... Most likely the end result would be a <ModelResourceLocation, IntColor> map that you feed the itemstack's cooresponding model through.
-
Just some thoughts on what I've seen in the rendering safari: pre blend the textures as custom TextureAtlasSprites during texture stitch eveny, keep track of their string keys. Then use those keys during model bake event to bake the textures into the appropriate models... How many models are you looking at?
-
Don't know why you'd want that but override Item.getItemStackDisplayName
-
With events you could theoretically listen for damage and eat away at your own stacks instead, then killing the player when necessary. I dunno about actual health modification, I know I've seen mods do this sort of thing with zelda esque health increasing though
-
The faces thing is just good practice, don't draw what you can't see; granted I dunno how common this chest is projected to be in a particular area but removing 10 faces per block (20 primitives since a quad is 2 triangles) adds up pretty fast that's a bit of a flag with the TESR... If it is just a system issue adding an additional colored pixel to the top & bottom rows of the texture should clear it up if it's a bleed. If aliasing the issue I don't know of a solution.
-
Just remove their face declarations: "name": "Support_NorthWest", "from": [ 0.0, 1.0, 0.0 ], "to": [ 1.0, 15.0, 1.0 ], "faces": { "north": { "texture": "#support", "uv": [ 0.0, 1.0, 1.0, 15.0 ] }, "east": { "texture": "#support", "uv": [ 1.0, 1.0, 2.0, 15.0 ] }, "south": { "texture": "#support", "uv": [ 2.0, 1.0, 3.0, 15.0 ] }, "west": { "texture": "#support", "uv": [ 3.0, 1.0, 4.0, 15.0 ] } } What's your computer's graphics situation? Just out of curiosity- Well the JSON block models means you/they can easily add textures if needed for in mod or in resourcepack. It shouldn't... Haven't seen issues with bleeding before, though mipped atlases are notorious for it.
-
Alrighty first you should reduce your poly count whenever you can by removing non-displayed faces (good practice) here being the up & down faces of the support quads, and the top of top base & bottom of bottom base. This looks like a texture issue though... why are you using a separate image for the sides and such instead of feeding from a single fully black image? It looks to me kinda like a mixture between bad aliasing and texture bleeding to me https://raw.githubusercontent.com/61352151511/Random-Utilities/1.8.9/src/main/resources/assets/randomutilities/textures/blocks/magicChest_side.png
-
There is no tutorial because it's that simple for calling it. Literally just call that method in a Model Bake Event handler. Once the model is baked that's what's linked to that file call. If you need help with even handlers there are plenty of tutorials out and about for that.
-
Null pointer error and you have no null checks...
-
How to you add Liquids into Forge 1.8.9?
RANKSHANK replied to KingOfMiners's topic in Modder Support
*posts on forums no response in 2 hours "I guess no one's going to respond never" You can easily find choonster's stab into the 1.8 fluid process on github. https://github.com/Choonster/TestMod3 -
Those are the methods that you need to use, take a look at LayerArmorBase
-
[SOLVED][1.8.9] Using Forge Mod Update Check system
RANKSHANK replied to Bektor's topic in Modder Support
The formatting is really finicky, took me a while to get it.. Though I think you're using the viewer link as opposed to the DL link.. https://www.dropbox.com/s/050us1ta4sunxml/update.json?dl=1 Try feeding it that instead -
item.getColorFromItemStack(new ItemStack(item), color); You're trying to use a getter as a setter. You need to override the getter in your item class.
-
Do you really need a sphere? A billboarded circle will probably work quite well
-
[1.8] How to convert my ArrayList back into my HashMap
RANKSHANK replied to HappyKiller1O1's topic in Modder Support
Seriously not understanding why you insist on trying to manually sort your keys. -
[1.8][SOLVED] How to organize a HashMap?
RANKSHANK replied to HappyKiller1O1's topic in Modder Support
You want a tree map if you want your map sorted by keys. Just note the String comparator is case sensitive. -
[1.7.10][Solved] EntityItem not spawning in world
RANKSHANK replied to yorkeMC's topic in Modder Support
public boolean checkRunes(World world, int x, int y, int z) { int[][] pos = { { 1, 0 }, { -1, 0 }, { 0, 1 }, { 0, -1 }, { 1, 1 }, { -1, 1 }, { 1, -1 }, { -1, -1 } }; ArrayList<Boolean> b = new ArrayList<Boolean>(); for (int i = 0; i < 8; ++i) { if (world.getBlock(x + pos[i][0], y, z + pos[i][1]) == BlockRegistry.BlockSpiritRune) b.add(true); else b.add(false); } return !b.contains(false); } A boolean list? Just break the for loop with a false return. if the loop finishes return true. And if you're using an array of values as a constant reference turn it into a constant external to the method so that you're not constantly reassigning the pos array to the memory. -
[1.8] Help with adding a new variable to every Item and Block
RANKSHANK replied to HappyKiller1O1's topic in Modder Support
one float value per Item? So you don't need sub-type sensitivity? By dynamic I mean you can set it up like the model jsons where you can just have a default weight by defining "default" or you can have a set of values that are represented by multiple sub type -
[1.8] Help with adding a new variable to every Item and Block
RANKSHANK replied to HappyKiller1O1's topic in Modder Support
If you're only doing a single possible value then a text file like the .lang files would work perfectly. However say you want to add metadata support as an option, or even add stack compound support you'll probably need to use a JSON so you can format it in a more dynamic sense. I'd also recommend scanning each mod path for the necessary JSON so that the API can support mods on a more optional basis (IE you can just include a weight.json in the root folder that'll add values when the API loads them, otherwise be neigh non existent values in a non API present environment)