diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index ddbfca2..22cc110 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -1,3 +1,9 @@ +------------------------------------------- +Version 1.2.2 +------------------------------------------- + +- Update to MC 1.9.4 + ------------------------------------------- Version 1.2.1 ------------------------------------------- diff --git a/build.gradle b/build.gradle index 7cd7c19..52900a7 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ buildscript { maven { url = "http://files.minecraftforge.net/maven" } maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" } } - dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT' } + dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT' } } plugins { @@ -29,8 +29,8 @@ if (project.hasProperty('mod_appendix')) version += "_${project.mod_appendix}" minecraft { - mappings = "snapshot_20160516" - version = "${minecraft_version}-${forge_version}" + mappings = "snapshot_20160518" + version = "${minecraft_version}-${forge_version}-${minecraft_version}" runDir = "run" replace "@VERSION@", project.version diff --git a/gradle.properties b/gradle.properties index 95634e0..5093138 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,10 +1,11 @@ -minecraft_version=1.9 -forge_version=12.16.1.1901 -mod_version=1.2.1 +minecraft_version=1.9.4 +forge_version=12.17.0.1910 + +mod_version=1.2.2 #Comment out this line to get rid of the appendix #mod_appendix=alpha -waila_version=1.7.0-B2_1.9 +waila_version=1.7.0-B3_1.9.4 curse_projectId=225247 diff --git a/src/main/java/crazypants/enderzoo/charge/BlockConfusingCharge.java b/src/main/java/crazypants/enderzoo/charge/BlockConfusingCharge.java index 549eccb..cfb2068 100644 --- a/src/main/java/crazypants/enderzoo/charge/BlockConfusingCharge.java +++ b/src/main/java/crazypants/enderzoo/charge/BlockConfusingCharge.java @@ -12,7 +12,7 @@ import net.minecraft.block.BlockTNT; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; -import net.minecraft.client.particle.EntitySpellParticleFX; +import net.minecraft.client.particle.ParticleSpell; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.MobEffects; @@ -143,44 +143,17 @@ public void explodeEffect(World world, double x, double y, double z) { double motionY = (0.5 - random.nextDouble()) * mag; double motionZ = (0.5 - random.nextDouble()) * mag * d; - EntitySpellParticleFX entityfx = (EntitySpellParticleFX) new EntitySpellParticleFX.InstantFactory().getEntityFX(i, world, x + motionX * 0.1, + ParticleSpell entityfx = (ParticleSpell) new ParticleSpell.InstantFactory().getEntityFX(i, world, x + motionX * 0.1, y + motionY * 0.1, z + motionZ * 0.1, motionX, motionY, motionZ, (int[]) null); float colRan = 0.75F + random.nextFloat() * 0.25F; entityfx.setRBGColorF(r * colRan, g * colRan, b * colRan); - // entityfx.multiplyVelocity((float) (random.nextDouble() * 4.0D)); - // entityfx.multiplyVelocity(0.1f); + entityfx.multiplyVelocity(0.1f); Minecraft.getMinecraft().effectRenderer.addEffect(entityfx); } } - // @Override - // public IIcon getIcon(int side, int meta) { - // return side == 0 ? bottomIcon : (side == 1 ? topIcon : blockIcon); - // } - // - // @Override - // public void registerBlockIcons(IIconRegister p_149651_1_) { - // blockIcon = p_149651_1_.registerIcon("enderzoo:" + name + "_side"); - // topIcon = p_149651_1_.registerIcon("enderzoo:" + name + "_top"); - // bottomIcon = p_149651_1_.registerIcon("enderzoo:" + name + "_bottom"); - // } - - // @Override - // public void func_150114_a(World world, int x, int y, int z, int meta, - // EntityLivingBase placedBy) { - // if(!world.isRemote) { - // if((meta & 1) == 1) { - // EntityPrimedCharge entity = new EntityPrimedCharge(this, world, x + 0.5F, y - // + 0.5F, z + 0.5F, placedBy); - // world.spawnEntityInWorld(entity); - // world.playSoundAtEntity(entity, "game.tnt.primed", 1.0F, 1.0F); - // world.updateEntity(entity); - // } - // } - // } - @Override public void onBlockDestroyedByExplosion(World world, BlockPos pos, Explosion explosion) { if (!world.isRemote) { diff --git a/src/main/java/crazypants/enderzoo/charge/BlockEnderCharge.java b/src/main/java/crazypants/enderzoo/charge/BlockEnderCharge.java index 08306b6..cae3e0a 100644 --- a/src/main/java/crazypants/enderzoo/charge/BlockEnderCharge.java +++ b/src/main/java/crazypants/enderzoo/charge/BlockEnderCharge.java @@ -8,8 +8,8 @@ import crazypants.enderzoo.entity.EntityUtil; import crazypants.enderzoo.entity.TeleportHelper; import net.minecraft.client.Minecraft; -import net.minecraft.client.particle.EntityFX; -import net.minecraft.client.particle.EntityPortalFX; +import net.minecraft.client.particle.Particle; +import net.minecraft.client.particle.ParticlePortal; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.SoundEvents; @@ -77,7 +77,7 @@ public static void doTeleportEffect(World world, double x, double y, double z) { double motionX = (0.5 - random.nextDouble()) * mag * d; double motionY = (0.5 - random.nextDouble()) * mag; double motionZ = (0.5 - random.nextDouble()) * mag * d; - EntityFX entityfx = new EntityPortalFX.Factory().getEntityFX + Particle entityfx = new ParticlePortal.Factory().getEntityFX (i, world, x + motionX * 0.1, y + motionY * 0.1, z + motionZ * 0.1, motionX, motionY, motionZ, (int[])null); Minecraft.getMinecraft().effectRenderer.addEffect(entityfx); diff --git a/src/main/java/crazypants/enderzoo/entity/EntityFallenMount.java b/src/main/java/crazypants/enderzoo/entity/EntityFallenMount.java index 02af8a0..9e26dec 100644 --- a/src/main/java/crazypants/enderzoo/entity/EntityFallenMount.java +++ b/src/main/java/crazypants/enderzoo/entity/EntityFallenMount.java @@ -108,9 +108,8 @@ public boolean isCreatureType(EnumCreatureType type, boolean forSpawnCount) { @Override public IEntityLivingData onInitialSpawn(DifficultyInstance di, IEntityLivingData data) { - HorseArmorType horsearmortype = HorseArmorType.ZOMBIE; - setType(horsearmortype); - + + setHorseArmorStack(null); setHorseSaddled(true); setGrowingAge(0); getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(Config.fallenMountHealth); diff --git a/src/main/java/crazypants/enderzoo/entity/EntityOwl.java b/src/main/java/crazypants/enderzoo/entity/EntityOwl.java index 5c2fbd0..ee93f0c 100644 --- a/src/main/java/crazypants/enderzoo/entity/EntityOwl.java +++ b/src/main/java/crazypants/enderzoo/entity/EntityOwl.java @@ -252,7 +252,7 @@ public boolean isEntityInsideOpaqueBlock() { int z = MathHelper.floor_double(posZ + ((i >> 2) % 2 - 0.5F) * width * 0.8F); if (pos.getX() != x || pos.getY() != y || pos.getZ() != z) { - pos.set(x, y, z); + pos.setPos(x, y, z); if (worldObj.getBlockState(pos).getBlock().isVisuallyOpaque()) { return true; } diff --git a/src/main/java/crazypants/enderzoo/entity/EntityWitherCat.java b/src/main/java/crazypants/enderzoo/entity/EntityWitherCat.java index d7ef6ef..f3cb3a6 100644 --- a/src/main/java/crazypants/enderzoo/entity/EntityWitherCat.java +++ b/src/main/java/crazypants/enderzoo/entity/EntityWitherCat.java @@ -6,7 +6,7 @@ import crazypants.enderzoo.entity.ai.EntityAIAttackOnCollideOwned; import crazypants.enderzoo.entity.ai.EntityAIFollowOwner; import net.minecraft.client.Minecraft; -import net.minecraft.client.particle.EntityFX; +import net.minecraft.client.particle.Particle; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.EntityAIAttackMelee; @@ -286,7 +286,7 @@ private void spawnParticles() { double xOffset = offsetScale - rand.nextFloat() * offsetScale * 2; double yOffset = offsetScale / 3 + rand.nextFloat() * offsetScale / 3 * 2F; double zOffset = offsetScale - rand.nextFloat() * offsetScale * 2; - EntityFX fx = Minecraft.getMinecraft().effectRenderer.spawnEffectParticle(EnumParticleTypes.SPELL.getParticleID(), startX + xOffset, startY + yOffset, + Particle fx = Minecraft.getMinecraft().effectRenderer.spawnEffectParticle(EnumParticleTypes.SPELL.getParticleID(), startX + xOffset, startY + yOffset, startZ + zOffset, 0.0D, 0.0D, 0.0D); if (fx != null) { fx.setRBGColorF(0.8f, 0.2f, 0.2f); diff --git a/src/main/java/crazypants/enderzoo/entity/ai/EntityAIAttackOnCollideAggressive.java b/src/main/java/crazypants/enderzoo/entity/ai/EntityAIAttackOnCollideAggressive.java index dcbc6e3..ad8a625 100644 --- a/src/main/java/crazypants/enderzoo/entity/ai/EntityAIAttackOnCollideAggressive.java +++ b/src/main/java/crazypants/enderzoo/entity/ai/EntityAIAttackOnCollideAggressive.java @@ -3,7 +3,7 @@ import net.minecraft.entity.EntityCreature; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.ai.EntityAIBase; -import net.minecraft.pathfinding.PathEntity; +import net.minecraft.pathfinding.Path; import net.minecraft.util.EnumHand; import net.minecraft.world.World; @@ -15,7 +15,7 @@ public class EntityAIAttackOnCollideAggressive extends EntityAIBase { int ticksToNextAttack; double speedTowardsTarget; boolean longMemory; - PathEntity entityPathEntity; + Path entityPathEntity; Class classTarget; private int ticksUntilNextPathingAttempt; private double targetX; diff --git a/src/main/java/crazypants/enderzoo/entity/ai/EntityAIFlyingAttackOnCollide.java b/src/main/java/crazypants/enderzoo/entity/ai/EntityAIFlyingAttackOnCollide.java index e014253..4c51666 100644 --- a/src/main/java/crazypants/enderzoo/entity/ai/EntityAIFlyingAttackOnCollide.java +++ b/src/main/java/crazypants/enderzoo/entity/ai/EntityAIFlyingAttackOnCollide.java @@ -5,7 +5,7 @@ import net.minecraft.entity.EntityCreature; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.ai.EntityAIBase; -import net.minecraft.pathfinding.PathEntity; +import net.minecraft.pathfinding.Path; import net.minecraft.pathfinding.PathPoint; import net.minecraft.util.EnumHand; import net.minecraft.util.math.AxisAlignedBB; @@ -18,7 +18,7 @@ public class EntityAIFlyingAttackOnCollide extends EntityAIBase { private int attackTick; private double speedTowardsTarget; private boolean longMemory; - private PathEntity entityPathEntity; + private Path entityPathEntity; private Class classTarget; private int delayCounter; private double targetX; diff --git a/src/main/java/crazypants/enderzoo/entity/ai/EntityAIMountedAttackOnCollide.java b/src/main/java/crazypants/enderzoo/entity/ai/EntityAIMountedAttackOnCollide.java index 517388f..51c3064 100644 --- a/src/main/java/crazypants/enderzoo/entity/ai/EntityAIMountedAttackOnCollide.java +++ b/src/main/java/crazypants/enderzoo/entity/ai/EntityAIMountedAttackOnCollide.java @@ -3,7 +3,7 @@ import net.minecraft.entity.EntityCreature; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.ai.EntityAIBase; -import net.minecraft.pathfinding.PathEntity; +import net.minecraft.pathfinding.Path; import net.minecraft.pathfinding.PathNavigate; import net.minecraft.pathfinding.PathPoint; import net.minecraft.util.EnumHand; @@ -26,7 +26,7 @@ public class EntityAIMountedAttackOnCollide extends EntityAIBase { boolean longMemory; - PathEntity entityPathEntity; + Path entityPathEntity; Class classTarget; private int pathUpdateTimer; private double targetPosX; diff --git a/src/main/java/crazypants/enderzoo/entity/navigate/FlyNodeProcessor.java b/src/main/java/crazypants/enderzoo/entity/navigate/FlyNodeProcessor.java index 9ee3b64..5318899 100644 --- a/src/main/java/crazypants/enderzoo/entity/navigate/FlyNodeProcessor.java +++ b/src/main/java/crazypants/enderzoo/entity/navigate/FlyNodeProcessor.java @@ -52,7 +52,7 @@ private boolean entityFits(Entity entityIn, int x, int y, int z) { for (int i = x; i < x + entitySizeX; ++i) { for (int j = y; j < y + entitySizeY; ++j) { for (int k = z; k < z + entitySizeZ; ++k) { - IBlockState bs = blockaccess.getBlockState(mutableblockpos.set(i, j, k)); + IBlockState bs = blockaccess.getBlockState(mutableblockpos.setPos(i, j, k)); Block block = bs.getBlock(); if (block.getMaterial(bs) != Material.AIR) { AxisAlignedBB bb = block.getCollisionBoundingBox(bs, entityIn.worldObj, mutableblockpos); diff --git a/src/main/java/crazypants/enderzoo/entity/navigate/FlyingPathFinder.java b/src/main/java/crazypants/enderzoo/entity/navigate/FlyingPathFinder.java index 5e90d98..83527e5 100644 --- a/src/main/java/crazypants/enderzoo/entity/navigate/FlyingPathFinder.java +++ b/src/main/java/crazypants/enderzoo/entity/navigate/FlyingPathFinder.java @@ -9,8 +9,8 @@ import net.minecraft.entity.EntityLiving; import net.minecraft.pathfinding.NodeProcessor; import net.minecraft.pathfinding.Path; -import net.minecraft.pathfinding.PathEntity; import net.minecraft.pathfinding.PathFinder; +import net.minecraft.pathfinding.PathHeap; import net.minecraft.pathfinding.PathPoint; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; @@ -19,7 +19,7 @@ public class FlyingPathFinder extends PathFinder { - private Path path = new Path(); + private PathHeap path = new PathHeap(); private PathPoint[] pathOptions = new PathPoint[32]; private NodeProcessor nodeProcessor; @@ -30,17 +30,17 @@ public FlyingPathFinder(NodeProcessor nodeProcessorIn) { //createEntityPathTo @Override - public PathEntity findPath(IBlockAccess blockaccess, EntityLiving entityFrom, Entity entityTo, float dist) { + public Path findPath(IBlockAccess blockaccess, EntityLiving entityFrom, Entity entityTo, float dist) { return createEntityPathTo(blockaccess, entityFrom, entityTo.posX, entityTo.getEntityBoundingBox().minY, entityTo.posZ, dist); } //createEntityPathTo @Override - public PathEntity findPath(IBlockAccess blockaccess, EntityLiving entityIn, BlockPos targetPos, float dist) { + public Path findPath(IBlockAccess blockaccess, EntityLiving entityIn, BlockPos targetPos, float dist) { return createEntityPathTo(blockaccess, entityIn, targetPos.getX() + 0.5F, targetPos.getY() + 0.5F, targetPos.getZ() + 0.5F, dist); } - private PathEntity createEntityPathTo(IBlockAccess blockaccess, Entity ent, double x, double y, double z, float distance) { + private Path createEntityPathTo(IBlockAccess blockaccess, Entity ent, double x, double y, double z, float distance) { path.clearPath(); @@ -112,7 +112,7 @@ private PathEntity createEntityPathTo(IBlockAccess blockaccess, Entity ent, doub if(resPoints.isEmpty()) { return null; } - return new PathEntity(resPoints.toArray(new PathPoint[resPoints.size()])); + return new Path(resPoints.toArray(new PathPoint[resPoints.size()])); } @@ -201,7 +201,7 @@ private int rnd(double d) { return (int)Math.round(d); } - private PathEntity createDefault(IBlockAccess blockaccess, EntityLiving entityIn, float distance, double x, double y, double z) { + private Path createDefault(IBlockAccess blockaccess, EntityLiving entityIn, float distance, double x, double y, double z) { this.path.clearPath(); this.nodeProcessor.initProcessor(blockaccess, entityIn); @@ -210,11 +210,11 @@ private PathEntity createDefault(IBlockAccess blockaccess, EntityLiving entityIn PathPoint pathpoint1 = nodeProcessor.getPathPointToCoords(x, y, z); PathPoint[] p = addToPath(entityIn, pathpoint, pathpoint1, distance); - PathEntity res; + Path res; if(p == null) { res = null; } else { - res = new PathEntity(p); + res = new Path(p); } this.nodeProcessor.postProcess(); return res; diff --git a/src/main/java/crazypants/enderzoo/entity/navigate/FlyingPathNavigate.java b/src/main/java/crazypants/enderzoo/entity/navigate/FlyingPathNavigate.java index 3df0f4d..66749bc 100644 --- a/src/main/java/crazypants/enderzoo/entity/navigate/FlyingPathNavigate.java +++ b/src/main/java/crazypants/enderzoo/entity/navigate/FlyingPathNavigate.java @@ -2,7 +2,7 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; -import net.minecraft.pathfinding.PathEntity; +import net.minecraft.pathfinding.Path; import net.minecraft.pathfinding.PathFinder; import net.minecraft.pathfinding.PathNavigateGround; import net.minecraft.util.math.AxisAlignedBB; @@ -50,21 +50,21 @@ protected Vec3d getEntityPosition() { } public boolean tryFlyToXYZ(double x, double y, double z, double speedIn) { - PathEntity pathentity = getPathToPos(new BlockPos((double) MathHelper.floor_double(x), (double) ((int) y), (double) MathHelper.floor_double(z))); + Path pathentity = getPathToPos(new BlockPos((double) MathHelper.floor_double(x), (double) ((int) y), (double) MathHelper.floor_double(z))); return setPath(pathentity, speedIn, true); } public boolean tryFlyToPos(double x, double y, double z, double speedIn) { - PathEntity pathentity = getPathToXYZ(x, y, z); + Path pathentity = getPathToXYZ(x, y, z); return setPath(pathentity, speedIn, true); } public boolean tryFlyToEntityLiving(Entity entityIn, double speedIn) { - PathEntity pathentity = getPathToEntityLiving(entityIn); + Path pathentity = getPathToEntityLiving(entityIn); return pathentity != null ? setPath(pathentity, speedIn, true) : false; } - public boolean setPath(PathEntity path, double speed, boolean forceFlying) { + public boolean setPath(Path path, double speed, boolean forceFlying) { if (super.setPath(path, speed)) { // String str = "FlyingPathNavigate.setPath:"; // for (int i = 0; i < path.getCurrentPathLength(); i++) { @@ -81,7 +81,7 @@ public boolean setPath(PathEntity path, double speed, boolean forceFlying) { } @Override - public boolean setPath(PathEntity path, double speed) { + public boolean setPath(Path path, double speed) { return setPath(path, speed, false); } diff --git a/src/main/java/crazypants/enderzoo/spawn/IBiomeFilter.java b/src/main/java/crazypants/enderzoo/spawn/IBiomeFilter.java index 8b54084..05cb1fa 100644 --- a/src/main/java/crazypants/enderzoo/spawn/IBiomeFilter.java +++ b/src/main/java/crazypants/enderzoo/spawn/IBiomeFilter.java @@ -1,13 +1,13 @@ package crazypants.enderzoo.spawn; -import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.biome.Biome; public interface IBiomeFilter { void addBiomeDescriptor(IBiomeDescriptor biome); - BiomeGenBase[] getMatchedBiomes(); + Biome[] getMatchedBiomes(); - boolean isMatchingBiome(BiomeGenBase bgb); + boolean isMatchingBiome(Biome bgb); } diff --git a/src/main/java/crazypants/enderzoo/spawn/MobSpawns.java b/src/main/java/crazypants/enderzoo/spawn/MobSpawns.java index 163f187..669edec 100644 --- a/src/main/java/crazypants/enderzoo/spawn/MobSpawns.java +++ b/src/main/java/crazypants/enderzoo/spawn/MobSpawns.java @@ -4,15 +4,15 @@ import java.util.Collection; import java.util.List; -import net.minecraft.entity.EntityList; -import net.minecraft.entity.EntityLiving; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraftforge.fml.common.registry.EntityRegistry; import crazypants.enderzoo.Log; import crazypants.enderzoo.config.Config; import crazypants.enderzoo.config.SpawnConfig; import crazypants.enderzoo.entity.MobInfo; import crazypants.enderzoo.spawn.impl.SpawnEntry; +import net.minecraft.entity.EntityList; +import net.minecraft.entity.EntityLiving; +import net.minecraft.world.biome.Biome; +import net.minecraftforge.fml.common.registry.EntityRegistry; public final class MobSpawns { @@ -57,7 +57,7 @@ public void addSpawn(ISpawnEntry entry) { Log.info(entry.getMobName() + " is disabled"); return; } - + if (entry.isRemove()) { if (PRINT_DETAIL) { //yeah, I know I could print them as debug messages but that is more painful to change... @@ -65,7 +65,7 @@ public void addSpawn(ISpawnEntry entry) { System.out.print(" - "); } for (IBiomeFilter filter : entry.getFilters()) { - BiomeGenBase[] biomes = filter.getMatchedBiomes(); + Biome[] biomes = filter.getMatchedBiomes(); if (PRINT_DETAIL) { printBiomeNames(biomes); } @@ -82,7 +82,7 @@ public void addSpawn(ISpawnEntry entry) { System.out.print(" - "); } for (IBiomeFilter filter : entry.getFilters()) { - BiomeGenBase[] biomes = filter.getMatchedBiomes(); + Biome[] biomes = filter.getMatchedBiomes(); if (PRINT_DETAIL) { printBiomeNames(biomes); } @@ -94,8 +94,8 @@ public void addSpawn(ISpawnEntry entry) { } - protected static void printBiomeNames(BiomeGenBase[] biomes) { - for (BiomeGenBase biome : biomes) { + protected static void printBiomeNames(Biome[] biomes) { + for (Biome biome : biomes) { if (biome != null) { System.out.print(biome.getBiomeName() + ", "); } else { diff --git a/src/main/java/crazypants/enderzoo/spawn/impl/AbstractBiomeFilter.java b/src/main/java/crazypants/enderzoo/spawn/impl/AbstractBiomeFilter.java index 2b0e81a..d8fbc62 100644 --- a/src/main/java/crazypants/enderzoo/spawn/impl/AbstractBiomeFilter.java +++ b/src/main/java/crazypants/enderzoo/spawn/impl/AbstractBiomeFilter.java @@ -3,11 +3,11 @@ import java.util.ArrayList; import java.util.List; -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraftforge.common.BiomeDictionary; import crazypants.enderzoo.config.Config; import crazypants.enderzoo.spawn.IBiomeDescriptor; import crazypants.enderzoo.spawn.IBiomeFilter; +import net.minecraft.world.biome.Biome; +import net.minecraftforge.common.BiomeDictionary; public abstract class AbstractBiomeFilter implements IBiomeFilter { @@ -34,7 +34,7 @@ public void addBiomeDescriptor(IBiomeDescriptor biome) { } } - protected boolean isExcluded(BiomeGenBase candidate) { + protected boolean isExcluded(Biome candidate) { for (BiomeDictionary.Type exType : typeExcludes) { if (BiomeDictionary.isBiomeOfType(candidate, exType)) { if (Config.spawnConfigPrintDetailedOutput) { diff --git a/src/main/java/crazypants/enderzoo/spawn/impl/BiomeFilterAll.java b/src/main/java/crazypants/enderzoo/spawn/impl/BiomeFilterAll.java index f7d4cd4..c07e634 100644 --- a/src/main/java/crazypants/enderzoo/spawn/impl/BiomeFilterAll.java +++ b/src/main/java/crazypants/enderzoo/spawn/impl/BiomeFilterAll.java @@ -4,31 +4,31 @@ import java.util.Iterator; import java.util.Set; -import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.biome.Biome; import net.minecraftforge.common.BiomeDictionary; public class BiomeFilterAll extends AbstractBiomeFilter { @Override - public BiomeGenBase[] getMatchedBiomes() { + public Biome[] getMatchedBiomes() { if (types.isEmpty() && names.isEmpty()) { - return new BiomeGenBase[0]; + return new Biome[0]; } - Set result = new HashSet(); - Iterator it = BiomeGenBase.REGISTRY.iterator(); + Set result = new HashSet(); + Iterator it = Biome.REGISTRY.iterator(); while(it.hasNext()) { - BiomeGenBase candidate = it.next(); + Biome candidate = it.next(); if (candidate != null && isMatchingBiome(candidate)) { result.add(candidate); } } - return result.toArray(new BiomeGenBase[result.size()]); + return result.toArray(new Biome[result.size()]); } @Override - public boolean isMatchingBiome(BiomeGenBase biome) { + public boolean isMatchingBiome(Biome biome) { if (isExcluded(biome)) { return false; diff --git a/src/main/java/crazypants/enderzoo/spawn/impl/BiomeFilterAny.java b/src/main/java/crazypants/enderzoo/spawn/impl/BiomeFilterAny.java index efa742f..02d1ea2 100644 --- a/src/main/java/crazypants/enderzoo/spawn/impl/BiomeFilterAny.java +++ b/src/main/java/crazypants/enderzoo/spawn/impl/BiomeFilterAny.java @@ -4,31 +4,31 @@ import java.util.Iterator; import java.util.Set; -import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.biome.Biome; import net.minecraftforge.common.BiomeDictionary; public class BiomeFilterAny extends AbstractBiomeFilter { @Override - public BiomeGenBase[] getMatchedBiomes() { + public Biome[] getMatchedBiomes() { if (types.isEmpty() && names.isEmpty()) { - return new BiomeGenBase[0]; + return new Biome[0]; } - Set passedBiomes = new HashSet(); - Iterator it = BiomeGenBase.REGISTRY.iterator(); + Set passedBiomes = new HashSet(); + Iterator it = Biome.REGISTRY.iterator(); while(it.hasNext()) { - BiomeGenBase candidate = it.next(); + Biome candidate = it.next(); if (candidate != null && isMatchingBiome(candidate)) { passedBiomes.add(candidate); } } - return passedBiomes.toArray(new BiomeGenBase[passedBiomes.size()]); + return passedBiomes.toArray(new Biome[passedBiomes.size()]); } @Override - public boolean isMatchingBiome(BiomeGenBase biome) { + public boolean isMatchingBiome(Biome biome) { if (isExcluded(biome)) { return false; }