diff --git a/src/minecraft/biomesoplenty/ClientProxy.java b/src/minecraft/biomesoplenty/ClientProxy.java index cc3330f6a..4b684f66e 100644 --- a/src/minecraft/biomesoplenty/ClientProxy.java +++ b/src/minecraft/biomesoplenty/ClientProxy.java @@ -19,11 +19,11 @@ import biomesoplenty.blocks.renderers.FoliageRenderer; import biomesoplenty.blocks.renderers.PlantsRenderer; import biomesoplenty.blocks.renderers.RenderUtils; import biomesoplenty.blocks.renderers.SmallBlockRenderer; +import biomesoplenty.entities.EntityGlob; +import biomesoplenty.entities.RenderGlob; import biomesoplenty.items.projectiles.EntityDart; import biomesoplenty.items.projectiles.EntityMudball; import biomesoplenty.items.projectiles.RenderDart; -import biomesoplenty.mobs.EntityGlob; -import biomesoplenty.mobs.RenderGlob; import biomesoplenty.particles.EntityDandelionFX; import biomesoplenty.particles.EntitySteamFX; import cpw.mods.fml.client.registry.RenderingRegistry; diff --git a/src/minecraft/biomesoplenty/api/Entities.java b/src/minecraft/biomesoplenty/api/Entities.java index a39cb146a..cbc9c41e6 100644 --- a/src/minecraft/biomesoplenty/api/Entities.java +++ b/src/minecraft/biomesoplenty/api/Entities.java @@ -4,9 +4,9 @@ public class Entities { public static Class Mudball = getClass("biomesoplenty.items.projectiles.EntityMudball"); public static Class Dart = getClass("biomesoplenty.items.projectiles.EntityDart"); - public static Class JungleSpider = getClass("biomesoplenty.mobs.EntityJungleSpider"); - public static Class Rosester = getClass("biomesoplenty.mobs.EntityRosester"); - public static Class Glob = getClass("biomesoplenty.mobs.EntityGlob"); + public static Class JungleSpider = getClass("biomesoplenty.entities.EntityJungleSpider"); + public static Class Rosester = getClass("biomesoplenty.entities.EntityRosester"); + public static Class Glob = getClass("biomesoplenty.entities.EntityGlob"); public static Class getClass(String inputstring) { diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenGarden.java b/src/minecraft/biomesoplenty/biomes/BiomeGenGarden.java index 2cd037362..30c509bf9 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeGenGarden.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenGarden.java @@ -8,10 +8,10 @@ import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.SpawnListEntry; import net.minecraft.world.gen.feature.WorldGenTallGrass; import net.minecraft.world.gen.feature.WorldGenerator; -import biomesoplenty.mobs.EntityRosester; import biomesoplenty.worldgen.WorldGenGiantFlowerRed; import biomesoplenty.worldgen.WorldGenGiantFlowerYellow; import biomesoplenty.api.Blocks; +import biomesoplenty.entities.EntityRosester; public class BiomeGenGarden extends BiomeGenBase { diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenJungleNew.java b/src/minecraft/biomesoplenty/biomes/BiomeGenJungleNew.java index 6a785471c..bfd579ebc 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeGenJungleNew.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenJungleNew.java @@ -14,8 +14,8 @@ import net.minecraft.world.gen.feature.WorldGenTallGrass; import net.minecraft.world.gen.feature.WorldGenTrees; import net.minecraft.world.gen.feature.WorldGenVines; import net.minecraft.world.gen.feature.WorldGenerator; -import biomesoplenty.mobs.EntityJungleSpider; import biomesoplenty.api.Blocks; +import biomesoplenty.entities.EntityJungleSpider; public class BiomeGenJungleNew extends BiomeGenBase { diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenRainforest.java b/src/minecraft/biomesoplenty/biomes/BiomeGenRainforest.java index 165a993c7..840d03a5f 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeGenRainforest.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenRainforest.java @@ -9,9 +9,9 @@ import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.SpawnListEntry; import net.minecraft.world.gen.feature.WorldGenTallGrass; import net.minecraft.world.gen.feature.WorldGenerator; -import biomesoplenty.mobs.EntityJungleSpider; import biomesoplenty.worldgen.WorldGenRainforestTree1; import biomesoplenty.api.Blocks; +import biomesoplenty.entities.EntityJungleSpider; public class BiomeGenRainforest extends BiomeGenBase { diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenSacredSprings.java b/src/minecraft/biomesoplenty/biomes/BiomeGenSacredSprings.java index 5ce5f7c94..8295c490f 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeGenSacredSprings.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenSacredSprings.java @@ -10,7 +10,7 @@ import net.minecraft.world.biome.SpawnListEntry; import net.minecraft.world.gen.feature.WorldGenShrub; import net.minecraft.world.gen.feature.WorldGenerator; import biomesoplenty.configuration.BOPConfiguration; -import biomesoplenty.mobs.EntityJungleSpider; +import biomesoplenty.entities.EntityJungleSpider; import biomesoplenty.api.Blocks; public class BiomeGenSacredSprings extends BiomeGenBase diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenTropicalRainforest.java b/src/minecraft/biomesoplenty/biomes/BiomeGenTropicalRainforest.java index 766812919..1345ae6b5 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeGenTropicalRainforest.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenTropicalRainforest.java @@ -10,7 +10,7 @@ import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.SpawnListEntry; import net.minecraft.world.gen.feature.WorldGenerator; import biomesoplenty.configuration.BOPConfiguration; -import biomesoplenty.mobs.EntityJungleSpider; +import biomesoplenty.entities.EntityJungleSpider; import biomesoplenty.worldgen.WorldGenRainforest1; import biomesoplenty.worldgen.WorldGenRainforest2; import biomesoplenty.api.Blocks; diff --git a/src/minecraft/biomesoplenty/biomes/BiomeGenTropics.java b/src/minecraft/biomesoplenty/biomes/BiomeGenTropics.java index 54585e66d..7938d8d26 100644 --- a/src/minecraft/biomesoplenty/biomes/BiomeGenTropics.java +++ b/src/minecraft/biomesoplenty/biomes/BiomeGenTropics.java @@ -9,7 +9,7 @@ import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.SpawnListEntry; import net.minecraft.world.gen.feature.WorldGenerator; import biomesoplenty.configuration.BOPConfiguration; -import biomesoplenty.mobs.EntityJungleSpider; +import biomesoplenty.entities.EntityJungleSpider; import biomesoplenty.worldgen.WorldGenPalmTree1; import biomesoplenty.worldgen.WorldGenPalmTree3; import biomesoplenty.api.Blocks; diff --git a/src/minecraft/biomesoplenty/blocks/BlockAltar.java b/src/minecraft/biomesoplenty/blocks/BlockAltar.java index ad5dee8ba..6707c8f25 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockAltar.java +++ b/src/minecraft/biomesoplenty/blocks/BlockAltar.java @@ -4,6 +4,7 @@ import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.util.ArrayList; import java.util.List; +import java.util.Random; import cpw.mods.fml.common.network.PacketDispatcher; import cpw.mods.fml.common.network.Player; @@ -16,8 +17,10 @@ import net.minecraft.block.material.Material; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; +import net.minecraft.item.ItemPickaxe; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.network.INetworkManager; @@ -163,6 +166,22 @@ public class BlockAltar extends Block { int meta = world.getBlockMetadata(x, y, z); + Item item = Item.itemsList[par6EntityPlayer.getCurrentEquippedItem().itemID]; + + if (item instanceof ItemPickaxe) + { + if (!world.isRemote && world.getGameRules().getGameRuleBooleanValue("doTileDrops")) + { + float f = 0.7F; + double d0 = (double)(world.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D; + double d1 = (double)(world.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D; + double d2 = (double)(world.rand.nextFloat() * f) + (double)(1.0F - f) * 0.5D; + EntityItem entityitem = new EntityItem(world, (double)x + d0, (double)y + d1, (double)z + d2, new ItemStack(Blocks.altar.get(), 1)); + entityitem.delayBeforeCanPickup = 10; + world.spawnEntityInWorld(entityitem); + } + } + dropBlockAsItem(world, x, y, z, id, meta); } @@ -191,8 +210,6 @@ public class BlockAltar extends Block if (tileentityaltar.getPresent(15)) ret.add(new ItemStack(Items.miscItems.get(), 1, 15)); - - ret.add(new ItemStack(Blocks.altar.get().blockID, 1, 0)); } return ret; diff --git a/src/minecraft/biomesoplenty/blocks/BlockBOPGlass.java b/src/minecraft/biomesoplenty/blocks/BlockBOPGlass.java index ff61a541e..e88228a9b 100644 --- a/src/minecraft/biomesoplenty/blocks/BlockBOPGlass.java +++ b/src/minecraft/biomesoplenty/blocks/BlockBOPGlass.java @@ -10,9 +10,12 @@ 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.entity.Entity; import net.minecraft.entity.effect.EntityLightningBolt; +import net.minecraft.entity.passive.EntityVillager; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; +import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.Icon; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; @@ -23,7 +26,7 @@ import biomesoplenty.tileentity.TileEntityAltar; public class BlockBOPGlass extends Block { - private static final String[] glassTypes = new String[] {"celestiallens", "sacrificialFocus"}; + private static final String[] glassTypes = new String[] {"celestiallens", "sacrificialFocus_empty", "sacrificialFocus_active"}; private Icon[] textures; public BlockBOPGlass(int blockID) @@ -34,6 +37,40 @@ public class BlockBOPGlass extends Block this.blockHardness = 0.37F; } + @Override + public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) + { + if (world.getBlockMetadata(x, y, z) == 2) + { + float var5 = 0.01F; + return AxisAlignedBB.getAABBPool().getAABB(x, y, z, x + 1, y + 1 - var5, z + 1); + } + else + return AxisAlignedBB.getAABBPool().getAABB(x, y, z, x + 1, y + 1, z + 1); + } + + @Override + public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) + { + if (world.getBlockMetadata(x, y, z) == 2) + { + if (checkAltarStructreIntegrity(world, x, y, z)) + { + if (entity instanceof EntityVillager) + { + world.setBlockMetadataWithNotify(x, y, z, 1, 2); + + world.spawnEntityInWorld(new EntityLightningBolt(world, x + 1, y + 2, z)); + world.spawnEntityInWorld(new EntityLightningBolt(world, x -1, y + 2, z)); + world.spawnEntityInWorld(new EntityLightningBolt(world, x, y + 2, z + 1)); + world.spawnEntityInWorld(new EntityLightningBolt(world, x, y + 2, z - 1)); + + entity.setDead(); + } + } + } + } + @Override public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int meta, float par7, float par8, float par9) { @@ -41,21 +78,21 @@ public class BlockBOPGlass extends Block if (equippedItem.itemID == Items.soulManipulator.get().itemID && equippedItem.getItemDamage() == 1) { - TileEntityAltar tileentityaltar0 = (TileEntityAltar) world.getBlockTileEntity(x + 1, y, z); - TileEntityAltar tileentityaltar1 = (TileEntityAltar) world.getBlockTileEntity(x - 1, y, z); - TileEntityAltar tileentityaltar2 = (TileEntityAltar) world.getBlockTileEntity(x, y, z + 1); - TileEntityAltar tileentityaltar3 = (TileEntityAltar) world.getBlockTileEntity(x, y, z - 1); - - if (checkAltarStructreIntegrity(world, x, y, z)) + if (world.getBlockMetadata(x, y, z) == 1) { - player.setCurrentItemOrArmor(0, new ItemStack(Items.soulManipulator.get(), 1, 0)); + if (checkAltarStructreIntegrity(world, x, y, z)) + { + player.setCurrentItemOrArmor(0, new ItemStack(Items.soulManipulator.get(), 1, 0)); - world.spawnEntityInWorld(new EntityLightningBolt(world, x + 1, y + 2, z)); - world.spawnEntityInWorld(new EntityLightningBolt(world, x -1, y + 2, z)); - world.spawnEntityInWorld(new EntityLightningBolt(world, x, y + 2, z + 1)); - world.spawnEntityInWorld(new EntityLightningBolt(world, x, y + 2, z - 1)); + world.spawnEntityInWorld(new EntityLightningBolt(world, x + 1, y + 2, z)); + world.spawnEntityInWorld(new EntityLightningBolt(world, x -1, y + 2, z)); + world.spawnEntityInWorld(new EntityLightningBolt(world, x, y + 2, z + 1)); + world.spawnEntityInWorld(new EntityLightningBolt(world, x, y + 2, z - 1)); + + world.setBlockMetadataWithNotify(x, y, z, 2, 2); - return true; + return true; + } } } @@ -69,6 +106,7 @@ public class BlockBOPGlass extends Block TileEntityAltar tileentityaltar2 = (TileEntityAltar) world.getBlockTileEntity(x, y, z + 1); TileEntityAltar tileentityaltar3 = (TileEntityAltar) world.getBlockTileEntity(x, y, z - 1); + if (tileentityaltar0 != null && tileentityaltar1 != null && tileentityaltar2 != null && tileentityaltar3 != null) if (tileentityaltar0.getAllPresent() && tileentityaltar1.getAllPresent() && tileentityaltar2.getAllPresent() && tileentityaltar3.getAllPresent()) { if (world.getBlockId(x + 1, y + 1, z) == Blocks.bones.get().blockID && world.getBlockId(x - 1, y + 1, z) == Blocks.bones.get().blockID && world.getBlockId(x, y + 1, z + 1) == Blocks.bones.get().blockID && world.getBlockId(x, y + 1, z - 1) == Blocks.bones.get().blockID) @@ -138,9 +176,12 @@ public class BlockBOPGlass extends Block @Override @SuppressWarnings({ "rawtypes", "unchecked" }) - public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) { - for (int i = 0; i < glassTypes.length; ++i) { - list.add(new ItemStack(blockID, 1, i)); + public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) + { + for (int i = 0; i < glassTypes.length; ++i) + { + if (i != 2) + list.add(new ItemStack(blockID, 1, i)); } } diff --git a/src/minecraft/biomesoplenty/configuration/BOPEntities.java b/src/minecraft/biomesoplenty/configuration/BOPEntities.java index 9231389be..977383a30 100644 --- a/src/minecraft/biomesoplenty/configuration/BOPEntities.java +++ b/src/minecraft/biomesoplenty/configuration/BOPEntities.java @@ -6,12 +6,12 @@ import net.minecraft.entity.EntityList; import net.minecraft.entity.EnumCreatureType; import biomesoplenty.BiomesOPlenty; import biomesoplenty.api.Biomes; +import biomesoplenty.entities.EntityGlob; +import biomesoplenty.entities.EntityJungleSpider; +import biomesoplenty.entities.EntityRosester; import biomesoplenty.items.projectiles.EntityDart; import biomesoplenty.items.projectiles.EntityMudball; import biomesoplenty.items.projectiles.EntityPoisonDart; -import biomesoplenty.mobs.EntityGlob; -import biomesoplenty.mobs.EntityJungleSpider; -import biomesoplenty.mobs.EntityRosester; import cpw.mods.fml.common.registry.EntityRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; diff --git a/src/minecraft/biomesoplenty/mobs/EntityGlob.java b/src/minecraft/biomesoplenty/entities/EntityGlob.java similarity index 99% rename from src/minecraft/biomesoplenty/mobs/EntityGlob.java rename to src/minecraft/biomesoplenty/entities/EntityGlob.java index a0042011d..ff7c3abf6 100644 --- a/src/minecraft/biomesoplenty/mobs/EntityGlob.java +++ b/src/minecraft/biomesoplenty/entities/EntityGlob.java @@ -1,4 +1,4 @@ -package biomesoplenty.mobs; +package biomesoplenty.entities; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.monster.IMob; diff --git a/src/minecraft/biomesoplenty/mobs/EntityJungleSpider.java b/src/minecraft/biomesoplenty/entities/EntityJungleSpider.java similarity index 97% rename from src/minecraft/biomesoplenty/mobs/EntityJungleSpider.java rename to src/minecraft/biomesoplenty/entities/EntityJungleSpider.java index a8f822108..9f61c62b6 100644 --- a/src/minecraft/biomesoplenty/mobs/EntityJungleSpider.java +++ b/src/minecraft/biomesoplenty/entities/EntityJungleSpider.java @@ -1,4 +1,4 @@ -package biomesoplenty.mobs; +package biomesoplenty.entities; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; diff --git a/src/minecraft/biomesoplenty/mobs/EntityRosester.java b/src/minecraft/biomesoplenty/entities/EntityRosester.java similarity index 99% rename from src/minecraft/biomesoplenty/mobs/EntityRosester.java rename to src/minecraft/biomesoplenty/entities/EntityRosester.java index c41b855bc..725487dbc 100644 --- a/src/minecraft/biomesoplenty/mobs/EntityRosester.java +++ b/src/minecraft/biomesoplenty/entities/EntityRosester.java @@ -1,4 +1,4 @@ -package biomesoplenty.mobs; +package biomesoplenty.entities; import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.ai.EntityAIFollowParent; diff --git a/src/minecraft/biomesoplenty/mobs/RenderGlob.java b/src/minecraft/biomesoplenty/entities/RenderGlob.java similarity index 98% rename from src/minecraft/biomesoplenty/mobs/RenderGlob.java rename to src/minecraft/biomesoplenty/entities/RenderGlob.java index 17c761275..240ea60c2 100644 --- a/src/minecraft/biomesoplenty/mobs/RenderGlob.java +++ b/src/minecraft/biomesoplenty/entities/RenderGlob.java @@ -1,4 +1,4 @@ -package biomesoplenty.mobs; +package biomesoplenty.entities; import net.minecraft.client.model.ModelBase; import net.minecraft.client.renderer.entity.RenderLiving; diff --git a/src/minecraft/biomesoplenty/mobs/ai/EntityAITemptArmour.java b/src/minecraft/biomesoplenty/entities/ai/EntityAITemptArmour.java similarity index 99% rename from src/minecraft/biomesoplenty/mobs/ai/EntityAITemptArmour.java rename to src/minecraft/biomesoplenty/entities/ai/EntityAITemptArmour.java index ff0706c16..1ab7bcc72 100644 --- a/src/minecraft/biomesoplenty/mobs/ai/EntityAITemptArmour.java +++ b/src/minecraft/biomesoplenty/entities/ai/EntityAITemptArmour.java @@ -1,4 +1,4 @@ -package biomesoplenty.mobs.ai; +package biomesoplenty.entities.ai; import net.minecraft.entity.EntityCreature; import net.minecraft.entity.ai.EntityAIBase; diff --git a/src/minecraft/biomesoplenty/helpers/EntitiesHelper.java b/src/minecraft/biomesoplenty/helpers/EntitiesHelper.java index 15fb9c424..4ba873c5b 100644 --- a/src/minecraft/biomesoplenty/helpers/EntitiesHelper.java +++ b/src/minecraft/biomesoplenty/helpers/EntitiesHelper.java @@ -1,17 +1,21 @@ package biomesoplenty.helpers; +import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityCreature; import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.passive.EntityAnimal; import net.minecraft.entity.passive.EntityChicken; import net.minecraft.entity.passive.EntityCow; import net.minecraft.entity.passive.EntityPig; import net.minecraft.entity.passive.EntitySheep; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; +import net.minecraft.world.World; import net.minecraftforge.event.Event.Result; import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.event.entity.EntityJoinWorldEvent; @@ -20,7 +24,7 @@ import net.minecraftforge.event.entity.living.LivingSpawnEvent.CheckSpawn; import biomesoplenty.api.Blocks; import biomesoplenty.api.Items; import biomesoplenty.configuration.BOPConfiguration; -import biomesoplenty.mobs.ai.EntityAITemptArmour; +import biomesoplenty.entities.ai.EntityAITemptArmour; public class EntitiesHelper { @@ -86,4 +90,52 @@ public class EntitiesHelper } } } + + @ForgeSubscribe + public void lightningStrike(LivingHurtEvent event) + { + if (event.source == DamageSource.inFire) + { + AxisAlignedBB axisalignedbb = AxisAlignedBB.getAABBPool().getAABB((double)event.entity.posX, (double)event.entity.posY, (double)event.entity.posZ, (double)(event.entity.posX + 1), (double)(event.entity.posY + 1), (double)(event.entity.posZ + 1)).expand(5, 5, 5); + + if (!event.entity.worldObj.getEntitiesWithinAABB(EntityLightningBolt.class, axisalignedbb).isEmpty()); + { + if (!event.entity.worldObj.getEntitiesWithinAABB(EntityPlayer.class, axisalignedbb).isEmpty()); + { + if (isBlockInBB(event.entity.worldObj, axisalignedbb, Blocks.glass.get().blockID, 2)) + { + event.setCanceled(true); + } + } + } + } + } + + public boolean isBlockInBB(World world, AxisAlignedBB par1AxisAlignedBB, int blockID, int blockMeta) + { + int i = MathHelper.floor_double(par1AxisAlignedBB.minX); + int j = MathHelper.floor_double(par1AxisAlignedBB.maxX + 1.0D); + int k = MathHelper.floor_double(par1AxisAlignedBB.minY); + int l = MathHelper.floor_double(par1AxisAlignedBB.maxY + 1.0D); + int i1 = MathHelper.floor_double(par1AxisAlignedBB.minZ); + int j1 = MathHelper.floor_double(par1AxisAlignedBB.maxZ + 1.0D); + + for (int k1 = i; k1 < j; ++k1) + { + for (int l1 = k; l1 < l; ++l1) + { + for (int i2 = i1; i2 < j1; ++i2) + { + Block block = Block.blocksList[world.getBlockId(k1, l1, i2)]; + + if (block != null && block.blockID == blockID && world.getBlockMetadata(k1, l1, i2) == blockMeta) + { + return true; + } + } + } + } + + return false; + } } diff --git a/src/minecraft/biomesoplenty/items/ItemBOPGlass.java b/src/minecraft/biomesoplenty/items/ItemBOPGlass.java index ef6be1d51..70b6edea6 100644 --- a/src/minecraft/biomesoplenty/items/ItemBOPGlass.java +++ b/src/minecraft/biomesoplenty/items/ItemBOPGlass.java @@ -5,7 +5,7 @@ import net.minecraft.item.ItemStack; public class ItemBOPGlass extends ItemBlock { - private static final String[] glassTypes = new String[] {"celestialLens", "sacrificialFocus"}; + private static final String[] glassTypes = new String[] {"celestialLens", "sacrificialFocus_empty", "sacrificialFocus_active"}; public ItemBOPGlass(int par1) { diff --git a/src/minecraft/mods/BiomesOPlenty/localizations/en_US.xml b/src/minecraft/mods/BiomesOPlenty/localizations/en_US.xml index cb103864c..4cc995efd 100644 --- a/src/minecraft/mods/BiomesOPlenty/localizations/en_US.xml +++ b/src/minecraft/mods/BiomesOPlenty/localizations/en_US.xml @@ -142,7 +142,8 @@ Large Bone Segment Celestial Lens - Sacrificial Focus + Sacrificial Focus + Sacrificial Focus Altar Frame diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/sacrificialfocus_active.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/sacrificialfocus_active.png new file mode 100644 index 000000000..73708a331 Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/sacrificialfocus_active.png differ diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/sacrificialfocus_active.txt b/src/minecraft/mods/BiomesOPlenty/textures/blocks/sacrificialfocus_active.txt new file mode 100644 index 000000000..35163c55b --- /dev/null +++ b/src/minecraft/mods/BiomesOPlenty/textures/blocks/sacrificialfocus_active.txt @@ -0,0 +1,9 @@ +0*20 +1*1 +2*1 +3*1 +4*6 +3*1 +2*1 +1*1 +0*20 diff --git a/src/minecraft/mods/BiomesOPlenty/textures/blocks/sacrificialfocus_empty.png b/src/minecraft/mods/BiomesOPlenty/textures/blocks/sacrificialfocus_empty.png new file mode 100644 index 000000000..a8b4e1fbf Binary files /dev/null and b/src/minecraft/mods/BiomesOPlenty/textures/blocks/sacrificialfocus_empty.png differ