Skip to content

Commit

Permalink
Fix mising drop items
Browse files Browse the repository at this point in the history
* re #177
  • Loading branch information
HenryLoenwind committed May 31, 2017
1 parent 578f6d5 commit cabb0d6
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import java.lang.reflect.Field;
import java.util.List;

import javax.annotation.Nullable;

import crazypants.enderzoo.EnderZoo;
import crazypants.enderzoo.Log;
import crazypants.enderzoo.config.Config;
Expand All @@ -13,6 +15,7 @@
import net.minecraft.init.SoundEvents;
import net.minecraft.item.Item;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.world.World;
Expand Down Expand Up @@ -106,6 +109,12 @@ protected Item getDropItem() {
}
}

@Override
@Nullable
protected ResourceLocation getLootTable() {
return null; // use getDropItem() instead
}

private void setTimeSinceIgnited(int i) {
if (fTimeSinceIgnited == null) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,13 @@ protected EntitySlime createInstance() {

@Override
protected Item getDropItem() {
return Items.CLAY_BALL;
return this.getSlimeSize() == 4 ? Item.getItemFromBlock(Blocks.CLAY) : Items.CLAY_BALL;
}

@Override
@Nullable
protected ResourceLocation getLootTable() {
return null; // use getDropItem() instead
}

@Override
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/crazypants/enderzoo/entity/EntityDireWolf.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import java.util.List;

import javax.annotation.Nullable;

import crazypants.enderzoo.config.Config;
import crazypants.enderzoo.entity.ai.EntityAIAttackOnCollideAggressive;
import crazypants.enderzoo.entity.ai.EntityAINearestAttackableTargetBounded;
Expand Down Expand Up @@ -166,6 +168,12 @@ protected Item getDropItem() {
return Item.getItemById(-1);
}

@Override
@Nullable
protected ResourceLocation getLootTable() {
return null; // use getDropItem() instead
}

public float getTailRotation() {
if (isAngry()) {
return (float) Math.PI / 2;
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/crazypants/enderzoo/entity/EntityEnderminy.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import java.util.List;
import java.util.UUID;

import javax.annotation.Nullable;

import crazypants.enderzoo.EnderZoo;
import crazypants.enderzoo.config.Config;
import crazypants.enderzoo.vec.VecUtil;
Expand Down Expand Up @@ -35,6 +37,7 @@
import net.minecraft.util.EntityDamageSource;
import net.minecraft.util.EntityDamageSourceIndirect;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundCategory;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.math.AxisAlignedBB;
Expand Down Expand Up @@ -272,6 +275,12 @@ protected Item getDropItem() {
return Items.ENDER_PEARL;
}

@Override
@Nullable
protected ResourceLocation getLootTable() {
return null; // use getDropItem() instead
}

@Override
protected void dropFewItems(boolean hitByPlayer, int looting) {
Item item = getDropItem();
Expand Down
8 changes: 8 additions & 0 deletions src/main/java/crazypants/enderzoo/entity/EntityOwl.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package crazypants.enderzoo.entity;

import javax.annotation.Nullable;

import crazypants.enderzoo.EnderZoo;
import crazypants.enderzoo.config.Config;
import crazypants.enderzoo.entity.ai.EntityAIFlyingAttackOnCollide;
Expand Down Expand Up @@ -418,6 +420,12 @@ protected Item getDropItem() {
return Items.FEATHER;
}

@Override
@Nullable
protected ResourceLocation getLootTable() {
return null; // use getDropItem() instead
}

@Override
public float getMaxTurnRate() {
return turnRate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import java.util.ArrayList;
import java.util.List;

import javax.annotation.Nullable;

import crazypants.enderzoo.EnderZoo;
import crazypants.enderzoo.config.Config;
import crazypants.enderzoo.entity.EntityWitherCat.GrowthMode;
Expand Down Expand Up @@ -31,6 +33,7 @@
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.DamageSource;
import net.minecraft.util.EnumHand;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.Vec3d;
Expand Down Expand Up @@ -119,6 +122,12 @@ protected void dropFewItems(boolean hitByPlayer, int lootingLevel) {
}
}

@Override
@Nullable
protected ResourceLocation getLootTable() {
return null; // use getDropItem() instead
}

@Override
public void setRevengeTarget(EntityLivingBase target) {
EntityLivingBase curTarget = getAITarget();
Expand Down

0 comments on commit cabb0d6

Please sign in to comment.