Jump to content

  • Curse Sites
Become a Premium Member! Help
Latest News Article

[1.4] [Forge] Modding Tutorials - Taking Requests - Advanced Tutorials Included

forge mod modding jcm2606 minecraft coding tutorials tut

  • Please log in to reply
449 replies to this topic

#341

Tyrato
    Tyrato

    Tree Puncher

  • Members
  • 25 posts

Posted 07 January 2013 - 04:50 AM

View Postmosterhunter798, on 07 January 2013 - 04:39 AM, said:

with the new forge, you have to make ALL your packages and classes in the src folder. Posted Image

thanks.

Register or log in to remove.

#342

jcm2606
    jcm2606

    Lapis Lazuli Collector

  • Members
  • 1016 posts
  • Location: Australia

Posted 07 January 2013 - 06:36 AM

View PostTyrato, on 07 January 2013 - 04:50 AM, said:

thanks.
The setting up tutorial should have been changed to say src instead of common. Is it for you?
Derpin da herp.

#343

ProjectMinebook

Posted 08 January 2013 - 07:02 PM

Dear jcm2606,
could you please show me how to detect shift right click?

#344

multistar444
  • Location: Everywhere!
  • Minecraft: multistar444

Posted 08 January 2013 - 07:32 PM

View Postjcm2606, on 06 January 2013 - 10:15 PM, said:

Okay, is your client proxy in the location you supplied in the SidedProxy annotation?

OK, I fixed that, but it still doesn't  load my mod.
CODE
Spoiler:

Posted Image

#345

multistar444
  • Location: Everywhere!
  • Minecraft: multistar444

Posted 08 January 2013 - 07:57 PM

View Postmultistar444, on 08 January 2013 - 07:32 PM, said:

OK, I fixed that, but it still doesn't  load my mod.
CODE
Spoiler:


I changed it a little bit. :)
CODE
Spoiler:

Posted Image

#346

jcm2606
    jcm2606

    Lapis Lazuli Collector

  • Members
  • 1016 posts
  • Location: Australia

Posted 08 January 2013 - 11:12 PM

View Postmultistar444, on 08 January 2013 - 07:57 PM, said:

I changed it a little bit. Posted Image
CODE
Spoiler:
You may need an instance:
@Instance("MODIDHERE")
public static <ClassNameHere> instance;

View PostProjectMinebook, on 08 January 2013 - 07:02 PM, said:

Dear jcm2606,
could you please show me how to detect shift right click?
Just put an if statement like this in your block's onBlockActivate method:
if(player.isSneaking)
{
return false;
}

Derpin da herp.

#347

ProjectMinebook

Posted 09 January 2013 - 08:02 AM

Thank you so much

#348

jcm2606
    jcm2606

    Lapis Lazuli Collector

  • Members
  • 1016 posts
  • Location: Australia

Posted 09 January 2013 - 09:56 AM

View PostProjectMinebook, on 09 January 2013 - 08:02 AM, said:

Thank you so much
No problem!
Derpin da herp.

#349

mosterhunter798
  • Location: You don't need to know.

Posted 09 January 2013 - 11:12 AM

View Postjcm2606, on 07 January 2013 - 02:48 AM, said:

GIMP and InkScape. Their the only two other ones which I know that are good. InkScape is a little confusing and hard-to-use but it gets the job done.
Thanks. GIMP works fine. And a suggestion to the tutorials... Make a "Finishing your mod"Section where there will be instructions on how to  make your mod ready to be played.
Posted ImagePosted Image
DEATH TO THE GREENBLOODS(Creepers)!!!

#350

jcm2606
    jcm2606

    Lapis Lazuli Collector

  • Members
  • 1016 posts
  • Location: Australia

Posted 09 January 2013 - 11:30 AM

View Postmosterhunter798, on 09 January 2013 - 11:12 AM, said:

Thanks. GIMP works fine. And a suggestion to the tutorials... Make a "Finishing your mod"Section where there will be instructions on how to  make your mod ready to be played.
Coming up soon. TBH I'm actually waiting on my laptop... because once i get that it's gonna be a LOT smoother. And I'll be able to release atleast a prerelease of SorceryCraft.
Derpin da herp.

#351

ProjectMinebook

Posted 09 January 2013 - 11:39 AM

Another question(two more like), so could you tell me how to make an item with a damage bar. And how to detect wich player put a block down, like onAdded event but with player detect.

#352

multistar444
  • Location: Everywhere!
  • Minecraft: multistar444

Posted 09 January 2013 - 12:29 PM

View Postjcm2606, on 08 January 2013 - 11:12 PM, said:

You may need an instance:
@Instance("MODIDHERE")
public static <ClassNameHere> instance;

Where this code goes?
Posted Image

#353

jcm2606
    jcm2606

    Lapis Lazuli Collector

  • Members
  • 1016 posts
  • Location: Australia

Posted 09 January 2013 - 08:56 PM

View Postmultistar444, on 09 January 2013 - 12:29 PM, said:

Where this code goes?
That code goes in your base mod class.

View PostProjectMinebook, on 09 January 2013 - 11:39 AM, said:

Another question(two more like), so could you tell me how to make an item with a damage bar. And how to detect wich player put a block down, like onAdded event but with player detect.
To make an item with a damage bar just add this.setMaxDamage(~MAXDAMAGEHERE~); to the class constructor for your item, then use stack.damageItem(~DAMAGEAMOUNT~, ~ENTITYDMAGING~); wherever you want to damage the item. Stack being the ItemStack variable.
Derpin da herp.

