Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Born2Code

Members
  • Posts

    57
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Born2Code's Achievements

Stone Miner

Stone Miner (3/8)

1

Reputation

  1. Override this method below to do whatever you want when the entity is attacked. The way the wolf does it for making it attack the player, (I'm assuming you want it to keep attacking after it's hit rather than hit for it) is using data watchers. Method to override... /** * Called when the entity is attacked. */ public boolean attackEntityFrom(DamageSource source, float amount) { if (entity != null && entity instanceof EntityPlayer) { //do stuff here } return super.attackEntityFrom(source, amount); } }
  2. Okay. As for the problem of not properly consuming the item, is that part is outside of the if(!world.isRemote) checker. As for the entity you might not have registered the entity properly (or at all), or maybe the applied the rendering wrong and it is spawning.
  3. Finally, got it solved. Updating OP for anyone else that has the problem.
  4. The material. Block block = (new Block(Material.rock)).setHardness(2.0F).setResistance(10.0F).setStepSound(soundTypePiston).setUnlocalizedName("stonebrick").setCreativeTab(CreativeTabs.tabBlock); public BlockPlanks() { super(Material.wood); }
  5. 1. You should post the full code, not just a method. 2. Post the crash report together. All I need, is an empty dimension, with one structure generated inside, that way when teleported there (working), I am teleported into that structure.
  6. Generating a cube of air and my structure inside forever was just a quick though, I would prefer the OP answered instead. ChunkProvider
  7. He figured out why it kept disappearing haha, his only problem now is he's using a vanilla renderer, that automatically uses it's own entity.
  8. Here.. public void func_180520_a(int p_180520_1_, int p_180520_2_, ChunkPrimer primer) { for(int x = 0; x < 100; x++) { for(int z = 0; z < 100; z++) { primer.setBlockState(x, 100, z, Blocks.air.getDefaultState()); } } primer.setBlockState(0, 100, 0, Blocks.end_stone.getDefaultState()); }
  9. If it's easier, I could also just have it generate a cube of air and then build the structure inside. But I also couldn't get that working, as I keep getting index out of bound errors.
  10. Well of course it's not rendering anything. public void doRender(EntityEnderCrystal entity, double x, double y, double z, float p_76986_8_, float partialTicks) { -snip- } The default renderer uses it's own entity (which I thing is true with all vanilla renderers), so you need to make your own renderer, which can do everything the same, except use your own entities and such
  11. Oh, yes, sorry. Forgot to include that in last post It doesn't work, it just doesn't add anything, but... I did another test, I had a counter variable, that increased every time that method was called and was printed out. When I first entered my dimension it was being increased without stopping until a certain point.. then it only increased as a moved towards un-generates terrain.
  12. Don't think it would work. I added a dummy variable to hold whether or not it's been built and based on that add the block. private boolean built = false; if(built == false) { addblockstuffhere built = true; }
  13. SOLVED ---------- Problem: I had a block where when you bump into it, it takes you inside of it, I added a new dimension for this but couldn't figure out how to generate the interior only once in the dimension. Solution: In whatever your teleporting method is, either an item, colliding with block, etc... whereever you change the player's dimension is where you need to do the generation. Just use entity.getEntityWorld() to get the world, AFTER you change dimensions, then you will have the "dimension's world". Then use that world to do all of the structure creation.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.