Skip to content

Commit

Permalink
Updated to 1.9.4
Browse files Browse the repository at this point in the history
  • Loading branch information
CrazyPants committed May 22, 2016
1 parent 3153eaf commit 32a25f8
Show file tree
Hide file tree
Showing 19 changed files with 78 additions and 99 deletions.
6 changes: 6 additions & 0 deletions ReleaseNotes.txt
@@ -1,3 +1,9 @@
-------------------------------------------
Version 1.2.2
-------------------------------------------

- Update to MC 1.9.4

------------------------------------------- -------------------------------------------
Version 1.2.1 Version 1.2.1
------------------------------------------- -------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Expand Up @@ -5,7 +5,7 @@ buildscript {
maven { url = "http://files.minecraftforge.net/maven" } maven { url = "http://files.minecraftforge.net/maven" }
maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" } 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 { plugins {
Expand All @@ -29,8 +29,8 @@ if (project.hasProperty('mod_appendix'))
version += "_${project.mod_appendix}" version += "_${project.mod_appendix}"


minecraft { minecraft {
mappings = "snapshot_20160516" mappings = "snapshot_20160518"
version = "${minecraft_version}-${forge_version}" version = "${minecraft_version}-${forge_version}-${minecraft_version}"
runDir = "run" runDir = "run"


replace "@VERSION@", project.version replace "@VERSION@", project.version
Expand Down
9 changes: 5 additions & 4 deletions gradle.properties
@@ -1,10 +1,11 @@
minecraft_version=1.9 minecraft_version=1.9.4
forge_version=12.16.1.1901 forge_version=12.17.0.1910
mod_version=1.2.1
mod_version=1.2.2


#Comment out this line to get rid of the appendix #Comment out this line to get rid of the appendix
#mod_appendix=alpha #mod_appendix=alpha


waila_version=1.7.0-B2_1.9 waila_version=1.7.0-B3_1.9.4


curse_projectId=225247 curse_projectId=225247
33 changes: 3 additions & 30 deletions src/main/java/crazypants/enderzoo/charge/BlockConfusingCharge.java
Expand Up @@ -12,7 +12,7 @@
import net.minecraft.block.BlockTNT; import net.minecraft.block.BlockTNT;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft; 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.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.MobEffects; import net.minecraft.init.MobEffects;
Expand Down Expand Up @@ -143,44 +143,17 @@ public void explodeEffect(World world, double x, double y, double z) {
double motionY = (0.5 - random.nextDouble()) * mag; double motionY = (0.5 - random.nextDouble()) * mag;
double motionZ = (0.5 - random.nextDouble()) * mag * d; 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); y + motionY * 0.1, z + motionZ * 0.1, motionX, motionY, motionZ, (int[]) null);
float colRan = 0.75F + random.nextFloat() * 0.25F; float colRan = 0.75F + random.nextFloat() * 0.25F;
entityfx.setRBGColorF(r * colRan, g * colRan, b * colRan); 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); 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 @Override
public void onBlockDestroyedByExplosion(World world, BlockPos pos, Explosion explosion) { public void onBlockDestroyedByExplosion(World world, BlockPos pos, Explosion explosion) {
if (!world.isRemote) { if (!world.isRemote) {
Expand Down
Expand Up @@ -8,8 +8,8 @@
import crazypants.enderzoo.entity.EntityUtil; import crazypants.enderzoo.entity.EntityUtil;
import crazypants.enderzoo.entity.TeleportHelper; import crazypants.enderzoo.entity.TeleportHelper;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.EntityFX; import net.minecraft.client.particle.Particle;
import net.minecraft.client.particle.EntityPortalFX; import net.minecraft.client.particle.ParticlePortal;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.SoundEvents; import net.minecraft.init.SoundEvents;
Expand Down Expand Up @@ -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 motionX = (0.5 - random.nextDouble()) * mag * d;
double motionY = (0.5 - random.nextDouble()) * mag; double motionY = (0.5 - random.nextDouble()) * mag;
double motionZ = (0.5 - random.nextDouble()) * mag * d; 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, (i, world, x + motionX * 0.1, y + motionY * 0.1, z + motionZ * 0.1, motionX, motionY,
motionZ, (int[])null); motionZ, (int[])null);
Minecraft.getMinecraft().effectRenderer.addEffect(entityfx); Minecraft.getMinecraft().effectRenderer.addEffect(entityfx);
Expand Down
Expand Up @@ -108,9 +108,8 @@ public boolean isCreatureType(EnumCreatureType type, boolean forSpawnCount) {


@Override @Override
public IEntityLivingData onInitialSpawn(DifficultyInstance di, IEntityLivingData data) { public IEntityLivingData onInitialSpawn(DifficultyInstance di, IEntityLivingData data) {
HorseArmorType horsearmortype = HorseArmorType.ZOMBIE;
setType(horsearmortype); setHorseArmorStack(null);

setHorseSaddled(true); setHorseSaddled(true);
setGrowingAge(0); setGrowingAge(0);
getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(Config.fallenMountHealth); getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(Config.fallenMountHealth);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/crazypants/enderzoo/entity/EntityOwl.java
Expand Up @@ -252,7 +252,7 @@ public boolean isEntityInsideOpaqueBlock() {
int z = MathHelper.floor_double(posZ + ((i >> 2) % 2 - 0.5F) * width * 0.8F); int z = MathHelper.floor_double(posZ + ((i >> 2) % 2 - 0.5F) * width * 0.8F);


if (pos.getX() != x || pos.getY() != y || pos.getZ() != z) { 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()) { if (worldObj.getBlockState(pos).getBlock().isVisuallyOpaque()) {
return true; return true;
} }
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/crazypants/enderzoo/entity/EntityWitherCat.java
Expand Up @@ -6,7 +6,7 @@
import crazypants.enderzoo.entity.ai.EntityAIAttackOnCollideOwned; import crazypants.enderzoo.entity.ai.EntityAIAttackOnCollideOwned;
import crazypants.enderzoo.entity.ai.EntityAIFollowOwner; import crazypants.enderzoo.entity.ai.EntityAIFollowOwner;
import net.minecraft.client.Minecraft; 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.EntityLivingBase;
import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.ai.EntityAIAttackMelee; import net.minecraft.entity.ai.EntityAIAttackMelee;
Expand Down Expand Up @@ -286,7 +286,7 @@ private void spawnParticles() {
double xOffset = offsetScale - rand.nextFloat() * offsetScale * 2; double xOffset = offsetScale - rand.nextFloat() * offsetScale * 2;
double yOffset = offsetScale / 3 + rand.nextFloat() * offsetScale / 3 * 2F; double yOffset = offsetScale / 3 + rand.nextFloat() * offsetScale / 3 * 2F;
double zOffset = offsetScale - rand.nextFloat() * offsetScale * 2; 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); startZ + zOffset, 0.0D, 0.0D, 0.0D);
if (fx != null) { if (fx != null) {
fx.setRBGColorF(0.8f, 0.2f, 0.2f); fx.setRBGColorF(0.8f, 0.2f, 0.2f);
Expand Down
Expand Up @@ -3,7 +3,7 @@
import net.minecraft.entity.EntityCreature; import net.minecraft.entity.EntityCreature;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.ai.EntityAIBase; import net.minecraft.entity.ai.EntityAIBase;
import net.minecraft.pathfinding.PathEntity; import net.minecraft.pathfinding.Path;
import net.minecraft.util.EnumHand; import net.minecraft.util.EnumHand;
import net.minecraft.world.World; import net.minecraft.world.World;


Expand All @@ -15,7 +15,7 @@ public class EntityAIAttackOnCollideAggressive extends EntityAIBase {
int ticksToNextAttack; int ticksToNextAttack;
double speedTowardsTarget; double speedTowardsTarget;
boolean longMemory; boolean longMemory;
PathEntity entityPathEntity; Path entityPathEntity;
Class<?> classTarget; Class<?> classTarget;
private int ticksUntilNextPathingAttempt; private int ticksUntilNextPathingAttempt;
private double targetX; private double targetX;
Expand Down
Expand Up @@ -5,7 +5,7 @@
import net.minecraft.entity.EntityCreature; import net.minecraft.entity.EntityCreature;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.ai.EntityAIBase; import net.minecraft.entity.ai.EntityAIBase;
import net.minecraft.pathfinding.PathEntity; import net.minecraft.pathfinding.Path;
import net.minecraft.pathfinding.PathPoint; import net.minecraft.pathfinding.PathPoint;
import net.minecraft.util.EnumHand; import net.minecraft.util.EnumHand;
import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.AxisAlignedBB;
Expand All @@ -18,7 +18,7 @@ public class EntityAIFlyingAttackOnCollide extends EntityAIBase {
private int attackTick; private int attackTick;
private double speedTowardsTarget; private double speedTowardsTarget;
private boolean longMemory; private boolean longMemory;
private PathEntity entityPathEntity; private Path entityPathEntity;
private Class<? extends Entity> classTarget; private Class<? extends Entity> classTarget;
private int delayCounter; private int delayCounter;
private double targetX; private double targetX;
Expand Down
Expand Up @@ -3,7 +3,7 @@
import net.minecraft.entity.EntityCreature; import net.minecraft.entity.EntityCreature;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.ai.EntityAIBase; 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.PathNavigate;
import net.minecraft.pathfinding.PathPoint; import net.minecraft.pathfinding.PathPoint;
import net.minecraft.util.EnumHand; import net.minecraft.util.EnumHand;
Expand All @@ -26,7 +26,7 @@ public class EntityAIMountedAttackOnCollide extends EntityAIBase {
boolean longMemory; boolean longMemory;




PathEntity entityPathEntity; Path entityPathEntity;
Class<?> classTarget; Class<?> classTarget;
private int pathUpdateTimer; private int pathUpdateTimer;
private double targetPosX; private double targetPosX;
Expand Down
Expand Up @@ -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 i = x; i < x + entitySizeX; ++i) {
for (int j = y; j < y + entitySizeY; ++j) { for (int j = y; j < y + entitySizeY; ++j) {
for (int k = z; k < z + entitySizeZ; ++k) { 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(); Block block = bs.getBlock();
if (block.getMaterial(bs) != Material.AIR) { if (block.getMaterial(bs) != Material.AIR) {
AxisAlignedBB bb = block.getCollisionBoundingBox(bs, entityIn.worldObj, mutableblockpos); AxisAlignedBB bb = block.getCollisionBoundingBox(bs, entityIn.worldObj, mutableblockpos);
Expand Down
Expand Up @@ -9,8 +9,8 @@
import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLiving;
import net.minecraft.pathfinding.NodeProcessor; import net.minecraft.pathfinding.NodeProcessor;
import net.minecraft.pathfinding.Path; import net.minecraft.pathfinding.Path;
import net.minecraft.pathfinding.PathEntity;
import net.minecraft.pathfinding.PathFinder; import net.minecraft.pathfinding.PathFinder;
import net.minecraft.pathfinding.PathHeap;
import net.minecraft.pathfinding.PathPoint; import net.minecraft.pathfinding.PathPoint;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
Expand All @@ -19,7 +19,7 @@


public class FlyingPathFinder extends PathFinder { public class FlyingPathFinder extends PathFinder {


private Path path = new Path(); private PathHeap path = new PathHeap();
private PathPoint[] pathOptions = new PathPoint[32]; private PathPoint[] pathOptions = new PathPoint[32];
private NodeProcessor nodeProcessor; private NodeProcessor nodeProcessor;


Expand All @@ -30,17 +30,17 @@ public FlyingPathFinder(NodeProcessor nodeProcessorIn) {


//createEntityPathTo //createEntityPathTo
@Override @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); return createEntityPathTo(blockaccess, entityFrom, entityTo.posX, entityTo.getEntityBoundingBox().minY, entityTo.posZ, dist);
} }


//createEntityPathTo //createEntityPathTo
@Override @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); 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(); path.clearPath();


Expand Down Expand Up @@ -112,7 +112,7 @@ private PathEntity createEntityPathTo(IBlockAccess blockaccess, Entity ent, doub
if(resPoints.isEmpty()) { if(resPoints.isEmpty()) {
return null; return null;
} }
return new PathEntity(resPoints.toArray(new PathPoint[resPoints.size()])); return new Path(resPoints.toArray(new PathPoint[resPoints.size()]));


} }


Expand Down Expand Up @@ -201,7 +201,7 @@ private int rnd(double d) {
return (int)Math.round(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.path.clearPath();
this.nodeProcessor.initProcessor(blockaccess, entityIn); this.nodeProcessor.initProcessor(blockaccess, entityIn);


Expand All @@ -210,11 +210,11 @@ private PathEntity createDefault(IBlockAccess blockaccess, EntityLiving entityIn
PathPoint pathpoint1 = nodeProcessor.getPathPointToCoords(x, y, z); PathPoint pathpoint1 = nodeProcessor.getPathPointToCoords(x, y, z);


PathPoint[] p = addToPath(entityIn, pathpoint, pathpoint1, distance); PathPoint[] p = addToPath(entityIn, pathpoint, pathpoint1, distance);
PathEntity res; Path res;
if(p == null) { if(p == null) {
res = null; res = null;
} else { } else {
res = new PathEntity(p); res = new Path(p);
} }
this.nodeProcessor.postProcess(); this.nodeProcessor.postProcess();
return res; return res;
Expand Down
Expand Up @@ -2,7 +2,7 @@


import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLiving;
import net.minecraft.pathfinding.PathEntity; import net.minecraft.pathfinding.Path;
import net.minecraft.pathfinding.PathFinder; import net.minecraft.pathfinding.PathFinder;
import net.minecraft.pathfinding.PathNavigateGround; import net.minecraft.pathfinding.PathNavigateGround;
import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.AxisAlignedBB;
Expand Down Expand Up @@ -50,21 +50,21 @@ protected Vec3d getEntityPosition() {
} }


public boolean tryFlyToXYZ(double x, double y, double z, double speedIn) { 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); return setPath(pathentity, speedIn, true);
} }


public boolean tryFlyToPos(double x, double y, double z, double speedIn) { 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); return setPath(pathentity, speedIn, true);
} }


public boolean tryFlyToEntityLiving(Entity entityIn, double speedIn) { public boolean tryFlyToEntityLiving(Entity entityIn, double speedIn) {
PathEntity pathentity = getPathToEntityLiving(entityIn); Path pathentity = getPathToEntityLiving(entityIn);
return pathentity != null ? setPath(pathentity, speedIn, true) : false; 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)) { if (super.setPath(path, speed)) {
// String str = "FlyingPathNavigate.setPath:"; // String str = "FlyingPathNavigate.setPath:";
// for (int i = 0; i < path.getCurrentPathLength(); i++) { // for (int i = 0; i < path.getCurrentPathLength(); i++) {
Expand All @@ -81,7 +81,7 @@ public boolean setPath(PathEntity path, double speed, boolean forceFlying) {
} }


@Override @Override
public boolean setPath(PathEntity path, double speed) { public boolean setPath(Path path, double speed) {
return setPath(path, speed, false); return setPath(path, speed, false);
} }


Expand Down
6 changes: 3 additions & 3 deletions src/main/java/crazypants/enderzoo/spawn/IBiomeFilter.java
@@ -1,13 +1,13 @@
package crazypants.enderzoo.spawn; package crazypants.enderzoo.spawn;


import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.biome.Biome;


public interface IBiomeFilter { public interface IBiomeFilter {


void addBiomeDescriptor(IBiomeDescriptor biome); void addBiomeDescriptor(IBiomeDescriptor biome);


BiomeGenBase[] getMatchedBiomes(); Biome[] getMatchedBiomes();


boolean isMatchingBiome(BiomeGenBase bgb); boolean isMatchingBiome(Biome bgb);


} }

0 comments on commit 32a25f8

Please sign in to comment.