-
Posts
878 -
Joined
-
Last visited
Everything posted by Elix_x
-
Blocks can have multiple render layers. These are also called rendering passes. In your iicon register method, register icons for all layers. Now, there's big good method getIICon with world, position and render layer parameters. Here you can check if your block is forming multiblock, and return textures based on rendering pass... Note: you have to override some methods in order for multiple layers to work...
-
[1.7.10] Get item and color from tool material...
Elix_x replied to Elix_x's topic in Modder Support
Ok, got it... I'll report to all of them one by one ... Wait, but isn't texture sheet generated from iicons? Fo items with single layer, i can just get their texture location and that's it (this is probably like 99.9% of cases for material items), fo colored items with color mutiplier method, i can apply this multiplier to medium color, but what for items with multiple layers? They are generated from multiple iicons, and where i can find them is on generated texture sheet... Or should i consider not coding them??? -
[1.7.10] Get item and color from tool material...
Elix_x replied to Elix_x's topic in Modder Support
That is what getRepairItemStack does...? I'm still using material.getRepairItemStack() , but this only works for vanilla items, as So what should i do in this case??? My guess is only to scan over all items, find tool instances with this material and apply pattern recipe "cutting" to determine item used... Sure, you could do that. Ok, so it's possible... I'm not experienced with graphics or open gl, so how can i proceed when i get texture file location? I heard of java image classes, is that what i can use? -
[1.7.10] Get item and color from tool material...
Elix_x replied to Elix_x's topic in Modder Support
I was meaning "repair" item, item which is used to make/repair tools. For example, for ToolMaterial.WOOD it's planks, for ToolMaterial.IRON it's iron ingot... So there's no way i can "scan" texture (of let's say repair item, which i found above) and determine "average" color??? (Yes, this will not work if item is special rendered)... -
Hello everybody, I'm here with 2 interesting questions: -Can we get material's item (or itemstack), another way than using material.getRepairItemStack() ? --Why? --Because i found that there's no single mod that cares about specifiyng repair item stack in tool material. And when recipes for mod items are generated, recipes for items based on modded tool materials have no recipe... -How can i get tool material's color? --Rgb or hex, both will work. --For example, wood color is 110:65:43 (r:g:b) and iron is 153:153:153 (r:g:b), but these i found manually... --I have not tried anything yet, i'm just asking about it, if anybody has done it already or knows approximative way to do it. --Note: color option is client only, so i can "scan" textures... Thanks for help! If you have any questions - just ask!
-
1) Sounds are indeed separate thread. In eclipse, you can see it when switch perspective to "Debug" mode. (It's LWJGL thread. LWJGL is java connector to OpenAl and OpenGl). 2) playSound sends packet (i think you know that) to everybody and then clients play convenient ISound in Minecraft.getMinecraft().getSoundHandler().playSound(ISound) This means, that you can play sound on client directly by creating new ISound and passing it to sound handler. Note that vanilla mc has already created helper classes such as PositionedSound , ITickableSound and MovingSound . You can use them too, or extend/implement your own (needed in certain cases, for example repeating sound like riding in minecart, which has it's own MovingSoundMinecart implementation).
-
Take look at classes in net.minecraftforge.fluid
-
Note on RenderBlocks.setRenderFromInside(): you should only set it to true only when your block is rendered. And after - back to false... Because otherwise ALL blocks will be rendered from inside... Which will decrease fps a lot...
-
Are you using default block model? Not default? Custom?
-
isOpaqueCube()
-
Why do you want to do this? Have you searched for other variants other then coremod?
-
Then there's tick method which is called every tick when armor is worn. It is called something like onArmorTick. Do player.motionY manipulations there...
-
When do you want to do this? (when wearing armor, holding item, next to the chicken, next to your mob...)...
-
https://github.com/MinecraftForge/MinecraftForge/blob/master/src/main/java/net/minecraftforge/client/model/b3d/B3DLoader.java
-
From json or dynamic model? Seriously, from here you can google it...
-
Where? In mc? In 3d modelling software?
-
Yep. Very similar to how it was with OBJ in 1.7.10. Also, B3D has something special: you can specify it in json... YAYYY...which means i can animate it? And which programs can create B3D models? I know that blender will work (i use it)... Probably also maya, cinema4d...
-
Reset te's position right after reading from nbt.
-
Yes, you are right. Before reading from nbt to te, change integers in nbt: "x", "y", "z" to valid values (pos of new te).
-
Yep. Very similar to how it was with OBJ in 1.7.10. Also, B3D has something special: you can specify it in json...
-
1.7.10, obj - yes. 1.7.10, b3d - no. 1.8, obj - no. 1.8, b3d - yes.
-
The way to fix the color is to use metadata. That's all...
-
OBJ - No. B3D - Yes.
-
Actually, me neither... But you can take a look at PotionHelper class, it must have a method convert effect in to meta, because it has method to convert it back... EDIT: Also, you can add effects by wrting those in to compounds in to tag list called CustomPotionEffects in stack's tag compound...
-
Multimountable entity and other problems?
Elix_x replied to ItsAMysteriousYT's topic in Modder Support
Typo... In entity ...