-
Posts
878 -
Joined
-
Last visited
Posts posted by Elix_x
-
-
Then you should not support those mods and if people complain send them to the mod authors. It's not your job to fix that
Ok, got it... I'll report to all of them one by one ...
Yes, the Java 2d image classes should be fine.
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???
-
That is what getRepairItemStack does...?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...
I'm still using
material.getRepairItemStack()
, but this only works for vanilla items, as
I found that there's no single mod that cares about specifiyng repair item stack in tool material.
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.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)...
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?
-
- There is no way to get the color, so you have to specify it yourself.
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...
- There is no way to get the color, so you have to specify it yourself.
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
-
SOLVED!
RenderBlocks has a method called setRenderFromInside(). Set it to true to draw the inside of a block! (Overriding shouldSideBeRendered from Block to always return true may also be a good idea).
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()
-
Gr8 help m8. I need to insert a call in the moveEntity Method, please whats wrong with this
Why do you want to do this? Have you searched for other variants other then coremod?
-
When wearing a part of an armor.
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...)...
-
-
In MC
From json or dynamic model?
Seriously, from here you can google it...
-
Okay - how to load it up?
Where? In mc? In 3d modelling software?
-
So, B3D - does it work the same way?
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).
-
So, B3D - does it work the same way?
Yep. Very similar to how it was with OBJ in 1.7.10. Also, B3D has something special: you can specify it in json...
-
But somehow forge must did it before. Isn't there a possibility called AccesTransformer - i think NoCubesMod uses that.
1.7.10, obj - yes.
1.7.10, b3d - no.
1.8, obj - no.
1.8, b3d - yes.
-
I just found the NBT thing before your edit. I got a potion that delivers my effect. Name is wrong and color is wrong, but I'm sure I could fix that.
All that being said, surely there is a built in way to do it?? Anyone got experience with this?
The way to fix the color is to use metadata. That's all...
-
OBJ - No.
B3D - Yes.
-
Thanks, that explains that.
I'm not the best with bit calcs.
How do I specify my new custom potion for a new Itemstack?
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...
-
Okay wait - what? Why do i use tileentity to store data? Hasn't an entity got fields for that?
Typo... In entity ...
[Solved] [1.7.10] Dynamically combine textures
in Modder Support
Posted
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...