Skip to content

Commit

Permalink
Removed leather drop from deer
Browse files Browse the repository at this point in the history
  • Loading branch information
juraj-hrivnak committed Dec 20, 2024
1 parent 5ee6095 commit fd91e47
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions scripts/CraftTweaker/Events/EventEntityLivingDeathDrops.zs
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ val others as IItemStack[][IEntityDefinition] = {
<entity:horse_colors:horse_felinoid> : [<minecraft:bone> * 4, <pyrotech:pelt_horse>, <animania:raw_horse> * 4 ],
<entity:horse_colors:mule> : [<minecraft:bone> * 4, <pyrotech:pelt_horse>, <animania:raw_horse> * 4 ],
<entity:minecraft:bat> : [<pyrotech:pelt_bat>],
<entity:mocreatures:deer> : [<minecraft:bone> * 3, <mocreatures:venisonraw>],
};

val sheepPelts as IItemStack[IItemStack] = {
Expand Down Expand Up @@ -146,7 +147,11 @@ val sheepPelts as IItemStack[IItemStack] = {
<animania:wool:6> : <pyrotech:pelt_sheep_brown>
};

function addDrops(entities as IItemStack[][IEntityDefinition], event as crafttweaker.event.EntityLivingDeathDropsEvent, removeDrops as bool) as void {
function addDrops(
entities as IItemStack[][IEntityDefinition],
event as crafttweaker.event.EntityLivingDeathDropsEvent,
removeDrops as bool
) as void {
for entity, items in entities {
if (!isNull(event.entity.definition) && event.entity.definition.name == entity.name) {
if (removeDrops) event.drops = [];
Expand All @@ -163,7 +168,11 @@ function addDrops(entities as IItemStack[][IEntityDefinition], event as crafttwe
}
}

function dropColoredPelt(pelts as IItemStack[IItemStack], drop as IItemStack, event as crafttweaker.event.EntityLivingDeathDropsEvent) as void {
function dropColoredPelt(
pelts as IItemStack[IItemStack],
drop as IItemStack,
event as crafttweaker.event.EntityLivingDeathDropsEvent
) as void {
for wool, pelt in pelts {
if (wool.name == drop.name) {
event.drops = [];
Expand All @@ -173,7 +182,11 @@ function dropColoredPelt(pelts as IItemStack[IItemStack], drop as IItemStack, ev
}
}

function addDropsSheep(entities as IItemStack[][IEntityDefinition], pelts as IItemStack[IItemStack], event as crafttweaker.event.EntityLivingDeathDropsEvent) as void {
function addDropsSheep(
entities as IItemStack[][IEntityDefinition],
pelts as IItemStack[IItemStack],
event as crafttweaker.event.EntityLivingDeathDropsEvent
) as void {
for entity, items in entities {
if (!isNull(event.entity.definition) && event.entity.definition.name == entity.name) {

Expand Down

0 comments on commit fd91e47

Please sign in to comment.