mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Clean up tags and fix some recipe unlock conditions
This commit is contained in:
parent
ea9c3bfaf9
commit
ec9a12bdf9
34 changed files with 267 additions and 239 deletions
|
@ -51,7 +51,7 @@ public interface Debug {
|
|||
)).forEach((namespace, entries) -> {
|
||||
@SuppressWarnings("deprecation")
|
||||
var unregistered = entries.stream()
|
||||
.filter(entry -> !entry.getValue().getRegistryEntry().isIn(UTags.HAS_NO_TRAITS) && SpellTraits.of(entry.getValue()).isEmpty())
|
||||
.filter(entry -> !entry.getValue().getRegistryEntry().isIn(UTags.Items.HAS_NO_TRAITS) && SpellTraits.of(entry.getValue()).isEmpty())
|
||||
.map(entry -> {
|
||||
String id = entry.getKey().getValue().toString();
|
||||
|
||||
|
|
|
@ -7,6 +7,19 @@ import net.minecraft.registry.tag.TagKey;
|
|||
import net.minecraft.util.Identifier;
|
||||
|
||||
public interface UConventionalTags {
|
||||
interface Blocks {
|
||||
TagKey<Block> CONCRETE_POWDERS = block("concrete_powders");
|
||||
TagKey<Block> CONCRETES = block("concretes");
|
||||
|
||||
private static TagKey<Block> block(String name) {
|
||||
return TagKey.of(RegistryKeys.BLOCK, new Identifier("c", name));
|
||||
}
|
||||
}
|
||||
|
||||
interface Items {
|
||||
TagKey<Item> CONCRETE_POWDERS = item("concrete_powders");
|
||||
TagKey<Item> CONCRETES = item("concretes");
|
||||
|
||||
TagKey<Item> APPLES = item("apples");
|
||||
TagKey<Item> ACORNS = item("acorns");
|
||||
TagKey<Item> PINECONES = item("pinecones");
|
||||
|
@ -28,21 +41,8 @@ public interface UConventionalTags {
|
|||
TagKey<Item> CROPS_PEANUTS = item("crops/peanuts");
|
||||
TagKey<Item> TOOL_KNIVES = item("tools/knives");
|
||||
|
||||
static TagKey<Item> item(String name) {
|
||||
private static TagKey<Item> item(String name) {
|
||||
return TagKey.of(RegistryKeys.ITEM, new Identifier("c", name));
|
||||
}
|
||||
|
||||
static TagKey<Block> block(String name) {
|
||||
return TagKey.of(RegistryKeys.BLOCK, new Identifier("c", name));
|
||||
}
|
||||
|
||||
interface Blocks {
|
||||
TagKey<Block> CONCRETE_POWDERS = block("concrete_powders");
|
||||
TagKey<Block> CONCRETES = block("concretes");
|
||||
}
|
||||
|
||||
interface Items {
|
||||
TagKey<Item> CONCRETE_POWDERS = item("concrete_powders");
|
||||
TagKey<Item> CONCRETES = item("concretes");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,16 @@ import net.minecraft.util.Identifier;
|
|||
import net.minecraft.world.dimension.DimensionType;
|
||||
|
||||
public interface UTags {
|
||||
interface Items {
|
||||
TagKey<Item> ZAP_LOGS = item("zap_logs");
|
||||
TagKey<Item> WAXED_ZAP_LOGS = item("waxed_zap_logs");
|
||||
TagKey<Item> PALM_LOGS = item("palm_logs");
|
||||
TagKey<Item> CLOUD_BEDS = item("cloud_beds");
|
||||
TagKey<Item> CLOUD_SLABS = item("cloud_slabs");
|
||||
TagKey<Item> CLOUD_STAIRS = item("cloud_stairs");
|
||||
TagKey<Item> CLOUD_BLOCKS = item("cloud_blocks");
|
||||
TagKey<Item> CHITIN_BLOCKS = item("chitin_blocks");
|
||||
|
||||
TagKey<Item> FRESH_APPLES = item("fresh_apples");
|
||||
|
||||
TagKey<Item> FALLS_SLOWLY = item("falls_slowly");
|
||||
|
@ -40,38 +50,17 @@ public interface UTags {
|
|||
TagKey<Item> BED_SHEETS = item("bed_sheets");
|
||||
TagKey<Item> CLOUD_JARS = item("cloud_jars");
|
||||
|
||||
TagKey<Block> FRAGILE = block("fragile");
|
||||
TagKey<Block> INTERESTING = block("interesting");
|
||||
TagKey<Block> CATAPULT_IMMUNE = block("catapult_immune");
|
||||
TagKey<Block> JARS = block("jars");
|
||||
TagKey<Item> GROUP_FORAGING = item("groups/foraging");
|
||||
TagKey<Item> GROUP_EARTH_PONY = item("groups/earth_pony");
|
||||
TagKey<Item> GROUP_UNICORN = item("groups/unicorn");
|
||||
TagKey<Item> GROUP_PEGASUS = item("groups/pegasus");
|
||||
TagKey<Item> GROUP_BAT_PONY = item("groups/bat_pony");
|
||||
TagKey<Item> GROUP_SEA_PONY = item("groups/sea_pony");
|
||||
TagKey<Item> GROUP_CHANGELING = item("groups/changeling");
|
||||
|
||||
TagKey<Block> CRYSTAL_HEART_BASE = block("crystal_heart_base");
|
||||
TagKey<Block> CRYSTAL_HEART_ORNAMENT = block("crystal_heart_ornament");
|
||||
TagKey<Block> UNAFFECTED_BY_GROW_ABILITY = block("unaffected_by_grow_ability");
|
||||
TagKey<Block> KICKS_UP_DUST = block("kicks_up_dust");
|
||||
|
||||
TagKey<Block> POLEARM_MINEABLE = block("mineable/polearm");
|
||||
|
||||
TagKey<EntityType<?>> TRANSFORMABLE_ENTITIES = entity("transformable");
|
||||
|
||||
TagKey<StatusEffect> PINEAPPLE_EFFECTS = effect("pineapple_effects");
|
||||
|
||||
TagKey<DamageType> BREAKS_SUNGLASSES = damage("breaks_sunglasses");
|
||||
TagKey<DamageType> SPELLBOOK_IMMUNE_TO = damage("spellbook_immune_to");
|
||||
TagKey<DamageType> FROM_ROCKS = damage("from_rocks");
|
||||
TagKey<DamageType> FROM_HORSESHOES = damage("from_horseshoes");
|
||||
|
||||
TagKey<DimensionType> HAS_NO_ATMOSPHERE = dimension("has_no_atmosphere");
|
||||
|
||||
interface Items {
|
||||
TagKey<Item> ZAP_LOGS = item("zap_logs");
|
||||
TagKey<Item> WAXED_ZAP_LOGS = item("waxed_zap_logs");
|
||||
TagKey<Item> PALM_LOGS = item("palm_logs");
|
||||
TagKey<Item> CLOUD_BEDS = item("cloud_beds");
|
||||
TagKey<Item> CLOUD_SLABS = item("cloud_slabs");
|
||||
TagKey<Item> CLOUD_STAIRS = item("cloud_stairs");
|
||||
TagKey<Item> CLOUD_BLOCKS = item("cloud_blocks");
|
||||
TagKey<Item> CHITIN_BLOCKS = item("chitin_blocks");
|
||||
private static TagKey<Item> item(String name) {
|
||||
return TagKey.of(RegistryKeys.ITEM, Unicopia.id(name));
|
||||
}
|
||||
}
|
||||
|
||||
interface Blocks {
|
||||
|
@ -84,30 +73,57 @@ public interface UTags {
|
|||
TagKey<Block> CLOUD_BLOCKS = block("cloud_blocks");
|
||||
TagKey<Block> CHITIN_BLOCKS = block("chitin_blocks");
|
||||
|
||||
TagKey<Block> FRAGILE = block("fragile");
|
||||
TagKey<Block> INTERESTING = block("interesting");
|
||||
TagKey<Block> CATAPULT_IMMUNE = block("catapult_immune");
|
||||
TagKey<Block> JARS = block("jars");
|
||||
|
||||
TagKey<Block> CRYSTAL_HEART_BASE = block("crystal_heart_base");
|
||||
TagKey<Block> CRYSTAL_HEART_ORNAMENT = block("crystal_heart_ornament");
|
||||
TagKey<Block> UNAFFECTED_BY_GROW_ABILITY = block("unaffected_by_grow_ability");
|
||||
TagKey<Block> KICKS_UP_DUST = block("kicks_up_dust");
|
||||
|
||||
TagKey<Block> POLEARM_MINEABLE = block("mineable/polearm");
|
||||
|
||||
TagKey<Block> BUTTERFLIES_SPAWNABLE_ON = block("butterflies_spawn_on");
|
||||
}
|
||||
|
||||
static TagKey<Item> item(String name) {
|
||||
return TagKey.of(RegistryKeys.ITEM, Unicopia.id(name));
|
||||
}
|
||||
|
||||
static TagKey<Block> block(String name) {
|
||||
private static TagKey<Block> block(String name) {
|
||||
return TagKey.of(RegistryKeys.BLOCK, Unicopia.id(name));
|
||||
}
|
||||
}
|
||||
|
||||
static TagKey<EntityType<?>> entity(String name) {
|
||||
interface Entities {
|
||||
TagKey<EntityType<?>> TRANSFORMABLE = entity("transformable");
|
||||
|
||||
private static TagKey<EntityType<?>> entity(String name) {
|
||||
return TagKey.of(RegistryKeys.ENTITY_TYPE, Unicopia.id(name));
|
||||
}
|
||||
|
||||
static TagKey<StatusEffect> effect(String name) {
|
||||
return TagKey.of(RegistryKeys.STATUS_EFFECT, Unicopia.id(name));
|
||||
}
|
||||
|
||||
static TagKey<DamageType> damage(String name) {
|
||||
interface DamageTypes {
|
||||
TagKey<DamageType> BREAKS_SUNGLASSES = damage("breaks_sunglasses");
|
||||
TagKey<DamageType> SPELLBOOK_IMMUNE_TO = damage("spellbook_immune_to");
|
||||
TagKey<DamageType> FROM_ROCKS = damage("from_rocks");
|
||||
TagKey<DamageType> FROM_HORSESHOES = damage("from_horseshoes");
|
||||
|
||||
private static TagKey<DamageType> damage(String name) {
|
||||
return TagKey.of(RegistryKeys.DAMAGE_TYPE, Unicopia.id(name));
|
||||
}
|
||||
}
|
||||
|
||||
static TagKey<DimensionType> dimension(String name) {
|
||||
interface DimensionTypes {
|
||||
TagKey<DimensionType> HAS_NO_ATMOSPHERE = dimension("has_no_atmosphere");
|
||||
|
||||
private static TagKey<DimensionType> dimension(String name) {
|
||||
return TagKey.of(RegistryKeys.DIMENSION_TYPE, new Identifier("c", name));
|
||||
}
|
||||
}
|
||||
|
||||
interface StatusEffects {
|
||||
TagKey<StatusEffect> PINEAPPLE_EFFECTS = effect("pineapple_effects");
|
||||
|
||||
private static TagKey<StatusEffect> effect(String name) {
|
||||
return TagKey.of(RegistryKeys.STATUS_EFFECT, Unicopia.id(name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ public class EarthPonyGrowAbility implements Ability<Pos> {
|
|||
}
|
||||
}
|
||||
|
||||
if (w.getBlockState(pos).isIn(UTags.UNAFFECTED_BY_GROW_ABILITY)) {
|
||||
if (w.getBlockState(pos).isIn(UTags.Blocks.UNAFFECTED_BY_GROW_ABILITY)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ public class EarthPonyStompAbility implements Ability<Hit> {
|
|||
|
||||
ParticleUtils.spawnParticle(player.getWorld(), UParticles.GROUND_POUND, player.getX(), player.getY() - 1, player.getZ(), 0, 0, 0);
|
||||
BlockState steppingState = player.getSteppingBlockState();
|
||||
if (steppingState.isIn(UTags.KICKS_UP_DUST)) {
|
||||
if (steppingState.isIn(UTags.Blocks.KICKS_UP_DUST)) {
|
||||
ParticleUtils.spawnParticle(player.getWorld(), new BlockStateParticleEffect(UParticles.DUST_CLOUD, steppingState), player.getBlockPos().down().toCenterPos(), Vec3d.ZERO);
|
||||
}
|
||||
|
||||
|
@ -227,7 +227,7 @@ public class EarthPonyStompAbility implements Ability<Hit> {
|
|||
w.syncWorldEvent(WorldEvents.BLOCK_BROKEN, pos, Block.getRawIdFromState(state));
|
||||
}
|
||||
|
||||
if (state.isIn(UTags.KICKS_UP_DUST)) {
|
||||
if (state.isIn(UTags.Blocks.KICKS_UP_DUST)) {
|
||||
if (w.random.nextInt(4) == 0 && w.isAir(pos.up()) && w.getFluidState(pos.up()).isEmpty()) {
|
||||
ParticleUtils.spawnParticle(w, new BlockStateParticleEffect(UParticles.DUST_CLOUD, state), pos.up().toCenterPos(), VecHelper.supply(() -> w.random.nextTriangular(0, 0.1F)));
|
||||
}
|
||||
|
|
|
@ -110,7 +110,7 @@ public class ScreechAbility implements Ability<Numeric> {
|
|||
|
||||
|
||||
if (living.getWorld().random.nextInt(MOB_SPOOK_PROBABILITY) == 0) {
|
||||
RegistryUtils.pickRandom(living.getWorld(), UTags.SPOOKED_MOB_DROPS).ifPresent(drop -> {
|
||||
RegistryUtils.pickRandom(living.getWorld(), UTags.Items.SPOOKED_MOB_DROPS).ifPresent(drop -> {
|
||||
living.dropStack(drop.getDefaultStack());
|
||||
living.playSound(USounds.Vanilla.ENTITY_ITEM_PICKUP, 1, 0.1F);
|
||||
UCriteria.SPOOK_MOB.trigger(player.asEntity());
|
||||
|
|
|
@ -64,7 +64,7 @@ public class RainboomAbilitySpell extends AbstractSpell {
|
|||
});
|
||||
EFFECT_RANGE.translate(source.getOrigin()).getBlockPositions().forEach(pos -> {
|
||||
BlockState state = source.asWorld().getBlockState(pos);
|
||||
if (state.isIn(UTags.FRAGILE) && source.canModifyAt(pos, ModificationType.PHYSICAL)) {
|
||||
if (state.isIn(UTags.Blocks.FRAGILE) && source.canModifyAt(pos, ModificationType.PHYSICAL)) {
|
||||
source.asWorld().breakBlock(pos, true);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -86,7 +86,7 @@ public class CatapultSpell extends AbstractSpell implements ProjectileDelegate.B
|
|||
}
|
||||
|
||||
BlockState state = world.getBlockState(bpos);
|
||||
if (state.isIn(UTags.CATAPULT_IMMUNE)) {
|
||||
if (state.isIn(UTags.Blocks.CATAPULT_IMMUNE)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ public class TransformationSpell extends AbstractSpell implements ProjectileDele
|
|||
|
||||
@SuppressWarnings("unchecked")
|
||||
private <T extends MobEntity> Optional<EntityType<T>> pickType(EntityType<?> except, World world) {
|
||||
Set<EntityType<?>> options = RegistryUtils.valuesForTag(world, UTags.TRANSFORMABLE_ENTITIES).collect(Collectors.toSet());
|
||||
Set<EntityType<?>> options = RegistryUtils.valuesForTag(world, UTags.Entities.TRANSFORMABLE).collect(Collectors.toSet());
|
||||
if (except.getSpawnGroup() == SpawnGroup.MONSTER) {
|
||||
options.removeIf(t -> t.getSpawnGroup() == SpawnGroup.MONSTER);
|
||||
} else {
|
||||
|
|
|
@ -71,7 +71,7 @@ public class PieBlock extends Block implements Waterloggable {
|
|||
|
||||
if (world.isClient) {
|
||||
|
||||
if (itemStack.isIn(UTags.CAN_CUT_PIE)) {
|
||||
if (itemStack.isIn(UTags.Items.CAN_CUT_PIE)) {
|
||||
return ActionResult.SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ public class PieBlock extends Block implements Waterloggable {
|
|||
}
|
||||
}
|
||||
|
||||
if (itemStack.isIn(UTags.CAN_CUT_PIE)) {
|
||||
if (itemStack.isIn(UTags.Items.CAN_CUT_PIE)) {
|
||||
SoundEmitter.playSoundAt(player, USounds.BLOCK_PIE_SLICE, SoundCategory.NEUTRAL, 1, 1);
|
||||
removeSlice(world, pos, state, player);
|
||||
itemStack.damage(1, player, p -> p.sendToolBreakStatus(hand));
|
||||
|
|
|
@ -52,7 +52,7 @@ public class PlayerPoser {
|
|||
float pitchChange = -0.5F;
|
||||
float yawChange = 0.8F;
|
||||
|
||||
if (player.getStackInHand(rightHand).isIn(UTags.POLEARMS) && (!ponyRace.isEquine() || model.rightArm.pitch != 0)) {
|
||||
if (player.getStackInHand(rightHand).isIn(UTags.Items.POLEARMS) && (!ponyRace.isEquine() || model.rightArm.pitch != 0)) {
|
||||
model.rightArm.pitch += pitchChange;
|
||||
model.rightArm.yaw += yawChange;
|
||||
if (player.handSwingTicks > 0 && rightHand == Hand.MAIN_HAND) {
|
||||
|
@ -61,7 +61,7 @@ public class PlayerPoser {
|
|||
}
|
||||
}
|
||||
|
||||
if (player.getStackInHand(leftHand).isIn(UTags.POLEARMS) && (!ponyRace.isEquine() || model.leftArm.pitch != 0)) {
|
||||
if (player.getStackInHand(leftHand).isIn(UTags.Items.POLEARMS) && (!ponyRace.isEquine() || model.leftArm.pitch != 0)) {
|
||||
model.leftArm.pitch += pitchChange;
|
||||
model.leftArm.yaw -= yawChange;
|
||||
if (player.handSwingTicks > 0 && leftHand == Hand.MAIN_HAND) {
|
||||
|
|
|
@ -73,27 +73,27 @@ public class UAdvancementsProvider extends FabricAdvancementProvider {
|
|||
|
||||
private void generateEarthTribeAdvancementsTree(Consumer<Advancement> consumer, AdvancementDisplayBuilder.Parent parent) {
|
||||
parent.child(UItems.ROCK).criterion("has_rock", hasItems(UItems.ROCK)).build(consumer, "born_on_a_rock_farm").children(p -> {
|
||||
p.child(UItems.PEBBLES).criterion("killed_entity_with_rock", killWithItems(UTags.FROM_ROCKS)).build(consumer, "sticks_and_stones");
|
||||
p.child(UItems.PEBBLES).criterion("killed_entity_with_rock", killWithItems(UTags.DamageTypes.FROM_ROCKS)).build(consumer, "sticks_and_stones");
|
||||
p.child(UItems.WEIRD_ROCK).hidden().criterion("has_rock", hasItems(UItems.WEIRD_ROCK)).build(consumer, "thats_unusual");
|
||||
});
|
||||
|
||||
parent.child(UItems.OATS).criterion("has_oats", hasItems(UItems.OATS)).build(consumer, "oats_so_easy");
|
||||
parent.child(Items.HAY_BLOCK).criterion("eat_hay", ConsumeItemCriterion.Conditions.item(Items.HAY_BLOCK)).build(consumer, "what_the_hay");
|
||||
parent.child(UItems.COPPER_HORSE_SHOE).criterion("has_horseshoe", hasItems(UTags.HORSE_SHOES)).build(consumer, "blacksmith").children(p -> {
|
||||
parent.child(UItems.COPPER_HORSE_SHOE).criterion("has_horseshoe", hasItems(UTags.Items.HORSE_SHOES)).build(consumer, "blacksmith").children(p -> {
|
||||
p.child(UItems.IRON_HORSE_SHOE).criterion("has_iron_horseshoe", hasItems(UItems.IRON_HORSE_SHOE)).build(consumer, "change_of_shoes")
|
||||
.child(UItems.GOLDEN_HORSE_SHOE).criterion("has_gold_horseshoe", hasItems(UItems.GOLDEN_HORSE_SHOE)).build(consumer, "fashionably_expensive")
|
||||
.child(UItems.NETHERITE_HORSE_SHOE).criterion("has_netherite_horseshoe", hasItems(UItems.NETHERITE_HORSE_SHOE)).build(consumer, "overkill");
|
||||
p.child(UItems.IRON_HORSE_SHOE).hidden().frame(AdvancementFrame.CHALLENGE).criterion("killed_entity_with_horseshoe", killWithItems(UTags.FROM_HORSESHOES)).build(consumer, "dead_ringer");
|
||||
p.child(UItems.IRON_HORSE_SHOE).hidden().frame(AdvancementFrame.CHALLENGE).criterion("killed_entity_with_horseshoe", killWithItems(UTags.DamageTypes.FROM_HORSESHOES)).build(consumer, "dead_ringer");
|
||||
});
|
||||
parent.child(UItems.PINECONE).frame(AdvancementFrame.CHALLENGE).criterion("eat_pinecone", ConsumeItemCriterion.Conditions.item(UItems.PINECONE)).build(consumer, "eat_pinecone");
|
||||
parent.child(UItems.OAK_BASKET).doNotAnnounce().criterion("has_basket", hasItems(UTags.BASKETS)).build(consumer, "basket_case")
|
||||
parent.child(UItems.OAK_BASKET).doNotAnnounce().criterion("has_basket", hasItems(UTags.Items.BASKETS)).build(consumer, "basket_case")
|
||||
.child(Items.LANTERN).criterion("construct_balloon", CustomEventCriterion.create("construct_balloon")).build(consumer, "aeronaut")
|
||||
.child(UItems.GIANT_BALLOON).announce().frame(AdvancementFrame.CHALLENGE).criterion("ride_balloon", CustomEventCriterion.create("ride_balloon")).build(consumer, "travelling_in_style");
|
||||
parent.child(UItems.MUFFIN).hidden().criterion("has_muffin", hasItems(UItems.MUFFIN)).build(consumer, "baked_bads");
|
||||
parent.child(UItems.HORSE_SHOE_FRIES).criterion("has_horse_shoe_fries", hasItems(UItems.HORSE_SHOE_FRIES)).build(consumer, "lucky");
|
||||
parent.child(UItems.TOAST).criterion("has_toast", hasItems(UItems.TOAST)).build(consumer, "toast")
|
||||
.child(UItems.BURNED_TOAST).hidden().criterion("has_burned_toast", hasItems(UItems.BURNED_TOAST)).build(consumer, "burn_toast");
|
||||
parent.child(UItems.GREEN_APPLE).criterion("has_apple", hasItems(UTags.FRESH_APPLES)).build(consumer, "apple_route").children(p -> {
|
||||
parent.child(UItems.GREEN_APPLE).criterion("has_apple", hasItems(UTags.Items.FRESH_APPLES)).build(consumer, "apple_route").children(p -> {
|
||||
p.child(UItems.SWEET_APPLE).criterion("has_all_apples", hasItems(Items.APPLE, UItems.GREEN_APPLE, UItems.SWEET_APPLE, UItems.SOUR_APPLE, UItems.ROTTEN_APPLE, UItems.ZAP_APPLE, UItems.COOKED_ZAP_APPLE, Items.GOLDEN_APPLE)).build(consumer, "sweet_apple_acres");
|
||||
p.child(UItems.ZAP_BULB).criterion("has_zap_apple", hasItems(UItems.ZAP_APPLE)).build(consumer, "trick_apple").children(pp -> {
|
||||
pp.child(UItems.ZAP_APPLE).hidden().criterion("eat_trick_apple", CustomEventCriterion.createFlying("eat_trick_apple")).build(consumer, "eat_trick_apple");
|
||||
|
@ -110,7 +110,7 @@ public class UAdvancementsProvider extends FabricAdvancementProvider {
|
|||
parent.child(Items.GLASS_PANE).criterion("break_window", CustomEventCriterion.createFlying("break_window")).rewards(AdvancementRewards.Builder.experience(10)).build(consumer, "rainbow_crash");
|
||||
parent.child(UItems.PEGASUS_BADGE).criterion("fly_through_the_pain", CustomEventCriterion.createFlying("second_wind")).rewards(AdvancementRewards.Builder.experience(10)).build(consumer, "second_wind");
|
||||
parent.child(UItems.EMPTY_JAR).criterion("has_empty_jar", hasItems(UItems.EMPTY_JAR)).build(consumer, "jar")
|
||||
.child(UItems.RAIN_CLOUD_JAR).criterion("has_cloud_jar", hasItems(UTags.CLOUD_JARS)).rewards(AdvancementRewards.Builder.experience(55)).build(consumer, "gotcha");
|
||||
.child(UItems.RAIN_CLOUD_JAR).criterion("has_cloud_jar", hasItems(UTags.Items.CLOUD_JARS)).rewards(AdvancementRewards.Builder.experience(55)).build(consumer, "gotcha");
|
||||
parent.child(UItems.LIGHTNING_JAR).frame(AdvancementFrame.CHALLENGE).criterion("lightning_strike", CustomEventCriterion.createFlying("lightning_strike")).rewards(AdvancementRewards.Builder.experience(30)).build(consumer, "mid_flight_interruption").children(p -> {
|
||||
p.child(UItems.LIGHTNING_JAR).hidden().frame(AdvancementFrame.CHALLENGE).apply(d -> applyLightningBugCriterions(d, RacePredicate.of(Set.of(Race.CHANGELING), Set.of()), 10, 90)).build(consumer, "lightning_bug");
|
||||
p.child(UItems.LIGHTNING_JAR).hidden().frame(AdvancementFrame.CHALLENGE).apply(d -> applyLightningBugCriterions(d, RacePredicate.of(Set.of(), Set.of(Race.CHANGELING)), 10, 90)).build(consumer, "wonder_bolt");
|
||||
|
@ -255,7 +255,7 @@ public class UAdvancementsProvider extends FabricAdvancementProvider {
|
|||
static CriterionConditions dingCelestia(Set<Race> includeTribes, Set<Race> excludeTribes) {
|
||||
return new SendViaDragonBreathScrollCriterion.Conditions(
|
||||
LootContextPredicate.EMPTY,
|
||||
ItemPredicate.Builder.create().tag(UTags.IS_DELIVERED_AGGRESSIVELY).build(), false,
|
||||
ItemPredicate.Builder.create().tag(UTags.Items.IS_DELIVERED_AGGRESSIVELY).build(), false,
|
||||
Optional.of("princess celestia"),
|
||||
TriState.FALSE,
|
||||
Optional.of("dings_on_celestias_head"),
|
||||
|
|
|
@ -39,7 +39,7 @@ public class UChestAdditionsLootTableProvider extends SimpleFabricLootTableProvi
|
|||
.rolls(UniformLootNumberProvider.create(2, 4))
|
||||
.with(ItemEntry.builder(UItems.GRYPHON_FEATHER).weight(10).apply(SetCountLootFunction.builder(UniformLootNumberProvider.create(1, 7))))
|
||||
.with(ItemEntry.builder(UItems.GOLDEN_WING).weight(1).apply(SetCountLootFunction.builder(UniformLootNumberProvider.create(1, 2))))
|
||||
.with(TagEntry.expandBuilder(UTags.FRESH_APPLES).weight(1).apply(SetCountLootFunction.builder(UniformLootNumberProvider.create(2, 5))))
|
||||
.with(TagEntry.expandBuilder(UTags.Items.FRESH_APPLES).weight(1).apply(SetCountLootFunction.builder(UniformLootNumberProvider.create(2, 5))))
|
||||
));
|
||||
exporter.accept(LootTables.VILLAGE_FLETCHER_CHEST, LootTable.builder().pool(LootPool.builder()
|
||||
.rolls(UniformLootNumberProvider.create(2, 4))
|
||||
|
@ -48,8 +48,8 @@ public class UChestAdditionsLootTableProvider extends SimpleFabricLootTableProvi
|
|||
));
|
||||
exporter.accept(LootTables.VILLAGE_PLAINS_CHEST, LootTable.builder().pool(LootPool.builder()
|
||||
.rolls(UniformLootNumberProvider.create(3, 4))
|
||||
.with(TagEntry.expandBuilder(UTags.FRESH_APPLES).weight(1))
|
||||
.with(TagEntry.expandBuilder(UTags.APPLE_SEEDS).weight(1))
|
||||
.with(TagEntry.expandBuilder(UTags.Items.FRESH_APPLES).weight(1))
|
||||
.with(TagEntry.expandBuilder(UTags.Items.APPLE_SEEDS).weight(1))
|
||||
));
|
||||
|
||||
exporter.accept(LootTables.ANCIENT_CITY_CHEST, LootTable.builder().pool(LootPool.builder()
|
||||
|
@ -59,26 +59,26 @@ public class UChestAdditionsLootTableProvider extends SimpleFabricLootTableProvi
|
|||
exporter.accept(LootTables.BURIED_TREASURE_CHEST, LootTable.builder().pool(LootPool.builder()
|
||||
.rolls(UniformLootNumberProvider.create(1, 4))
|
||||
.with(ItemEntry.builder(UItems.PEARL_NECKLACE).weight(1))
|
||||
.with(TagEntry.expandBuilder(UTags.item("food_types/shells")).weight(3))
|
||||
.with(TagEntry.expandBuilder(UTags.Items.SHELLS).weight(3))
|
||||
));
|
||||
exporter.accept(LootTables.SHIPWRECK_SUPPLY_CHEST, LootTable.builder().pool(LootPool.builder()
|
||||
.rolls(UniformLootNumberProvider.create(1, 6))
|
||||
.with(TagEntry.expandBuilder(UTags.SHELLS).weight(3))
|
||||
.with(TagEntry.expandBuilder(UTags.Items.SHELLS).weight(3))
|
||||
));
|
||||
exporter.accept(LootTables.SHIPWRECK_TREASURE_CHEST, LootTable.builder().pool(LootPool.builder()
|
||||
.rolls(UniformLootNumberProvider.create(1, 4))
|
||||
.with(ItemEntry.builder(UItems.PEARL_NECKLACE).weight(1))
|
||||
.with(TagEntry.expandBuilder(UTags.SHELLS).weight(3))
|
||||
.with(TagEntry.expandBuilder(UTags.Items.SHELLS).weight(3))
|
||||
));
|
||||
exporter.accept(LootTables.UNDERWATER_RUIN_BIG_CHEST, LootTable.builder().pool(LootPool.builder()
|
||||
.rolls(UniformLootNumberProvider.create(1, 2))
|
||||
.with(ItemEntry.builder(UItems.PEARL_NECKLACE).weight(1))
|
||||
.with(ItemEntry.builder(UItems.SHELLY).weight(4))
|
||||
.with(TagEntry.expandBuilder(UTags.SHELLS).weight(8))
|
||||
.with(TagEntry.expandBuilder(UTags.Items.SHELLS).weight(8))
|
||||
));
|
||||
exporter.accept(LootTables.UNDERWATER_RUIN_SMALL_CHEST, LootTable.builder().pool(LootPool.builder()
|
||||
.rolls(UniformLootNumberProvider.create(1, 4))
|
||||
.with(TagEntry.expandBuilder(UTags.SHELLS).weight(1))
|
||||
.with(TagEntry.expandBuilder(UTags.Items.SHELLS).weight(1))
|
||||
));
|
||||
|
||||
exporter.accept(LootTables.DESERT_WELL_ARCHAEOLOGY, LootTable.builder().pool(LootPool.builder()
|
||||
|
@ -89,7 +89,7 @@ public class UChestAdditionsLootTableProvider extends SimpleFabricLootTableProvi
|
|||
.with(ItemEntry.builder(UItems.ROCK_STEW).weight(1))
|
||||
.with(ItemEntry.builder(UItems.PEBBLES).weight(1))
|
||||
.with(ItemEntry.builder(UItems.SHELLY).weight(1))
|
||||
.with(TagEntry.expandBuilder(UTags.SHELLS).weight(1))
|
||||
.with(TagEntry.expandBuilder(UTags.Items.SHELLS).weight(1))
|
||||
.with(ItemEntry.builder(UItems.PEARL_NECKLACE).weight(1))
|
||||
));
|
||||
exporter.accept(LootTables.TRAIL_RUINS_COMMON_ARCHAEOLOGY, LootTable.builder().pool(LootPool.builder()
|
||||
|
@ -106,13 +106,13 @@ public class UChestAdditionsLootTableProvider extends SimpleFabricLootTableProvi
|
|||
));
|
||||
exporter.accept(LootTables.OCEAN_RUIN_WARM_ARCHAEOLOGY, LootTable.builder().pool(LootPool.builder()
|
||||
.rolls(UniformLootNumberProvider.create(1, 4))
|
||||
.with(TagEntry.expandBuilder(UTags.SHELLS).weight(1))
|
||||
.with(TagEntry.expandBuilder(UTags.Items.SHELLS).weight(1))
|
||||
.with(ItemEntry.builder(UItems.PEARL_NECKLACE).weight(1))
|
||||
));
|
||||
|
||||
exporter.accept(LootTables.FISHING_GAMEPLAY, LootTable.builder().pool(LootPool.builder()
|
||||
.rolls(UniformLootNumberProvider.create(1, 4))
|
||||
.with(TagEntry.expandBuilder(UTags.SHELLS).weight(2))
|
||||
.with(TagEntry.expandBuilder(UTags.Items.SHELLS).weight(2))
|
||||
));
|
||||
|
||||
exporter.accept(LootTables.FISHING_JUNK_GAMEPLAY, LootTable.builder().pool(LootPool.builder()
|
||||
|
|
|
@ -73,7 +73,7 @@ public class BedSheetPatternRecipeBuilder {
|
|||
|
||||
private static void offerBedSheetConversionRecipe(Consumer<RecipeJsonProvider> exporter, ItemConvertible output, Stream<ItemConvertible> wools) {
|
||||
var builder = ShapelessRecipeJsonBuilder.create(RecipeCategory.DECORATIONS, output)
|
||||
.input(UTags.WOOL_BED_SHEETS).criterion("has_bed_sheet", RecipeProvider.conditionsFromTag(UTags.WOOL_BED_SHEETS));
|
||||
.input(UTags.Items.WOOL_BED_SHEETS).criterion("has_bed_sheet", RecipeProvider.conditionsFromTag(UTags.Items.WOOL_BED_SHEETS));
|
||||
wools.forEach(builder::input);
|
||||
builder
|
||||
.group("bed_sheet")
|
||||
|
|
|
@ -80,8 +80,19 @@ public class URecipeProvider extends FabricRecipeProvider {
|
|||
}
|
||||
|
||||
private void generateVanillaRecipeExtensions(Consumer<RecipeJsonProvider> exporter) {
|
||||
ShapelessRecipeJsonBuilder.create(RecipeCategory.MISC, Items.WRITABLE_BOOK).input(Items.BOOK).input(Items.INK_SAC).input(UTags.MAGIC_FEATHERS).criterion("has_book", conditionsFromItem(Items.BOOK)).offerTo(exporter);
|
||||
ShapedRecipeJsonBuilder.create(RecipeCategory.COMBAT, Items.ARROW, 4).input('#', UConventionalTags.STICKS).input('X', Items.FLINT).input('Y', UTags.MAGIC_FEATHERS).pattern("X").pattern("#").pattern("Y").criterion("has_feather", conditionsFromTag(UTags.MAGIC_FEATHERS)).criterion("has_flint", conditionsFromItem(Items.FLINT)).offerTo(exporter);
|
||||
ShapelessRecipeJsonBuilder.create(RecipeCategory.MISC, Items.WRITABLE_BOOK)
|
||||
.input(Items.BOOK).criterion("has_book", conditionsFromItem(Items.BOOK))
|
||||
.input(Items.INK_SAC)
|
||||
.input(UTags.Items.MAGIC_FEATHERS)
|
||||
.offerTo(exporter);
|
||||
ShapedRecipeJsonBuilder.create(RecipeCategory.COMBAT, Items.ARROW, 4)
|
||||
.input('#', UConventionalTags.Items.STICKS)
|
||||
.input('X', Items.FLINT).criterion("has_flint", conditionsFromItem(Items.FLINT))
|
||||
.input('Y', UTags.Items.MAGIC_FEATHERS).criterion("has_feather", conditionsFromTag(UTags.Items.MAGIC_FEATHERS))
|
||||
.pattern("X")
|
||||
.pattern("#")
|
||||
.pattern("Y")
|
||||
.offerTo(exporter);
|
||||
}
|
||||
|
||||
private void offerJarRecipes(Consumer<RecipeJsonProvider> exporter) {
|
||||
|
@ -97,7 +108,7 @@ public class URecipeProvider extends FabricRecipeProvider {
|
|||
}
|
||||
|
||||
private void offerCloudRecipes(Consumer<RecipeJsonProvider> exporter) {
|
||||
offerShapelessRecipe(exporter, UItems.CLOUD_LUMP, UTags.CLOUD_JARS, "cloud", 4);
|
||||
offerShapelessRecipe(exporter, UItems.CLOUD_LUMP, UTags.Items.CLOUD_JARS, "cloud", 4);
|
||||
generateFamily(exporter, UBlockFamilies.CLOUD);
|
||||
offer2x3Recipe(exporter, UBlocks.CLOUD_PILLAR, UBlocks.CLOUD, "pillar");
|
||||
offer2x2CompactingRecipe(exporter, RecipeCategory.BUILDING_BLOCKS, UBlocks.CLOUD, UItems.CLOUD_LUMP);
|
||||
|
@ -200,7 +211,7 @@ public class URecipeProvider extends FabricRecipeProvider {
|
|||
// magic staff
|
||||
ShapedRecipeJsonBuilder.create(RecipeCategory.TOOLS, UItems.MAGIC_STAFF)
|
||||
.input('*', UItems.GEMSTONE).criterion("has_gemstone", conditionsFromItem(UItems.GEMSTONE))
|
||||
.input('#', UConventionalTags.STICKS).criterion("has_stick", conditionsFromTag(UConventionalTags.STICKS))
|
||||
.input('#', UConventionalTags.Items.STICKS).criterion("has_stick", conditionsFromTag(UConventionalTags.Items.STICKS))
|
||||
.pattern(" *")
|
||||
.pattern(" # ")
|
||||
.pattern("# ")
|
||||
|
@ -217,7 +228,7 @@ public class URecipeProvider extends FabricRecipeProvider {
|
|||
// pegasus amulet
|
||||
ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, UItems.GOLDEN_FEATHER)
|
||||
.input('*', Items.GOLD_NUGGET).criterion("has_nugget", conditionsFromItem(Items.GOLD_NUGGET))
|
||||
.input('#', UTags.MAGIC_FEATHERS).criterion("has_feather", conditionsFromTag(UTags.MAGIC_FEATHERS))
|
||||
.input('#', UTags.Items.MAGIC_FEATHERS).criterion("has_feather", conditionsFromTag(UTags.Items.MAGIC_FEATHERS))
|
||||
.pattern("***")
|
||||
.pattern("*#*")
|
||||
.pattern("***")
|
||||
|
@ -232,7 +243,7 @@ public class URecipeProvider extends FabricRecipeProvider {
|
|||
// friendship bracelet
|
||||
ShapedRecipeJsonBuilder.create(RecipeCategory.TOOLS, UItems.FRIENDSHIP_BRACELET)
|
||||
.input('*', Items.STRING)
|
||||
.input('#', Items.LEATHER).criterion(hasItem(Items.LEATHER), conditionsFromTag(UTags.MAGIC_FEATHERS))
|
||||
.input('#', Items.LEATHER).criterion(hasItem(Items.LEATHER), conditionsFromItem(Items.LEATHER))
|
||||
.pattern("*#*")
|
||||
.pattern("# #")
|
||||
.pattern("*#*")
|
||||
|
@ -242,7 +253,7 @@ public class URecipeProvider extends FabricRecipeProvider {
|
|||
// meadowbrook's staff
|
||||
ShapedRecipeJsonBuilder.create(RecipeCategory.TOOLS, UItems.MEADOWBROOKS_STAFF)
|
||||
.input('*', UItems.GEMSTONE).criterion(hasItem(UItems.GEMSTONE), conditionsFromItem(UItems.GEMSTONE))
|
||||
.input('/', UConventionalTags.STICKS).criterion(hasItem(Items.STICK), conditionsFromTag(UConventionalTags.STICKS))
|
||||
.input('/', UConventionalTags.Items.STICKS).criterion(hasItem(Items.STICK), conditionsFromTag(UConventionalTags.Items.STICKS))
|
||||
.pattern(" *")
|
||||
.pattern(" / ")
|
||||
.pattern("/ ")
|
||||
|
@ -310,7 +321,7 @@ public class URecipeProvider extends FabricRecipeProvider {
|
|||
offerShapelessRecipe(exporter, UItems.SOUR_APPLE_SEEDS, UItems.SOUR_APPLE, "seeds", 3);
|
||||
offerShapelessRecipe(exporter, UItems.GREEN_APPLE_SEEDS, UItems.GREEN_APPLE, "seeds", 3);
|
||||
offerShapelessRecipe(exporter, UItems.GOLDEN_OAK_SEEDS, Items.GOLDEN_APPLE, "seeds", 1);
|
||||
offerPieRecipe(exporter, UItems.APPLE_PIE, UItems.APPLE_PIE_SLICE, Items.WHEAT, UTags.FRESH_APPLES);
|
||||
offerPieRecipe(exporter, UItems.APPLE_PIE, UItems.APPLE_PIE_SLICE, Items.WHEAT, UTags.Items.FRESH_APPLES);
|
||||
|
||||
ShapelessRecipeJsonBuilder.create(RecipeCategory.FOOD, UItems.ROCK_STEW)
|
||||
.input(UItems.ROCK, 3).criterion(hasItem(UItems.ROCK), conditionsFromItem(UItems.ROCK))
|
||||
|
@ -344,20 +355,20 @@ public class URecipeProvider extends FabricRecipeProvider {
|
|||
.pattern("###")
|
||||
.offerTo(exporter, convertBetween(UItems.OATS, Items.WHEAT));
|
||||
ShapelessRecipeJsonBuilder.create(RecipeCategory.FOOD, UItems.JUICE)
|
||||
.input(Ingredient.fromTag(UTags.FRESH_APPLES), 6).criterion(hasItem(Items.APPLE), conditionsFromTag(UTags.FRESH_APPLES))
|
||||
.input(Ingredient.fromTag(UTags.Items.FRESH_APPLES), 6).criterion(hasItem(Items.APPLE), conditionsFromTag(UTags.Items.FRESH_APPLES))
|
||||
.input(Items.GLASS_BOTTLE)
|
||||
.group("juice")
|
||||
.offerTo(exporter);
|
||||
appendIngredients(ShapelessRecipeJsonBuilder.create(RecipeCategory.FOOD, UItems.MUFFIN), Items.SUGAR, Items.EGG, Items.POTATO, UItems.JUICE, UItems.WHEAT_WORMS).offerTo(exporter);
|
||||
ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, UItems.MUG)
|
||||
.input('*', Items.IRON_NUGGET).criterion(hasItem(Items.IRON_NUGGET), conditionsFromItem(Items.IRON_NUGGET))
|
||||
.input('#', UConventionalTags.STICKS).criterion(hasItem(Items.STICK), conditionsFromTag(UConventionalTags.STICKS))
|
||||
.input('#', UConventionalTags.Items.STICKS).criterion(hasItem(Items.STICK), conditionsFromTag(UConventionalTags.Items.STICKS))
|
||||
.pattern("# #")
|
||||
.pattern("* *")
|
||||
.pattern(" # ")
|
||||
.offerTo(exporter);
|
||||
appendIngredients(ShapelessRecipeJsonBuilder.create(RecipeCategory.FOOD, UItems.CIDER), UItems.BURNED_JUICE, UItems.MUG)
|
||||
.input(Ingredient.fromTag(UTags.FRESH_APPLES)).criterion(hasItem(Items.APPLE), conditionsFromTag(UTags.FRESH_APPLES))
|
||||
.input(Ingredient.fromTag(UTags.Items.FRESH_APPLES)).criterion(hasItem(Items.APPLE), conditionsFromTag(UTags.Items.FRESH_APPLES))
|
||||
.offerTo(exporter);
|
||||
|
||||
ShapedRecipeJsonBuilder.create(RecipeCategory.FOOD, UItems.HAY_FRIES)
|
||||
|
@ -410,8 +421,8 @@ public class URecipeProvider extends FabricRecipeProvider {
|
|||
.input(UItems.TOAST, 8)
|
||||
.offerTo(exporter);
|
||||
ShapelessRecipeJsonBuilder.create(RecipeCategory.FOOD, UItems.CANDIED_APPLE)
|
||||
.input(UConventionalTags.STICKS)
|
||||
.input(UTags.FRESH_APPLES).criterion(hasItem(UItems.ZAP_APPLE_JAM_JAR), conditionsFromItem(UItems.ZAP_APPLE_JAM_JAR))
|
||||
.input(UConventionalTags.Items.STICKS)
|
||||
.input(UTags.Items.FRESH_APPLES).criterion(hasItem(Items.APPLE), conditionsFromTag(UTags.Items.FRESH_APPLES))
|
||||
.input(Items.SUGAR, 4)
|
||||
.offerTo(exporter);
|
||||
|
||||
|
@ -445,7 +456,7 @@ public class URecipeProvider extends FabricRecipeProvider {
|
|||
.pattern(" C ")
|
||||
.offerTo(exporter);
|
||||
ShapedRecipeJsonBuilder.create(RecipeCategory.COMBAT, UItems.PEARL_NECKLACE)
|
||||
.input('#', UTags.SHELLS).criterion("has_shell", conditionsFromTag(UTags.SHELLS))
|
||||
.input('#', UTags.Items.SHELLS).criterion("has_shell", conditionsFromTag(UTags.Items.SHELLS))
|
||||
.input('~', Items.STRING)
|
||||
.pattern("# #")
|
||||
.pattern("# #")
|
||||
|
@ -492,7 +503,7 @@ public class URecipeProvider extends FabricRecipeProvider {
|
|||
.pattern("#*")
|
||||
.offerTo(exporter, convertBetween(Items.DIRT, UItems.WHEAT_WORMS));
|
||||
|
||||
offerShapelessRecipe(exporter, Items.BONE_MEAL, UTags.SHELLS, "bonemeal", 3);
|
||||
offerShapelessRecipe(exporter, Items.BONE_MEAL, UTags.Items.SHELLS, "bonemeal", 3);
|
||||
|
||||
// pegasus feathers for non pegasi
|
||||
ShapedRecipeJsonBuilder.create(RecipeCategory.MISC, UItems.PEGASUS_FEATHER)
|
||||
|
@ -578,7 +589,7 @@ public class URecipeProvider extends FabricRecipeProvider {
|
|||
public static void offerPolearmRecipe(Consumer<RecipeJsonProvider> exporter, ItemConvertible output, Either<ItemConvertible, TagKey<Item>> input) {
|
||||
CraftingMaterialHelper
|
||||
.input(ShapedRecipeJsonBuilder.create(RecipeCategory.TOOLS, output), 'o', input).criterion(CraftingMaterialHelper.hasEither(input), CraftingMaterialHelper.conditionsFromEither(input))
|
||||
.input('#', UConventionalTags.STICKS)
|
||||
.input('#', UConventionalTags.Items.STICKS)
|
||||
.pattern(" o")
|
||||
.pattern(" # ")
|
||||
.pattern("# ")
|
||||
|
|
|
@ -44,14 +44,14 @@ public class UBlockTagProvider extends FabricTagProvider.BlockTagProvider {
|
|||
UBlocks.GOLDEN_OAK_SPROUT
|
||||
};
|
||||
|
||||
getOrCreateTagBuilder(UTags.CATAPULT_IMMUNE).add(Blocks.BEDROCK).forceAddTag(BlockTags.DOORS).forceAddTag(BlockTags.TRAPDOORS);
|
||||
getOrCreateTagBuilder(UTags.Blocks.CATAPULT_IMMUNE).add(Blocks.BEDROCK).forceAddTag(BlockTags.DOORS).forceAddTag(BlockTags.TRAPDOORS);
|
||||
getOrCreateTagBuilder(UTags.Blocks.BUTTERFLIES_SPAWNABLE_ON).forceAddTag(BlockTags.ANIMALS_SPAWNABLE_ON).forceAddTag(BlockTags.LEAVES).forceAddTag(BlockTags.FLOWERS).forceAddTag(BlockTags.FLOWER_POTS);
|
||||
getOrCreateTagBuilder(UTags.JARS).add(UBlocks.JAR, UBlocks.CLOUD_JAR, UBlocks.STORM_JAR, UBlocks.LIGHTNING_JAR, UBlocks.ZAP_JAR);
|
||||
getOrCreateTagBuilder(UTags.Blocks.JARS).add(UBlocks.JAR, UBlocks.CLOUD_JAR, UBlocks.STORM_JAR, UBlocks.LIGHTNING_JAR, UBlocks.ZAP_JAR);
|
||||
getOrCreateTagBuilder(BlockTags.CROPS).add(crops);
|
||||
getOrCreateTagBuilder(BlockTags.BEE_GROWABLES).add(crops);
|
||||
getOrCreateTagBuilder(BlockTags.MAINTAINS_FARMLAND).add(crops);
|
||||
getOrCreateTagBuilder(BlockTags.NEEDS_DIAMOND_TOOL).add(UBlocks.FROSTED_OBSIDIAN);
|
||||
getOrCreateTagBuilder(BlockTags.PICKAXE_MINEABLE).add(UBlocks.ROCKS, UBlocks.FROSTED_OBSIDIAN, UBlocks.WEATHER_VANE).forceAddTag(UTags.JARS);
|
||||
getOrCreateTagBuilder(BlockTags.PICKAXE_MINEABLE).add(UBlocks.ROCKS, UBlocks.FROSTED_OBSIDIAN, UBlocks.WEATHER_VANE).forceAddTag(UTags.Blocks.JARS);
|
||||
getOrCreateTagBuilder(BlockTags.DRAGON_IMMUNE).add(UBlocks.FROSTED_OBSIDIAN, UBlocks.GOLDEN_OAK_LOG, UBlocks.GOLDEN_OAK_LEAVES);
|
||||
getOrCreateTagBuilder(BlockTags.FIRE).add(UBlocks.SPECTRAL_FIRE);
|
||||
getOrCreateTagBuilder(BlockTags.HOE_MINEABLE).add(UBlocks.HAY_BLOCK).addOptional(Unicopia.id("rice_block")).addOptional(Unicopia.id("straw_block"));
|
||||
|
@ -63,31 +63,31 @@ public class UBlockTagProvider extends FabricTagProvider.BlockTagProvider {
|
|||
addChitinBlocksets();
|
||||
addFruitTrees();
|
||||
|
||||
getOrCreateTagBuilder(UTags.CRYSTAL_HEART_BASE).add(
|
||||
getOrCreateTagBuilder(UTags.Blocks.CRYSTAL_HEART_BASE).add(
|
||||
Blocks.DIAMOND_BLOCK,
|
||||
Blocks.QUARTZ_BLOCK, Blocks.QUARTZ_BRICKS, Blocks.QUARTZ_SLAB, Blocks.QUARTZ_STAIRS, Blocks.QUARTZ_PILLAR,
|
||||
Blocks.SMOOTH_QUARTZ, Blocks.SMOOTH_QUARTZ_SLAB, Blocks.SMOOTH_QUARTZ_STAIRS, Blocks.CHISELED_QUARTZ_BLOCK,
|
||||
Blocks.AMETHYST_BLOCK, Blocks.NETHERITE_BLOCK, Blocks.EMERALD_BLOCK
|
||||
);
|
||||
getOrCreateTagBuilder(UTags.CRYSTAL_HEART_ORNAMENT).add(Blocks.END_ROD);
|
||||
getOrCreateTagBuilder(UTags.Blocks.CRYSTAL_HEART_ORNAMENT).add(Blocks.END_ROD);
|
||||
|
||||
getOrCreateTagBuilder(UTags.FRAGILE)
|
||||
getOrCreateTagBuilder(UTags.Blocks.FRAGILE)
|
||||
.forceAddTag(ConventionalBlockTags.GLASS_BLOCKS)
|
||||
.forceAddTag(ConventionalBlockTags.GLASS_PANES)
|
||||
.forceAddTag(UTags.JARS)
|
||||
.forceAddTag(UTags.Blocks.JARS)
|
||||
.add(Blocks.VINE, Blocks.LILY_PAD);
|
||||
|
||||
getOrCreateTagBuilder(UTags.INTERESTING).add(
|
||||
getOrCreateTagBuilder(UTags.Blocks.INTERESTING).add(
|
||||
Blocks.SEA_LANTERN, Blocks.ENDER_CHEST, Blocks.END_PORTAL_FRAME,
|
||||
Blocks.JUKEBOX, Blocks.SPAWNER
|
||||
).forceAddTag(ConventionalBlockTags.ORES);
|
||||
|
||||
getOrCreateTagBuilder(UTags.KICKS_UP_DUST).forceAddTag(BlockTags.SAND).add(
|
||||
getOrCreateTagBuilder(UTags.Blocks.KICKS_UP_DUST).forceAddTag(BlockTags.SAND).add(
|
||||
Blocks.SUSPICIOUS_SAND,
|
||||
Blocks.GRAVEL, Blocks.SUSPICIOUS_GRAVEL
|
||||
).forceAddTag(TagKey.of(RegistryKeys.BLOCK, new Identifier("c", "concrete_powders")));
|
||||
|
||||
getOrCreateTagBuilder(UTags.UNAFFECTED_BY_GROW_ABILITY).add(Blocks.GRASS_BLOCK);
|
||||
getOrCreateTagBuilder(UTags.Blocks.UNAFFECTED_BY_GROW_ABILITY).add(Blocks.GRASS_BLOCK);
|
||||
}
|
||||
|
||||
private void addFruitTrees() {
|
||||
|
@ -112,7 +112,7 @@ public class UBlockTagProvider extends FabricTagProvider.BlockTagProvider {
|
|||
|
||||
private void addZapWoodset() {
|
||||
getOrCreateTagBuilder(BlockTags.LEAVES).add(UBlocks.ZAP_LEAVES, UBlocks.FLOWERING_ZAP_LEAVES);
|
||||
getOrCreateTagBuilder(UTags.POLEARM_MINEABLE).add(
|
||||
getOrCreateTagBuilder(UTags.Blocks.POLEARM_MINEABLE).add(
|
||||
UBlocks.ZAP_LEAVES, UBlocks.FLOWERING_ZAP_LEAVES,
|
||||
UBlocks.ZAP_PLANKS,
|
||||
UBlocks.ZAP_LOG, UBlocks.ZAP_WOOD, UBlocks.STRIPPED_ZAP_LOG, UBlocks.STRIPPED_ZAP_WOOD,
|
||||
|
|
|
@ -19,12 +19,12 @@ public class UDamageTypeProvider extends FabricTagProvider<DamageType> {
|
|||
|
||||
@Override
|
||||
protected void configure(WrapperLookup lookup) {
|
||||
getOrCreateTagBuilder(UTags.SPELLBOOK_IMMUNE_TO).add(
|
||||
getOrCreateTagBuilder(UTags.DamageTypes.SPELLBOOK_IMMUNE_TO).add(
|
||||
UDamageTypes.ZAP_APPLE, UDamageTypes.LOVE_DRAINING, UDamageTypes.LIFE_DRAINING,
|
||||
UDamageTypes.RAINBOOM, UDamageTypes.SUN, UDamageTypes.SUNLIGHT, UDamageTypes.SMASH
|
||||
).forceAddTag(DamageTypeTags.IS_FALL).forceAddTag(DamageTypeTags.IS_FREEZING).forceAddTag(DamageTypeTags.IS_LIGHTNING).forceAddTag(DamageTypeTags.IS_PROJECTILE);
|
||||
getOrCreateTagBuilder(UTags.FROM_ROCKS).add(UDamageTypes.ROCK);
|
||||
getOrCreateTagBuilder(UTags.FROM_HORSESHOES).add(UDamageTypes.HORSESHOE);
|
||||
getOrCreateTagBuilder(UTags.BREAKS_SUNGLASSES).add(UDamageTypes.BAT_SCREECH, UDamageTypes.RAINBOOM);
|
||||
getOrCreateTagBuilder(UTags.DamageTypes.FROM_ROCKS).add(UDamageTypes.ROCK);
|
||||
getOrCreateTagBuilder(UTags.DamageTypes.FROM_HORSESHOES).add(UDamageTypes.HORSESHOE);
|
||||
getOrCreateTagBuilder(UTags.DamageTypes.BREAKS_SUNGLASSES).add(UDamageTypes.BAT_SCREECH, UDamageTypes.RAINBOOM);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package com.minelittlepony.unicopia.datagen.providers;
|
||||
package com.minelittlepony.unicopia.datagen.providers.tag;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
@ -66,50 +66,50 @@ public class UItemTagProvider extends FabricTagProvider.ItemTagProvider {
|
|||
getOrCreateTagBuilder(ItemTags.SIGNS).add(UBlocks.PALM_SIGN.asItem());
|
||||
getOrCreateTagBuilder(ItemTags.HANGING_SIGNS).add(UBlocks.PALM_HANGING_SIGN.asItem());
|
||||
|
||||
getOrCreateTagBuilder(UTags.HORSE_SHOES).add(ItemFamilies.HORSE_SHOES);
|
||||
getOrCreateTagBuilder(UTags.POLEARMS).add(ItemFamilies.POLEARMS);
|
||||
getOrCreateTagBuilder(UTags.Items.HORSE_SHOES).add(ItemFamilies.HORSE_SHOES);
|
||||
getOrCreateTagBuilder(UTags.Items.POLEARMS).add(ItemFamilies.POLEARMS);
|
||||
|
||||
getOrCreateTagBuilder(ItemTags.TOOLS).addTag(UTags.HORSE_SHOES).addTag(UTags.POLEARMS);
|
||||
getOrCreateTagBuilder(ItemTags.TOOLS).addTag(UTags.Items.HORSE_SHOES).addTag(UTags.Items.POLEARMS);
|
||||
|
||||
getOrCreateTagBuilder(UTags.BASKETS).add(ItemFamilies.BASKETS);
|
||||
getOrCreateTagBuilder(UTags.BADGES).add(Race.REGISTRY.stream()
|
||||
getOrCreateTagBuilder(UTags.Items.BASKETS).add(ItemFamilies.BASKETS);
|
||||
getOrCreateTagBuilder(UTags.Items.BADGES).add(Race.REGISTRY.stream()
|
||||
.map(race -> race.getId().withPath(p -> p + "_badge"))
|
||||
.flatMap(id -> Registries.ITEM.getOrEmpty(id).stream())
|
||||
.toArray(Item[]::new));
|
||||
getOrCreateTagBuilder(UTags.WOOL_BED_SHEETS).add(BedsheetsItem.ITEMS.values().stream().filter(sheet -> sheet != UItems.KELP_BED_SHEETS).toArray(Item[]::new));
|
||||
getOrCreateTagBuilder(UTags.BED_SHEETS).forceAddTag(UTags.WOOL_BED_SHEETS).add(UItems.KELP_BED_SHEETS);
|
||||
getOrCreateTagBuilder(UTags.APPLE_SEEDS).add(UItems.GREEN_APPLE_SEEDS, UItems.SWEET_APPLE_SEEDS, UItems.SOUR_APPLE_SEEDS);
|
||||
getOrCreateTagBuilder(UTags.MAGIC_FEATHERS).add(UItems.PEGASUS_FEATHER, UItems.GRYPHON_FEATHER);
|
||||
getOrCreateTagBuilder(UTags.FRESH_APPLES).add(Items.APPLE, UItems.GREEN_APPLE, UItems.SWEET_APPLE, UItems.SOUR_APPLE);
|
||||
getOrCreateTagBuilder(UTags.CLOUD_JARS).add(UItems.RAIN_CLOUD_JAR, UItems.STORM_CLOUD_JAR);
|
||||
getOrCreateTagBuilder(UTags.PIES).add(UItems.APPLE_PIE, UItems.APPLE_PIE_HOOF);
|
||||
getOrCreateTagBuilder(UTags.Items.WOOL_BED_SHEETS).add(BedsheetsItem.ITEMS.values().stream().filter(sheet -> sheet != UItems.KELP_BED_SHEETS).toArray(Item[]::new));
|
||||
getOrCreateTagBuilder(UTags.Items.BED_SHEETS).forceAddTag(UTags.Items.WOOL_BED_SHEETS).add(UItems.KELP_BED_SHEETS);
|
||||
getOrCreateTagBuilder(UTags.Items.APPLE_SEEDS).add(UItems.GREEN_APPLE_SEEDS, UItems.SWEET_APPLE_SEEDS, UItems.SOUR_APPLE_SEEDS);
|
||||
getOrCreateTagBuilder(UTags.Items.MAGIC_FEATHERS).add(UItems.PEGASUS_FEATHER, UItems.GRYPHON_FEATHER);
|
||||
getOrCreateTagBuilder(UTags.Items.FRESH_APPLES).add(Items.APPLE, UItems.GREEN_APPLE, UItems.SWEET_APPLE, UItems.SOUR_APPLE);
|
||||
getOrCreateTagBuilder(UTags.Items.CLOUD_JARS).add(UItems.RAIN_CLOUD_JAR, UItems.STORM_CLOUD_JAR);
|
||||
getOrCreateTagBuilder(UTags.Items.PIES).add(UItems.APPLE_PIE, UItems.APPLE_PIE_HOOF);
|
||||
|
||||
// technical tags
|
||||
getOrCreateTagBuilder(ItemTags.VILLAGER_PLANTABLE_SEEDS).addTag(UTags.APPLE_SEEDS);
|
||||
getOrCreateTagBuilder(UTags.CAN_CUT_PIE).forceAddTag(ConventionalItemTags.SHEARS).addOptionalTag(UConventionalTags.TOOL_KNIVES);
|
||||
getOrCreateTagBuilder(UTags.COOLS_OFF_KIRINS).add(Items.MELON_SLICE, UItems.JUICE).forceAddTag(ConventionalItemTags.WATER_BUCKETS);
|
||||
getOrCreateTagBuilder(UTags.FALLS_SLOWLY).add(Items.FEATHER, UItems.CLOUD_LUMP).forceAddTag(UTags.MAGIC_FEATHERS);
|
||||
getOrCreateTagBuilder(UTags.IS_DELIVERED_AGGRESSIVELY).forceAddTag(ItemTags.ANVIL);
|
||||
getOrCreateTagBuilder(UTags.SPOOKED_MOB_DROPS).add(Items.BRICK);
|
||||
getOrCreateTagBuilder(UTags.SHADES).add(
|
||||
getOrCreateTagBuilder(ItemTags.VILLAGER_PLANTABLE_SEEDS).addTag(UTags.Items.APPLE_SEEDS);
|
||||
getOrCreateTagBuilder(UTags.Items.CAN_CUT_PIE).forceAddTag(ConventionalItemTags.SHEARS).addOptionalTag(UConventionalTags.Items.TOOL_KNIVES);
|
||||
getOrCreateTagBuilder(UTags.Items.COOLS_OFF_KIRINS).add(Items.MELON_SLICE, UItems.JUICE).forceAddTag(ConventionalItemTags.WATER_BUCKETS);
|
||||
getOrCreateTagBuilder(UTags.Items.FALLS_SLOWLY).add(Items.FEATHER, UItems.CLOUD_LUMP).forceAddTag(UTags.Items.MAGIC_FEATHERS);
|
||||
getOrCreateTagBuilder(UTags.Items.IS_DELIVERED_AGGRESSIVELY).forceAddTag(ItemTags.ANVIL);
|
||||
getOrCreateTagBuilder(UTags.Items.SPOOKED_MOB_DROPS).add(Items.BRICK);
|
||||
getOrCreateTagBuilder(UTags.Items.SHADES).add(
|
||||
Items.CARVED_PUMPKIN, Items.SKELETON_SKULL, Items.WITHER_SKELETON_SKULL, Items.PLAYER_HEAD,
|
||||
Items.ZOMBIE_HEAD, Items.CREEPER_HEAD, Items.DRAGON_HEAD, Items.PIGLIN_HEAD,
|
||||
UItems.SUNGLASSES
|
||||
);
|
||||
getOrCreateTagBuilder(UTags.FLOATS_ON_CLOUDS)
|
||||
getOrCreateTagBuilder(UTags.Items.FLOATS_ON_CLOUDS)
|
||||
.forceAddTag(UTags.Items.CLOUD_BEDS)
|
||||
.forceAddTag(UTags.Items.CLOUD_SLABS)
|
||||
.forceAddTag(UTags.Items.CLOUD_STAIRS)
|
||||
.forceAddTag(UTags.Items.CLOUD_BLOCKS)
|
||||
.add(UItems.CLOUD_LUMP);
|
||||
getOrCreateTagBuilder(UTags.HAS_NO_TRAITS).add(
|
||||
getOrCreateTagBuilder(UTags.Items.HAS_NO_TRAITS).add(
|
||||
Items.AIR, Items.SPAWNER, Items.STRUCTURE_VOID, Items.STRUCTURE_BLOCK,
|
||||
Items.COMMAND_BLOCK, Items.CHAIN_COMMAND_BLOCK, Items.REPEATING_COMMAND_BLOCK,
|
||||
Items.LIGHT, Items.JIGSAW, Items.BARRIER, Items.BEDROCK, Items.END_PORTAL_FRAME,
|
||||
Items.DEBUG_STICK, Items.COMMAND_BLOCK_MINECART,
|
||||
UItems.PLUNDER_VINE
|
||||
).forceAddTag(UTags.BADGES);
|
||||
getOrCreateTagBuilder(UTags.LOOT_BUG_HIGH_VALUE_DROPS).add(
|
||||
).forceAddTag(UTags.Items.BADGES);
|
||||
getOrCreateTagBuilder(UTags.Items.LOOT_BUG_HIGH_VALUE_DROPS).add(
|
||||
Items.DIAMOND, Items.GOLDEN_APPLE, Items.GOLDEN_CARROT,
|
||||
Items.GOLDEN_HELMET, Items.GOLDEN_BOOTS, Items.GOLDEN_LEGGINGS, Items.GOLDEN_CHESTPLATE,
|
||||
Items.GOLDEN_HORSE_ARMOR,
|
||||
|
@ -152,36 +152,38 @@ public class UItemTagProvider extends FabricTagProvider.ItemTagProvider {
|
|||
}
|
||||
|
||||
private void exportConventionalTags() {
|
||||
getOrCreateTagBuilder(UConventionalTags.ACORNS).add(UItems.ACORN);
|
||||
getOrCreateTagBuilder(UConventionalTags.APPLES)
|
||||
copy(UConventionalTags.Blocks.CONCRETES, UConventionalTags.Items.CONCRETES);
|
||||
copy(UConventionalTags.Blocks.CONCRETE_POWDERS, UConventionalTags.Items.CONCRETE_POWDERS);
|
||||
getOrCreateTagBuilder(UConventionalTags.Items.ACORNS).add(UItems.ACORN);
|
||||
getOrCreateTagBuilder(UConventionalTags.Items.APPLES)
|
||||
.add(Items.APPLE, Items.GOLDEN_APPLE, Items.ENCHANTED_GOLDEN_APPLE, UItems.ROTTEN_APPLE)
|
||||
.forceAddTag(UTags.FRESH_APPLES)
|
||||
.forceAddTag(UTags.Items.FRESH_APPLES)
|
||||
.addOptionalTag(new Identifier("c", "pyrite_apples")) // no idea which mod add pyrite apples
|
||||
;
|
||||
getOrCreateTagBuilder(UConventionalTags.BANANAS).add(UItems.BANANA);
|
||||
getOrCreateTagBuilder(UConventionalTags.COOKED_FISH).add(Items.COOKED_COD, Items.COOKED_SALMON);
|
||||
getOrCreateTagBuilder(UConventionalTags.STICKS).add(Items.STICK);
|
||||
getOrCreateTagBuilder(UConventionalTags.PINECONES).add(UItems.PINECONE);
|
||||
getOrCreateTagBuilder(UConventionalTags.PINEAPPLES).add(UItems.PINEAPPLE);
|
||||
getOrCreateTagBuilder(UConventionalTags.MANGOES).add(UItems.MANGO);
|
||||
getOrCreateTagBuilder(UConventionalTags.MUSHROOMS).add(Items.RED_MUSHROOM, Items.BROWN_MUSHROOM);
|
||||
getOrCreateTagBuilder(UConventionalTags.MUFFINS).add(UItems.MUFFIN);
|
||||
getOrCreateTagBuilder(UConventionalTags.SEEDS).add(Items.BEETROOT_SEEDS, Items.MELON_SEEDS, Items.PUMPKIN_SEEDS, Items.TORCHFLOWER_SEEDS, Items.WHEAT_SEEDS)
|
||||
getOrCreateTagBuilder(UConventionalTags.Items.BANANAS).add(UItems.BANANA);
|
||||
getOrCreateTagBuilder(UConventionalTags.Items.COOKED_FISH).add(Items.COOKED_COD, Items.COOKED_SALMON);
|
||||
getOrCreateTagBuilder(UConventionalTags.Items.STICKS).add(Items.STICK);
|
||||
getOrCreateTagBuilder(UConventionalTags.Items.PINECONES).add(UItems.PINECONE);
|
||||
getOrCreateTagBuilder(UConventionalTags.Items.PINEAPPLES).add(UItems.PINEAPPLE);
|
||||
getOrCreateTagBuilder(UConventionalTags.Items.MANGOES).add(UItems.MANGO);
|
||||
getOrCreateTagBuilder(UConventionalTags.Items.MUSHROOMS).add(Items.RED_MUSHROOM, Items.BROWN_MUSHROOM);
|
||||
getOrCreateTagBuilder(UConventionalTags.Items.MUFFINS).add(UItems.MUFFIN);
|
||||
getOrCreateTagBuilder(UConventionalTags.Items.SEEDS).add(Items.BEETROOT_SEEDS, Items.MELON_SEEDS, Items.PUMPKIN_SEEDS, Items.TORCHFLOWER_SEEDS, Items.WHEAT_SEEDS)
|
||||
.add(UItems.OAT_SEEDS)
|
||||
.forceAddTag(UTags.APPLE_SEEDS);
|
||||
getOrCreateTagBuilder(UConventionalTags.OATMEALS).add(UItems.OATMEAL);
|
||||
getOrCreateTagBuilder(UConventionalTags.GRAIN).add(Items.WHEAT, UItems.OATS);
|
||||
getOrCreateTagBuilder(UConventionalTags.NUTS).addOptionalTag(UConventionalTags.CROPS_PEANUTS);
|
||||
.forceAddTag(UTags.Items.APPLE_SEEDS);
|
||||
getOrCreateTagBuilder(UConventionalTags.Items.OATMEALS).add(UItems.OATMEAL);
|
||||
getOrCreateTagBuilder(UConventionalTags.Items.GRAIN).add(Items.WHEAT, UItems.OATS);
|
||||
getOrCreateTagBuilder(UConventionalTags.Items.NUTS).addOptionalTag(UConventionalTags.Items.CROPS_PEANUTS);
|
||||
|
||||
getOrCreateTagBuilder(UConventionalTags.FRUITS)
|
||||
.forceAddTag(UConventionalTags.MANGOES)
|
||||
.forceAddTag(UConventionalTags.PINEAPPLES)
|
||||
.forceAddTag(UConventionalTags.APPLES)
|
||||
.forceAddTag(UConventionalTags.BANANAS);
|
||||
getOrCreateTagBuilder(UConventionalTags.Items.FRUITS)
|
||||
.forceAddTag(UConventionalTags.Items.MANGOES)
|
||||
.forceAddTag(UConventionalTags.Items.PINEAPPLES)
|
||||
.forceAddTag(UConventionalTags.Items.APPLES)
|
||||
.forceAddTag(UConventionalTags.Items.BANANAS);
|
||||
}
|
||||
|
||||
private void exportFarmersDelightItems() {
|
||||
getOrCreateTagBuilder(UTags.COOLS_OFF_KIRINS)
|
||||
getOrCreateTagBuilder(UTags.Items.COOLS_OFF_KIRINS)
|
||||
.addOptional(new Identifier("farmersdelight:melon_popsicle"))
|
||||
.addOptional(new Identifier("farmersdelight:melon_juice"));
|
||||
getOrCreateTagBuilder(TagKey.of(RegistryKeys.ITEM, new Identifier("farmersdelight:cabbage_roll_ingredients"))).add(UItems.OATS, UItems.ROCK, UItems.WHEAT_WORMS);
|
||||
|
|
|
@ -111,7 +111,7 @@ public class ItemImpl implements Equine<ItemEntity> {
|
|||
});
|
||||
}
|
||||
|
||||
if (stack.isIn(UTags.FALLS_SLOWLY)) {
|
||||
if (stack.isIn(UTags.Items.FALLS_SLOWLY)) {
|
||||
if (!entity.isOnGround() && Math.signum(entity.getVelocity().y) != getPhysics().getGravitySignum()) {
|
||||
double ticks = ((Entity)entity).age;
|
||||
double shift = Math.sin(ticks / 9D) / 9D;
|
||||
|
@ -160,7 +160,7 @@ public class ItemImpl implements Equine<ItemEntity> {
|
|||
|
||||
@Override
|
||||
public boolean collidesWithClouds() {
|
||||
return entity.getStack().isIn(UTags.FLOATS_ON_CLOUDS) || getSpecies().hasPersistentWeatherMagic();
|
||||
return entity.getStack().isIn(UTags.Items.FLOATS_ON_CLOUDS) || getSpecies().hasPersistentWeatherMagic();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -310,7 +310,7 @@ public abstract class Living<T extends LivingEntity> implements Equine<T>, Caste
|
|||
ItemStack payload = stack.payload();
|
||||
Item item = payload.getItem();
|
||||
|
||||
boolean deliverAggressively = payload.isIn(UTags.IS_DELIVERED_AGGRESSIVELY);
|
||||
boolean deliverAggressively = payload.isIn(UTags.Items.IS_DELIVERED_AGGRESSIVELY);
|
||||
|
||||
Vec3d randomPos = deliverAggressively ? targetPos.add(0, 2, 0) : targetPos.add(VecHelper.supply(() -> entity.getRandom().nextTriangular(0.1, 0.5)));
|
||||
|
||||
|
@ -400,7 +400,7 @@ public abstract class Living<T extends LivingEntity> implements Equine<T>, Caste
|
|||
this.attacker = attacker;
|
||||
}
|
||||
|
||||
if (magical.isIn(UTags.BREAKS_SUNGLASSES)) {
|
||||
if (magical.isIn(UTags.DamageTypes.BREAKS_SUNGLASSES)) {
|
||||
ItemStack glasses = GlassesItem.getForEntity(entity);
|
||||
if (glasses.getItem() == UItems.SUNGLASSES) {
|
||||
ItemStack broken = UItems.BROKEN_SUNGLASSES.getDefaultStack();
|
||||
|
|
|
@ -72,8 +72,8 @@ public class SunBlindnessStatusEffect extends StatusEffect {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (entity.getEquippedStack(EquipmentSlot.HEAD).isIn(UTags.SHADES)
|
||||
|| TrinketsDelegate.getInstance(entity).getEquipped(entity, TrinketsDelegate.FACE).anyMatch(i -> i.isIn(UTags.SHADES))
|
||||
if (entity.getEquippedStack(EquipmentSlot.HEAD).isIn(UTags.Items.SHADES)
|
||||
|| TrinketsDelegate.getInstance(entity).getEquipped(entity, TrinketsDelegate.FACE).anyMatch(i -> i.isIn(UTags.Items.SHADES))
|
||||
|| entity.isSubmergedInWater()) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -373,7 +373,7 @@ public class SpellbookEntity extends MobEntity implements MagicImmune {
|
|||
|
||||
@Override
|
||||
public boolean isInvulnerableTo(DamageSource damageSource) {
|
||||
return super.isInvulnerableTo(damageSource) || damageSource.isIn(UTags.SPELLBOOK_IMMUNE_TO);
|
||||
return super.isInvulnerableTo(damageSource) || damageSource.isIn(UTags.DamageTypes.SPELLBOOK_IMMUNE_TO);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -35,7 +35,7 @@ public interface UTradeOffers {
|
|||
factories.add(buyForEmeralds(UItems.GEMSTONE, 3, 1, 20, 1, 0.05F));
|
||||
});
|
||||
TradeOfferHelper.registerVillagerOffers(VillagerProfession.FARMER, 2, factories -> {
|
||||
factories.add(buy(Items.EMERALD, 4, UTags.APPLE_SEEDS, 2, 20, 1, 0.05F));
|
||||
factories.add(buy(Items.EMERALD, 4, UTags.Items.APPLE_SEEDS, 2, 20, 1, 0.05F));
|
||||
factories.add(buy(Items.EMERALD, 8, UItems.MANGO, 1, 15, 1, 0.025F));
|
||||
});
|
||||
|
||||
|
@ -47,7 +47,7 @@ public interface UTradeOffers {
|
|||
factories.add(buy(ItemTags.SMALL_FLOWERS, 2, UItems.DAFFODIL_DAISY_SANDWICH, 1, 10, 6, 0.08F));
|
||||
factories.add(buy(UItems.ZAP_APPLE, 45, UItems.ZAP_APPLE_JAM_JAR, 5, 50, 3, 0.07F));
|
||||
factories.add(buy(UItems.CIDER, 1, UItems.FRIENDSHIP_BRACELET, 1, 6, 1, 0.05F));
|
||||
factories.add(buy(UItems.GEMSTONE, 5, UTags.FRESH_APPLES, 2, 12, 3, 0.05F));
|
||||
factories.add(buy(UItems.GEMSTONE, 5, UTags.Items.FRESH_APPLES, 2, 12, 3, 0.05F));
|
||||
factories.add(buy(Items.EMERALD, 4, UItems.MANGO, 1, 35, 1, 0.025F));
|
||||
factories.add(new JarredItemTradeOfferFactory());
|
||||
});
|
||||
|
|
|
@ -194,7 +194,7 @@ public class PlayerPhysics extends EntityPhysics<PlayerEntity> implements Tickab
|
|||
private FlightType recalculateFlightType() {
|
||||
DimensionType dimension = entity.getWorld().getDimension();
|
||||
|
||||
if ((RegistryUtils.isIn(entity.getWorld(), dimension, RegistryKeys.DIMENSION_TYPE, UTags.HAS_NO_ATMOSPHERE)
|
||||
if ((RegistryUtils.isIn(entity.getWorld(), dimension, RegistryKeys.DIMENSION_TYPE, UTags.DimensionTypes.HAS_NO_ATMOSPHERE)
|
||||
|| Unicopia.getConfig().dimensionsWithoutAtmosphere.get().contains(RegistryUtils.getId(entity.getWorld(), dimension, RegistryKeys.DIMENSION_TYPE).toString()))
|
||||
&& !OxygenUtils.API.hasOxygen(entity)) {
|
||||
return FlightType.NONE;
|
||||
|
@ -582,7 +582,7 @@ public class PlayerPhysics extends EntityPhysics<PlayerEntity> implements Tickab
|
|||
|
||||
if (entity.isOnGround() || !force) {
|
||||
BlockState steppingState = pony.asEntity().getSteppingBlockState();
|
||||
if (steppingState.isIn(UTags.KICKS_UP_DUST)) {
|
||||
if (steppingState.isIn(UTags.Blocks.KICKS_UP_DUST)) {
|
||||
pony.addParticle(new BlockStateParticleEffect(UParticles.DUST_CLOUD, steppingState), pony.getOrigin().toCenterPos(), Vec3d.ZERO);
|
||||
} else {
|
||||
Supplier<Vec3d> pos = VecHelper.sphere(pony.asWorld().getRandom(), 0.5D);
|
||||
|
|
|
@ -551,7 +551,7 @@ public class Pony extends Living<PlayerEntity> implements Copyable<Pony>, Update
|
|||
}
|
||||
|
||||
if (getObservedSpecies() == Race.BAT && !entity.hasPortalCooldown()) {
|
||||
boolean hasShades = TrinketsDelegate.getInstance(entity).getEquipped(entity, TrinketsDelegate.FACE).anyMatch(s -> s.isIn(UTags.SHADES));
|
||||
boolean hasShades = TrinketsDelegate.getInstance(entity).getEquipped(entity, TrinketsDelegate.FACE).anyMatch(s -> s.isIn(UTags.Items.SHADES));
|
||||
if (!this.hasShades && hasShades && getObservedSpecies() == Race.BAT) {
|
||||
UCriteria.WEAR_SHADES.trigger(entity);
|
||||
}
|
||||
|
@ -754,7 +754,7 @@ public class Pony extends Living<PlayerEntity> implements Copyable<Pony>, Update
|
|||
}
|
||||
|
||||
if (getObservedSpecies() == Race.KIRIN
|
||||
&& (stack.isIn(UTags.COOLS_OFF_KIRINS) || PotionUtil.getPotion(stack) == Potions.WATER)) {
|
||||
&& (stack.isIn(UTags.Items.COOLS_OFF_KIRINS) || PotionUtil.getPotion(stack) == Potions.WATER)) {
|
||||
getMagicalReserves().getCharge().multiply(0.5F);
|
||||
getSpellSlot().get(SpellType.RAGE, false).ifPresent(RageAbilitySpell::setExtenguishing);
|
||||
}
|
||||
|
|
|
@ -188,7 +188,7 @@ public class CrystalHeartItem extends Item implements FloatingArtefactEntity.Art
|
|||
|
||||
BlockPos tip = entity.getBlockPos().offset(direction);
|
||||
BlockState tipState = entity.getWorld().getBlockState(tip);
|
||||
if (!tipState.isIn(UTags.CRYSTAL_HEART_ORNAMENT) || (!tipState.contains(EndRodBlock.FACING)|| tipState.get(EndRodBlock.FACING) != direction.getOpposite())) {
|
||||
if (!tipState.isIn(UTags.Blocks.CRYSTAL_HEART_ORNAMENT) || (!tipState.contains(EndRodBlock.FACING)|| tipState.get(EndRodBlock.FACING) != direction.getOpposite())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -207,6 +207,6 @@ public class CrystalHeartItem extends Item implements FloatingArtefactEntity.Art
|
|||
}
|
||||
|
||||
private boolean isDiamond(BlockState state) {
|
||||
return state.isIn(UTags.CRYSTAL_HEART_BASE);
|
||||
return state.isIn(UTags.Blocks.CRYSTAL_HEART_BASE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ public class PineappleItem extends Item {
|
|||
});
|
||||
|
||||
if (world.random.nextInt(20) == 0) {
|
||||
RegistryUtils.pickRandom(world, UTags.PINEAPPLE_EFFECTS, e -> !user.hasStatusEffect(e)).ifPresent(effect -> {
|
||||
RegistryUtils.pickRandom(world, UTags.StatusEffects.PINEAPPLE_EFFECTS, e -> !user.hasStatusEffect(e)).ifPresent(effect -> {
|
||||
user.addStatusEffect(new StatusEffectInstance(effect, 10, 1));
|
||||
});
|
||||
}
|
||||
|
|
|
@ -41,7 +41,7 @@ public class PolearmItem extends SwordItem {
|
|||
|
||||
@Override
|
||||
public boolean isSuitableFor(BlockState state) {
|
||||
return state.isIn(UTags.POLEARM_MINEABLE);
|
||||
return state.isIn(UTags.Blocks.POLEARM_MINEABLE);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -272,7 +272,7 @@ public interface UItems {
|
|||
FuelRegistry.INSTANCE.add(SPELLBOOK, 9000);
|
||||
FuelRegistry.INSTANCE.add(MEADOWBROOKS_STAFF, 800);
|
||||
FuelRegistry.INSTANCE.add(BURNED_TOAST, 1600);
|
||||
FuelRegistry.INSTANCE.add(UTags.BASKETS, 1700);
|
||||
FuelRegistry.INSTANCE.add(UTags.Items.BASKETS, 1700);
|
||||
|
||||
CompostingChanceRegistry.INSTANCE.add(GREEN_APPLE, 0.65F);
|
||||
CompostingChanceRegistry.INSTANCE.add(SWEET_APPLE, 0.65F);
|
||||
|
|
|
@ -103,7 +103,7 @@ public class ZapAppleItem extends Item implements ChameleonItem, MultiItem {
|
|||
public List<ItemStack> getDefaultStacks() {
|
||||
return Unicopia.SIDE.getPony().map(Pony::asWorld)
|
||||
.stream()
|
||||
.flatMap(world -> RegistryUtils.valuesForTag(world, UConventionalTags.APPLES))
|
||||
.flatMap(world -> RegistryUtils.valuesForTag(world, UConventionalTags.Items.APPLES))
|
||||
.filter(a -> a != this).map(item -> {
|
||||
ItemStack stack = new ItemStack(this);
|
||||
stack.getOrCreateNbt().putString("appearance", Registries.ITEM.getId(item).toString());
|
||||
|
|
|
@ -21,7 +21,7 @@ public class GemFindingEnchantment extends SimpleEnchantment {
|
|||
|
||||
BlockPos origin = user.getOrigin();
|
||||
|
||||
double volume = BlockPos.findClosest(origin, radius, radius, pos -> user.asWorld().getBlockState(pos).isIn(UTags.INTERESTING))
|
||||
double volume = BlockPos.findClosest(origin, radius, radius, pos -> user.asWorld().getBlockState(pos).isIn(UTags.Blocks.INTERESTING))
|
||||
.map(p -> user.getOriginVector().squaredDistanceTo(p.getX(), p.getY(), p.getZ()))
|
||||
.map(find -> (1 - (Math.sqrt(find) / radius)))
|
||||
.orElse(-1D);
|
||||
|
|
|
@ -4,7 +4,6 @@ import java.util.*;
|
|||
import java.util.function.Supplier;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import com.minelittlepony.unicopia.UTags;
|
||||
import com.minelittlepony.unicopia.Unicopia;
|
||||
|
||||
import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup;
|
||||
|
@ -57,10 +56,9 @@ public interface ItemGroupRegistry {
|
|||
return key;
|
||||
}
|
||||
|
||||
static RegistryKey<ItemGroup> createGroupFromTag(String name, Supplier<ItemStack> icon) {
|
||||
TagKey<Item> key = UTags.item("groups/" + name);
|
||||
static RegistryKey<ItemGroup> createGroupFromTag(String name, TagKey<Item> tag, Supplier<ItemStack> icon) {
|
||||
return createDynamic(name, icon, () -> {
|
||||
return Registries.ITEM.getEntryList(key)
|
||||
return Registries.ITEM.getEntryList(tag)
|
||||
.stream()
|
||||
.flatMap(named -> named.stream())
|
||||
.map(entry -> entry.value());
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.minelittlepony.unicopia.item.group;
|
|||
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import com.minelittlepony.unicopia.UTags;
|
||||
import com.minelittlepony.unicopia.item.ChameleonItem;
|
||||
import com.minelittlepony.unicopia.item.UItems;
|
||||
import net.minecraft.item.*;
|
||||
|
@ -12,13 +13,13 @@ public interface UItemGroups {
|
|||
return Stream.concat(Stream.of(Items.APPLE), ItemGroupRegistry.ITEMS.stream()
|
||||
.filter(item -> !(item instanceof ChameleonItem) || ((ChameleonItem)item).isFullyDisguised()));
|
||||
});
|
||||
RegistryKey<ItemGroup> FORAGING_ITEMS = ItemGroupRegistry.createGroupFromTag("foraging", Items.HAY_BLOCK::getDefaultStack);
|
||||
RegistryKey<ItemGroup> EARTH_PONY_ITEMS = ItemGroupRegistry.createGroupFromTag("earth_pony", UItems.EARTH_BADGE::getDefaultStack);
|
||||
RegistryKey<ItemGroup> UNICORN_ITEMS = ItemGroupRegistry.createGroupFromTag("unicorn", UItems.UNICORN_BADGE::getDefaultStack);
|
||||
RegistryKey<ItemGroup> PEGASUS_ITEMS = ItemGroupRegistry.createGroupFromTag("pegasus", UItems.PEGASUS_BADGE::getDefaultStack);
|
||||
RegistryKey<ItemGroup> BAT_PONY_ITEMS = ItemGroupRegistry.createGroupFromTag("bat_pony", UItems.BAT_BADGE::getDefaultStack);
|
||||
RegistryKey<ItemGroup> SEA_PON_ITEMS = ItemGroupRegistry.createGroupFromTag("sea_pony", UItems.PEARL_NECKLACE::getDefaultStack);
|
||||
RegistryKey<ItemGroup> CHANGELING_ITEMS = ItemGroupRegistry.createGroupFromTag("changeling", UItems.CHANGELING_BADGE::getDefaultStack);
|
||||
RegistryKey<ItemGroup> FORAGING_ITEMS = ItemGroupRegistry.createGroupFromTag("foraging", UTags.Items.GROUP_FORAGING, Items.HAY_BLOCK::getDefaultStack);
|
||||
RegistryKey<ItemGroup> EARTH_PONY_ITEMS = ItemGroupRegistry.createGroupFromTag("earth_pony", UTags.Items.GROUP_EARTH_PONY, UItems.EARTH_BADGE::getDefaultStack);
|
||||
RegistryKey<ItemGroup> UNICORN_ITEMS = ItemGroupRegistry.createGroupFromTag("unicorn", UTags.Items.GROUP_UNICORN, UItems.UNICORN_BADGE::getDefaultStack);
|
||||
RegistryKey<ItemGroup> PEGASUS_ITEMS = ItemGroupRegistry.createGroupFromTag("pegasus", UTags.Items.GROUP_PEGASUS, UItems.PEGASUS_BADGE::getDefaultStack);
|
||||
RegistryKey<ItemGroup> BAT_PONY_ITEMS = ItemGroupRegistry.createGroupFromTag("bat_pony", UTags.Items.GROUP_BAT_PONY, UItems.BAT_BADGE::getDefaultStack);
|
||||
RegistryKey<ItemGroup> SEA_PON_ITEMS = ItemGroupRegistry.createGroupFromTag("sea_pony", UTags.Items.GROUP_SEA_PONY, UItems.PEARL_NECKLACE::getDefaultStack);
|
||||
RegistryKey<ItemGroup> CHANGELING_ITEMS = ItemGroupRegistry.createGroupFromTag("changeling", UTags.Items.GROUP_CHANGELING, UItems.CHANGELING_BADGE::getDefaultStack);
|
||||
|
||||
static void bootstrap() {
|
||||
ItemGroupRegistry.bootstrap();
|
||||
|
|
|
@ -145,7 +145,7 @@ public class PhysicsBodyProjectileEntity extends PersistentProjectileEntity impl
|
|||
return;
|
||||
} else {
|
||||
ItemStack stack = asItemStack();
|
||||
if (stack.isIn(UTags.HORSE_SHOES)) {
|
||||
if (stack.isIn(UTags.Items.HORSE_SHOES)) {
|
||||
if (stack.damage(1 + random.nextInt(10), random, null)) {
|
||||
playSound(USounds.Vanilla.ENTITY_ITEM_BREAK, 1, 1);
|
||||
} else {
|
||||
|
@ -205,7 +205,7 @@ public class PhysicsBodyProjectileEntity extends PersistentProjectileEntity impl
|
|||
boolean ownerCanModify = !getWorld().isClient && Caster.of(getOwner()).filter(pony -> pony.canModifyAt(hit.getBlockPos())).isPresent();
|
||||
|
||||
if (ownerCanModify && getWorld().getGameRules().getBoolean(GameRules.DO_MOB_GRIEFING)) {
|
||||
if ((!isBouncy() || getWorld().random.nextInt(200) == 0) && state.isIn(UTags.FRAGILE)) {
|
||||
if ((!isBouncy() || getWorld().random.nextInt(200) == 0) && state.isIn(UTags.Blocks.FRAGILE)) {
|
||||
getWorld().breakBlock(hit.getBlockPos(), true);
|
||||
}
|
||||
}
|
||||
|
@ -246,7 +246,7 @@ public class PhysicsBodyProjectileEntity extends PersistentProjectileEntity impl
|
|||
emitGameEvent(GameEvent.STEP);
|
||||
|
||||
if (!isBouncy()) {
|
||||
if (stack.isIn(UTags.HORSE_SHOES)) {
|
||||
if (stack.isIn(UTags.Items.HORSE_SHOES)) {
|
||||
if (stack.damage(1 + random.nextInt(10), random, null)) {
|
||||
playSound(USounds.Vanilla.ENTITY_ITEM_BREAK, 1, 1);
|
||||
discard();
|
||||
|
@ -262,7 +262,7 @@ public class PhysicsBodyProjectileEntity extends PersistentProjectileEntity impl
|
|||
|
||||
@Override
|
||||
protected SoundEvent getHitSound() {
|
||||
if (getStack().isIn(UTags.HORSE_SHOES)) {
|
||||
if (getStack().isIn(UTags.Items.HORSE_SHOES)) {
|
||||
return USounds.Vanilla.ITEM_TRIDENT_HIT_GROUND;
|
||||
}
|
||||
return isBouncy() ? USounds.ITEM_MUFFIN_BOUNCE.value() : USounds.ITEM_ROCK_LAND;
|
||||
|
|
Loading…
Reference in a new issue