Sorry, meant to post that I figured it out. The game was trying to add lore information but since the NBT tag it was referencing didn't exist, it seemed to cause the name to not work correctly. I just made it so it actually checks if the tag exists before it adds the info, which fixed the name.
Hey, for some reason I have an item that while in the creative menu or in NEI, it's name is Unnamed. When I put it into my inventory it fixes itself. I suspect this may be due to me using NBT but I'm not sure.
Didn't copy it, just quick referencing guides when I need them which tends to lead to choppy code while I'm learning a new language. I'm more fluent in C#, so i'm learning Java syntax as I go. I'd use tutorials but I just can't stand them and so I just learn how to write in a new language through trial and error (most of the time :P)
Anyways, looking at the code side by side, I'm now realizing I popped the if statement in the wrong place like a noob, should have checked it more carefully. Guess that's what being tired can do to you.
Hey, very new to modding Minecraft and coding in Java, and for some reason par2World and par3EntityPlayer isn't being resolved to a variable. It also seems to have an issue with the brackets. I took a screenshot so you can see where the errors are here: http://i.imgur.com/u2vo1r3.png
and here's the code for the class that seems to be the offender (main ball/grenade class):
package noahc3.MaterialBlobs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class ItemDirtBlob extends Item
{
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
return par1ItemStack;
}
if (!par2World.isRemote)
{
par2World.spawnEntityInWorld(new EntityDirtBlob(par2World, par3EntityPlayer));
--par1ItemStack.stackSize;
}
}
0
Very nice map! Found 3 of the levers and got 6 questions wrong.
0
Sorry, meant to post that I figured it out. The game was trying to add lore information but since the NBT tag it was referencing didn't exist, it seemed to cause the name to not work correctly. I just made it so it actually checks if the tag exists before it adds the info, which fixed the name.
Thanks anyways!
0
Hey, for some reason I have an item that while in the creative menu or in NEI, it's name is Unnamed. When I put it into my inventory it fixes itself. I suspect this may be due to me using NBT but I'm not sure.
Here is my Item Class:
http://pastebin.com/W1z00wnh
Here is my core class:
http://pastebin.com/u1zkZVmc
Here is my en_US.lang:
http://pastebin.com/uHi27kgD (I know its a small file but MCForum formatting is broken)
Thanks for the help.
0
As majix560 said, the downloads aren't working. Please fix!
0
Here is the server-side class:
http://pastebin.com/9MH4r1Jh
Here is the client-side class:
http://pastebin.com/60MLqwrv
And here is the class for the actual entity (where the setBlock is):
http://pastebin.com/tnMCFpPy
I'd use the code tag, but it seems broken as all hell.
0
Hey, I'm wondering if there is a way to reference all worlds using DimensionManager.getWorld()
I would first try -1 but negatives are used as dimension IDs and -1 is just the nether.
I also tried an asterisk, but it isn't an integer.
So is there any way to do this?
I'm using it in this line of code:
DimensionManager.getWorld(0).setBlock(mop.blockX, mop.blockY, mop.blockZ, Blocks.dirt);
which basically set a block of dirt at an entities location. No, world.setBlock or World.setBlock do not work.
Thanks!
0
Didn't copy it, just quick referencing guides when I need them which tends to lead to choppy code while I'm learning a new language. I'm more fluent in C#, so i'm learning Java syntax as I go. I'd use tutorials but I just can't stand them and so I just learn how to write in a new language through trial and error (most of the time :P)
Anyways, looking at the code side by side, I'm now realizing I popped the if statement in the wrong place like a noob, should have checked it more carefully. Guess that's what being tired can do to you.
Either way, thanks!
0
Hey, very new to modding Minecraft and coding in Java, and for some reason par2World and par3EntityPlayer isn't being resolved to a variable. It also seems to have an issue with the brackets. I took a screenshot so you can see where the errors are here: http://i.imgur.com/u2vo1r3.png
and here's the code for the class that seems to be the offender (main ball/grenade class):
And here's the crash log if that can tell you more info (though I doubt it): http://pastebin.com/Nmxifk6x
Running Forge 1340 MC 1.7.10
I'm not too familiar with how variables work in Java so I can't really help myself. :/