Jump to content

TheRPGAdventurer

Members
  • Posts

    642
  • Joined

  • Last visited

Everything posted by TheRPGAdventurer

  1. how about 1 and 15? or 1 and 10? My idea is to lower it to see if it does spawn.
  2. got any examples, tutorials or exactly tell me how to do it?
  3. I was using this method I found on the Internet yet it still doesn't work public void generateNestUnderground(World world, Random random, int chunkX, int chunkZ, Random rand) { int x = chunkX * 16 + random.nextInt(16); int z = chunkZ * 16 + random.nextInt(16); int xy = x >> 4; int zy = z >> 4; int height = world.getChunkFromChunkCoords(xy, zy).getHeight(new BlockPos(x & 15, 0, z & 15)); int y = height - 1; if(world.getBiomeForCoordsBody(new BlockPos(x,y,z)).getBiomeClass().equals(BiomePlains.class)) { if((random.nextInt(120) + 1) <= 1) { boolean place = true; for(int Y = 0; Y < 30; Y++) { for(int Z = 0; Z < 9; Z++) { for(int X = 0; X < 11; X++) { if(world.getBlockState(new BlockPos(X + x, Y + y + 1, Z + z)).getBlock() != Blocks.AIR) { place = false; } } } } if(place) { dragonNest.generate(world, random, new BlockPos(x,y,z)); } } } } } All throughout the web I had been asking yet I always get the answer "you use ChunkProviderOverWorld" my question is how?
  4. maybe he didn't watch tutorials before starting, just a theory tho.
  5. what class in minecraft do I have to look for examples?
  6. My mob just won't regenerate health unless thrown with potions, how do I make it naturally regenerating health?
  7. dude also where can I find the durability of diamond, I am trying to compare it to my own armor and tools but the problem is, I see the diamond is more durable.
  8. I've already done it thanks btw, I have been using the method before you taught me, I just wondered why it didn't work on registertools.class, laso do you know how to store things in the world?
  9. location of the recipetools.class like net.minecraft.etc?
  10. I need to figure out how shears are crafted but I can't see the class where it is handled.
  11. k but I am confused when you say model the json one or the one in java.
  12. @Override public boolean isShearable(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos) { return (item != null && item.getItem() == ModTools.DiamondShears && !this.isChild()); } @Override public java.util.List<ItemStack> onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune) { java.util.List<ItemStack> ret = new java.util.ArrayList<ItemStack>(); ret.add(new ItemStack(this.getShearDropItem())); this.playSound(SoundEvents.ENTITY_SHEEP_SHEAR, 1.0F, 1.0F); return ret; } } It works now but how do I make it like, shear once wait another time to shear agan not comtinously keep shearing it and shearing items.
  13. Okay now I fixed it's riding and shearing ability without changing the controls.
  14. how abut this one? private boolean getSheared() { return true; } public boolean setSheared(boolean sheared) { return sheared; }
  15. 1. what do you mean give them a purpose? I don't have the data like in the wool blocks of the sheep, some sort of return them to true?
  16. also can you tell me what's wrong with this public boolean setSheared(boolean sheared) { return false; } public boolean getSheared() { return false; } @Override public boolean isShearable(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos) { return !this.getSheared() && !this.isChild(); } @Override public java.util.List<ItemStack> onSheared(ItemStack item, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune) { this.setSheared(true); int i = 1 + this.rand.nextInt(3); java.util.List<ItemStack> ret = new java.util.ArrayList<ItemStack>(); for (int j = 0; j < i; ++j) ret.add(new ItemStack(this.getDropItem(), 1)); this.playSound(SoundEvents.ENTITY_SHEEP_SHEAR, 1.0F, 1.0F); return ret; } } it gives me in the console a FATAL ERROR yet it still drops the item I set to it.
  17. when my dragon is saddled and tamed and right clicked it with a shear I actually ride the dragon, I want to make it in a way that I need to Shift right click or press middle mouse when riding the saddled dragon,
  18. How do I make my mob shift right clicking to ride it, it was conflicting with my shearing method because right clicking to shear and right clicking to ride and I want my mob to be right clicked when riding it,
  19. sorry sir it was delayed; bad typhoon in our country causing slow Internet, I was programming in the middle of the storm, while my family is panicking from lightnings and thunders,
  20. because I don't have the data like the wool block; Edit: delayed
  21. I want to make it shear once and wait another time using this on onSheared method, this.setSheared(true); int i = 1 + this.rand.nextInt(3); without knowing what to put on set Sheared method above and getSheared above, it doesn't work
×
×
  • Create New...

Important Information

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