Everything posted by Mazetar
-
[Unsolved] Stopping held items from bobbing on update?
not me, as I have no understanding of what you are doing. You say the item is bobbing when being updated and the only code you have is a single line that increases the damage of the item by 1, whenever it's called where that is So as it's (for me at least) unclear what exactly the problem is, and how it got like that. Edit: I have one idea, if that's the only line of code which is relevant for you're problem then comment it out and see if that fixes the problem heh
-
[SOLVED] Ghost Item being spawned when hitting entity
hehe good good <3 Then you can mark this as solved by putting [solved] inn your title and lock the thread. This makes it easier for people using the search function to find solutions to the same problem thanks
-
First Mod Help
[*]Eclipse does not check your code's logic, only the grammar/syntax. It has no way of knowing what you intended to do, only that what you are trying to do seems like legal Java code. [*]It's good that you describe your intentions, but we also need to know what did happen instead? [*]Without access to your code, we can't possible tell you what you did wrong, can we? [*]And without the error log, how can we know what kind of error caused the runtime crash? Head over to www.pastebin.com and while telling pastebin to use Syntax Highlightning: Java, post your code there and give us the link. This makes for a nice reader friendly piece of code for us to debugg. Then do the same for your error log(without any highlighting), and you are on your way to perfection inn the way you ask for help, which makes getting a fast and useful reply much more likely
-
3D Item Model Rendering help
Read the error log my friend, it tells you most of the time the source of your problem What does these two lines from the log tell you?
-
[SOLVED] Ghost Item being spawned when hitting entity
you need to use world.isRemote so you only spawn entity's on the server side It's true that you don't get served a world Object inn the parameters, but ya know what? You do gets Entity's which live inside the world, so you can check what world they are inn and use that world object to do the check
-
3D Item Model Rendering help
Please use pastebin(With syntax highlightning: Java) when posting code, then it looks like this: http://pastebin.com/b85FsjAE Look it even got line numbers! Looking at the pastebin, then line 79 seems okay, but since we are copy-pasting I assume the lines can have jumped up or down a line. So looking at the area around line 79 you see something quite interesting: Front2.mirror = true; Front2 = new ModelRenderer(this, 0, 30); Front2.addBox(11F, 1F, 0F, 3, 1, 1); You are setting a property of Front2 before you instansiate Front2, this would cause the exception, since Front2 is null when you try to set mirror=true;
-
3D Item Model Rendering help
Inn the error log you provided we can read the following: at java.lang.Thread.run(Unknown Source) Caused by: java.lang.NullPointerException at sypher.mps.items.ArmCannon.<init>(ArmCannon.java:27) So you have a NullPointerException causing the crash. At line 27 of ArmCannon.java. So go into the ArmCannon.java file and see what happends at line27, for some reason you are trying to do something with something which is null
-
unplaceable plant
Place breakpoints inside the relevant methods, and see what happens when the IF statments are executed, see how the variables and then you should be able to tell why it's not placed correctly.
-
Rotation Matrix?
If I remember correctly that would be: R(O) = [ cos(O) -sin(O)] [ sin(O) cos(O)] edit, what new Z inn 2d space?
-
TileEntity not working properly
yes, thats how you tell minecraft that the TileEntity exists.
-
No Block Textures Since 1.5.1
Not the source of this problem I guess, but still: @cpw.mods.fml.common.Mod.Instance("ParallelWorlds") public static ParallelWorlds Instance = new ParallelWorlds(); You shouldn't instansiate it to something, Forge will fix that part internally I assume the register Icon part for your item is the same before the ":" conatining "ParallelWorlds" spelled the same way etc. so then the only difference I see is the lack of overriding the getTexture methods, although I doubt it would change something since it should by default return the blockIcon anyways.. Edit: Yeah they do all return blockIcon by default. Your block seems similar to mine inn code, so bleh I dunno, Time for bed when I can't compare two classes anymore, lolz
-
No Block Textures Since 1.5.1
Where is the TimeStone.png file located on your computer? Also you could try to override the three getTexture related methods and make them return the texture you want, i.e: the blockIcon
-
Do I need to learn about Tile Entities?
Well you didn't just ask an abstract question, you where forthcoming and honest telling us what you're goals are and what level you are at and you where polite. That makes the odds of getting a useful reply quite good Don't start with NBT's from the start. Start smaller, with just a block and an item and go from there. After getting a furnace or something working you will get the need for NBT's to save it's state between game sessions, which will naturally lead to you having to implement it Trying to implement all this from the start can be frustrating and overwhelming, and god knows programming can be that without us adding to it Good luck on your adventures into programming, and remember that you can always ask questions
-
Help with itemInteractionForEntity()
Sometimes a change inn perspective is all that's needed
-
Moding Help please respond been stuck with this for ages!
1. So am I, and my grammar sucks. But come'on even in Stavanger they have periods at the end of a sentence. At the very least inn a running text so the reader knows what word belongs where It's much better now inn your latest post, ty. Oh and btw, since it's 23:30 why are you inn such a hurry? it's holidays now chill <3 1.b) Norwegian reply here in addition too the english one below. 3. This sounds a lot more like you misunderstanding something on how to get this to work, at least it sounds quite weird to me that you would need to write a code snippit for the texture packs to work I think you should go ask the guys over here: http://www.minecraftforum.net/forum/196-modded-client-support/ They are a lot better equipped knowledge wise to help you out with your problems.
-
How to make a custom Arrow ?
Or just take a look at the original bow's code, as I said above ' It's easy to understand and it shows him how it's been done. Should make his learning easier and his progress to get it working faster
-
Do I need to learn about Tile Entities?
Hehe I must say I like your post mate The TL;DR is: Yes! The real and long answer(s): The idea you have is interesting and cool and totally possible to do. When it comes to tutorials they are aimed at the basic stuff, the advance stuff is lacking some information and to be honest part of programming is inventing the logic behind mechanics and reading documentation to understand other people's code. I would suggest that you try to actively learn Java more than you learn to modd with forge first, as it's much faster and easier than the other way around Some sources to look at for Learning Java can be found here: You will need to learn about Container's and GUI's, TE's(Tile Entity's <-- you will love these!) and NBT yeah! Also you will need to learn about Server<->Client communications, packet handling and much more But don't get discouraged now, there is a lot of material and people out there to help you I'm going to give you a nice start by telling you about the things you mentioned and suggest some things you can read, like a small reading list if you will Containers are well they are things that contain stuff duh! No but seriously they are responsible for containing and managing slots inn which Items can be placed. So the container has the logic for letting you increase and decrease the items inside a stack inside the inventory/crafting bench/chest/etc. They are quite easy to learn to use GUI's, well they are all the screens you see, like the inventory window and the Chest window etc. If the GUI is going to handle items being moved around in an inventory, then it's a GuiContainer type of GUI, which adds some functionality to deal with items and containers If it's not a GuiContainer it's usually just a GuiScreen. Anyways GUI's are fun to work with once you get the hang of it, and if you unlike me like drawing stuff then you will have quite a fun time experimenting with GUI's NBT's or Named Binary Tag is a special format which was made to store information to disk in an easy way. NBT is simply put a set of methods that allow you to save and load the state of your TileEntitys, Entitys and so on between game sessions. So that you're self-made furnace keeps it's inventory after you restart Minecraft You can store different types of values via NBT and when you store an value you give it an identifier/name which you later use inn code to retrieve the data upon load Tile Entity's Did you know that at any given xyz location of the world there is not a block but an int BlockID? The Block's them self's are not stored inn the world, only their ID's. The blocks have no memory of anything except the little they get from the metadata assosiated with the block at that xyz position. And metadata can only small amounts of information so how can a chestBlock store hundreds of items? The solution is TileEntity's! They are the ones where you will store ALL your information related to your special blocks, and the place where all the logic is done If you are curios about TE's you could go into the code and check out BlockFurnace and TileEntityFurnace, atleast you can see that the logic of smelting and everything is handled by the TE. TE's are not as scary as they sound, it's just all the logic and memory the block should have by it self moved into a different class Some last words and links If you haven't already I suggest you read http://www.minecraftforge.net/wiki/Basic_Modding before you start modding with forge, it will help you setup the essential files every mod needs And you can keep following that to learn about implementing items and blocks. From there on, you can play around with new tools and armor before you move on to GUI's and Containers, which also will be a nice introduction to TE's. A project with GUI, Container and TE's I think there are several tutorials for out there is Custom Furnace, just google for around and it's inn the top hits After that it depends on how well you are doing and what you want, either way looking at tutorials on youtube, forge wiki and minecraft forums is a good idea. Just make sure to only follow FORGE tutorials, since ModLoader doesn't work on SMP nor does it follow the same form as forge when it comes to code Well that's it for me, at this time I really hope you do learn some java fundamentals before embarking on the modding journey, else it will be so much harder than it needs to <3 Edit: Fuck I managed to post before I was done writing. Updated and fixed now Edit2: PS: Holy cow this got quite long, sorry for the wall of text.. but Hey you could have just read the TL;DR at the top
-
Moding Help please respond been stuck with this for ages!
Okay a few things just to clarify: [*]Don't PM me for answers when I'm actively replying to your thread, I'm replying here when I can and when I got something to say. It's not like I'm forgetting this forum and thread existence over a few minutes.. [*]It's hard to understand what exactly you are saying, the complete lack of commas and periods make it hard just to follow which sentence start where and ends where. [*]You are asking about code help for a problem which you have using some coding API I'm not familiar with at all, and which this forum ain't exactly aimed at supporting either. [*]The problem seems to be less about code and more about adding a texture pack to your Minecraft client which has your mod? [*]Whatever the block is made to look like, doesn't matter for the texture pack at least. even if it's the same image it shouldn't matter or change anything and much less make it bug out. [*]Are you using the latest version of the Texture Pack then, since it says Update TP? [*]Have you tried asking on the ModLoader related threads and forums for help? [*]And how big is this mod of your's really?
-
Help with itemInteractionForEntity()
Hey! maybe you can use onItemRightClick(itemStack, world, entityPlayer) instead. And inside the method body, do like this: [spoiler=CODE] float f = 1.0F; double d0 = par3EntityPlayer.prevPosX + (par3EntityPlayer.posX - par3EntityPlayer.prevPosX) * (double)f; double d1 = par3EntityPlayer.prevPosY + (par3EntityPlayer.posY - par3EntityPlayer.prevPosY) * (double)f + 1.62D - (double)par3EntityPlayer.yOffset; double d2 = par3EntityPlayer.prevPosZ + (par3EntityPlayer.posZ - par3EntityPlayer.prevPosZ) * (double)f; MovingObjectPosition movingobjectposition = this.getMovingObjectPositionFromPlayer(par2World, par3EntityPlayer, true); if (movingobjectposition == null) { return par1ItemStack; } else if (movingobjectposition.entityHit instanceof EntityLiving) { // DO STUFF HERE, Entity hit } This is using the getMovingObjectPositionFromPlayer() method which all items inherit from the Item class. I got this code by looking at how ItemBucket get's milk from EntityCow upon using the item Hope it helps ^^
-
Changing a method
I feel that I'm quite far away from my comfort zone, I haven't tried anything like it so I'd rather wait and see if some of the pro's inn here has the time to read and reply to this I'm sure there are some cleverer solutions to this than we'd come up with so far Meanwhile I guess one could read how the BiomeDecoration works and figure out how the pumpkin generation is called along with a events and such that is sent out, maybe it could bring some answers
-
Moding Help please respond been stuck with this for ages!
if Spahx is just a texture pack then YOU as the CODER/MODDER of a mod does not need to do anything special for the texture pack to work. Just do everything as normal and don't think of the texture pack.. you don't need to do anything fancy for it to work. If someone wants to create or use a texture pack for your mod's blocks & items they should be able to do so without you having to do some crazy stuff for it to work, so no worries
-
[1.5.1] Block/Item Texture/Icon location?
Yes Barney, that's how it works as of the newest versions of Forge for 1.5 and beyond since Minecraft 1.5 updated how textures are handled
-
Changing a method
ah I see, well I'm not sure about any smart ways to do that. But didn't you already create your own stem and such? Since the code only generates normal pumpkins and not stems after all? If you want to generate some stems and pumpkins you could create your own generation code and make it run in addition to the vanilla one?
-
Moding Help please respond been stuck with this for ages!
Maybe I'm just old but what is Sphax, by the way you speak of it, it sounds like an API or something other code related but as far as I can tell by the top links on google it's a texture pack? So then I'm not sure what you want to do
-
Moding Help please respond been stuck with this for ages!
I'm sorry but I'm not familiar with the methods of ModLoader. But then again this is a forum to help people solve problems with their modding with the Forge API, so I guess that's not unexpected You could of course go to the ModLoader's thread and ask for help, or try out modding with forge. However I can say that generally the mods inn eclipse reffere to files within the MCP folder, so you might really be asking for "MCP_Directory/AppData/Roaming/.minecraft/texturepacks/sphax PureBDCraft/MagicCola/Cokoore.png" By entering that location as a string to the load method. I assume that you should have your images somewhere inside the MCP folder, probably inside MCP/src/Minecraft.
IPS spam blocked by CleanTalk.