Everything posted by GotoLink
-
1.6.2 Playing music till the RMB is hold
if(!Minecraft.getMinecraft().sndManager.sndSystem.playing("your_music") && Mouse.isButtonDown(1)) { Minecraft.getMinecraft().sndManager.sndSystem.play("your_music"); }
-
can i set the critical hit damage on a sword/tool
Read again, or learn how to use booleans. This is the null class: public class null { //Really, just void } Do you see a getItem() method here ?
-
can i set the critical hit damage on a sword/tool
if(weapon!=null) { //do things }
-
Minecraft 1.6.2 Forge SRC Decompile Error [!!PLEASE HELP!!]
Do you have Java for 64bits and 32bits ?
-
Creating a basic GUI dialog
As for help files, there is a "Read me before posting" sticky. The "Container and GUIs" tutorial is merely a practical example of a simple use case. Learn what you need from it: in Forge, the simplest way to pop a GUI is to use a player instance and implement a IGuiHandler. Buttons are implemented into GuiScreen.
-
Get the block(or blocks nearby is ok) which player is looking at
Probably not since nothing in Minecraft would use it. You can use the "look" vector (math is required ) from the player and its position to check blocks in a straight line, and stop when said block isn't air.
-
can i set the critical hit damage on a sword/tool
Well your method has a "void" as return type. So you can't return null (which is an object). The other issue is you didn't check if "weapon" isn't null before calling getItem().
-
[Solved] Overriding getLightValue() has no effect
:'( Copy pasting and not understanding the code... That var1 is completely useless. By the way, since markBlockForUpdate(x,y,z) didn't work, that method won't either. The issue is within the TileEntity. getCurrentLightValInt() probably doesn't return same value on both sides.
-
Problems between server-client, client-server talk[unsolved but i don't care]
bench.gettingEXP() In the Gui, client side...but exp is only updated server side. Send packets.
-
Can't get custom inventory to work
None of your slots use the player inventory. Check your layoutInventory() in NetControllerContainer.
-
accessing values from IExtendedEntityProperties class from the client side
Huh ? Why do you use EntityPlayerMP instead of EntityPlayer ?
-
Projectile fire rate and walk speed.
Then make your own timer. @Override public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer entityPlayer) { if(time<limit) { time++; } else { //do things } return stack; }
-
Projectile fire rate and walk speed.
Then we set the item in use on right click. @Override public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer entityPlayer) { entityPlayer.setItemInUse(stack, this.getMaxItemUseDuration(stack)); return stack; } Then @Override public void onPlayerStoppedUsing(ItemStack stack, World world, EntityPlayer entityPlayer, int amountUsed) { //do things... if (!world.isRemote) { world.spawnEntityInWorld(new EntityTear(world, entityPlayer)); } }
-
java.lang.NullPointerException?
entityplayerbalances is null. It isn't set in WelcomeMessages before player login.
-
Projectile fire rate and walk speed.
Override: /** * How long it takes to use or consume an item */ public int getMaxItemUseDuration(ItemStack par1ItemStack) { return 0;//change that }
-
[1.6.2] Custom Music Disc
Do you call registerSound() yourself ? What is in EventSounds class ?
-
[Solved] Overriding getLightValue() has no effect
If you want the light change to happen fast, you'll need to call a block rerendering, with world.markBlockForUpdate(x,y,z), for example.
-
Making Blocks Drop Items
You can put a setter for the drop in a custom block class file, so you can chain it into your block initialization line.
-
BiomeEvent not getting called/registered, Forge bug?
Yes, initializing your mod before world generation is highly recommended.
-
[ help ] - Can't call ItemStack methods from RenderGameOverlayEvent.
p (aka player) can be null too.
-
accessing values from IExtendedEntityProperties class from the client side
Your class which implements IExtendedEntityProperties is on both sides. I would suggest using it.
-
[1.6.2] What am I doing wrong? (Creating custom bow)
extend ItemBow and change only what you need to.
-
Damage and Meta for Items?
Show your item class.
-
Client proxy update help?
See the originals: public Block func_111022_d(String par1Str) { this.field_111026_f = par1Str; return this; } @SideOnly(Side.CLIENT) protected String func_111023_E() { return this.field_111026_f == null ? "MISSING_ICON_TILE_" + this.blockID + "_" + this.unlocalizedName : this.field_111026_f; } public void registerIcons(IconRegister iconRegister){ this.blockIcon = iconRegister.registerIcon(this.func_111023_E()); } Use func_111022_d, the texture setter.
-
Client proxy update help?
Drop the overriden method. You only have one texture, use the texture setter. (its name is obfuscated, but pretty obvious anyway) Also, @Instance should get the modid, and items and blocks should be done in PreInit.
IPS spam blocked by CleanTalk.