
Taji34
Forge Modder-
Posts
147 -
Joined
-
Last visited
Everything posted by Taji34
-
Sorry, I've been super scatter-brained trying to figure this one out. Events do seem like the way to go. However, the event seems to never be happening. This is my code: TajiEvents.java: My other event is working, however, the onCrafted event is never printing to the console, so it seems that it is never happening. Any Ideas?
-
I tracked the issue down to a method in ContainerWorkbench called transferStackInSlot() which is called when the item is shift clicked. Problem is I'm not really sure how to change the behavior without making my own crafting bench. It seems to work with two instances of the itemstack, passing one or the other to different methods. If anyone has any ideas on how to help me change the behavior, that would be great, otherwise I'm just gonna change when my NBT tags get added.
-
You know, I'm thinking this is more of an event problem then anything, I think when I am shift clicking into my inventory, it's passing the item stack differently, and that's where my problem is. I'm thinking this because after some testing, the only place onCreated() isn't being called is when taking the item out of the creative menu. I'm gonna explore the crafting handler and see if i can find how it handles shift clicking.
-
So you're saying that when addInformation() is called, I should send a packet to the server? I'm a little confused at what all I should be sending to the server, could you explain a bit further? I'm reading up on using the SimpleNetworkWrapper for packet handling, and I understand what all goes into that, I'm just not sure how to translate it to my specific situation. Do I send the parameters of addInformation() over to the server and then repeat what I did in addInformation()? Or what? Something is just not clicking and I don't know what I need to send in the packet in order to tell the server what the client did. I'm sorry if I am missing something blatantly obvious.
-
Alright, I think packets are the way to go cause after some experimenting, I'm getting three different behaviors and I think it just needs to be solved with packets to ensure the client and server both know what is happening. I haven't worked with packets and know that the packet system was recently just rewritten, could you point me to a tutorial that's updated (I'll look myself, but in case I can't find any)? Also, what exactly would I be doing with the packets, would I be sending a packet to the client saying that the item has been created and then send a packet from the client to the server with the info on what to do next?
-
This is delving a bit further than my knowledge of forge. How would I make sure the tags are being shared? If I grab the item out of the creative inventory, it does not add the tag. I'm gonna play around with it a bit to see if I can find the exact reason why the tag is not getting added. I just noticed this happens with another item of mine as well. Even though onCreated() seems to be called, the tag is never made and the stackTagCompound seems to be null. I found this out because my other item uses info from the NBT tag to vary function, and when I used it, it threw a NullPointer Exception.
-
Basically, I'm adding a tag to my item which denotes its owner (who crafted it) for later use in multiplayer functions. However, I noticed when I shift click the output of the crafting bench into my inventory, it does not add the NBT tag. When I click and drag it into my inventory it adds the tag fine. Any insights on to why this is happening? I though maybe onCreated() or addInformation() wasn't being called, but I found out that is not the case after using some print statements to find out when they were called. Here is my code for the specific item: IdentityDisc.java:
-
SimonSlime, I believe what he means is, as you had to do with your X coordinate, you have to add the chunkZ to your Z variable. Does that make sense? I can give a further explanation if you do not understand why, it's important you understand why things work, not just that they do. diesieben07, is that what you meant?
-
Could you please post your current code so I can see all of it?
-
Excuse me if I'm wrong, but in the images currently posted, I don't see that error anywhere. And if it was there, the OP would be getting a runtime error and the minecraft client wouldn't even run. You aren't using the x, y, and z values you generated in each for loop. i.e. you should be calling this: (new WorldGenMinable(...)).generate(world, random, x, y, z); But instead you are calling this: (new WorldGenMinable(...)).generate(world, random, chunkX, chunkY, chunkZ); Even though these are technically valid coordinates in the world, they are not the coordinates you generated. The reason you can't find any ores is A) they are all spawning in the same area in each chunk, and B) chunkY is set to 0, therefore it is being spawned under bedrock, however, since ores can only be spawned in stone, it just isn't spawning anything. Does that make sense?
-
I need help with my custom bucket, it isn't working
Taji34 replied to kennybenny's topic in Modder Support
Also, you never define a constructor in which you pass a parameter (i.e. a block) into it, you need to define that constructor. -
So i'm generating my custom fluid in the world and have run into a problem. I decided to use minecraft's built in WorldGenLakes() and WorldGenLiquids() methods, however, they seem to be crashing for some reason. All I can figure out is it's either my fluid's properties, can anybody help me decipher what is happening? Crash Report: https://gist.github.com/anonymous/383f9ffd293052295773 WorldGeneration.java: https://gist.github.com/anonymous/b56435b374d4946041e5 LiquidEnergyBlock.java: https://gist.github.com/anonymous/f3772330c063f04d0adc Troncraft.java: https://gist.github.com/anonymous/2109c5c3750b906c7d99 When I comment out the lines in WorldGeneration.java that contains WorldGenLakes() everything works perfectly, so it has to be something with what I'm putting into that line right?
-
[1.7.2][Solved]Checking what a thrown entity has collided with
Taji34 replied to Taji34's topic in Modder Support
Thanks! That works! -
[1.7.2][Solved]Need help on learning howto render 2D projectile entities
Taji34 replied to Taji34's topic in Modder Support
Yep! That did the trick! Thanks! -
Okay, so I am making an item that acts like a snowball on right click. I've got everything working how I want it except when the item is flying through the air, it is invisible. I know I have to tell minecraft how to render the entity, I just don't know how to do so. Could someone point me to a tutorial on/show me how to render an object like a snowball (i.e. it's 2D texture) and how to register that render? Thanks!
-
[Solved][1.7.2]Fluid Container Registry Null Pointer Exception
Taji34 replied to Taji34's topic in Modder Support
Ok, the case issue makes sense, staying consistent and what not with standards. However, is there anything wrong with using fluid.getName() instead of "fluidname"? -
[Solved][1.7.2]Fluid Container Registry Null Pointer Exception
Taji34 replied to Taji34's topic in Modder Support
I mean, is doing it the way I have right now going to cause problems in the future? -
[Solved][1.7.2]Fluid Container Registry Null Pointer Exception
Taji34 replied to Taji34's topic in Modder Support
But I did register a fluid. This is the second line of my preint: FluidRegistry.registerFluid(liquidEnergy); Which I do before I call the getFluidStack. Does the name parameter need to be the localized or unlocalized name of my fluid? EDIT: I did some experimenting and figured it out! I needed to do liquidEnergy.getName() for the string name parameter. -
[1.7.2] I need help with my texturing, It's not working
Taji34 replied to kennybenny's topic in Modder Support
Someone correct me if I am wrong, but textures for blocks need to be in /src/main/resources/assets/yourMODID/textures/blocks/ not just /src/main/resources. -
So I have created a liquid and I'm creating a bucket for it, however, the fluid container registry line is throwing a null pointer exception. Troncraft.java: https://gist.github.com/anonymous/c6006d69a773edea63e5 Crash Report: https://gist.github.com/anonymous/fc4f35a84df9bab4d088 This line in particular is the one having the issue: FluidContainerRegistry.registerFluidContainer(FluidRegistry.getFluidStack("liquidEnergy", FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(liquidEnergyBucket), new ItemStack(Items.bucket)); When I comment this line out, everything works fine, bucket functions normally. I figured this line was there to reqister how many mB it is and some other properties, so I need it correct? Every parameter appears to me to not be null, but obviously that's not the case, could someone help me figure this out? Again, it's not affecting the buckets functionality, I just figured this line was important since it was in the tutorial.
-
[Solved][1.7.2]Can someone explain adding new liquids to me?
Taji34 replied to Taji34's topic in Modder Support
Good Idea! I will do so shortly when I have time! -
[Solved][1.7.2]Can someone explain adding new liquids to me?
Taji34 replied to Taji34's topic in Modder Support
Yeah, I realized that like an hour ago and just finished fixing it all up! I was actually editing my previous post when you replied. -
[Solved][1.7.2]Can someone explain adding new liquids to me?
Taji34 replied to Taji34's topic in Modder Support
EDIT: Ok, got everything working! For those who stumble upon this thread, this is my code: Troncraft.java: LiquidEnergy.java: The use of an en_US.lang file is needed for naming. Original post before edits: