Everything posted by mnn
-
Throwable Items
well, you have to implement your custom renderer, because the vanilla ones work only for vanilla stuff (at least the snowball does). if you want just slightly modified snowball renderer you can take a look at this - https://github.com/mnn/jaffas/blob/c5359edb2e287d6503ec8a4def73b01917c4b257/src/minecraft/monnef/jaffas/food/client/RenderItemInAir.java.
-
Throwable Items
only on client proxy register rendering stuff, server doesn't need to know.
-
Item/block tick callback in x ticks
read whole topic. there are described two possible solutions (one easy to implement but a bit more damanding by diesieben07, second more optimized approach by me). all data you want to pass you have to wrap into the event object. this is not totally trivial stuff, some programming experience is required...
-
Item spawning in Entities onRightClick
Man, you aren't setting coordinates of TNT. par2World.spawnEntityInWorld( new EntityTNTPrimed(par2World, par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ) );
-
rendering Model in renderWorldBlock of ISimpleBlockRenderingHandler
firsty, this topis is not about how to create a custom TileEntity renderer. I tried few times rewrite that code, but even after coordinates and lightmap correction it does not always work. Sometimes it crashes on "already tesselating" error, next run it works fine. I'm quite lost when it comes to this tesselator rendering madness... PS: I somewhere read that there've been done some changes to rendering in 1.5, is it in a new version better/different?
-
A question about metadata blocks/items?
why the sad face? do you really think that many players will reach the limit of 32000 item IDs?
-
Throwable Items
you have to implement and register a renderer. look at RenderingRegistry.registerEntityRenderingHandler .
-
Writing/reading from NBT
eh, interfaceable? not sure what you mean by that. furnace uses NBT to save current progress and inventory. it's not just when game closes, it's also used when chunks are unloaded (the loading from NBT, not certain about saving, it's imo more frequent). on the wiki is article about NBT, if you want to know how to work with it: http://www.minecraftforge.net/wiki/How_to_use_NBT_Tag_Compound.
-
Item/block tick callback in x ticks
oh no, not this again... http://www.minecraftforge.net/forum/index.php/topic,5964.0.html
-
Make ore spawn in certain blocks besides stone? (sand)
You could post your solution (or a comment how to do it). It's not nice to have a "solved" topic with no information on how to actually do it...
-
[SOLVED] Brewing Stand Recipe
PotionHelper.class.getDeclaredField("potionRequirements"); the string "potionRequirements" is a name of the static field in PotionHelper, when running in obfuscated mc it won't be the same. the runtime deobfuscation is pretty new feature in FML for 1.5 (I haven't even try it yet), this topic might help you: http://www.minecraftforge.net/forum/index.php/topic,6430.0.html
-
[Solved] Custom mobs won't spawn
oh, by relevant code I meant classes responsible for/working with your biome and mob, you didn't have to prune it by hand (my bad, sorry). I didn't feel any arrogance from you post, but again my english isn't excellent. A lot of people asking here forgets to append source code/logs, but without it it's usually nearly impossible to track down the issue. the biome seems to be created after registering a mob spawn which uses the biome, it could be the problem. I'm not really sure if only "registerModEntity" is enough, in my mod I had to register my mob also by the global method. take a look at this post, it might help: http://www.minecraftforge.net/forum/index.php/topic,5748.msg30986.html#msg30986 (rest of it is here - https://github.com/mnn/jaffas/tree/master/src/minecraft/monnef)
-
[SOLVED] Brewing Stand Recipe
code posted by me just changes access modifier of the field from private to public, you can read more about reflection there - http://docs.oracle.com/javase/tutorial/reflect/. when the field is accessible you can add your recipes into it (it's similar to adding any other recipe in the load phase). if you don't have much experience with java i would not recommend using reflection. there are some things you need to take care of (like that the minecraft code will be obfuscated, so in that enviroment you'd have to use different name of the field, or utilize the new runtime deobfuscation).
-
Mob Drops
you could use LivingUpdateEvent and NBT of an entity (as a counter) to achieve this .
-
[Solved] Custom mobs won't spawn
I'm sorry, but this sounds like you should learn more about java and/or programming. Please provide more information, like (relevant) source code at http://paste.minecraftforge.net/, logs of crash and so on.
-
Rendering custom block render in inventory?
This is not an answer for custom BLOCK renderer, but for custom TILEENTITY renderer. You can't (or rather you shouldn't) use this approach for blocks that are naturally ocuring. Even for blocks that are not it's not the best solution. Yes, it works, but there's a performance cost - tile entity saves itself, ticks, synchronizes and so on. This should be done via ISimpleBlockRenderingHandler. sample code (not nicest, some things like dependency on TileEntityRenderer's mappings need refactoring, but it's functional): https://github.com/mnn/jaffas/blob/b05d038e7c30c3c3fc9ea0783c640bdd76129a09/src/minecraft/monnef/jaffas/power/client/BlockRenderingHandler.java (you can browse the repo to view other classes)
-
Setting up using IntelliJ
I'd like that too, but if I can't figure it out, I'll live with it. not really, I'm working even with coremod code wihout any problems. after few days/weeks I got used to those lines and now I automatically ignore them. (although this could be an issue, if you're going to work on FML) but if you find a solution, please do share with us, I'd still like the output to be nice and clean .
-
Setting up using IntelliJ
I'm developing my mod in intellij for some (few months) and I wasn't able to get rid of this. It's probably connected to the IDE's passing of classpath, but I wasn't able to solve it. Well, to be honest I didn't tried really hard, it does not affect anything...
-
Things that glow in the dark
oh, you're right about the redstone ore, sorry. looking at the enderman rendering, the glowing texture is rendered in a second pass (don't forget to use setRenderPassModel).
-
Lighting the area around the player
problem with minecraft light system is, only blocks can emit light. greg's tech has similar think to what you want. it's solved by spawning and removing invisible blocks which emit light, but it can't be done too often or it starts to lag (computing of lighting is quite demanding).
-
Risks of editing EntityLiving class <updated>
no, they do not. they "just" modify its bytecode on-the-fly using ASM library. http://asm.ow2.org/
-
Things that glow in the dark
if I were you I'd pay attention to the red stone ore (and its rendering, or enderman's eyes), it should have all features you want . EDIT: then probably implement your custom block renderer using ISimpleBlockRenderingHandler.
-
Adding enchantments to tools
yea, using tick handler would be possible. you'd probably use the player tick on a server side, I recommend using scheduled tick handler (to not stress a server too much, checking every tick for every player seems a bit much, every 10 or 20 ticks should be fine). brief howto of tickhandler: implement IScheduledTickHandler, ticks() should return player. on tickEnd you'll do the testing of a player for your tool and applying potion effect to the player. the TickType is well commented. when you have done tick handler you just register it in your load method (via TickRegistry.registerTickHandler) and you're done .
-
Adding enchantments to tools
I think it could be done via onUpdate (called every tick when in players inventory) or onBlockDestroyed (less cpu intensive, but not exactly thing you wanted).
-
Who can create or knows how to code a NEI plugin?
found some open-source mod using NEI - https://github.com/Alex-hawks/Electric-Expansion/tree/master/src/minecraft/electricexpansion/nei, too bad I have so little time these days .
IPS spam blocked by CleanTalk.