mirror of
https://github.com/TechnoVisionDev/Forge-Modding-Tutorial-1.16
synced 2024-10-27 20:34:04 +00:00
Add drops to entity
This commit is contained in:
parent
ae4ee12175
commit
3bf0c35082
@ -29,10 +29,10 @@ public class HogEntity extends AnimalEntity {
|
|||||||
super(type, worldIn);
|
super(type, worldIn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//func_233666_p_ ---> registerAttributes()
|
||||||
public static AttributeModifierMap.MutableAttribute setCustomAttributes() {
|
public static AttributeModifierMap.MutableAttribute setCustomAttributes() {
|
||||||
//func_233666_p_ ---> registerAttributes()
|
return MobEntity.func_233666_p_()
|
||||||
//func_233815_a_ ---> createMutableAttribute()
|
.createMutableAttribute(Attributes.MAX_HEALTH, 10.0D)
|
||||||
return MobEntity.func_233666_p_().createMutableAttribute(Attributes.MAX_HEALTH, 10.0D)
|
|
||||||
.createMutableAttribute(Attributes.MOVEMENT_SPEED, 0.25D);
|
.createMutableAttribute(Attributes.MOVEMENT_SPEED, 0.25D);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:entity",
|
||||||
|
"pools": [
|
||||||
|
{
|
||||||
|
"rolls": 1,
|
||||||
|
"entries": [
|
||||||
|
{
|
||||||
|
"type": "minecraft:item",
|
||||||
|
"functions": [
|
||||||
|
{
|
||||||
|
"function": "minecraft:set_count",
|
||||||
|
"count": {
|
||||||
|
"min": 1.0,
|
||||||
|
"max": 3.0,
|
||||||
|
"type": "minecraft:uniform"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"function": "minecraft:furnace_smelt",
|
||||||
|
"conditions": [
|
||||||
|
{
|
||||||
|
"condition": "minecraft:entity_properties",
|
||||||
|
"predicate": {
|
||||||
|
"flags": {
|
||||||
|
"is_on_fire": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"entity": "this"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"function": "minecraft:looting_enchant",
|
||||||
|
"count": {
|
||||||
|
"min": 0.0,
|
||||||
|
"max": 1.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "minecraft:porkchop"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user