Jump to content

ObsequiousNewt

Forge Modder
  • Posts

    751
  • Joined

  • Last visited

Everything posted by ObsequiousNewt

  1. (1) This and this look helpful. I also have a TE/container/recipe system in my mod, which is open-source, and the Github link is in my sig. (2) Create a custom slot and override isItemValid. Then just set the stack, and transcend that function. (3) I believe you get a TE arg passed to your renderer or your model, which you can then use to alter the rendering code.
  2. Use instead player.moveEntity(distance*sin(player.pitch)*sin(player.yaw),distance*cos(player.pitch),distance*sin(player.pitch)*sin(player.yaw)); If it's moving at odd angles try switching x and z.
  3. Read the OP and the thread. He used a tutorial for making special models, which I pointed out was unnecessary. You told him to replace the .obj file with .java, which he had already done, you restated what I had already said, and then you told him to delete his block class, which has caused an unnecessary tangle. Really, I was doing alright before you butted in. @Nieue: Yes, that is the correct tutorial.
  4. I dunno, figure out some sort of algorithm. Or copy WorldGenLakes and modify variables until it's big enough.
  5. Just install the APIs into your mcp directory. Simple. Then follow the instructions/javadocs.
  6. I tried this method, but the TE gets removed from the world after a tick, when I want it to stay. I am unsure if this is a problem with the fact this TE is not assigned to any block, and that I just want it placed upon an item clicking on a block. Also, using some System.out.println I know that the TE is being placed, just not staying in the world at all... You shouldn't need to be doing that. Instead, set the block to BlockCover and watch as the TE is created automatically. I want the block to stay as its original block, and keep all its old features, just look different. Essentially an item that changes the look of any block it is clicked on... You can't do that without modifying the block. Which means you'd have to modify every block. Just create your own block/TE, put the ID/metadata in an NBT tag, and redefine all the block functions to emulate whichever block. (like return Block.blocksList[((myTE) w.getTileEntity(x,y,z)).theID].whateverFunction(...). Unfortunately most functions will then not work because the coords are not passed in and you can't access your TE without coords.)
  7. Just going by memory here, but you want either an IRecipe or a CraftingHandler. I think.
  8. I've gotten into using type restrictions in Flash because it's faster. Otherwise this is valid code (and not only will compile, but will run: var i = 1.333; i += 0x1; i = new Object(); i.random = 2; I don't see a good reason why it shouldn't run. You're setting it to 1.333, then adding 1. Then you're setting it to an object, and you're giving it an attribute called "random" that you're setting to 2. Beats me as to why, but there's no good reason why you shouldn't be able to do that. There are good reasons for getters/setters. For example if setting the property means that some other flags or variables need to get set as a result. A good example is the setters that cause datawatchers to update. Likewise health (forcing every effect that CAN reduce an entity to 0 hp having to manage that entity dying would be absurd, instead you can manage that inside the setter!). True. I agree entirely. I'm referring to the getters without setters (if you don't want the variable modified, just say so!) or the like.
  9. You need something like this: public boolean onBlockDestroyed(ItemStack stack, World w, int id, int x, int y, int z, EntityLiving entity){ super.onBlockDestroyed(...) for i in range(-1,2): for j in range(-1,2): w.destroyBlock(x+i,y,z+j,True) return true; } Of course, you'll need to change it to add i and j to the right axes, but that should do for a start. Good luck!
  10. Okay... what are you using to create your wiki? MediaWiki? Wikia?
  11. Well, yes. Load it the normal way, not with that tutorial.
  12. Those functions don't do anything. They just return information. You are supposed to instead register an IFuelHandler.
  13. ...What kind of issues? Does it crash? Does it not function? Or what? What's your code?
  14. What should I do with it then? Convert it manually, find a converter (which I doubt you'll be able to do), or find another program that makes wavefront files. Or just use it as a normal renderer. Why do you need a Wavefront renderer? I just copied the code from the tutorial and edited it to my codes. I can however make the model into a .java but I've tried that with this and it didn't work. "It doesn't work." Then we can fix it. Describe how it doesn't work. But it's going to work even less if you try it like this.
  15. So i made a new recipes class and a new CraftingManager class, but do you know where it is called? You don't need a new CraftingManager. Just create your own class which implements IRecipe, copy the ShapedRecipe code, and remove the mirroring check. Then use GameRegistry.addRecipe(new MyRecipe(args));
  16. True. I hadn't looked at his code initially. Re #5, you should instead be overriding onArmorTickUpdate() in your item class.
  17. I tried this method, but the TE gets removed from the world after a tick, when I want it to stay. I am unsure if this is a problem with the fact this TE is not assigned to any block, and that I just want it placed upon an item clicking on a block. Also, using some System.out.println I know that the TE is being placed, just not staying in the world at all... You shouldn't need to be doing that. Instead, set the block to BlockCover and watch as the TE is created automatically.
  18. Eh. My C* is a bit rusty. I can't write applications from the ground up, much less one with a GUI or any rendering. Most of what I do is either in Unity3D, Flash, or web-based. As far as I'm concerned the only difference between Java and Flash is how variables are declared. ("int a;" vs. "var a:int;") Oh, and having to deal with Floats and Doubles not being the same thing and can't convert between them implicitly. The largest change for me (python to java) was getting used to all the type restriction, and not just float/double. (function args, returns, variable types, casting) I don't like the way Java restricts everything. I've wanted, many times, to change something that was private/protected/package or final in a Minecraft class, but I couldn't. Making a getter and setter for one variable when you could just refer directly seems like a waste of space. I hold the belief that if you don't want something changed, it is a simple matter to *not change it*. Or, if you're writing an API or the like, make sure to write in the docs that you don't want it changed. I wrote a rant a while back to this effect. Actually, the largest change was probably the eternal stupidity of Java arrays (here's another rant for you). Python's list syntax alone makes it a better language. Probably the only advantage Java has over Python that I can think of is the ternary operator. And even then you can instead use (c,a)\[b\] instead of a ? b : c. (Edit: Dammit, markdown.) Or maybe the largest change would be the non-descriptive-ness of NPE's. If Python can use a NameError to say that something isn't defined, or an AttributeError to say that there's no such function or method, I don't see why Java can't. Just put a "static" modifier on the block.
  19. How exactly do you want this liquid to generate? In lakes? (if so use WorldGenLakes)
  20. ForgeHooks.blockStrength has those coordinates. Perhaps you could modify getCurrentPlayerStrVsBlock and pass those in?
  21. False. This method is called whenever you shift-click on an item. I actually redefined this method for this exact purpose.
  22. "You can probably pick it up while writing mods." I am going to kick the person who wrote that. It's not technically incorrect. I didn't know Java and started writing mods. I did, however, have prior programming experience in multiple languages (C++, C#, Javascript, Actionscript 2, Actionscript 3...). Well, if you know C, then it's smooth sailing. I knew Python at the age of, like, ten, then I learned Java and GL because I wanted to write a Minecraft clone, then I decided to get into Minecraft modding. Still, I get tired of the people who think they can learn how to program and how to program in Java like this.
  23. What should I do with it then? Convert it manually, find a converter (which I doubt you'll be able to do), or find another program that makes wavefront files. Or just use it as a normal renderer. Why do you need a Wavefront renderer?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.