Skip to content

Commit

Permalink
Fixed crash when Hanzo's arrows collide with non-living entities
Browse files Browse the repository at this point in the history
  • Loading branch information
2piradians committed Sep 5, 2017
1 parent 9163945 commit 5644432
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ apply plugin: 'net.minecraftforge.gradle.forge'
//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.


version = "1.12.1-3.2.2"
version = "1.12.1-3.2.4"
group = "twopiradians.minewatch" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "Minewatch"

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/twopiradians/minewatch/common/Minewatch.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class Minewatch
{
public static final String MODNAME = "Minewatch";
public static final String MODID = "minewatch";
public static final String VERSION = "3.2.2";
public static final String VERSION = "3.2.4";
@Mod.Instance(MODID)
public static Minewatch instance;
public static MinewatchTab tab = new MinewatchTab("tabMinewatch");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void onUpdate() {

@Override
protected void onHit(RayTraceResult result) {
if (this.world.isRemote && result.entityHit != null && result.entityHit != this.shootingEntity &&
if (this.world.isRemote && result.entityHit instanceof EntityLivingBase && result.entityHit != this.shootingEntity &&
((EntityLivingBase)result.entityHit).getHealth() > 0 && this.shootingEntity != null)
this.shootingEntity.playSound(ModSoundEvents.hurt, 0.3f, result.entityHit.world.rand.nextFloat()/2+0.75f);

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"modid": "minewatch",
"name": "Minewatch",
"description": "Overwatch characters in Minecraft.",
"version": "3.2.2",
"version": "3.2.4",
"mcversion": "1.12.2",
"url": "https://github.com/2piradians/Minewatch",
"updateUrl": "",
Expand Down
4 changes: 2 additions & 2 deletions update.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"homepage": "https://minecraft.curseforge.com/projects/minewatch/files",
"promos": {
"1.12.1-latest": "3.2.2",
"1.12.1-recommended": "3.2.2"
"1.12.1-latest": "3.2.4",
"1.12.1-recommended": "3.2.4"
}
}

0 comments on commit 5644432

Please sign in to comment.