Everything posted by Mazetar
-
Need advice/help with getting a custom model chest working.
Try taking a look at this: https://github.com/cpw/ironchest it's cpw's own IronChest mod, it's not a tutorial or guide but seeing how he is doing it should help ya get it working
-
Techne Blocks?
Actually if you already have the model, the next part is the one you need: This is for importing mob models, but the process should be similar except it is handling a block and TileEntitySpecialRenderer
-
MOB HOLDING ITEMS AND MOB SPAWNING WITH ITEMS.
are you calling the initCreature() method from your entity's class constructor?
-
Infinite Terrain/Sprite Indexes... Finite Block IDs. Workaround?
Also ya might wanna check this thread below where it just recieved an expert answer http://www.minecraftforge.net/forum/index.php/topic,5514.0.html
-
Rendering Only a Model
I'm still curious to what the OP wants, and if hes still around I hope he either got help from the above answers or that he could clearify his needs
-
[Solved]4x4 Crafting Matrix not registering
If you would be so kind, un-striking your text and writing how you solved it, so that others using the search function could have use of your solution, it would be awesome
-
Add to the hud?
Believe me, I did the same, when I read your post earlier I didn't notice it untill now that I was reading it again and going "WTF?" Haha, well there the null pointer should be gone ^^ Is it working now?
-
Add to the hud?
WAIT!!! Did you say you DungeonTickHandler level; but never did level = new DungeonTickHandler; !!! Theres your null pointer right there! You never instantiate the level variable of type DungeonTickHandler to a new DungeonTickHandler. When you don't have it as a static class, you must instantiate it before use or else it will always be NULL. This is not beacuse of MCP or Forge, but basic Java, recommended reading/soruce: http://thenewboston.org/list.php?cat=31
-
Add to the hud?
Well do you have any way to get futher down the stacktrace to see what is causing the null pointer exception, just find the first line which contains on of your classes and you should find the source. Also have you tried using breakpoints and the debugger to find the error? What else have you tried?
-
Rendering Only a Model
If you want to render something it has to be, well something if it's not some kind of entity then what the hell is it? Solve that one for us and maybe we can help you Or else you could make it have a simple empty tileEntity without anything special inn it except that it is a tileEntity which can be rendered
-
Prevent monster entities from spawning
Read up the code for how monsters are spawned, and see what conditions are meat and what forgeHooks are triggered, also searching the documentation for spawn event's might result inn something. I'm not familiar with the spawn code so I can't give you any other answer than what I would have had to do in order to figure it out But yeah I believe it should be possible to do something like that
-
Infinite Terrain/Sprite Indexes... Finite Block IDs. Workaround?
Redpower2 created by Eloraam has A LOT more than that, if you aren't familiar with the mod you really should before you set out to do something so massive, also it sounds like quite a huge leap as your first big modding project, maybe you should start simpler? In any case, in RP2 there is this saw which can cut any block into pieces, these can be set out into the world or cut into other pieces. And you can do this for ANY kind of vanilla block + all the normal RP2 blocks! Creating 43 different unique blocks for EACH normal block!!! And then when you consider how many different blocks you can cut into these 43 different ways, the amount of BlockID's used should skyrocket! but no.. Eloraam uses only 1 block ID for ALL the 43*(number of cut able blocks)! One single bId for several hundreds of blocks. and also her mod is compatible with all other forge mods, so shes not ruining any base classes doing so, meaning it is possible for anyone to do it without modifying forge's base classes.
-
playSoundAtEntity help?
Well is it calling that line? Have you tried debugging and using breakpoints to determine what happens when it executes the specified line?
-
I'm Stuck, can't do anything until I deal with this
either remove the static keyword from the method, or make both of them static and call super on the first line. As i said, you don't have any reason to call the CommonProxy's method, so why make it static and call super at all?
-
Developing a new mod in modded environment
If the mods you want have an API then you can use that and you should be fine to interact with that mod, when the mod is closed down and ain't telling you how to access it's code or interact with it then you can't as far as I know directly mod addon's to that mod. Except for the fact that if you mod using Forge's hooks and interfaces many mods can use that to interact with your mods, for example the ISidedInventory interface makes it possible for BC pipes to connect to your inventory blocks, even without using any kind of code from BC or any API. As for mods which have API's you could import the API's or Whole mods(in case of open soruce mods) as separate projects into eclipse and then use their contents to integrate your mod with their's.
-
Need help with entity spawn on World load
well if the world IS remote, that means you are on the client side of things. And the client side shouldn't spawn entity's, the server should spawn them and then update the client about them. If the client somehow spawns and entity, the server wouldn't know about it, neither would any other clients(players) and the effects of the spawned entity would not do anything since the server doesn't know about it So Side.Client and isRemote means it's on the client side, which in turns means you should not be spawning entity's.
-
[URGENT]Help with ITextureProvider
Okay so the boots are fixed, you can now wear them and you see them on you but the icon inn the inventory is not working as you wanted it too? It's just some weird or random icon, right? Maybe you havent told it to read the item texture from a new texture file so it is reading the texture from the /items.png file as is default for all items?
-
Add to the hud?
No you don't have to re install forge, that won't help. The problem is NOT with forge but with your own code. Forge does not ever suddenly break when you are coding something, unless you modify base classes(which means you modify forge, which you really shouldn't). So when there is a crash like that the problem is with your own code. Now the problem we are facing is that something is throwing a NullPointerException, this means it expected something but got Nothing, not even a value, just pure nothingness, Null. So when you look at the Stack Trace, you see it throws a Null pointer exception right after doing some stuff related to Ticks, and that seems logical since the things you did lately are all related to ticks. So look inn your TickHandler and see if you can find the place where it sends null and fix it. Possible hint: When it comes to the fact that you have to instantiate the TickHandler you created that's quite natural, you need to call a =new DungeonTickHandler to get access to a new version of it, since it is NOT static. I'm not sure if the class should be static or not, but I'm sure you can find it out by testing or reading the javadocs/forge documentation
-
How do ticks work?
I'm not sure what calls "randomDisplayTick" and when, are you sure the code is even run? I believe that you have to make some kind of custom tick handler which extends TickHandler and register it with forge (like you do with blocks and TileEntitys) in order to do things every tick.
-
Techne Blocks?
You create a new file, of type .Java and you give it a meaningful name, like ModelBlockName or something. Then do as RegalBlaze said and copy the stuff from the exported file into the newley made file.
-
MOB HOLDING ITEMS AND MOB SPAWNING WITH ITEMS.
Take a look on the code for zombies, they pickup and use items they find on the ground!
-
Crafting Manager Output Quantity
I assume he is talking about his own self-made CraftManager, which makes it not a base class edit at all and perfectly fine
-
[URGENT]Help with ITextureProvider
If you place the image files into eclipse into the package structure which you reffer to it as being inn, it should find it. Also it should find it inside the mcp/src/"The string for the file location you specified inn the code".
-
Add to the hud?
FMLClientHandler.instance().getClient().ingameGUI. Call this somewhere it will be called every tick(inside a tick handler). And you can use the ingameGUI.drawXXXX methods to draw strings or textures to the screen. I believe that if you want to draw textures you will need to bind the texture by using the GL11 method glBindTexture, but I'm not sure. Hope this helps you to get a place where you can start looking and exploring the code Edit: Read this post http://www.minecraftforge.net/forum/index.php?topic=516.0 It's about tick handlers, just ignore it ModLoader answer inn post #2 and look at what CPW said
-
Add to the hud?
I'm not 100% sure how to do this, but I believe it to be rather simple if you are familiar to tickHandlers. I can look into it after work if you haven't found a solution until I get back. Inn any case do you have a max value the variable could be? if so to know how much of the bar to draw is an easy % calculation, and once you figure out how to get something drawn on the HUD it's easy as pie to draw the bar you want to
IPS spam blocked by CleanTalk.