Skip to content

Commit

Permalink
Add nutrition values for foods
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan19 committed Dec 1, 2019
1 parent 679d56d commit 43dff8f
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 8 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'

version = '0.4.4'
version = '0.4.6'
group = 'com.alan199921.astral' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'astral'

Expand Down Expand Up @@ -70,7 +70,7 @@ minecraft {
}

dependencies {
minecraft 'net.minecraftforge:forge:1.14.4-28.1.87'
minecraft 'net.minecraftforge:forge:1.14.4-28.1.96'
}

jar {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/alan199921/astral/items/Feverweed.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public Feverweed() {
.group(Astral.setup.astralItems)
.food(new Food.Builder()
.setAlwaysEdible()
.saturation(1)
.saturation(-1F)
.hunger(1)
.fastToEat()
.effect(new EffectInstance(Effects.LUCK, AstralConfig.getHerbEffectDurations().getFeverweedLuckDuration(), 1), 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ public IntrospectionMedicine() {
super(new Properties()
.food(new Food.Builder()
.setAlwaysEdible()
.hunger(1)
.saturation(-2F)
.build())
.group(Astral.setup.astralItems)
);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/alan199921/astral/items/Snowberry.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public Snowberry() {
.group(Astral.setup.astralItems)
.food(new Food.Builder()
.setAlwaysEdible()
.saturation(1)
.saturation(-1F)
.hunger(1)
.fastToEat()
.effect(new EffectInstance(Effects.NAUSEA, AstralConfig.getHerbEffectDurations().getSnowberryNauseaDuration(), 1), 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public TravellingMedicine() {
.food(new Food.Builder()
.fastToEat()
.setAlwaysEdible()
.saturation(-2F)
.hunger(1)
.effect(new EffectInstance(AstralEffects.astralTravelEffect, AstralConfig.getHerbEffectDurations().getTravellingMedicineDuration(), 1), 1)
.build()));
}
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ issueTrackerURL="https://github.com/Alan19/Astral/issues"
modId="astral"
version="${file.jarVersion}"
displayName="Astral"
updateJSONURL="http://myurl.me/" #optional
displayURL="https://github.com/Alan19/Astral" #optional
logoFile="examplemod.png" #optional
credits="Thanks to Divineaspect for designing and planning the mod and Lance5057 for some of the textures!" #optional
updateJSONURL="http://myurl.me/"
displayURL="https://github.com/Alan19/Astral"
logoFile="examplemod.png"
credits="Thanks to Divineaspect for designing and planning the mod and Lance5057 and Snurly for some of the textures!"
authors="Alan199921"
description='''A practice of the arts of psychic projection and inversion, the exploration of the psychic world hidden around us, and the development of the inner worlds of the mind of the practitioner.'''
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,80 @@
}
}
]
},
{
"name": "not_grown",
"rolls": 1.0,
"entries": [
{
"type": "minecraft:item",
"name": "astral:snowberry"
}
],
"conditions": [
{
"condition": "minecraft:block_state_property",
"block": "astral:snowberry_bush",
"properties": {
"age": "1"
}
}
],
"functions": [
{
"function": "minecraft:set_count",
"count": {
"min": 1.0,
"max": 1.0,
"type": "minecraft:uniform"
}
},
{
"function": "minecraft:apply_bonus",
"enchantment": "minecraft:fortune",
"formula": "minecraft:uniform_bonus_count",
"parameters": {
"bonusMultiplier": 1
}
}
]
},
{
"name": "planted",
"rolls": 1.0,
"entries": [
{
"type": "minecraft:item",
"name": "astral:snowberry"
}
],
"conditions": [
{
"condition": "minecraft:block_state_property",
"block": "astral:snowberry_bush",
"properties": {
"age": "0"
}
}
],
"functions": [
{
"function": "minecraft:set_count",
"count": {
"min": 1.0,
"max": 1.0,
"type": "minecraft:uniform"
}
},
{
"function": "minecraft:apply_bonus",
"enchantment": "minecraft:fortune",
"formula": "minecraft:uniform_bonus_count",
"parameters": {
"bonusMultiplier": 1
}
}
]
}
],
"functions": [
Expand Down

1 comment on commit 43dff8f

@Alan19
Copy link
Collaborator Author

@Alan19 Alan19 commented on 43dff8f Dec 1, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An attempt to fix #24

Please sign in to comment.