Jump to content

Draco18s

Members
  • Posts

    16559
  • Joined

  • Last visited

  • Days Won

    156

Everything posted by Draco18s

  1. And if that's not enough for you, you can use CompressedStreamTools to read/write NBT data to any file you want.
  2. I still want your original, "failed" code. It looked awesome in its own way.
  3. Send me your code for that now, I want. (More specifically, it's almost exactly like a world generator a bunch of people would like to see in Mystcraft)
  4. So how does making sure the boundingbox is less than 63 make it spawn underground? Whats the bounding box got to do with if it can spawn underground. How does that work The bounding box thing is Mojang code. However, the bounding box minY just so conveniently happens to also bethe mob's posY[/u]. If the mob's posY is less than 63, then it's HIGHLY LIKELY that the mob is underground. What with ground being 63 and up or covered in water (and thus not a valid spawn location).
  5. What's vanilla's ground height? (Hint: it's 63) Also, what else do you have access to? (Hint: the mob's posY)
  6. Huh, my reply this morning apprently didn't go through. setPositionAndUpdate() did the trick, thanks.
  7. You shouldn't need the first one. There's very little reason (if any) to have a global ID.
  8. Hm, I dont think I understand. Why does it use the calender along with Minecrafts Time? To make sure its night? But then how does it check if its underground still Ignore that part and look at the REST of the function. (Oh, and the Calendar is checking to see if the real world date is Halloween)
  9. Yes...it also overrides the function from BiomeGenBase... @SideOnly(Side.CLIENT) /** * Provides the basic grass color based on the biome temperature and rainfall */ public int getBiomeGrassColor() { double d0 = (double)MathHelper.clamp_float(this.getFloatTemperature(), 0.0F, 1.0F); double d1 = (double)MathHelper.clamp_float(this.getFloatRainfall(), 0.0F, 1.0F); return getModdedBiomeGrassColor(ColorizerGrass.getGrassColor(d0, d1)); } @SideOnly(Side.CLIENT) /** * Provides the basic foliage color based on the biome temperature and rainfall */ public int getBiomeFoliageColor() { double d0 = (double)MathHelper.clamp_float(this.getFloatTemperature(), 0.0F, 1.0F); double d1 = (double)MathHelper.clamp_float(this.getFloatRainfall(), 0.0F, 1.0F); return getModdedBiomeFoliageColor(ColorizerFoliage.getFoliageColor(d0, d1)); }
  10. ?!? You shouldn't be override-ing the method at all.
  11. Having a little trouble with this; getting some weird behavior. If I trigger the teleport on the server side only (using Entity#setPosition) the player never moves. If I trigger the teleport on the client only, they end up at the build height (and in an unloaded chunk, at 0,0 because the client doesn't know what the destination should be). If I trigger the teleport on both I get even weirder behavior: First, realize that a map is the item used to determine the destination coordinates (i.e. teleport to map center). On a default zoom map, I get this: If the player is not on the map, teleport works as expected. If the player is on the map, teleport goes to 0,255,0 (in air, due to the loop direction looking for the first block that can see the sky). WTF? Here's the code, on a custom entity: public boolean interact(EntityPlayer player) { ItemStack var1 = player.getCurrentEquippedItem(); if (var1 != null) { if(player.inventory.hasItem(Item.enderPearl.itemID)) { if(var1.itemID == Item.map.itemID) { ItemMap m = (ItemMap)var1.getItem(); MapData d = m.getMapData(var1, worldObj); if(worldObj.provider.dimensionId == d.dimension) { player.inventory.consumeInventoryItem(Item.enderPearl.itemID); int px = d.xCenter; int pz = d.zCenter; System.out.println("Center: " + px + "," + pz);//on server prints map center. on client prints "0,0" int py; for(py = 50; py < 256 && !worldObj.canBlockSeeTheSky(px, py, pz); py++) { ; } player.setPosition(px, py, pz); this.setPosition(px, py, pz); } } } } return false; } Most times the entity itself does not teleport either. It simply ceases to exist as far as I can tell.
  12. Ok, I looked into things. Even though Deserts have a temp greater than 1, when the color is polled, that value is capped at 1: BiomeGenBase line 370 /** * Provides the basic grass color based on the biome temperature and rainfall */ public int getBiomeGrassColor() { double d0 = (double)MathHelper.clamp_float(this.getFloatTemperature(), 0.0F, 1.0F); double d1 = (double)MathHelper.clamp_float(this.getFloatRainfall(), 0.0F, 1.0F); return getModdedBiomeGrassColor(ColorizerGrass.getGrassColor(d0, d1)); } So either, you've overridden this method causing the values to be uncapped, you're your doing something else Bad and passing uncapped values to the grass colorizer.
  13. ERROR: QUESTION NOT ANSWERED. UNABLE TO FORMULATE REPLY. QUITTING PROGRAM. APPLICATION QUIT UNEXPECTEDLY: BAD INPUT.
  14. What humidity value are you trying to use?
  15. I think you need to include the packages when you distribute as well, or indicate that they're required and provide a link to download their compiled versions. I've never used external libraries though, so you'll have to check.
  16. You may be interested in the source for one of my mods: http://www.mediafire.com/download/422x2dlo1co3v2n/phaseblocks-src-164.zip The RedPhaseStone handles transmission of a redstone-like signal in all six directions. It's not as...perfect as redstone at turning off (probably because of an in-build delay), but it was sufficient for my purposes.
  17. EntityLivingBase onEntityUpdate() and handleWaterMovement()
  18. I know I've found what causes drowning and swimming and it's "get the block I'm in. Is its material water? If yes, do X, if not do Y."
  19. You would have to make your fluid use Material.water All entities check for Material.water for water-behavior (drowning, swimming, etc.) (pro-tip: you can't drown in lava)
×
×
  • Create New...

Important Information

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