-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #149 from Faboslav/rascal
Rascal
- Loading branch information
Showing
80 changed files
with
2,011 additions
and
149 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
Large diffs are not rendered by default.
Oops, something went wrong.
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,215 @@ | ||
{ | ||
"format_version": "1.8.0", | ||
"animations": { | ||
"give_reward": { | ||
"animation_length": 1.54167, | ||
"bones": { | ||
"head": { | ||
"rotation": { | ||
"0.0": { | ||
"vector": [0, 0, 0] | ||
}, | ||
"0.375": { | ||
"vector": [-7.5, -50, 0], | ||
"easing": "linear" | ||
}, | ||
"0.4583": { | ||
"vector": [-7.5, -40, 0] | ||
}, | ||
"0.6667": { | ||
"vector": [0, 0, 0] | ||
}, | ||
"0.8333": { | ||
"vector": [15, 0, 0] | ||
}, | ||
"0.9583": { | ||
"vector": [15, 0, 0] | ||
}, | ||
"1.0833": { | ||
"vector": [0, 0, 0] | ||
}, | ||
"1.25": { | ||
"vector": [0, 0, 0] | ||
}, | ||
"1.5417": { | ||
"vector": [0, 0, 0] | ||
} | ||
} | ||
}, | ||
"rightArm": { | ||
"rotation": { | ||
"0.0": { | ||
"vector": [0, 0, 0] | ||
}, | ||
"0.125": { | ||
"vector": [-37.5, 0, -20] | ||
}, | ||
"0.4583": { | ||
"vector": [-170, 0, -20], | ||
"easing": "easeInElastic" | ||
}, | ||
"0.5417": { | ||
"vector": [-170, 0, -20], | ||
"easing": "easeInElastic" | ||
}, | ||
"0.625": { | ||
"vector": [-60, 0, 0] | ||
}, | ||
"0.75": { | ||
"vector": [-60, 20, 0] | ||
}, | ||
"1.0833": { | ||
"vector": [-60, 20, 0] | ||
}, | ||
"1.25": { | ||
"vector": [-60, 20, 0] | ||
}, | ||
"1.5417": { | ||
"vector": [0, 0, 0] | ||
} | ||
}, | ||
"position": { | ||
"0.625": { | ||
"vector": [0, 0, 0] | ||
}, | ||
"0.75": { | ||
"vector": [0, -2, -1] | ||
}, | ||
"1.0833": { | ||
"vector": [0, -2, -1] | ||
}, | ||
"1.25": { | ||
"vector": [0, -2, -1] | ||
}, | ||
"1.5417": { | ||
"vector": [0, 0, 0] | ||
} | ||
} | ||
}, | ||
"bag": { | ||
"rotation": { | ||
"0.4583": { | ||
"vector": [0, 0, 0] | ||
}, | ||
"0.5417": { | ||
"vector": [5, 0, 0] | ||
}, | ||
"0.625": { | ||
"vector": [0, 90, 0] | ||
}, | ||
"0.75": { | ||
"vector": [-30, 180, 0] | ||
}, | ||
"0.8333": { | ||
"vector": [-30, 180, 0] | ||
}, | ||
"1.0833": { | ||
"vector": [-30, 180, 0] | ||
}, | ||
"1.25": { | ||
"vector": [-30, 180, 0] | ||
}, | ||
"1.375": { | ||
"vector": [0, 90, 0] | ||
}, | ||
"1.4583": { | ||
"vector": [5, 0, 0] | ||
}, | ||
"1.5417": { | ||
"vector": [0, 0, 0] | ||
} | ||
}, | ||
"position": { | ||
"0.4583": { | ||
"vector": [0, 0, 0] | ||
}, | ||
"0.625": { | ||
"vector": [7, 0, -6] | ||
}, | ||
"0.75": { | ||
"vector": [-3, -7, -12] | ||
}, | ||
"1.0833": { | ||
"vector": [-3, -7, -12] | ||
}, | ||
"1.25": { | ||
"vector": [-3, -7, -12] | ||
}, | ||
"1.375": { | ||
"vector": [7, 0, -6] | ||
}, | ||
"1.5417": { | ||
"vector": [0, 0, 0] | ||
} | ||
} | ||
}, | ||
"leftArm": { | ||
"rotation": { | ||
"0.75": { | ||
"vector": [0, 0, 0] | ||
}, | ||
"0.8333": { | ||
"vector": [-52.5, 0, 0] | ||
}, | ||
"0.9167": { | ||
"vector": [-65, -30, 0] | ||
}, | ||
"1.0833": { | ||
"vector": [-90, 0, 0] | ||
}, | ||
"1.25": { | ||
"vector": [-90, 0, 0] | ||
}, | ||
"1.5417": { | ||
"vector": [0, 0, 0] | ||
} | ||
}, | ||
"position": { | ||
"0.4583": { | ||
"vector": [0, 0, 0] | ||
}, | ||
"0.5833": { | ||
"vector": [0, -0.25, 0], | ||
"easing": "linear" | ||
}, | ||
"0.6667": { | ||
"vector": [0, 0, 0] | ||
}, | ||
"0.75": { | ||
"vector": [0, 0, 0] | ||
}, | ||
"0.8333": { | ||
"vector": [0, -2, -1] | ||
}, | ||
"1.25": { | ||
"vector": [0, -2, -1] | ||
}, | ||
"1.5417": { | ||
"vector": [0, 0, 0] | ||
} | ||
} | ||
}, | ||
"body": { | ||
"position": { | ||
"0.4583": { | ||
"vector": [0, 0, 0] | ||
}, | ||
"0.5833": { | ||
"vector": [0, -0.25, 0], | ||
"easing": "linear" | ||
}, | ||
"0.6667": { | ||
"vector": [0, 0, 0] | ||
}, | ||
"1.0833": { | ||
"vector": [0, 0, 0] | ||
}, | ||
"1.5": { | ||
"vector": [0, 0, 0] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
71 changes: 71 additions & 0 deletions
71
.../com/faboslav/friendsandfoes/advancements/criterion/CompleteHideAndSeekGameCriterion.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,71 @@ | ||
package com.faboslav.friendsandfoes.advancements.criterion; | ||
|
||
import com.faboslav.friendsandfoes.FriendsAndFoes; | ||
import com.faboslav.friendsandfoes.entity.RascalEntity; | ||
import com.google.gson.JsonObject; | ||
import net.minecraft.advancement.criterion.AbstractCriterion; | ||
import net.minecraft.advancement.criterion.AbstractCriterionConditions; | ||
import net.minecraft.loot.context.LootContext; | ||
import net.minecraft.predicate.entity.AdvancementEntityPredicateDeserializer; | ||
import net.minecraft.predicate.entity.AdvancementEntityPredicateSerializer; | ||
import net.minecraft.predicate.entity.EntityPredicate; | ||
import net.minecraft.predicate.entity.EntityPredicate.Extended; | ||
import net.minecraft.server.network.ServerPlayerEntity; | ||
import net.minecraft.util.Identifier; | ||
|
||
public final class CompleteHideAndSeekGameCriterion extends AbstractCriterion<CompleteHideAndSeekGameCriterion.Conditions> | ||
{ | ||
static final Identifier ID = FriendsAndFoes.makeID("complete_hide_and_seek_game"); | ||
|
||
public CompleteHideAndSeekGameCriterion() { | ||
} | ||
|
||
public Identifier getId() { | ||
return ID; | ||
} | ||
|
||
public CompleteHideAndSeekGameCriterion.Conditions conditionsFromJson( | ||
JsonObject jsonObject, | ||
Extended extended, | ||
AdvancementEntityPredicateDeserializer advancementEntityPredicateDeserializer | ||
) { | ||
Extended extended2 = Extended.getInJson(jsonObject, "rascal", advancementEntityPredicateDeserializer); | ||
|
||
return new CompleteHideAndSeekGameCriterion.Conditions(extended, extended2); | ||
} | ||
|
||
public void trigger(ServerPlayerEntity player, RascalEntity entity) { | ||
LootContext lootContext = EntityPredicate.createAdvancementEntityLootContext(player, entity); | ||
this.trigger(player, (conditions) -> { | ||
return conditions.matches(lootContext); | ||
}); | ||
} | ||
|
||
public static class Conditions extends AbstractCriterionConditions | ||
{ | ||
private final Extended entity; | ||
|
||
public Conditions(Extended player, Extended entity) { | ||
super(CompleteHideAndSeekGameCriterion.ID, player); | ||
this.entity = entity; | ||
} | ||
|
||
public static CompleteHideAndSeekGameCriterion.Conditions any() { | ||
return new CompleteHideAndSeekGameCriterion.Conditions(Extended.EMPTY, Extended.EMPTY); | ||
} | ||
|
||
public static CompleteHideAndSeekGameCriterion.Conditions create(EntityPredicate entity) { | ||
return new CompleteHideAndSeekGameCriterion.Conditions(Extended.EMPTY, Extended.ofLegacy(entity)); | ||
} | ||
|
||
public boolean matches(LootContext entityContext) { | ||
return this.entity.test(entityContext); | ||
} | ||
|
||
public JsonObject toJson(AdvancementEntityPredicateSerializer predicateSerializer) { | ||
JsonObject jsonObject = super.toJson(predicateSerializer); | ||
jsonObject.add("entity", this.entity.toJson(predicateSerializer)); | ||
return jsonObject; | ||
} | ||
} | ||
} |
Oops, something went wrong.