Skip to content

Commit

Permalink
advancements
Browse files Browse the repository at this point in the history
  • Loading branch information
MBatt1 committed May 4, 2024
1 parent cd4fa11 commit dc86f1b
Show file tree
Hide file tree
Showing 12 changed files with 379 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net.id.paradiselost.mixin.item;

import net.id.paradiselost.blocks.ParadiseLostBlocks;
import net.minecraft.advancement.criterion.Criteria;
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.entity.player.PlayerEntity;
Expand All @@ -12,6 +13,7 @@
import net.minecraft.particle.ParticleTypes;
import net.minecraft.potion.PotionUtil;
import net.minecraft.potion.Potions;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.sound.SoundCategory;
import net.minecraft.sound.SoundEvents;
import net.minecraft.util.ActionResult;
Expand All @@ -35,6 +37,9 @@ public void useOnBlock(ItemUsageContext context, CallbackInfoReturnable<ActionRe
BlockState blockState = world.getBlockState(blockPos);
Random random = world.random;
if (blockState.isOf(Blocks.CALCITE) && (PotionUtil.getPotion(itemStack) == Potions.HEALING || PotionUtil.getPotion(itemStack) == Potions.STRONG_HEALING)) {
if (playerEntity instanceof ServerPlayerEntity) {
Criteria.ITEM_USED_ON_BLOCK.trigger((ServerPlayerEntity)playerEntity, blockPos, itemStack);
}
playerEntity.setStackInHand(context.getHand(), ItemUsage.exchangeStack(itemStack, playerEntity, new ItemStack(Items.GLASS_BOTTLE)));
world.setBlockState(blockPos, ParadiseLostBlocks.BLOOMED_CALCITE.getDefaultState());
// particles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class ParadiseLostTreePlacedFeatures extends ParadiseLostPlacedFeatures {
public static final RegistryEntry<PlacedFeature> MIXED_TREES = register("mixed_trees", ParadiseLostTreeConfiguredFeatures.MIXED_TREES, CountMultilayerPlacementModifier.of(1), ChancePlacementModifier.of(30));
public static final RegistryEntry<PlacedFeature> SPARSE_TREES = register("sparse_trees", ParadiseLostTreeConfiguredFeatures.SPARSE_TREES, CountMultilayerPlacementModifier.of(7), ChancePlacementModifier.of(100), CountPlacementModifier.of(UniformIntProvider.create(0, 2)));
public static final RegistryEntry<PlacedFeature> THICKET_TREES = register("thicket_trees", ParadiseLostTreeConfiguredFeatures.THICKET_TREES, CountMultilayerPlacementModifier.of(6), CountPlacementModifier.of(UniformIntProvider.create(0, 3)));
public static final RegistryEntry<PlacedFeature> THICKET_MOTHER_AUREL_TREES = register("thicket_mother_aurel_trees", ParadiseLostTreeConfiguredFeatures.THICKET_MOTHER_AUREL_TREES, CountMultilayerPlacementModifier.of(1), ChancePlacementModifier.of(60));
public static final RegistryEntry<PlacedFeature> THICKET_MOTHER_AUREL_TREES = register("thicket_mother_aurel_trees", ParadiseLostTreeConfiguredFeatures.THICKET_MOTHER_AUREL_TREES, CountMultilayerPlacementModifier.of(2), ChancePlacementModifier.of(30));
public static final RegistryEntry<PlacedFeature> RAINBOW_FOREST_TREES = register("wisteria_woods_trees", ParadiseLostTreeConfiguredFeatures.RAINBOW_FOREST_TREES, CountMultilayerPlacementModifier.of(17), CountPlacementModifier.of(UniformIntProvider.create(0, 4)));
// Fallen leaves
public static final RegistryEntry<PlacedFeature> FALLEN_LEAVES = register("fallen_leaves", ParadiseLostTreeConfiguredFeatures.FALLEN_LEAVES, SPREAD_32_ABOVE, PlacedFeatures.MOTION_BLOCKING_HEIGHTMAP, CountPlacementModifier.of(3), ChancePlacementModifier.of(5), HeightmapPlacementModifier.of(Heightmap.Type.WORLD_SURFACE));
Expand Down
18 changes: 15 additions & 3 deletions src/main/resources/assets/paradise_lost/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -476,20 +476,32 @@
"subtitles.paradise_lost.item.bloodstone.prick": "Bloodstone pricks",


"advancements.paradise_lost.bloomed_calcite_craft.title": "Healing Crystals",
"advancements.paradise_lost.bloomed_calcite_craft.description": "Douse a calcite block with a healing potion",
"advancements.paradise_lost.consume_food.title": "Exotic Starter",
"advancements.paradise_lost.consume_food.description": "Consume something from Paradise",
"advancements.paradise_lost.enter_paradise_lost.title": "We Need to Go Higher",
"advancements.paradise_lost.enter_paradise_lost.description": "Build a frame of shimmering glowstone, flood it with water, and step into the light",
"advancements.paradise_lost.food_bowl_fill.title": "Not Your Average Birdfeeder",
"advancements.paradise_lost.food_bowl_fill.description": "Fill a feeding trough with raw meat for your Moas",
"advancements.paradise_lost.enter_paradise_lost.description": "Build a frame of Bloomed Calcite, flood it with water, and step into the light",
"advancements.paradise_lost.float_up_paradise_lost.title": "To Infinity",
"advancements.paradise_lost.float_up_paradise_lost.description": "Ride a levitating block to the sky limit",
"advancements.paradise_lost.food_bowl_fill.title": "Not Your Average Birdfeeder",
"advancements.paradise_lost.food_bowl_fill.description": "Fill a feeding trough with raw meat for your Moas",
"advancements.paradise_lost.glazed_upgrade_find.title": "Lost Art",
"advancements.paradise_lost.glazed_upgrade_find.description": "Find a Glazed Gold Upgrade in a Lost Vault",
"advancements.paradise_lost.glazed_upgrade_use.title": "Dunkin'",
"advancements.paradise_lost.glazed_upgrade_use.description": "Improve a piece of gold equipment with a Glazed Gold Upgrade",
"advancements.paradise_lost.mother_aurel.title": "The Matriarch",
"advancements.paradise_lost.mother_aurel.description": "Find a Mother Aurel Tree in a Highlands Thicket",
"advancements.paradise_lost.mother_aurel_strip.title": "Stripping For Gold",
"advancements.paradise_lost.mother_aurel_strip.description": "Strip a Mother Aurel log to collect its amber",
"advancements.paradise_lost.nitra_bunch.title": "Bundle of Joy",
"advancements.paradise_lost.nitra_bunch.description": "Create an explosive bundle of Nitra",
"advancements.paradise_lost.nitra_find.title": "Seeds of Wrath",
"advancements.paradise_lost.nitra_find.description": "Find a Nitra seed in an Aurel Tower",
"advancements.paradise_lost.root.title": "Paradise Lost",
"advancements.paradise_lost.root.description": "A hostile paradise in the sky, full of mystery and surprises",
"advancements.paradise_lost.surtrum_blast.title": "Is it getting hot in here?",
"advancements.paradise_lost.surtrum_blast.description": "Blast your way into a Meteorite and harvest some Surtrum",
"advancements.paradise_lost.tame_moa.title": "Air Superiority",
"advancements.paradise_lost.tame_moa.description": "Tame a wild Moa with raw meat",
"advancements.paradise_lost.void_paradise_lost.title": "I've been falling, for 30 minutes!",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"display": {
"title": {
"translate": "advancements.paradise_lost.bloomed_calcite_craft.title"
},
"description": {
"translate": "advancements.paradise_lost.bloomed_calcite_craft.description"
},
"icon": {
"item": "paradise_lost:bloomed_calcite"
},
"frame": "task",
"show_toast": true,
"announce_to_chat": true,
"hidden": false
},
"criteria": {
"douse": {
"trigger": "minecraft:item_used_on_block",
"conditions": {
"item": {
"item": "minecraft:potion"
},
"location": {
"block": {
"blocks": [
"minecraft:calcite"
]
}
}
}
},
"hold_bc": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"items": [
"paradise_lost:bloomed_calcite"
]
}
]
}
}
},
"requirements": [
[
"douse",
"hold_bc"
]
],
"parent": "minecraft:nether/brew_potion"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"parent": "minecraft:story/enter_the_nether",
"parent": "paradise_lost:bloomed_calcite_craft",
"display": {
"icon": {
"item": "paradise_lost:bloomed_calcite"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"parent": "paradise_lost:mother_aurel_strip",
"criteria": {
"upgrade": {
"conditions": {
"items": [
{
"items": [
"paradise_lost:glazed_gold_upgrade_smithing_template"
]
}
]
},
"trigger": "minecraft:inventory_changed"
}
},
"display": {
"announce_to_chat": true,
"description": {
"translate": "advancements.paradise_lost.glazed_upgrade_find.description"
},
"frame": "task",
"hidden": false,
"icon": {
"item": "paradise_lost:glazed_gold_upgrade_smithing_template"
},
"show_toast": true,
"title": {
"translate": "advancements.paradise_lost.glazed_upgrade_find.title"
}
},
"requirements": [
[
"upgrade"
]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
{
"parent": "paradise_lost:glazed_upgrade_find",
"criteria": {
"shovel": {
"conditions": {
"items": [
{
"items": [
"paradise_lost:glazed_gold_shovel"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"pickaxe": {
"conditions": {
"items": [
{
"items": [
"paradise_lost:glazed_gold_pickaxe"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"axe": {
"conditions": {
"items": [
{
"items": [
"paradise_lost:glazed_gold_axe"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"sword": {
"conditions": {
"items": [
{
"items": [
"paradise_lost:glazed_gold_sword"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"hoe": {
"conditions": {
"items": [
{
"items": [
"paradise_lost:glazed_gold_hoe"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"helmet": {
"conditions": {
"items": [
{
"items": [
"paradise_lost:glazed_gold_helmet"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"chestplate": {
"conditions": {
"items": [
{
"items": [
"paradise_lost:glazed_gold_chestplate"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"leggings": {
"conditions": {
"items": [
{
"items": [
"paradise_lost:glazed_gold_leggings"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"boots": {
"conditions": {
"items": [
{
"items": [
"paradise_lost:glazed_gold_boots"
]
}
]
},
"trigger": "minecraft:inventory_changed"
}
},
"display": {
"announce_to_chat": true,
"description": {
"translate": "advancements.paradise_lost.glazed_upgrade_use.description"
},
"frame": "task",
"hidden": false,
"icon": {
"item": "paradise_lost:glazed_gold_pickaxe"
},
"show_toast": true,
"title": {
"translate": "advancements.paradise_lost.glazed_upgrade_use.title"
}
},
"requirements": [
[
"shovel",
"pickaxe",
"axe",
"sword",
"hoe",
"helmet",
"chestplate",
"leggings",
"boots"
]
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"parent": "paradise_lost:nitra_find",
"criteria": {
"find": {
"conditions": {
"items": [
{
"items": [
"paradise_lost:nitra_bunch"
]
}
]
},
"trigger": "minecraft:inventory_changed"
}
},
"display": {
"announce_to_chat": true,
"description": {
"translate": "advancements.paradise_lost.nitra_bunch.description"
},
"frame": "task",
"hidden": false,
"icon": {
"item": "paradise_lost:nitra_bunch"
},
"show_toast": true,
"title": {
"translate": "advancements.paradise_lost.nitra_bunch.title"
}
},
"requirements": [
[
"find"
]
]
}
37 changes: 37 additions & 0 deletions src/main/resources/data/paradise_lost/advancements/nitra_find.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"parent": "paradise_lost:root",
"criteria": {
"find": {
"conditions": {
"items": [
{
"items": [
"paradise_lost:nitra"
]
}
]
},
"trigger": "minecraft:inventory_changed"
}
},
"display": {
"announce_to_chat": true,
"description": {
"translate": "advancements.paradise_lost.nitra_find.description"
},
"frame": "task",
"hidden": false,
"icon": {
"item": "paradise_lost:nitra"
},
"show_toast": true,
"title": {
"translate": "advancements.paradise_lost.nitra_find.title"
}
},
"requirements": [
[
"find"
]
]
}
Loading

0 comments on commit dc86f1b

Please sign in to comment.