Guff
Members-
Posts
159 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Guff
-
[RESOLVED] Display names for items appearing as the same name
Guff replied to HazeTrance's topic in Modder Support
You're using ModLoader. -
[1.6] [HELP]Custom furnace not working outside of eclipse minecraft
Guff replied to xcoopergangx's topic in Modder Support
I answered a similar question a few days ago: http://www.minecraftforge.net/forum/index.php/topic,10407.msg52900.html#msg52900 Read through that and come back if it still isn't fixed. -
So for example, you are using the axe to break a dirt block. Above the dirt block is a tree. The timber effect should not take place since you are breaking dirt. That is why it checks for logs first, so that "hey, you're breaking a wood block now, let's know out the rest of 'em" will happen.
-
[1.6] [HELP]Custom furnace not working outside of eclipse minecraft
Guff replied to xcoopergangx's topic in Modder Support
Sigh. new ResourceLocation("titaniummod", "textures/gui/furnace.png") Start looking at older threads, questions like these have been answered before. -
It's to tell it that breaking a block beneath a wood block won't have the "timber" effect. If that weren't there it could work by breaking it otherwise. Thanks for the concern, though.
-
if(brokenBlock != null) { ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(new ItemStack(brokenBlock, 1, meta)); if(result != null) { EntityItem drop = new EntityItem(world, par2, par3, par4, result); world.spawnEntityInWorld(drop); return false; } }
-
Okay, well I kind of need a crash log for that.
-
EntityItem item = new EntityItem(world, i, j, k, result); world.spawnEntityInWorld(item);
-
Oh whoops: new ResourceLocation("chargecraft", "textures/villager/chargecraftvillager.png");
-
Use this as your ResourceLocation: new ResourceLocation("chargecraft", "textures/villager/chargecraftvillager");
-
ExecutorService exe = Executors.newCachedThreadPool(); exe.execute(new MyWorldGenThread(params)); That will run alongside the main thread. I just tested it with one of my mods by executing the Runnable using the service. By printing a line at the start of the run() method, and then another during a loop, and then placing a line after the exe.execute() invocation, you will see something like this: The thread has started Test 1 Test 2 This should show after the thread has started Test 3 Test 4 Test 5 This should help you run a world gen thread alongside the main thread.
-
Haha woops. I forgot this. Under delay = cooldown, put this: nbt.setInteger("delay", delay);
-
Amethyst hasn't been created yet.
-
You'll want to check if result != null and then spawn an EntityItem in the world if it is not remote.
-
if (!par2World.isRemote) { par2World.spawnEntityInWorld(yourEntity); }
-
Block brokenBlock = Block.blocksList[world.getBlockId(x, y, z)]; int meta = world.getBlockMetadata(x, y, z); ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(new ItemStack(brokenBlock, 1, meta));
-
It's in the comment: if(delay == 0) { //throw entity par1ItemStack.stackSize--; delay = cooldown; }
-
Yes, I know this. I'm pretty adept with NBT. However, unless everyone on the server were to be using it at the same time, this wouldn't affect anything much. If it really is a problem: private final int cooldown = 40; //2 second cooldown in ticks, this is the same for all items since it will never change. @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { NBTTagCompound nbt = par1ItemStack.getTagCompound(); if(nbt == null) { nbt = new NBTTagCompound(); par1ItemStack.setTagCompound(nbt); } int delay = nbt.getInteger("delay"); if(delay == 0) { //throw entity par1ItemStack.stackSize--; delay = cooldown; } return par1ItemStack; } @Override public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) { NBTTagCompound nbt = par1ItemStack.getTagCompound(); if(nbt == null) { nbt = new NBTTagCompound(); par1ItemStack.setTagCompound(); } int delay = nbt.getInteger("delay"); if(delay > 0) { delay--; nbt.setInteger("delay", delay); } }
-
The modID needs to be a String that represents the mod you are checking for. When you made your @Mod, you gave it modid = "someID". All @Mods have this, so you need to know what the ID of the mod is. You can check that mod's mcmod.info, and it should give it to you. For example, if you wanted to check and see if my mod Plunder Rummage was installed, you'd do this: if(Loader.isModLoader("PR")) { //do stuff }
-
Well, if you are making the items usable by these other mods, via fuel or pipe connections or EU users or whatever, you're going to need the APIs. In your question you just said you wanted to add new content using another mod's items, in which case would not require the API to make a tin pickaxe. Hopefully that makes sense.
-
private long delay = 0L; private long cooldown = 2000L; //2 seconds public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { if(delay > System.getCurrentTimeMillis()) { //throw entity par1ItemStack.stackSize--; delay = System.getCurrentTimeMillis() + cooldown; } return par1ItemStack; }
-
if(Loader.isModLoader(modid)) { //make new items }