Jump to content

RegalBlaze

Members
  • Posts

    21
  • Joined

  • Last visited

Everything posted by RegalBlaze

  1. Hi all, So I've made a new block called roof. I followed the forge tutorials to set up the block's TileEntity and custom Renderer . I tested placing the block when it had just the block and tileentity classes and everything was fine. After making the custom renderer ,however, the block turned invisble showing just the collision lines. Which of the following classes should I check for the problem? Roof, TileEntityRoof, RenderRoof, ModelRoof, clientproxy, commonproxy or the main mod file? I can post the codes but it's so much that it would be really nice if it could be fixed without it. Thnx, RegalBlaze
  2. I see that i have 2 extra methods in my render method 1 doRenderLiving 2 doRender.I don't really know what it does. I just copied rendercow and replaced all the names. My suggestion is you try that too
  3. Works like a charm, thank you very much
  4. I've added it but still the same error... For good measure, here's my code SaltBlock: package mods.aom.common; import java.util.Random; 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.item.Item; public class BlockSalt extends Block { public BlockSalt(int ID, Material material) { super(ID, material); this.setCreativeTab(CreativeTabs.tabBlock); } public void registerIcons(IconRegister iconreg){ this.blockIcon = iconreg.registerIcon("aom:SaltBlock"); } public int idDropped(int par1, Random par2Random, int par3) { return Aom.SaltID; } public int quantityDropped(Random par1Random) { return 4 + par1Random.nextInt(5); } } SaltItem: package mods.aom.common; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; public class ItemSalt extends Item { public ItemSalt(int par1) { super(par1); this.setCreativeTab(CreativeTabs.tabMaterials); } public void updateIcons(IconRegister iconregister){ this.iconIndex = iconregister.registerIcon("aom:Salt"); } }
  5. Hi guys, This is probably very easy to fix but i don't know what is wrong.. I made a block of salt. When mined this block should drop 4 salt items. Think of redstone dropping redstone dust. I use the idDropped(){} code which used to work just fine, but now when it needs to drop an item nothing happens. I tried to let it drop blocks and it works just fine but when it should drop an item i get the following error: Attempted to add a EntityItem to the world with a invalid item: ID 601 at (-787,39, 4,68, 1122,23), this is most likely a config issue between you and the server. Please double check your configs What should i do?
  6. The zombies pick up stuff from the ground with 1 very short boolean line: canPickUpLoot I wanted to make my mob pick up specific stuff from the ground but couldn't figure out how using that code, so i think you would have to write something of your own.
  7. in techne click export as> java then just make the modelclass and copy the stuff from the java file into it.
  8. I have the same problem, i made a new block model in techne but don't know how to make my block use it. I studied the other not-square blocks in minecraft like the stairs for example and i figured out that they have 2 methods to change the block. #1 public boolean renderAsNormalBlock() { return false; } #2 public int getRenderType() { return 10; } In this, the number 10 represents case 10 from getRenderType which renders the stairs. But i don't know how the last step of actually declaring what it looks like is performed. I think somehow method #2 has to be replaced with the model.java or something but i have no clue...
  9. Could you maybe explain a little more how your mod checks for the pattern? I want to make my mod recognize an entire house and give it a health and it sounds like your approach might be able to help me with that.
  10. that was the best thing I've ever seen someone link to. lol He's right though, just make the model in techne, copy the shoot stuffs from skeleton and then change as you like
  11. Here's some of my code, this one spawns my custom mob when i place a block. I don't know how to make a mob spawn in the way that cows or sheep do but there are plenty tutorials for that on youtube. public int onBlockPlaced(World world, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9) { if (!world.isRemote){ EntityCitizen entitycitizen = new EntityCitizen(world); entitycitizen.setPosition( par2 +2, par3, par4); { world.spawnEntityInWorld(entitycitizen); } } return par9; }
  12. So i'm working on my mod and i want my mob to break certain blocks and then drop the block. I thought of the code for zombies breaking doors but that is like 100% magic to me. Does anyone know an easy way to make my mob do this? -RegalBlaze
  13. I'm a noob too so i can't just give you the code unfortunately. But i think you should try it like this: onBlockAdded{ if( flower on ceiling code){ set texture for upside down flower code } } Or else maybe an if statement in the getBlockTextureFromSideAndMetadata code Sorry i can't be of too much help but i hope i've given you something
  14. well you could just make a custom block texture for the flower and let him use that texture if the flower is placed on the ceiling
  15. I believe if you let your modeldeer extend modelquadruped it does it automatically. When i tried this, I did encounter that my mob suddenly had 8 legs, 4 moving ones and 4 stationary ones... Don't know how to fix this yet but maybe you can figure it out.
  16. else you can check some of the code in entityzombie.. de part where you give it a golden apple and it converts to a villager
  17. Yeah i did. it gave me an error and asked me to create it, so i did. I have no errors now but it doesn't do what i want...
  18. Thank you so much! The part of attracting the mob works like a charm Only the spawn and kill on collision doesnt work. The mob just stands still on the block like an idiot I tried to fix it myself but i'm not quite sure what these if statements exactly mean. if (this.movedEntity != null) if (par5Entity.entityId == this.movedEntity.entityId) { if (par5Entity instanceof EntityLiving) {
  19. Hi guys, I'm trying to make my own mod but im not very experienced in java and some things are simply nowhere to find . In my mod i want to have a block and upon placement this block attracts one mob and changes it to another. For example, when the block is placed, it sends the nearest zombie to it, kills it and spawns a skeleton. Does anyone know how to make the mob go towards my block?
×
×
  • Create New...

Important Information

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