From d7bfeb8cdac6fca0e05a1c02b5a18ac295956f86 Mon Sep 17 00:00:00 2001 From: Matt Caughey Date: Sat, 11 May 2013 07:25:43 -0400 Subject: [PATCH] Tweaked clouds. Lowered the amount of Amethyst Ore generated per chunk in the Promised Land. --- .../biomesoplenty/blocks/BlockCloud.java | 23 ++++++++++++++++++ .../world/ChunkProviderPromised.java | 2 +- .../BiomesOPlenty/textures/blocks/cloud.png | Bin 173 -> 302 bytes 3 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/minecraft/biomesoplenty/blocks/BlockCloud.java b/src/minecraft/biomesoplenty/blocks/BlockCloud.java index 6385c1075..bdf7273d7 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockCloud.java +++ b/src/minecraft/biomesoplenty/blocks/BlockCloud.java @@ -3,6 +3,9 @@ package biomesoplenty.blocks; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; +import net.minecraft.entity.Entity; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.world.World; import net.minecraft.world.IBlockAccess; import biomesoplenty.BiomesOPlenty; import cpw.mods.fml.relauncher.Side; @@ -22,6 +25,26 @@ public class BlockCloud extends Block this.blockIcon = par1IconRegister.registerIcon("BiomesOPlenty:cloud"); } + + /** + * Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been + * cleared to be reused) + */ + public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) + { + float var5 = 0.125F; + return AxisAlignedBB.getAABBPool().getAABB((double)par2, (double)par3, (double)par4, (double)(par2 + 1), (double)((float)(par3 + 1) - var5), (double)(par4 + 1)); + } + + /** + * Triggered whenever an entity collides with this block (enters into the block). Args: world, x, y, z, entity + */ + public void onEntityCollidedWithBlock(World par1World, int par2, int par3, int par4, Entity par5Entity) + { + par5Entity.motionX *= 0.8D; + par5Entity.motionZ *= 0.8D; + } + @Override @SideOnly(Side.CLIENT) diff --git a/src/minecraft/biomesoplenty/world/ChunkProviderPromised.java b/src/minecraft/biomesoplenty/world/ChunkProviderPromised.java index c562d28f4..fc363b390 100644 --- a/src/minecraft/biomesoplenty/world/ChunkProviderPromised.java +++ b/src/minecraft/biomesoplenty/world/ChunkProviderPromised.java @@ -503,7 +503,7 @@ public class ChunkProviderPromised implements IChunkProvider int var5 = par3 * 16; BiomeGenBase var6 = this.endWorld.getBiomeGenForCoords(var4 + 16, var5 + 16); - for (int a = 0; a < 100; ++a) + for (int a = 0; a < 25; ++a) { int x = var4 + endWorld.rand.nextInt(16); int y = endWorld.rand.nextInt(30) + 30; diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/cloud.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/cloud.png index 991e15c6a3dd342e2b3478d7ff3c2dfa990c9158..e1502f5ed7fd2d552cef36f0c9b903e221943a4d 100644 GIT binary patch delta 216 zcmV;}04M*g0j>g&B#|)~3cvsW4!{9w)`kh>GZx^prwCn`#F9cEzQJIr`Ie?`hfH%&tsPZ!4!3;*OF|NqxB mt5#fT2xN8ul8Ffi{