Skip to content

Commit

Permalink
Add moose drops and fix deer having weird drops
Browse files Browse the repository at this point in the history
  • Loading branch information
itsmeow committed Nov 26, 2019
1 parent 08f73dc commit a327977
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import javax.annotation.Nullable;

import its_meow.betteranimalsplus.common.entity.ai.EntityAIEatGrassCustom;
import its_meow.betteranimalsplus.init.ModLootTables;
import its_meow.betteranimalsplus.util.HeadTypes;
import net.minecraft.block.state.IBlockState;
import net.minecraft.crash.CrashReport;
Expand All @@ -22,6 +23,7 @@
import net.minecraft.util.DamageSource;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ReportedException;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
Expand Down Expand Up @@ -130,6 +132,11 @@ protected void doBlockCollisions() {
blockpos$pooledmutableblockpos2.release();
}

@Override
protected ResourceLocation getLootTable() {
return ModLootTables.MOOSE;
}

@Override
public int getVariantMax() {
return 4;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public class ModLootTables {

public static final ResourceLocation TURKEY = new ResourceLocation(Ref.MOD_ID, "turkey");

public static final ResourceLocation MOOSE = new ResourceLocation(Ref.MOD_ID, "moose");

public static void register() {
LootTableList.register(deer);
LootTableList.register(lammergeier);
Expand All @@ -50,6 +52,7 @@ public static void register() {
LootTableList.register(BEAR_KERMODE);
LootTableList.register(SHARK);
LootTableList.register(TURKEY);
LootTableList.register(MOOSE);
}

}
17 changes: 10 additions & 7 deletions src/main/resources/assets/betteranimalsplus/loot_tables/deer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"pools": [
{
"name": "deer",
"rolls": 2,
"name": "deer-venison",
"rolls": 1,
"entries": [
{
"type": "item",
Expand Down Expand Up @@ -36,18 +36,21 @@
}
}
]
},
}
]
},
{
"name": "deer-antler",
"rolls": 1,
"entries": [
{
"type": "item",
"name": "betteranimalsplus:antler",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": {
"min": 2,
"max": 2
}
"count": 2
}
]
}
Expand Down
60 changes: 60 additions & 0 deletions src/main/resources/assets/betteranimalsplus/loot_tables/moose.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"pools": [
{
"name": "moose-venison",
"rolls": 1,
"entries": [
{
"type": "item",
"name": "betteranimalsplus:venisonraw",
"weight": 2,
"functions": [
{
"function": "set_count",
"count": {
"min": 5,
"max": 8
}
},
{
"function": "furnace_smelt",
"conditions": [
{
"condition": "entity_properties",
"entity": "this",
"properties": {
"on_fire": true
}
}
]
},
{
"function": "looting_enchant",
"count": {
"min": 0,
"max": 1
}
}
]
}
]
},
{
"name": "moose-antler",
"rolls": 1,
"entries": [
{
"type": "item",
"name": "betteranimalsplus:antler",
"weight": 1,
"functions": [
{
"function": "set_count",
"count": 2
}
]
}
]
}
]
}

0 comments on commit a327977

Please sign in to comment.