You should look at a vanilla block that does this (like the furnace) and just go from there.
Well, you could just set the generate so that it would need a block of air nearby in order to spawn, and then set the spawn height to the desired height
You could probably set a lighting condition. The block wouldn't spawn by lava but it wouldn't spawn on the surface either. So conditions for a nearby air block and low lighting conditions : )Does anyone know how to make a block behave like redstone place upon another block?
How do I make my block drop more than one custom item?(Man..I suck at modding. )
You really can't. Adding another return statement is unreachable (Block.class calls for only one integer, no more) to the JVM, so you really can't. You don't suck at modding; trust me. That's not a basic inquiry.
In case that's still a bit fuzzy, here's what I mean: the statement
public int idDropped(int i, Random random)
{
}
Calls for one int; int i. You cannot have more than one item assigned to a block, and using an && or || operator is undefined for idDropped.
When life gives you a potato, wonder why the heck life just gave you a potato. Why not something else? Like money? Or a combustable lemon? No, you get a potato. Nothing else.
This post still remains unnoticed and not helped...
That's because you cannot read the OP. It clearly states that help is only being given here for issues related to the tutorials. You have been continuously asking questions unrelated to the tutorials.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
You really can't. Adding another return statement is unreachable (Block.class calls for only one integer, no more) to the JVM, so you really can't. You don't suck at modding; trust me. That's not a basic inquiry.
In case that's still a bit fuzzy, here's what I mean: the statement
public int idDropped(int i, Random random)
{
}
Calls for one int; int i. You cannot have more than one item assigned to a block, and using an && or || operator is undefined for idDropped.
Alright, then how about a block that randomly drops One out of three custom items then?
I've made a custom crop, opium. It should have three growth stages however when the seeds are planted instead of starting at the lowest stage they just instantly end up at their final harvestable stage.
mod_MUI
package net.minecraft.src;
import java.util.Random;
public class mod_MUI extends BaseMod
{
//OPIUM CROP SETUP
public static final Block opiumblock = new BlockOpiumBlock(165, 0).setBlockName("opiumblock");
public static final Item opiumseeds = new ItemOpiumSeeds(909, opiumblock.blockID, Block.tilledField.blockID).setItemName("opiumseeds");
//CROP STAGES
public static int opiumstageone = ModLoader.addOverride("/terrain.png", "/crops/opiumstageone.png");
public static int opiumstagetwo = ModLoader.addOverride("/terrain.png", "/crops/opiumstagetwo.png");
public static int opiumstagethree = ModLoader.addOverride("/terrain.png", "/crops/opiumstagethree.png");
public void load()
{
/////////
//CROPS//
/////////
//Opium Poppy
opiumblock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/opoppy.png");
ModLoader.registerBlock(opiumblock);
ModLoader.addName(opiumblock, "Opium Poppy");
//Opium Seeds
opiumseeds.iconIndex = ModLoader.addOverride("/gui/items.png", "/opiumseeds.png");
ModLoader.addName(opiumseeds, "Opium Poppy Seeds");
opiumseeds.setTabToDisplayOn(CreativeTabs.tabMaterials);
}
public String getVersion()
{
return "0.1a";
}
}
BlockOpiumBlock
package net.minecraft.src;
import java.util.Random;
public class BlockOpiumBlock extends BlockFlower
{
public BlockOpiumBlock(int i, int j)
{
super(i, j);
blockIndexInTexture = j;
setTickRandomly(true);
float f = 0.5F;
setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.25F, 0.5F + f);
}
/**
* Gets passed in the blockID of the block below and supposed to return true if its allowed to grow on the type of
* blockID passed in. Args: blockID.
* This basically checks to see if the block below is a tilled field/tilled dirt. If it is true then the crop can grow.
*/
protected boolean canThisPlantGrowOnThisBlockID(int par1)
{
return par1 == Block.tilledField.blockID;
}
/**
* Ticks the block if it's been scheduled. This method gets scheduled to run because of the setTickRandomly part in the constructor of the class.
*/
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
{
super.updateTick(par1World, par2, par3, par4, par5Random);
if (par1World.getBlockLightValue(par2, par3 + 1, par4) >= 9)
{
int i = par1World.getBlockMetadata(par2, par3, par4);
if (i < 3)
{
float f = getGrowthRate(par1World, par2, par3, par4);
if (par5Random.nextInt((int)(25F / f) + 1) == 0)
{
i++;
par1World.setBlockMetadataWithNotify(par2, par3, par4, i);
}
}
}
}
/**
* Gets the growth rate for the crop. Setup to encourage rows by halving growth rate if there is diagonals, crops on
* different sides that aren't opposing, and by adding growth for every crop next to this one (and for crop below
* this one). Args: x, y, z
*/
private float getGrowthRate(World par1World, int par2, int par3, int par4)
{
float f = 1.0F;
int i = par1World.getBlockId(par2, par3, par4 - 1);
int j = par1World.getBlockId(par2, par3, par4 + 1);
int k = par1World.getBlockId(par2 - 1, par3, par4);
int l = par1World.getBlockId(par2 + 1, par3, par4);
int i1 = par1World.getBlockId(par2 - 1, par3, par4 - 1);
int j1 = par1World.getBlockId(par2 + 1, par3, par4 - 1);
int k1 = par1World.getBlockId(par2 + 1, par3, par4 + 1);
int l1 = par1World.getBlockId(par2 - 1, par3, par4 + 1);
boolean flag = k == blockID || l == blockID;
boolean flag1 = i == blockID || j == blockID;
boolean flag2 = i1 == blockID || j1 == blockID || k1 == blockID || l1 == blockID;
for (int i2 = par2 - 1; i2 <= par2 + 1; i2++)
{
for (int j2 = par4 - 1; j2 <= par4 + 1; j2++)
{
int k2 = par1World.getBlockId(i2, par3 - 1, j2);
float f1 = 0.0F;
if (k2 == Block.tilledField.blockID)
{
f1 = 1.0F;
if (par1World.getBlockMetadata(i2, par3 - 1, j2) > 0)
{
f1 = 3F;
}
}
if (i2 != par2 || j2 != par4)
{
f1 /= 4F;
}
f += f1;
}
}
if (flag2 || flag && flag1)
{
f /= 2.0F;
}
return f;
}
/**
* The type of render function that is called for this block. The render type of 6 gets the texture and places it four times around the sides of the block and leaves nothing on the top or bottom.
*/
public int getRenderType()
{
return 1;
}
/**
* Drops the block items with a specified chance of dropping the specified items
*/
public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)
{
float f = 0.7F;
float f1 = par1World.rand.nextFloat() * f + (1.0F - f) * 0.5F;
float f2 = par1World.rand.nextFloat() * f + (1.0F - f) * 0.5F;
float f3 = par1World.rand.nextFloat() * f + (1.0F - f) * 0.5F;
EntityItem entityitem = new EntityItem(par1World, (float)par2 + f1, (float)par3 + f2, (float)par4 + f3, new ItemStack(mod_MUI.opiumblock));
entityitem.delayBeforeCanPickup = 10;
par1World.spawnEntityInWorld(entityitem);
}
/**
* Returns the ID of the items to drop on destruction. "i" is equal to the blocks metadata value(explained slightly more in the getBlockTextureFromSideAndMetadata method below). This means that it will check that that value is equal to 8(the final stage of growth) and if it is then it will drop wheat. It may be fairly obvious, but the 'else' statement means that if the growth state is not equal to 7 then drop nothing (-1 means nothing)
*/
public int idDropped(int i, Random random, int j)
{
if (i == 8)
{
return mod_MUI.opiumblock.blockID;
}
else
{
return -1;
}
}
/**
* Returns the quantity of items to drop on block destruction.
*/
public int quantityDropped(Random random)
{
return 1;
}
/**
* From the specified side and block metadata retrieves the blocks texture. Args: side, metadata.
* As you may have been able to tell from the line above, "j" is equal to the metadata value of the block. This checks if that value is equal to a certain number then sets the blocks texture to what you have defined.
* The things that are being returned are the ints in your mod_ class which you created and set to your texture for the specific stages of growth.
*/
public int getBlockTextureFromSideAndMetadata(int i, int j)
{
if(j == 0)
{
return blockIndexInTexture;
}
if(j == 1)
{
return mod_MUI.opiumstageone;
}
if(j == 2)
{
return mod_MUI.opiumstagetwo;
}
if(j == 3)
{
return mod_MUI.opiumstagethree;
}
return j;
}
}
ItemOpiumSeeds
package net.minecraft.src;
public class ItemOpiumSeeds extends Item
{
/** The type of block this seed turns into (wheat or pumpkin stems for instance)*/
private int blockType;
/** BlockID of the block the seeds can be planted on. */
private int soilBlockID;
public ItemOpiumSeeds(int i, int j, int k)
{
super(i);
blockType = j;
soilBlockID = k;
}
/**
* Callback for item usage. If the item does something special on right clicking, he will have one of those. Return
* True if something happen and false if it don't. This is for ITEMS, not BLOCKS !
*/
public boolean tryPlaceIntoWorld(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
{
if (par7 != 1)
{
return false;
}
if (!par2EntityPlayer.canPlayerEdit(par4, par5, par6) || !par2EntityPlayer.canPlayerEdit(par4, par5 + 1, par6))
{
return false;
}
int i = par3World.getBlockId(par4, par5, par6);
if (i == soilBlockID && par3World.isAirBlock(par4, par5 + 1, par6))
{
par3World.setBlockWithNotify(par4, par5 + 1, par6, blockType);
par1ItemStack.stackSize--;
return true;
}
else
{
return false;
}
}
}
How do I make my block drop more than one custom item?(Man..I suck at modding. )
Try this, I just finished editing it It is an extract from different files.
/**
* Returns the ID of the items to drop on destruction.
*/
public int idDropped(int par1, Random par2Random, int par3)
{
return mod_file.nameHere.shiftedIndex;
}
/**
* Returns the quantity of items to drop on block destruction.
*/
public int quantityDropped(Random par1Random)
{
return #;
}
}
mod_file = name of mod_file
nameHere = the item/block you want to drop's name in the part after "public static final Item/Block"
# = the amount you want dropped.
I also know how to make it drop a random amount. I'm thinking of showing Techguy so he can just add it to the tutorials because it is simnple, small and useful. Hopefully he will just read this .
Try this, I just finished editing it It is an extract from different files.
/**
* Returns the ID of the items to drop on destruction.
*/
public int idDropped(int par1, Random par2Random, int par3)
{
return mod_file.nameHere.shiftedIndex;
}
/**
* Returns the quantity of items to drop on block destruction.
*/
public int quantityDropped(Random par1Random)
{
return #;
}
}
mod_file = name of mod_file
nameHere = the item/block you want to drop's name in the part after "public static final Item/Block"
# = the amount you want dropped.
I also know how to make it drop a random amount. I'm thinking of showing Techguy so he can just add it to the tutorials because it is simnple, small and useful. Hopefully he will just read this .
That's not what he wanted to know. He wants to let a block drop more multiple different items, not just a few of one item.^^
Have you heard of recursive code? You code probably write something like this(I haven't tried it yet, just using my knowledgebase)
public int idDropped(int i, Random random, int j)
{
if (i == value)
{
idDropped(int i + 1)
return mod_***.blockName.blockID;
}
if (i == value + 1)
{
return mod_***.blockNameTwo.blockID;
}
}
Might need some playing around to get it just right but in theory, it should work.
The idea is that it stacks the function on itself. When it first runs, it tests the variable and finds it to be true, so it calls itself with the variable value plus one. That halts the first call to it, and then it runs through the new call. It tests the variable and passes on the second condition, making it return the second block. The second call ends, returning it to the first call where it then executes the last line of code it can, returning the original block to be dropped. I apologize if this explanation is unclear. Say so and I will try to re explain in a better way =)
So I created a multitextured block and have found a coupleproblems. One, it won't pick up the block top. Naming and all is fine, I even renamed and changed all references.Second, transparency. The block is a table, supposed to be a legit table, not crafting. It's showing white which makes sense since Paint.exe doesn't exactly let you delete a pixel. I set the boolean to return false for isOpaqueBlock. So my questions I guess are, do I need a program like GIMP or Photoshop to achieve transparency? Or is there code to mask the white and make it transparent?And why won't it pick up my table top image? Here's the code, thanks very much I'm still looking myself Also, I tried using sticks for recipe. It didn't show up in block and I don't see it. How do I call it? I'm prob just blind mod_Experiments
package net.minecraft.src;
public class mod_Experiments extends BaseMod
{
public static final Block pinkBlock = new BlockPinkBlock(160, 0) .setBlockName("Pink Block") .setHardness(0.7F) .setCreativeTab(CreativeTabs.tabAllSearch) .setStepSound(Block.soundGrassFootstep);
public static final Block table = new BlockTable(161, 0) .setBlockName("Table") .setHardness(1.2F) .setCreativeTab(CreativeTabs.tabBlock) .setStepSound(Block.soundWoodFootstep);
public static int tableBottom = ModLoader.addOverride("/terrain.png", "/TableBottom.png");
public static int tableTop = ModLoader.addOverride("/terrain.png", "/Table.png");
public static int tableSides = ModLoader.addOverride("/terrain.png", "/TableSides.png");
public class BlockTable extends Block
{
public BlockTable (int i, int j)
{
super(i, j, Material.wood);
}
public boolean isOpaqueCube()
{
return false;
}
public int getBlockTextureFromSideAndMetadata(int i, int j)
{
return getBlockTextureFromSide(i);
}
public int getBlockTextureFromSide(int i)
{
if (i == 0)
{
return mod_Experiments.tableBottom;
}
if (i == 1)
{
return mod_Experiments.tableTop;
}
else
{
return mod_Experiments.tableSides;
}
}
}
Alright, then how about a block that randomly drops One out of three custom items then?
Hmm, I suppose that's possible. You could probably work off of the redstone/lapis lazuli ore's random quantityDropped but instead use the same mechanic to drop different items.
Rollback Post to RevisionRollBack
When life gives you a potato, wonder why the heck life just gave you a potato. Why not something else? Like money? Or a combustable lemon? No, you get a potato. Nothing else.
Try this, I just finished editing it It is an extract from different files.
/**
* Returns the ID of the items to drop on destruction.
*/
public int idDropped(int par1, Random par2Random, int par3)
{
return mod_file.nameHere.shiftedIndex;
}
/**
* Returns the quantity of items to drop on block destruction.
*/
public int quantityDropped(Random par1Random)
{
return #;
}
}
mod_file = name of mod_file
nameHere = the item/block you want to drop's name in the part after "public static final Item/Block"
# = the amount you want dropped.
I also know how to make it drop a random amount. I'm thinking of showing Techguy so he can just add it to the tutorials because it is simnple, small and useful. Hopefully he will just read this .
But that's not what he/she wants to know. He/she wants to know how to make a single block drop multiple (read: different) items he's/she's added. Not just one. Controlling the quantity isn't what he/she wants to know; that's not very hard.
When life gives you a potato, wonder why the heck life just gave you a potato. Why not something else? Like money? Or a combustable lemon? No, you get a potato. Nothing else.
I'm adding a block that behaves like redstone wire. I got it to add in game and all but I have a couple of problems. The block looks nothing like what it actually does. It shows up correctly in inventory and in hand but places a different image. Also, it won't place on anything but the top part of the block. I copied some code from redstone wire and tinkered with it, getting broken or no results. Any help would be appreciated. Thanks
mod_Experiment
package net.minecraft.src;
public class mod_Experiments extends BaseMod
{
public static final Block pinkBlock = new BlockPinkBlock(160, 0) .setBlockName("Pink Block") .setHardness(0.7F) .setCreativeTab(CreativeTabs.tabAllSearch) .setStepSound(Block.soundGrassFootstep);
public static final Block table = new BlockTable(161, 0) .setBlockName("Table") .setHardness(1.2F) .setCreativeTab(CreativeTabs.tabBlock) .setStepSound(Block.soundWoodFootstep) .setLightValue(1.0F);
public static final Block c4 = new BlockC4(162, 0) .setBlockName("C4") .setHardness(.1F) .setCreativeTab(CreativeTabs.tabRedstone) .setStepSound(Block.soundPowderFootstep);
public static int tableBottom = ModLoader.addOverride("/terrain.png", "/TableBottom.png");
public static int tableTop = ModLoader.addOverride("/terrain.png", "/TableT.png");
public static int tableSides = ModLoader.addOverride("/terrain.png", "/TableSides.png");
public class BlockC4 extends Block
{
public BlockC4(int i, int j)
{
super(i, j, Material.circuits);
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.1F, 1.0F);
}
public int getBlockTextureFromSideAndMetadata(int par1, int par2)
{
return this.blockIndexInTexture;
}
public boolean renderAsNormalBlock()
{
return false;
}
public int getRenderType()
{
return 5;
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
{
return null;
}
I would have to agree that it should be updated when possible and that you should try to do it yourself. I've posted a few questions on here already but I actively attempt to figure it out myself while I hope someone saves me time haha if you look at one of my last posts you'll see I crossed out the majority of it because as I waited I figured out the answer myself. No harm in working when you might have hours days or weeks to wait
I would have to agree that it should be updated when possible and that you should try to do it yourself. I've posted a few questions on here already but I actively attempt to figure it out myself while I hope someone saves me time haha if you look at one of my last posts you'll see I crossed out the majority of it because as I waited I figured out the answer myself. No harm in working when you might have hours days or weeks to wait
Exactly, there's that and a simple Google search. don't see why people have to be so impatient. makes me just wanna stab their eyes out with a rusty pitchfork, lol. Not that I'd actually do such a thing, but you get the point.
Well, I knew that already^^ (I did in my mod, too)
I just pointed out that you can't use the ItemFood class with a drinking sound/animation except you want to drink all your food
If you want to change this for just one or more items, you have to create a new class, which contains what you wrote. But you're right, there's no great difference between eating and drinking animation. Drinking just doesn't let texture bits fall to the floor.
And the sound effect. I set mine to drinking.
LIQUID LAMBCHAWP.
It'll happen when it happens. Until then, don't be a jerk about it.
Rollback Post to RevisionRollBack
When life gives you a potato, wonder why the heck life just gave you a potato. Why not something else? Like money? Or a combustable lemon? No, you get a potato. Nothing else.
To post a comment, please login or register a new account.
You could probably set a lighting condition. The block wouldn't spawn by lava but it wouldn't spawn on the surface either. So conditions for a nearby air block and low lighting conditions : )Does anyone know how to make a block behave like redstone place upon another block?
-
View User Profile
-
View Posts
-
Send Message
Retired StaffYou really can't. Adding another return statement is unreachable (Block.class calls for only one integer, no more) to the JVM, so you really can't. You don't suck at modding; trust me. That's not a basic inquiry.
In case that's still a bit fuzzy, here's what I mean: the statement
public int idDropped(int i, Random random) { }Calls for one int; int i. You cannot have more than one item assigned to a block, and using an && or || operator is undefined for idDropped.
That's because you cannot read the OP. It clearly states that help is only being given here for issues related to the tutorials. You have been continuously asking questions unrelated to the tutorials.
together they are powerful beyond imagination."
Alright, then how about a block that randomly drops One out of three custom items then?
Try this, I just finished editing it
/** * Returns the ID of the items to drop on destruction. */ public int idDropped(int par1, Random par2Random, int par3) { return mod_file.nameHere.shiftedIndex; } /** * Returns the quantity of items to drop on block destruction. */ public int quantityDropped(Random par1Random) { return #; } }mod_file = name of mod_file
nameHere = the item/block you want to drop's name in the part after "public static final Item/Block"
# = the amount you want dropped.
I also know how to make it drop a random amount. I'm thinking of showing Techguy so he can just add it to the tutorials because it is simnple, small and useful. Hopefully he will just read this
Have you heard of recursive code? You code probably write something like this(I haven't tried it yet, just using my knowledgebase)
public int idDropped(int i, Random random, int j) { if (i == value) { idDropped(int i + 1) return mod_***.blockName.blockID; } if (i == value + 1) { return mod_***.blockNameTwo.blockID; } }The idea is that it stacks the function on itself. When it first runs, it tests the variable and finds it to be true, so it calls itself with the variable value plus one. That halts the first call to it, and then it runs through the new call. It tests the variable and passes on the second condition, making it return the second block. The second call ends, returning it to the first call where it then executes the last line of code it can, returning the original block to be dropped. I apologize if this explanation is unclear. Say so and I will try to re explain in a better way =)
coupleproblems.One, it won't pick up the block top. Naming and all is fine, I even renamed and changed all references.Second, transparency. The block is a table, supposed to be a legit table, not crafting. It's showing white which makes sense since Paint.exe doesn't exactly let you delete a pixel. I set the boolean to return false for isOpaqueBlock. So my questions I guess are, do I need a program like GIMP or Photoshop to achieve transparency? Or is there code to mask the white and make it transparent?And why won't it pick up my table top image? Here's the code, thanks very much
I'm still looking myselfAlso,I tried using sticks for recipe. It didn't show up in block and I don't see it. How do I call it? I'm prob just blindmod_Experimentspublic class mod_Experiments extends BaseMod
{
public static final Block pinkBlock = new BlockPinkBlock(160, 0) .setBlockName("Pink Block") .setHardness(0.7F) .setCreativeTab(CreativeTabs.tabAllSearch) .setStepSound(Block.soundGrassFootstep);
public static final Block table = new BlockTable(161, 0) .setBlockName("Table") .setHardness(1.2F) .setCreativeTab(CreativeTabs.tabBlock) .setStepSound(Block.soundWoodFootstep);
public static int tableBottom = ModLoader.addOverride("/terrain.png", "/TableBottom.png");
public static int tableTop = ModLoader.addOverride("/terrain.png", "/Table.png");
public static int tableSides = ModLoader.addOverride("/terrain.png", "/TableSides.png");
public void load()
{
pinkBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/PinkBlock.png");
ModLoader.registerBlock(pinkBlock);
ModLoader.addName(pinkBlock, "Pink Block");
table.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Table.png");
ModLoader.registerBlock(table);
ModLoader.addName(table, "Table");
ModLoader.addRecipe(new ItemStack(table, 1), new Object [] {"@ @", " @ ", "@ @", Character.valueOf('@'), Block.planks});
}
public String getVersion()
{
return "1.3.2";
}
}
BlockTable
public class BlockTable extends Block
{
public BlockTable (int i, int j)
{
super(i, j, Material.wood);
}
public boolean isOpaqueCube()
{
return false;
}
public int getBlockTextureFromSideAndMetadata(int i, int j)
{
return getBlockTextureFromSide(i);
}
public int getBlockTextureFromSide(int i)
{
if (i == 0)
{
return mod_Experiments.tableBottom;
}
if (i == 1)
{
return mod_Experiments.tableTop;
}
else
{
return mod_Experiments.tableSides;
}
}
}
I wuv you <3
-
View User Profile
-
View Posts
-
Send Message
Retired StaffHmm, I suppose that's possible. You could probably work off of the redstone/lapis lazuli ore's random quantityDropped but instead use the same mechanic to drop different items.
Is it possible to add a drinking animation?
On normal food registered with new ItemFood, is it possible to add drinking animation to that too?
This was supposed to be a witty signature, but then it got lost somewhere.
-
View User Profile
-
View Posts
-
Send Message
Retired StaffBut that's not what he/she wants to know. He/she wants to know how to make a single block drop multiple (read: different) items he's/she's added. Not just one. Controlling the quantity isn't what he/she wants to know; that's not very hard.
Adding a drinking animation is actually easier than you may think. In your item class, you change
public EnumAction getItemUseAction(ItemStack par1ItemStack) { return EnumAction.eat; }to
public EnumAction getItemUseAction(ItemStack par1ItemStack) { return EnumAction.drink; }Or just copy that to your item class.
But all that really does is change the sound effect. They rotate on basically the same axis.
mod_Experiment
public class mod_Experiments extends BaseMod
{
public static final Block pinkBlock = new BlockPinkBlock(160, 0) .setBlockName("Pink Block") .setHardness(0.7F) .setCreativeTab(CreativeTabs.tabAllSearch) .setStepSound(Block.soundGrassFootstep);
public static final Block table = new BlockTable(161, 0) .setBlockName("Table") .setHardness(1.2F) .setCreativeTab(CreativeTabs.tabBlock) .setStepSound(Block.soundWoodFootstep) .setLightValue(1.0F);
public static final Block c4 = new BlockC4(162, 0) .setBlockName("C4") .setHardness(.1F) .setCreativeTab(CreativeTabs.tabRedstone) .setStepSound(Block.soundPowderFootstep);
public static int tableBottom = ModLoader.addOverride("/terrain.png", "/TableBottom.png");
public static int tableTop = ModLoader.addOverride("/terrain.png", "/TableT.png");
public static int tableSides = ModLoader.addOverride("/terrain.png", "/TableSides.png");
public void load()
{
pinkBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/PinkBlock.png");
ModLoader.registerBlock(pinkBlock);
ModLoader.addName(pinkBlock, "Pink Block");
table.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Table.png");
ModLoader.registerBlock(table);
ModLoader.addName(table, "Table");
ModLoader.addRecipe(new ItemStack(table, 1), new Object [] {"@ @", " @ ", "@ @", Character.valueOf('@'), Block.planks});
c4.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/C4.png");
ModLoader.registerBlock(c4);
ModLoader.addName(c4, "C4");
}
public String getVersion()
{
return "1.3.2";
}
}
BlockC4
public class BlockC4 extends Block
{
public BlockC4(int i, int j)
{
super(i, j, Material.circuits);
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.1F, 1.0F);
}
public int getBlockTextureFromSideAndMetadata(int par1, int par2)
{
return this.blockIndexInTexture;
}
public boolean renderAsNormalBlock()
{
return false;
}
public int getRenderType()
{
return 5;
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
{
return null;
}
public boolean isOpaqueCube()
{
return false;
}
}
Why don't you update NPC.
I would have to agree that it should be updated when possible and that you should try to do it yourself. I've posted a few questions on here already but I actively attempt to figure it out myself while I hope someone saves me time haha if you look at one of my last posts you'll see I crossed out the majority of it because as I waited I figured out the answer myself. No harm in working when you might have hours days or weeks to wait
Exactly, there's that and a simple Google search. don't see why people have to be so impatient. makes me just wanna stab their eyes out with a rusty pitchfork, lol. Not that I'd actually do such a thing, but you get the point.
-
View User Profile
-
View Posts
-
Send Message
Retired StaffAnd the sound effect. I set mine to drinking.
LIQUID LAMBCHAWP.
It'll happen when it happens. Until then, don't be a jerk about it.