#354

mosterhunter798
  • Location: You don't need to know.

Posted 10 January 2013 - 08:30 AM

View Postjcm2606, on 09 January 2013 - 11:30 AM, said:

Coming up soon. TBH I'm actually waiting on my laptop... because once i get that it's gonna be a LOT smoother. And I'll be able to release atleast a prerelease of SorceryCraft.
Thanks. And can you make the mob tutorial sooner please? My mod is all about new mobs. And event tutorial. P.S Is it possible to force the portal to spawn in a specific place when you enter a new dimension? And can you make biomes is dimensions?
EDIT: I just tried GIMP, in your texture tutorial, when you said "in Eclipse, make a new package in the yourname.yourmodname folder called “resources”, then a new one in there called “art”" did you mean that we're supposed to make a new package inside the "resources" package? is resources even a package? And do you mean that we're supposed to make resources in the src folder?
Posted ImagePosted Image
DEATH TO THE GREENBLOODS(Creepers)!!!

#355

jcm2606
    jcm2606

    Lapis Lazuli Collector

  • Members
  • 1016 posts
  • Location: Australia

Posted 10 January 2013 - 10:24 AM

View Postmosterhunter798, on 10 January 2013 - 08:30 AM, said:

Thanks. And can you make the mob tutorial sooner please? My mod is all about new mobs. And event tutorial. P.S Is it possible to force the portal to spawn in a specific place when you enter a new dimension? And can you make biomes is dimensions?
EDIT: I just tried GIMP, in your texture tutorial, when you said "in Eclipse, make a new package in the yourname.yourmodname folder called “resources”, then a new one in there called “art”" did you mean that we're supposed to make a new package inside the "resources" package? is resources even a package? And do you mean that we're supposed to make resources in the src folder?
Yes, make the resources package in your mod's package, then make the art package in the resources package, then place your art in there.
Derpin da herp.

#356

mosterhunter798
  • Location: You don't need to know.

Posted 10 January 2013 - 10:31 AM

View Postjcm2606, on 10 January 2013 - 10:24 AM, said:

Yes, make the resources package in your mod's package, then make the art package in the resources package, then place your art in there.
So make the resources package in the src folder and make the art package inside the resources?
I cant make a package inside another package.
Posted ImagePosted Image
DEATH TO THE GREENBLOODS(Creepers)!!!

#357

ProjectMinebook

Posted 10 January 2013 - 10:54 AM

The damadge thing is not working help please!
package technology.mod;
import cpw.mods.fml.common.network.Player;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class ItemExpBanker extends Item {
	public ItemExpBanker(int id) {
			super(id);
		   
			// Constructor Configuration
			maxStackSize = 64;
			setCreativeTab(Technology.TechnologyTab);
			setIconIndex(0);
			setItemName("ItemExpBanker");
			this.setMaxDamage(500);
	}
   
	public String getTextureFile() {
			return CommonProxy.ITEMS_PNG;
	}
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
  if(par3EntityPlayer.isSneaking())
  {
   par3EntityPlayer.addExperienceLevel(1);
   par1ItemStack.damageItem(1, par3EntityPlayer);
  } else {
   par3EntityPlayer.addExperienceLevel(-1);
   par1ItemStack.damageItem(-1, par3EntityPlayer);
  }
  return par1ItemStack;
}
}


#358

jcm2606
    jcm2606

    Lapis Lazuli Collector

  • Members
  • 1016 posts
  • Location: Australia

Posted 10 January 2013 - 11:21 AM

View Postmosterhunter798, on 10 January 2013 - 10:31 AM, said:

So make the resources package in the src folder and make the art package inside the resources?
I cant make a package inside another package.
You can. And the resources package goes inside your yourname.yourmodname.common package.

View PostProjectMinebook, on 10 January 2013 - 10:54 AM, said:

The damadge thing is not working help please!
package technology.mod;
import cpw.mods.fml.common.network.Player;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class ItemExpBanker extends Item {
public ItemExpBanker(int id) {
		 super(id);
		
		 // Constructor Configuration
		 maxStackSize = 64;
		 setCreativeTab(Technology.TechnologyTab);
		 setIconIndex(0);
		 setItemName("ItemExpBanker");
		 this.setMaxDamage(500);
}

public String getTextureFile() {
		 return CommonProxy.ITEMS_PNG;
}
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
if(par3EntityPlayer.isSneaking())
{
par3EntityPlayer.addExperienceLevel(1);
par1ItemStack.damageItem(1, par3EntityPlayer);
} else {
par3EntityPlayer.addExperienceLevel(-1);
par1ItemStack.damageItem(-1, par3EntityPlayer);
}
return par1ItemStack;
}
}
How isn't it working? Crashes? Just does't work?
Derpin da herp.

#359

ProjectMinebook

Posted 10 January 2013 - 11:49 AM

Just doesnt work

#360

jcm2606
    jcm2606

    Lapis Lazuli Collector

  • Members
  • 1016 posts
  • Location: Australia

Posted 10 January 2013 - 11:55 AM

View PostProjectMinebook, on 10 January 2013 - 11:49 AM, said:

Just doesnt work
Are you in creative?
Derpin da herp.