Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

SantacreeperLP

Members
  • Joined

  • Last visited

Everything posted by SantacreeperLP

  1. package yourpackage; public class item_damagable extends Item{ public String data ="mod"+ ":" + this.getClass().getName(); public item_damagable() { super(); setMaxStackSize(1); setNoRepair(); setMaxDamage(128); //how often is it usable? now 128 this.setUnlocalizedName(data); this.setTextureName(data); this.setCreativeTab(tab); } @SideOnly(Side.CLIENT) public boolean hasEffect(ItemStack par1ItemStack) // the item has a enchanting effect. delete it if you don't want it { return true; } @Override public boolean doesContainerItemLeaveCraftingGrid(ItemStack itemStack) { return false; } @Override public boolean getShareTag() { return true; } public boolean hasContainerItem(ItemStack itemStack) { return true; } @Override public ItemStack getContainerItem(ItemStack itemStack) { ItemStack stack = itemStack.copy(); stack.setItemDamage(stack.getItemDamage() + 1); stack.stackSize = 1; return stack; }
  2. My big question: How to use Codechicken ForgeMultipart with Scala in Eclipse
  3. Hey guys, I want to know Crop like a wheat crop that grows 2 blocks high (6 stages) . Sorry that I post so many things but I'm interested into forge ~Santa
  4. ok, you've right here's my code: public boolean recurseCrops(ItemStack stack, World w, int x, int y, int z, EntityPlayer player) { boolean used = false; for (int i = -rWheat; i <= rWheat; i++) for (int j = -rWheat; j <= rWheat; j++) { int localX = x + i; int localY = y; int localZ = z + j; Block id = w.getBlock(localX, localY, localZ); int meta = w.getBlockMetadata(localX, localY, localZ); Block localBlock; if (localBlock != null && (localBlock instanceof BlockFlower || localBlock instanceof IPlantable)) { if (localBlock.canHarvestBlock(player, meta)) localBlock.harvestBlock(w, player, localX, localY, localZ, meta); w.setBlock(localX, localY, localZ, Blocks.air, 0, 3); used = true; } } if (used) stack.damageItem(1, player); return used; }
  5. Hey guys, I want to know how to make a item that loses durability when using in crafting table ~Santa
  6. package yourpackage; import java.util.Random; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.material.Material; import net.minecraft.block.Block; import net.minecraft.block.BlockCrops; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.IIcon; import net.minecraft.world.World; public class yourcrop extends BlockCrops{ public yourcrop() { super(); } @SideOnly(Side.CLIENT) private IIcon[] field_149869_a; private static final String __OBFID = "CL_00000286"; /** * Gets the block's texture. Args: side, meta */ @SideOnly(Side.CLIENT) public IIcon getIcon(int p_149691_1_, int p_149691_2_) { if (p_149691_2_ < 7) { if (p_149691_2_ == 6) { p_149691_2_ = 5; } return this.field_149869_a[p_149691_2_ >> 1]; } else { return this.field_149869_a[3]; } } protected Item func_149866_i() { return **DROP always** } protected Item func_149865_P() { return **DROP if full grown** } /** * Drops the block items with a specified chance of dropping the specified items */ public void dropBlockAsItemWithChance(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_) { super.dropBlockAsItemWithChance(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, p_149690_7_); if (!p_149690_1_.isRemote) { if (p_149690_5_ >= 7 && p_149690_1_.rand.nextInt(50) == 0) { this.dropBlockAsItem(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, new ItemStack(Items.string)); } } } @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister p_149651_1_) { this.field_149869_a = new IIcon[4]; for (int i = 0; i < this.field_149869_a.length; ++i) { int stage = 0; if(i==0) { stage = 0; } if(i==1) { stage = 1; } if(i==2) { stage = 2; } if(i==3) { stage = 3; } } this.field_149869_a = p_149651_1_.registerIcon("yourtexturefile" + "_" + stage); } } }
  7. I know this, but blockList isn't there anymore.
  8. Hey I'm updating my mod to 1.7.2 and I've get an error: Block localBlock = Block.blocksList[id]; But how can I write it in 1.7.2? Can you give me an short example? ~Santa
  9. Hey guys, the Redpower 2 season is over. But I want to write a mod like Redpower 2 but a little bit other , not 100%. I search people that can code Minecraft Mods good and people that want to help me. If you're interested, write an answer. PS: I've already finished something but Redpower World, but I need help. For one person, thats too much . ~Santa
  10. how can I deobfuscate it? Can you give me a instruction? I will use it for my own only.
  11. Hey people, I want to know if it's possible to write a mod or a modloader that can load mods for older versions like RedPower in a newer Minecraft version. I know that there isn't something like that , but is it possible or not? Please answer me . I would be happy ~Santa
  12. Hey, You've got a 'thank you' but how can I generate it outside of the chunk? There must be a way because the pyramids are bigger than 16x16 blocks. Best regards, ~Santa
  13. Here is the source code of BlockDarkStoneGen package com.Santa.betterundergroundmod; protected int meta; protected int veinSize; protected Block block; public BlockDarkStoneGen(Block block, int meta, int veinSize) { this.block = block; this.meta = meta; this.veinSize = veinSize; } public void swapStoneBlock(World world, Random random, int x, int y, int z) { if (world.getBlock(x, y, z) == Blocks.stone) world.setBlock(x, y, z, block, meta, 2); } @Override public boolean generate(World world, Random random, int x, int y, int z) { float f = (float) (random.nextFloat() * Math.PI); double d0 = x + 8 + MathHelper.sin(f) * this.veinSize / 8.0F; double d1 = x + 8 - MathHelper.sin(f) * this.veinSize / 8.0F; double d2 = z + 8 + MathHelper.cos(f) * this.veinSize / 8.0F; double d3 = z + 8 - MathHelper.cos(f) * this.veinSize / 8.0F; double d4 = y + random.nextInt(3) - 2; double d5 = y + random.nextInt(3) - 2; for (int l = 0; l <= this.veinSize; l++) { double d6 = d0 + (d1 - d0) * l / this.veinSize; double d7 = d4 + (d5 - d4) * l / this.veinSize; double d8 = d2 + (d3 - d2) * l / this.veinSize; double d9 = random.nextDouble() * this.veinSize / 16.0D; double d10 = (MathHelper.sin(l * 3.141593F / this.veinSize) + 1.0F) * d9 + 1.0D; double d11 = (MathHelper.sin(l * 3.141593F / this.veinSize) + 1.0F) * d9 + 1.0D; int i1 = MathHelper.floor_double(d6 - d10 / 2.0D); int j1 = MathHelper.floor_double(d7 - d11 / 2.0D); int k1 = MathHelper.floor_double(d8 - d10 / 2.0D); int l1 = MathHelper.floor_double(d6 + d10 / 2.0D); int i2 = MathHelper.floor_double(d7 + d11 / 2.0D); int j2 = MathHelper.floor_double(d8 + d10 / 2.0D); for (int k2 = i1; k2 <= l1; k2++) { double d12 = (k2 + 0.5D - d6) / (d10 / 2.0D); if (d12 * d12 < 1.0D) for (int l2 = j1; l2 <= i2; l2++) { double d13 = (l2 + 0.5D - d7) / (d11 / 2.0D); if (d12 * d12 + d13 * d13 < 1.0D) for (int i3 = k1; i3 <= j2; i3++) { double d14 = (i3 + 0.5D - d8) / (d10 / 2.0D); if (d12 * d12 + d13 * d13 + d14 * d14 < 1.0D) swapStoneBlock(world, random, k2, l2, i3); } } } } return true; } protected static class Evaluation { final int x, y, z; int sides; public Evaluation(int x, int y, int z, int sides) { this.x = x; this.y = y; this.z = z; this.sides = sides; } public void evaluateSide() { sides--; } @Override public boolean equals(Object o) { if (o instanceof Evaluation) { Evaluation e = (Evaluation) o; return x == e.x && y == e.y && z == e.z && sides == e.sides; } return false; } } } and here is the crash report: Location: World: (41744,20,-1347), Chunk: (at 0,1,13 in 2609,-85; contains blocks 41744,0,-1360 to 41759,255,-1345), Region: (81,-3; contains chunks 2592,-96 to 2623,-65, blocks 41472,0,-1536 to 41983,255,-1025) -- Requested block coordinates -- Details: Found chunk: true Location: World: (41472,0,-1344), Chunk: (at 0,0,0 in 2592,-84; contains blocks 41472,0,-1344 to 41487,255,-1329), Region: (81,-3; contains chunks 2592,-96 to 2623,-65, blocks 41472,0,-1536 to 41983,255,-1025) -- Requested block coordinates -- Details: Found chunk: true Location: World: (41392,46,-1666), Chunk: (at 0,2,14 in 2587,-105; contains blocks 41392,0,-1680 to 41407,255,-1665), Region: (80,-4; contains chunks 2560,-128 to 2591,-97, blocks 40960,0,-2048 to 41471,255,-1537) -- Requested block coordinates -- Details: Found chunk: true Location: World: (41200,37,-1536), Chunk: (at 0,2,0 in 2575,-96; contains blocks 41200,0,-1536 to 41215,255,-1521), Region: (80,-3; contains chunks 2560,-96 to 2591,-65, blocks 40960,0,-1536 to 41471,255,-1025) -- Requested block coordinates -- Details: Found chunk: true Location: World: (41056,0,-1792), Chunk: (at 0,0,0 in 2566,-112; contains blocks 41056,0,-1792 to 41071,255,-1777), Region: (80,-4; contains chunks 2560,-128 to 2591,-97, blocks 40960,0,-2048 to 41471,255,-1537) There isn't more information. Hope you can help me
  14. Hey guys, I've created a worldgen. That works fine: new BlockDarkStoneGen(BlockDarkStone,0, random.nextInt(16)).generate(world, random, x, y, z); But If I change the nextInt >16 ,Minecraft crashs If I want to create a new world. Can anybody help me
  15. Hey, Does somebody knows how to code a custom crop that grows two blocks high. It should be like a potatoe crop and should drop the seeds and the fruits if it is destroyed. Can somebody help me? Best regards, ~Santa
  16. Hey guys, my code is : { EntityPlayer player; if (entity instanceof EntityPlayer) player = (EntityPlayer) entity; else return false; //Block b = Block.blocksList[blockID]; if (b != null) { if (b.isLeaves(world, x, y, z)) return recurseLeaves(stack, world, x, y, z, player); if (b instanceof BlockFlower) return recurseCrops(stack, world, x, y, z, player); } return super.onBlockDestroyed(stack, world, Block, x, y, z, entity); } How I have to write the code in 1.7.2 ? I've edited some stuff already, but there is a problem with the BlackList. I heared that is renamed BlockRegistry. But how I've to do it? Please help me with a little code example Best regards, SantacreeperLP
  17. I don't know why, but it doesn't work . When I place the block and skeletons there, they don't die. What value I have to set (this.worldObj.rand.nextInt(5) if I want that the block kills the mobs every second?
  18. And what about a tile entity? It works with random tick but its very slow. Are you so nice and give me an example?
  19. thank you very much
  20. the second sounds good. But how can I do it? Do u have an idea?
  21. Hey people, how can I make that a block kills all mobs in a radius of x blocks? Please answer me
  22. Hello Minecraft Forge Community, I've made a Chest & Workbench GUI. I don't know how to make a TileEntity and a GUI for this idea. There should be: A Crafting Table and 2x9 Chest as you can at the bottom of this topic in one GUI. Can anybody help me? I would be very glad because I'm not good at TileEntities and in English because I'm from Germany. ~SantacreeperLP OOO OOO => O (Crafting Table OOO OOOOOOOOO OOOOOOOOO (Chest) [Forge 1.7.2]TileEntity and GUI to custom GUI.png
  23. I've coded an multi-textured-block in 1.7.2 , but it doesn't work . Here is the code: package DETheLegendOfGaming.RedPow0rReloaded; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; import net.minecraft.block.BlockLog; import net.minecraft.block.BlockRotatedPillar; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; public class blockRubberWood extends BlockRotatedPillar { @SideOnly(Side.CLIENT) protected IIcon[] blockRubberWood_top; @SideOnly(Side.CLIENT) protected IIcon[] blockRubberWood_side; private static final String __OBFID = "CL_00000266"; public blockRubberWood(Material p_i45394_1_) { super(p_i45394_1_); // TODO Auto-generated constructor stub this.setCreativeTab(DETheLegendOfGaming.RedPow0rReloaded.RedPow0rReloadedMain.tabProjectRedAddon); this.setHardness(2.0F); this.setStepSound(soundTypeWood); this.setBlockTextureName(DETheLegendOfGaming.RedPow0rReloaded.RedPow0rReloadedMain.MODID + ":" + "IIconRubberWood_up"); } @SideOnly(Side.CLIENT) public static IIcon topIcon; @SideOnly(Side.CLIENT) public static IIcon bottomIcon; @SideOnly(Side.CLIENT) public static IIcon sideIcon; public int getRenderType() { return 31; } @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister icon) { topIcon = icon.registerIcon(DETheLegendOfGaming.RedPow0rReloaded.RedPow0rReloadedMain.MODID + ":" + "IIconRubberWood" + "_up"); bottomIcon = icon.registerIcon(DETheLegendOfGaming.RedPow0rReloaded.RedPow0rReloadedMain.MODID + ":" + "IIconRubberWood" + "_up"); sideIcon = icon.registerIcon(DETheLegendOfGaming.RedPow0rReloaded.RedPow0rReloadedMain.MODID + ":" + "IIconRubberWood" + "_side"); } public static void init() { } @Override public boolean canSustainLeaves(IBlockAccess world, int x, int y, int z) { return true; } @Override public boolean isWood(IBlockAccess world, int x, int y, int z) { return true; } @Override public IIcon getSideIcon(int var1) { // TODO Auto-generated method stub return sideIcon; } public IIcon getTopIcon(int var1) { // TODO Auto-generated method stub return topIcon; } public IIcon getBottomIcon(int var1) { // TODO Auto-generated method stub return bottomIcon; } }

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.