generated from TropheusJ/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
177 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
# It's as Shrimple as That | ||
A shrimple mod about everyone's favorite crustaceans. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/main/java/io/github/tropheusj/its_as_shrimple_as_that/criteria/KrillTrigger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package io.github.tropheusj.its_as_shrimple_as_that.criteria; | ||
|
||
import java.util.Optional; | ||
|
||
import io.github.tropheusj.its_as_shrimple_as_that.criteria.KrillTrigger.TriggerInstance; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
import com.mojang.serialization.Codec; | ||
|
||
import net.minecraft.advancements.critereon.ContextAwarePredicate; | ||
import net.minecraft.advancements.critereon.SimpleCriterionTrigger; | ||
import net.minecraft.server.level.ServerPlayer; | ||
|
||
public class KrillTrigger extends SimpleCriterionTrigger<TriggerInstance> { | ||
public void trigger(ServerPlayer player) { | ||
this.trigger(player, instance -> true); | ||
} | ||
|
||
@Override | ||
@NotNull | ||
public Codec<TriggerInstance> codec() { | ||
return TriggerInstance.CODEC; | ||
} | ||
|
||
public record TriggerInstance() implements SimpleInstance { | ||
public static final Codec<TriggerInstance> CODEC = Codec.unit(new TriggerInstance()); | ||
|
||
@Override | ||
@NotNull | ||
public Optional<ContextAwarePredicate> player() { | ||
return Optional.empty(); | ||
} | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
src/main/java/io/github/tropheusj/its_as_shrimple_as_that/criteria/LoadShrimpTrigger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package io.github.tropheusj.its_as_shrimple_as_that.criteria; | ||
|
||
import java.util.Optional; | ||
|
||
import com.mojang.serialization.Codec; | ||
|
||
import io.github.tropheusj.its_as_shrimple_as_that.criteria.LoadShrimpTrigger.TriggerInstance; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
import net.minecraft.advancements.critereon.ContextAwarePredicate; | ||
import net.minecraft.advancements.critereon.SimpleCriterionTrigger; | ||
import net.minecraft.server.level.ServerPlayer; | ||
|
||
public class LoadShrimpTrigger extends SimpleCriterionTrigger<TriggerInstance> { | ||
public void trigger(ServerPlayer player) { | ||
this.trigger(player, instance -> true); | ||
} | ||
|
||
@Override | ||
@NotNull | ||
public Codec<TriggerInstance> codec() { | ||
return TriggerInstance.CODEC; | ||
} | ||
|
||
public record TriggerInstance() implements SimpleInstance { | ||
public static final Codec<TriggerInstance> CODEC = Codec.unit(new TriggerInstance()); | ||
|
||
@Override | ||
@NotNull | ||
public Optional<ContextAwarePredicate> player() { | ||
return Optional.empty(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 11 additions & 20 deletions
31
src/main/resources/data/its_as_shrimple_as_that/advancements/its_as_shrimple_as_that.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,24 @@ | ||
{ | ||
"parent": "its_as_shrimple_as_that:one_in_a_krillion", | ||
"display": { | ||
"icon": { | ||
"id": "its_as_shrimple_as_that:fried_rice" | ||
"id": "its_as_shrimple_as_that:shrimp_spawn_egg" | ||
}, | ||
"title": "You're telling me a shrimp fried this rice?", | ||
"description": "It couldn't be more true.", | ||
"frame": "challenge", | ||
"show_toast": true, | ||
"announce_to_chat": true, | ||
"title": "It's as Shrimple as That", | ||
"description": "Or is it?", | ||
"background": "minecraft:textures/block/terredepomme.png", | ||
"frame": "task", | ||
"show_toast": false, | ||
"announce_to_chat": false, | ||
"hidden": false | ||
}, | ||
"criteria": { | ||
"traded": { | ||
"trigger": "minecraft:villager_trade", | ||
"conditions": { | ||
"item": { | ||
"items": "its_as_shrimple_as_that:fried_rice", | ||
"count": 1 | ||
} | ||
} | ||
"impossible": { | ||
"trigger": "minecraft:impossible" | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"traded" | ||
"impossible" | ||
] | ||
], | ||
"rewards": { | ||
"experience": 42069 | ||
} | ||
] | ||
} |
2 changes: 1 addition & 1 deletion
2
src/main/resources/data/its_as_shrimple_as_that/advancements/krill_yourself.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/resources/data/its_as_shrimple_as_that/advancements/krilled.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"parent": "its_as_shrimple_as_that:unimaginable_power", | ||
"display": { | ||
"icon": { | ||
"id": "its_as_shrimple_as_that:shrimp_spawn_egg" | ||
}, | ||
"title": "Krilled", | ||
"description": "An unconventional strategy.", | ||
"frame": "task", | ||
"show_toast": true, | ||
"announce_to_chat": true, | ||
"hidden": true | ||
}, | ||
"criteria": { | ||
"krill": { | ||
"trigger": "its_as_shrimple_as_that:krill" | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"krill" | ||
] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
src/main/resources/data/its_as_shrimple_as_that/advancements/shrimp_fried_rice.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"parent": "its_as_shrimple_as_that:one_in_a_krillion", | ||
"display": { | ||
"icon": { | ||
"id": "its_as_shrimple_as_that:fried_rice" | ||
}, | ||
"title": "You're telling me a shrimp fried this rice?", | ||
"description": "It couldn't be more true.", | ||
"frame": "challenge", | ||
"show_toast": true, | ||
"announce_to_chat": true, | ||
"hidden": false | ||
}, | ||
"criteria": { | ||
"traded": { | ||
"trigger": "minecraft:villager_trade", | ||
"conditions": { | ||
"item": { | ||
"items": "its_as_shrimple_as_that:fried_rice", | ||
"count": 1 | ||
} | ||
} | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"traded" | ||
] | ||
] | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/resources/data/its_as_shrimple_as_that/advancements/unimaginable_power.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"parent": "its_as_shrimple_as_that:its_as_shrimple_as_that", | ||
"display": { | ||
"icon": { | ||
"id": "minecraft:crossbow" | ||
}, | ||
"title": "Unimaginable Power", | ||
"description": "What will you do with it?", | ||
"frame": "task", | ||
"show_toast": true, | ||
"announce_to_chat": true, | ||
"hidden": false | ||
}, | ||
"criteria": { | ||
"load_shrimp": { | ||
"trigger": "its_as_shrimple_as_that:load_shrimp" | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"load_shrimp" | ||
] | ||
] | ||
} |