-
Notifications
You must be signed in to change notification settings - Fork 4
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
1 parent
b66b2c0
commit ee27203
Showing
595 changed files
with
10,277 additions
and
728 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
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
46 changes: 46 additions & 0 deletions
46
src/main/java/net/dakotapride/garnished/advancements/AnniversaryCakeTrigger.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,46 @@ | ||
package net.dakotapride.garnished.advancements; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
import com.google.gson.JsonObject; | ||
|
||
import net.dakotapride.garnished.CreateGarnished; | ||
import net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance; | ||
import net.minecraft.advancements.critereon.ContextAwarePredicate; | ||
import net.minecraft.advancements.critereon.DeserializationContext; | ||
import net.minecraft.advancements.critereon.SimpleCriterionTrigger; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.server.level.ServerPlayer; | ||
|
||
public class AnniversaryCakeTrigger extends SimpleCriterionTrigger<AnniversaryCakeTrigger.TriggerInstance> { | ||
private static final ResourceLocation ID = new ResourceLocation(CreateGarnished.ID, "consume_anniversary_cake_slice"); | ||
|
||
@Override | ||
public @NotNull ResourceLocation getId() { | ||
return ID; | ||
} | ||
|
||
public void trigger(@NotNull ServerPlayer player) { | ||
this.trigger(player, TriggerInstance::test); | ||
} | ||
|
||
@Override | ||
protected @NotNull TriggerInstance createInstance(@NotNull JsonObject json, @NotNull ContextAwarePredicate player, @NotNull DeserializationContext conditionsParser) { | ||
return new TriggerInstance(player); | ||
} | ||
|
||
public static class TriggerInstance extends AbstractCriterionTriggerInstance { | ||
public TriggerInstance(ContextAwarePredicate player) { | ||
super(AnniversaryCakeTrigger.ID, player); | ||
} | ||
|
||
public static TriggerInstance simple() { | ||
return new TriggerInstance(ContextAwarePredicate.ANY); | ||
} | ||
|
||
public boolean test() { | ||
return true; | ||
} | ||
} | ||
} | ||
|
46 changes: 46 additions & 0 deletions
46
src/main/java/net/dakotapride/garnished/advancements/DejojoTheAwsomeTrigger.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,46 @@ | ||
package net.dakotapride.garnished.advancements; | ||
|
||
import org.jetbrains.annotations.NotNull; | ||
|
||
import com.google.gson.JsonObject; | ||
|
||
import net.dakotapride.garnished.CreateGarnished; | ||
import net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance; | ||
import net.minecraft.advancements.critereon.ContextAwarePredicate; | ||
import net.minecraft.advancements.critereon.DeserializationContext; | ||
import net.minecraft.advancements.critereon.SimpleCriterionTrigger; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.server.level.ServerPlayer; | ||
|
||
public class DejojoTheAwsomeTrigger extends SimpleCriterionTrigger<DejojoTheAwsomeTrigger.TriggerInstance> { | ||
private static final ResourceLocation ID = new ResourceLocation(CreateGarnished.ID, "the_one_who_started_it_all"); | ||
|
||
@Override | ||
public @NotNull ResourceLocation getId() { | ||
return ID; | ||
} | ||
|
||
public void trigger(@NotNull ServerPlayer player) { | ||
this.trigger(player, TriggerInstance::test); | ||
} | ||
|
||
@Override | ||
protected @NotNull TriggerInstance createInstance(@NotNull JsonObject json, @NotNull ContextAwarePredicate player, @NotNull DeserializationContext conditionsParser) { | ||
return new TriggerInstance(player); | ||
} | ||
|
||
public static class TriggerInstance extends AbstractCriterionTriggerInstance { | ||
public TriggerInstance(ContextAwarePredicate player) { | ||
super(DejojoTheAwsomeTrigger.ID, player); | ||
} | ||
|
||
public static TriggerInstance simple() { | ||
return new TriggerInstance(ContextAwarePredicate.ANY); | ||
} | ||
|
||
public boolean test() { | ||
return true; | ||
} | ||
} | ||
} | ||
|
Oops, something went wrong.