Jump to content

JohnnyMccurm

Members
  • Posts

    37
  • Joined

  • Last visited

Everything posted by JohnnyMccurm

  1. Okay, here's what I tried to do, I think this code just spawns stuff in the world though, NOT relevant to my block. How do I make it relevant? public void onBlockDestroyedByPlayer(World world, int x, int y, int z, int p_149664_5_) { //l of src world.setBlock(0, 0, -1, ModBlocks.BlockJohnnyBlockRubble); //r of src world.setBlock(0, 0, 1, ModBlocks.BlockJohnnyBlockRubble); //n of src world.setBlock(1, 0, 0, ModBlocks.BlockJohnnyBlockRubble); //s of src world.setBlock(-1, 0, 0, ModBlocks.BlockJohnnyBlockRubble); //se of src world.setBlock(-1, 0, -1, ModBlocks.BlockJohnnyBlockRubble); //ne of src world.setBlock(1, 0, 1, ModBlocks.BlockJohnnyBlockRubble); }
  2. Yep, was lang files, issue solved Now just need to figure out how to spawn these blocks when my other one breaks.
  3. I managed to fix it, the renderer is working and this is the un-textured way my model should look, the problem with that code was that I was doing this: public static final BaseJohnnyBlock johnnyFaceBlockRubble = new BlockJohnnyBlockRubble(); Instead of this public static final BlockJohnnyBlockRubble johnnyFaceBlockRubble = new BlockJohnnyBlockRubble(Material.rock); My texture and name aren't working though now. **UPDATE** Stupid error to do with my renderer not finding the correct path for my image, my fault for putting "model" instead of "models" last error to fix is the name of the item to be placed, don't know how to fix this one.
  4. I have another issue if you feel like helping out. My block is completely invisible. I hear this has something to do with extending the BlockContainer class instead of my BaseBlock But when I do that I get a bunch of errors to do with "material" any idea what I'm doing wrong?
  5. You call yourself an Asshole Draco, but I think you have a heart of gold, thanks. I can't believe I missed that.
  6. Trying to render a Techne Model I get an error in my ClientProxy class that looks like this public class ClientProxy extends CommonProxy { public void registerRenderThings() { //rubble TileEntitySpecialRenderer render = new RendererJohnnyBlockRubble(); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityJohnnyBlockRubble, render); } public void registerTileEntitySpecialRenderer() { } } Error is the first Parameter in "ClientRegistry.bindTileEntitySpecialRenderer" which would be "TileEntityJohnnyBlockRubble" Any idea what I've done wrong? Here's the code for My BlockJohnnyBlockRubble (The block that will eventually be the techne model public class BlockJohnnyBlockRubble extends BaseJohnnyBlock { public BlockJohnnyBlockRubble() { super(); this.setBlockName("johnnyFaceBlockRubble"); this.setStepSound(soundTypeStone); this.setHardness(10.0f); this.setResistance(20.0f); this.setHarvestLevel("pickaxe", 2); } public TileEntity createNewTileEntity(World var1, int var2) { return new TileEntityJohnnyBlockRubble(); } public int getRenderType() { return 100; } public boolean isOpaqueCube() { return false; } public boolean renderAsNormalBlock() { return false; } } The "TileEntityJohnnyBlockRubble" class exists but it doesn't contain any code.
  7. I couldn't find a method that actually worked so I used a BlockEvent.BreakEvent and got the xyz of the source block and was going to use a few x - 1 and y - 1's but yeah, that didn't work, I didn't get far at all and I'd like some assistance if possible.
  8. Could you elaborate a little please? I tried writing a piece of code and it doesn't work.
  9. Hey guys. I wanted to make an addition to my "face" block. When I destroy this "face" block I wanted it to randomly spawn sheets of "rubble" adjacent to itself (With the same thickness as the placeholder snow sheets) How would I achieve this? ALSO If I planned on replacing these " rubble" sheets later with 3D rendered objects, would I need to replace the code?
  10. I need to type in the html formatting/styles myself and I can't click any of the GUI buttons in the editor. I suppose it is just an issue on my end and not a global issue, no big deal.
  11. I am a massive noob when it comes to modding, I only started last week, can you guys provide a practical example? I'd be grateful. And thanks for the help, I appreciate the quick response, this is going to be the core functionality of the mod I seek to create. **Update** @Override public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) { ArrayList<ItemStack> drops = new ArrayList<ItemStack>(); drops.add(new ItemStack(Items.coal, world.rand.nextInt(3) + 1)); drops.add(new ItemStack(Items.iron_ingot, world.rand.nextInt(2) + 1)); if (world.rand.nextFloat() < 0.5F) drops.add(new ItemStack(Items.diamond)); return drops; } Typed this up fast to see if it would work. **Update 2** I'm incredibly surprised that it worked, but it did apparently, just need to play around with the code a little. How would I do this for vanilla blocks then? Pic related, two custom face items I made dropping from a single block and in different quantities
  12. Hey guys I wondered if there was any way to make a Block drop multiple Items and at different quantities when it is destroyed by the user. What I mean by this is, I'd like, for example a Cheese Block that drops: A high chance of Cheese Chunks, (1+ 0-3 per destruction) A moderate chance of Cheese Slices, (0-2) and has a very rare chance to contain a Mouse. (0-1) How would I achieve this with a Custom block OR an Official Minecraft block? I thought about using an if or case construct and I figured they weren't completely random (I preset limited outcomes) and I'd like a better way of achieving this result.
×
×
  • Create New...

Important Information

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