
joaogl
Members-
Posts
17 -
Joined
-
Last visited
Converted
-
Gender
Undisclosed
-
Personal Text
I am new!
joaogl's Achievements

Tree Puncher (2/8)
0
Reputation
-
Ok I'm trying to make a proper build.xml but I cant even find the build.properties on his github... as well as the <property file="build_number.properties" prefix="build_number"/>
-
I have no idea what is pahimar's workspace.... I have a normal project on eclipse and I just added Minecraft souce as projects on Java Build Path.... How can I make a proper build.xml?
-
Hello, I use a different workspace to make my mods, where should and what should I put in the mcp folder to be able to recompile?
-
That is the problem I have 4 diferent textures for each side.... Top and Bot is one Sides Front and Back but dont know why in the inventory is only rendering the bot and top and sides....
-
I dont know the metadata for inventory.... Is there any way to check if the block is on inventory or if it is placed?
-
I've done it bug it only worked half... the block rended the top and the sides... there's no front being rended... why? Render code: public Icon getIcon(int par1, int par2) { if (par1 == 1 || par1 == 0) return this.iconTopBot; else { if (par1 == 2) { if (par2 == 2) return this.iconFront; else if (par2 == 3) return this.iconBack; else return this.blockIcon; } else if (par1 == 3) { if (par2 == 3) return this.iconFront; else if (par2 == 2) return this.iconBack; else return this.blockIcon; } else if (par1 == 4) { if (par2 == 4) return this.iconFront; else if (par2 == 5) return this.iconBack; else return this.blockIcon; } else if (par1 == 5) { if (par2 == 5) return this.iconFront; else if (par2 == 4) return this.iconBack; else return this.blockIcon; } } return this.blockIcon; }
-
So how can I do this? I need to use the getBlockTexture(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) so I can have the block facing me...
-
Hello, I've created a block but the texture of it and the texture that shows up on the hotbar or toolbar(dont know the name) its not the same... How can I change that? block code: public class BlockPolluCraft extends Block { @SideOnly(Side.CLIENT) private Icon iconTopBot; @SideOnly(Side.CLIENT) private Icon iconFront; @SideOnly(Side.CLIENT) private Icon iconBack; public BlockPolluCraft(int par1, Material material) { super(par1, material); this.setHardness(2F); this.setStepSound(Block.soundMetalFootstep); this.setCreativeTab(Hygienic.hygienicCreativeTab); } public int idDropped(int par1, Random par2Random, int par3) { return BlockIDs.BLOCK_POLLUCRAFT; } public int quantityDropped(Random par1Random) { return 1; } @SideOnly(Side.CLIENT) public Icon getBlockTexture(IBlockAccess par1IBlockAccess, int par2, int par3, int par4, int par5) { if (par5 == 1 || par5 == 0) return this.iconTopBot; else { int par6 = par1IBlockAccess.getBlockMetadata(par2, par3, par4); if (par5 == 2) { if (par6 == 2) return this.iconFront; else if (par6 == 3) return this.iconBack; else return this.blockIcon; } else if (par5 == 3) { if (par6 == 3) return this.iconFront; else if (par6 == 2) return this.iconBack; else return this.blockIcon; } else if (par5 == 4) { if (par6 == 4) return this.iconFront; else if (par6 == 5) return this.iconBack; else return this.blockIcon; } else if (par5 == 5) { if (par6 == 5) return this.iconFront; else if (par6 == 4) return this.iconBack; else return this.blockIcon; } } return this.blockIcon; } public void onBlockAdded(World par1World, int par2, int par3, int par4) { super.onBlockAdded(par1World, par2, par3, par4); this.setDefaultDirection(par1World, par2, par3, par4); } private void setDefaultDirection(World par1World, int par2, int par3, int par4) { if (!par1World.isRemote) { int l = par1World.getBlockId(par2, par3, par4 - 1); int i1 = par1World.getBlockId(par2, par3, par4 + 1); int j1 = par1World.getBlockId(par2 - 1, par3, par4); int k1 = par1World.getBlockId(par2 + 1, par3, par4); byte b0 = 3; if (Block.opaqueCubeLookup[l] && !Block.opaqueCubeLookup[i1]) b0 = 3; if (Block.opaqueCubeLookup[i1] && !Block.opaqueCubeLookup[l]) b0 = 2; if (Block.opaqueCubeLookup[j1] && !Block.opaqueCubeLookup[k1]) b0 = 5; if (Block.opaqueCubeLookup[k1] && !Block.opaqueCubeLookup[j1]) b0 = 4; par1World.setBlockMetadataWithNotify(par2, par3, par4, b0, 2); } } public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLiving par5EntityLiving, ItemStack par6ItemStack) { int l = MathHelper.floor_double((double) (par5EntityLiving.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; if (l == 0) par1World.setBlockMetadataWithNotify(par2, par3, par4, 2, 2); if (l == 1) par1World.setBlockMetadataWithNotify(par2, par3, par4, 5, 2); if (l == 2) par1World.setBlockMetadataWithNotify(par2, par3, par4, 3, 2); if (l == 3) par1World.setBlockMetadataWithNotify(par2, par3, par4, 4, 2); if (par6ItemStack.hasDisplayName()) ((TileEntityFurnace) par1World.getBlockTileEntity(par2, par3, par4)).func_94129_a(par6ItemStack.getDisplayName()); } @SideOnly(Side.CLIENT) public void registerIcons(IconRegister par1IconRegister) { this.blockIcon = par1IconRegister.registerIcon(ModInfo.polluCraft_Sides); this.iconTopBot = par1IconRegister.registerIcon(ModInfo.polluCraft_TopBot); this.iconFront = par1IconRegister.registerIcon(ModInfo.polluCraft_Front); this.iconBack = par1IconRegister.registerIcon(ModInfo.polluCraft_Back); } @SideOnly(Side.CLIENT) public boolean onBlockActivated(World var1, int var2, int var3, int var4, EntityPlayer player, int var6, float var7, float var8, float var9) { if (!player.isSneaking()) { player.openGui(Hygienic.instance, 1, var1, var2, var3, var4); return true; } else return false; } }
-
Hello, First how can I create like a listener to check the block where the player is standing on? Second how can I make (example) if the player health is between 0 and 5 the player starts dropping the item that he has in his hands? Thanks, Joao Lourenco.
-
Hello, How can we draw a new bar just like the health?
-
Hello, I have no clues about what is needed to run the mod in a server... how can I do it? I already have the port 25565 open but I'm sure I have to add some code in my mod... and because I'm running the mod in eclipse how can I add the server too?
-
How to create a breakable block only with one tool.
joaogl replied to joaogl's topic in Modder Support
Ok, I got it to work thanks a lot -
How to create a breakable block only with one tool.
joaogl replied to joaogl's topic in Modder Support
I've added the: MinecraftForge.setBlockHarvestLevel(myBlock, "myshovel", 2); on the init and added the: public static final Block[] blocksEffectiveAgainst = new Block[] { MyMod.myBlock}; public myBlock(int par1, EnumToolMaterial par2EnumToolMaterial, String texture) { super(par1, 2, par2EnumToolMaterial, blocksEffectiveAgainst); this.texture = texture; this.toolMaterial = par2EnumToolMaterial; this.maxStackSize = 1; } on the block class what else I should do? I cant apply the canHarvestBlock code in the block class because I dont have the player entity.... -
How to create a breakable block only with one tool.
joaogl replied to joaogl's topic in Modder Support
And how can I do that? I really dont know.