-
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
eb7f5e8
commit 8d10722
Showing
626 changed files
with
10,724 additions
and
1,303 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
45 changes: 45 additions & 0 deletions
45
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,45 @@ | ||
package net.dakotapride.garnished.advancements; | ||
|
||
import com.google.gson.JsonObject; | ||
import net.dakotapride.garnished.CreateGarnished; | ||
import net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance; | ||
import net.minecraft.advancements.critereon.DeserializationContext; | ||
import net.minecraft.advancements.critereon.EntityPredicate; | ||
import net.minecraft.advancements.critereon.SimpleCriterionTrigger; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.server.level.ServerPlayer; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
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, EntityPredicate.@NotNull Composite player, @NotNull DeserializationContext context) { | ||
return new TriggerInstance(player); | ||
} | ||
|
||
public static class TriggerInstance extends AbstractCriterionTriggerInstance { | ||
public TriggerInstance(EntityPredicate.Composite player) { | ||
super(AnniversaryCakeTrigger.ID, player); | ||
} | ||
|
||
public static TriggerInstance simple() { | ||
return new TriggerInstance(EntityPredicate.Composite.ANY); | ||
} | ||
|
||
public boolean test() { | ||
return true; | ||
} | ||
} | ||
} | ||
|
44 changes: 44 additions & 0 deletions
44
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,44 @@ | ||
package net.dakotapride.garnished.advancements; | ||
|
||
import com.google.gson.JsonObject; | ||
import net.dakotapride.garnished.CreateGarnished; | ||
import net.minecraft.advancements.critereon.AbstractCriterionTriggerInstance; | ||
import net.minecraft.advancements.critereon.DeserializationContext; | ||
import net.minecraft.advancements.critereon.EntityPredicate; | ||
import net.minecraft.advancements.critereon.SimpleCriterionTrigger; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.server.level.ServerPlayer; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
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 EntityPredicate.Composite player, @NotNull DeserializationContext conditionsParser) { | ||
return new TriggerInstance(player); | ||
} | ||
|
||
public static class TriggerInstance extends AbstractCriterionTriggerInstance { | ||
public TriggerInstance(EntityPredicate.Composite player) { | ||
super(DejojoTheAwsomeTrigger.ID, player); | ||
} | ||
|
||
public static TriggerInstance simple() { | ||
return new TriggerInstance(EntityPredicate.Composite.ANY); | ||
} | ||
|
||
public boolean test() { | ||
return true; | ||
} | ||
} | ||
} | ||
|
Oops, something went wrong.