Everything posted by jkorn2324swagg
-
[1.6.4][SOLVED] My Custom Grass Textures
Ummm, what does that mean
-
[1.6.4][SOLVED] My Custom Grass Textures
No, I don't think so.
-
[1.6.4][SOLVED] My Custom Grass Textures
I also changed my code again: package mymod.blocks; import java.util.Random; import mymod.Main; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class FlamingGrass extends Block { // @SideOnly(Side.CLIENT) private Icon Dirt_1; //Top of Grass // @SideOnly(Side.CLIENT) private Icon Dirt_3; //Bottom of Grass public FlamingGrass(int par1) { super(par1, Material.grass); this.setTickRandomly(true); this.setCreativeTab(CreativeTabs.tabBlock); } // @SideOnly(Side.CLIENT) /** * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata */ public Icon getIcon(int par1, int par2) { return par1 == 1 ? this.Dirt_1 : par1 == 0 ? this.Dirt_3 : this.blockIcon; // 1- Top 0- Bottom else: Side ); } /** * Ticks the block if it's been scheduled */ public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { if (!par1World.isRemote) { if (par1World.getBlockLightValue(par2, par3 + 1, par4) < 4 && par1World.getBlockLightOpacity(par2, par3 + 1, par4) > 2) { par1World.setBlock(par2, par3, par4, Main.Dirt_3.blockID); } else if (par1World.getBlockLightValue(par2, par3 + 1, par4) >= 9) { for (int l = 0; l < 4; ++l) { int i1 = par2 + par5Random.nextInt(3) - 1; int j1 = par3 + par5Random.nextInt(5) - 3; int k1 = par4 + par5Random.nextInt(3) - 1; int l1 = par1World.getBlockId(i1, j1 + 1, k1); if (par1World.getBlockId(i1, j1, k1) == Main.Dirt_3.blockID && par1World.getBlockLightValue(i1, j1 + 1, k1) >= 4 && par1World.getBlockLightOpacity(i1, j1 + 1, k1) <= 2) { par1World.setBlock(i1, j1, k1, Main.FlamingGrass.blockID); } } } } } /** * Returns the ID of the items to drop on destruction. */ public int idDropped(int par1, Random par2Random, int par3) { return Main.Dirt_3.idDropped(0, par2Random, par3); } // @SideOnly(Side.CLIENT) /** * Retrieves the block texture to use based on the display side. Args: iBlockAccess, x, y, z, side */ public Icon getBlockTexture(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) { if (par5 == 1) { return this.Dirt_1; } else if (par5 == 0) { return this.Dirt_3; } else { return blockIcon; } } // @SideOnly(Side.CLIENT) /** * When this method is called, your block should register all the icons it needs with the given IconRegister. This * is the only chance you get to register icons. */ @Override public void registerIcons(IconRegister par1IconRegister) { this.blockIcon = par1IconRegister.registerIcon(this.getTextureName() + "Flaming Grass Side"); this.Dirt_1 = par1IconRegister.registerIcon(this.getTextureName() + "Flaming Grass Top"); this.Dirt_3 = par1IconRegister.registerIcon(this.getTextureName() + "Flaming Grass Bottom"); } // @SideOnly(Side.CLIENT) /** * A randomly called display update to be able to add particles or other items for display */ public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { super.randomDisplayTick(par1World, par2, par3, par4, par5Random); if (par5Random.nextInt(10) == 0) { par1World.spawnParticle("townaura", (double)((float)par2 + par5Random.nextFloat()), (double)((float)par3 + 1.1F), (double)((float)par4 + par5Random.nextFloat()), 0.0D, 0.0D, 0.0D); } } }
-
[1.6.4][SOLVED] My Custom Grass Textures
I want to see my grass block textures on the grass block, but I get this: 2015-01-16 18:26:26 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/blocks/MISSING_ICON_TILE_253_nullFlaming Grass Top.png 2015-01-16 18:26:26 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/blocks/MISSING_ICON_TILE_253_nullFlaming Grass Bottom.png 2015-01-16 18:26:26 [sEVERE] [Minecraft-Client] Using missing texture, unable to load: minecraft:textures/blocks/MISSING_ICON_TILE_253_nullFlaming Grass Side.png
-
[1.6.4][SOLVED] My Custom Grass Textures
Oh and this was all a copy from the Minecraft Source Code btw, I just made a few changes to mine
-
[1.6.4][SOLVED] My Custom Grass Textures
Ok, so I changed a couple things up on the code, but it still will not work. Here it is currently: package mymod.blocks; import java.util.Random; import mymod.Main; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class FlamingGrass extends Block { @SideOnly(Side.CLIENT) private Icon Dirt_1; //Top of Grass @SideOnly(Side.CLIENT) private Icon Dirt_3; //Bottom of Grass @SideOnly(Side.CLIENT) private Icon Dirt_2; //Side of Grass public FlamingGrass(int par1) { super(par1, Material.grass); this.setTickRandomly(true); this.setCreativeTab(CreativeTabs.tabBlock); } @SideOnly(Side.CLIENT) /** * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata */ public Icon getIcon(int par1, int par2) { return par1 == 1 ? this.Dirt_1 : (par1 == 0 ? Main.Dirt_3.getBlockTextureFromSide(par1) : this.blockIcon); // 1- Top 0- Bottom else: Side ); } /** * Ticks the block if it's been scheduled */ public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { if (!par1World.isRemote) { if (par1World.getBlockLightValue(par2, par3 + 1, par4) < 4 && par1World.getBlockLightOpacity(par2, par3 + 1, par4) > 2) { par1World.setBlock(par2, par3, par4, Main.Dirt_3.blockID); } else if (par1World.getBlockLightValue(par2, par3 + 1, par4) >= 9) { for (int l = 0; l < 4; ++l) { int i1 = par2 + par5Random.nextInt(3) - 1; int j1 = par3 + par5Random.nextInt(5) - 3; int k1 = par4 + par5Random.nextInt(3) - 1; int l1 = par1World.getBlockId(i1, j1 + 1, k1); if (par1World.getBlockId(i1, j1, k1) == Main.Dirt_3.blockID && par1World.getBlockLightValue(i1, j1 + 1, k1) >= 4 && par1World.getBlockLightOpacity(i1, j1 + 1, k1) <= 2) { par1World.setBlock(i1, j1, k1, Main.FlamingGrass.blockID); } } } } } /** * Returns the ID of the items to drop on destruction. */ public int idDropped(int par1, Random par2Random, int par3) { return Main.Dirt_3.idDropped(0, par2Random, par3); } @SideOnly(Side.CLIENT) /** * Retrieves the block texture to use based on the display side. Args: iBlockAccess, x, y, z, side */ public Icon getBlockTexture(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) { if (par5 == 1) { return this.Dirt_1; } else if (par5 == 0) { return Main.Dirt_3.getBlockTextureFromSide(par5); } else { return this.Dirt_2; } } @SideOnly(Side.CLIENT) /** * When this method is called, your block should register all the icons it needs with the given IconRegister. This * is the only chance you get to register icons. */ @Override public void registerIcons(IconRegister par1IconRegister) { this.blockIcon = par1IconRegister.registerIcon(this.getTextureName() + "_side"); this.Dirt_2 = par1IconRegister.registerIcon(this.getTextureName() + "Side of Grass (Dirt_2)"); this.Dirt_1 = par1IconRegister.registerIcon(this.getTextureName() + "Top of Grass (Dirt_1)"); this.Dirt_3 = par1IconRegister.registerIcon("Bottom of Grass (Dirt_3)"); } @SideOnly(Side.CLIENT) /** * A randomly called display update to be able to add particles or other items for display */ public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { super.randomDisplayTick(par1World, par2, par3, par4, par5Random); if (par5Random.nextInt(10) == 0) { par1World.spawnParticle("townaura", (double)((float)par2 + par5Random.nextFloat()), (double)((float)par3 + 1.1F), (double)((float)par4 + par5Random.nextFloat()), 0.0D, 0.0D, 0.0D); } } }
-
[1.6.4][SOLVED] My Custom Grass Textures
They do teach you how to make your textures look nice, but they do not teach you how to do this type of code.
-
[1.6.4][SOLVED] My Custom Grass Textures
Thank you, you are awesome
-
[1.6.4][SOLVED] My Custom Grass Textures
No that's not what they do in the course, they teach you and explain to you what is going on in the code. I am just asking because I want to just be able to finish my custom grass block, + that is also how I learn.
-
[1.6.4][SOLVED] My Custom Grass Textures
So those Icons will never be called? Btw, I am currently doing a modding course with this program, and they do not teach me this stuff so, I kind of do not know what my intention was
-
[1.6.4][SOLVED] My Custom Grass Textures
I have removed the Side Only code, but it still will not load my textures.
-
[1.6.4][SOLVED] My Custom Grass Textures
Hi, I made a custom grass block and coded it, but when I tried to load minecraft, my textures for my custom grass block were unable to load into minecraft and I do not know what I did wrong. Here is my code: package mymod.blocks; import java.util.Random; import mymod.Main; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class FlamingGrass extends Block { @SideOnly(Side.CLIENT) private Icon Dirt_1; //Top of Grass @SideOnly(Side.CLIENT) private Icon Dirt_3; //Bottom of Grass @SideOnly(Side.CLIENT) private Icon Dirt_2; //Side of Grass public FlamingGrass(int par1) { super(par1, Material.grass); this.setTickRandomly(true); this.setCreativeTab(CreativeTabs.tabBlock); } @SideOnly(Side.CLIENT) /** * From the specified side and block metadata retrieves the blocks texture. Args: side, metadata */ public Icon getIcon(int par1, int par2) { return par1 == 1 ? this.Dirt_1 : par1 == 0 ? this.Dirt_3 : this.Dirt_2; // 1- Top 0- Bottom else: Side ); } /** * Ticks the block if it's been scheduled */ public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) { if (!par1World.isRemote) { if (par1World.getBlockLightValue(par2, par3 + 1, par4) < 4 && par1World.getBlockLightOpacity(par2, par3 + 1, par4) > 2) { par1World.setBlock(par2, par3, par4, Main.Dirt_3.blockID); } else if (par1World.getBlockLightValue(par2, par3 + 1, par4) >= 9) { for (int l = 0; l < 4; ++l) { int i1 = par2 + par5Random.nextInt(3) - 1; int j1 = par3 + par5Random.nextInt(5) - 3; int k1 = par4 + par5Random.nextInt(3) - 1; int l1 = par1World.getBlockId(i1, j1 + 1, k1); if (par1World.getBlockId(i1, j1, k1) == Main.Dirt_3.blockID && par1World.getBlockLightValue(i1, j1 + 1, k1) >= 4 && par1World.getBlockLightOpacity(i1, j1 + 1, k1) <= 2) { par1World.setBlock(i1, j1, k1, this.blockID); } } } } } /** * Returns the ID of the items to drop on destruction. */ public int idDropped(int par1, Random par2Random, int par3) { return Main.Dirt_3.idDropped(0, par2Random, par3); } @SideOnly(Side.CLIENT) /** * Retrieves the block texture to use based on the display side. Args: iBlockAccess, x, y, z, side */ public Icon getBlockTexture(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) { if (par5 == 1) { return this.Dirt_1; } else if (par5 == 0) { return Main.Dirt_3.getBlockTextureFromSide(par5); } else { Material material = par1IBlockAccess.getBlockMaterial(par2, par3 + 1, par4); return material != Material.snow && material != Material.craftedSnow ? this.blockIcon : this.Dirt_2; } } @SideOnly(Side.CLIENT) /** * When this method is called, your block should register all the icons it needs with the given IconRegister. This * is the only chance you get to register icons. */ public void registerIcons(IconRegister par1IconRegister) { this.Dirt_2 = par1IconRegister.registerIcon(this.getTextureName() + "Side of Grass (Dirt_2)"); this.Dirt_1 = par1IconRegister.registerIcon(this.getTextureName() + "Top of Grass (Dirt_1)"); this.Dirt_3 = par1IconRegister.registerIcon("Bottom of Grass (Dirt_3)"); } @SideOnly(Side.CLIENT) /** * A randomly called display update to be able to add particles or other items for display */ public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) { super.randomDisplayTick(par1World, par2, par3, par4, par5Random); if (par5Random.nextInt(10) == 0) { par1World.spawnParticle("townaura", (double)((float)par2 + par5Random.nextFloat()), (double)((float)par3 + 1.1F), (double)((float)par4 + par5Random.nextFloat()), 0.0D, 0.0D, 0.0D); } } }
IPS spam blocked by CleanTalk.