This commit is contained in:
simibubi 2020-02-08 20:02:17 +01:00
commit 45195df7f9
31 changed files with 461 additions and 102 deletions

View file

@ -1,5 +1,8 @@
package com.simibubi.create; package com.simibubi.create;
import com.simibubi.create.foundation.advancement.AllCriterionTriggers;
import com.simibubi.create.foundation.advancement.SandpaperUseTrigger;
import net.minecraft.advancements.CriteriaTriggers;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
@ -69,6 +72,7 @@ public class Create {
CraftingHelper.register(new ModuleLoadedCondition.Serializer()); CraftingHelper.register(new ModuleLoadedCondition.Serializer());
AllPackets.registerPackets(); AllPackets.registerPackets();
AllCriterionTriggers.register();
} }
public static void serverStarting(FMLServerStartingEvent event) { public static void serverStarting(FMLServerStartingEvent event) {

View file

@ -0,0 +1,27 @@
package com.simibubi.create.foundation.advancement;
import net.minecraft.advancements.CriteriaTriggers;
import java.util.LinkedList;
import java.util.List;
public class AllCriterionTriggers {
private static List<CriterionTriggerBase<?>> triggers = new LinkedList<>();
public static SandpaperUseTrigger SANDPAPER_USE = add(new SandpaperUseTrigger("sandpaper_use"));
public static NoArgumentTrigger DEPLOYER_BOOP = add(new NoArgumentTrigger("deployer"));
public static NoArgumentTrigger ABSORBED_LIGHT = add(new NoArgumentTrigger("light_absorbed"));
public static NoArgumentTrigger SPEED_READ = add(new NoArgumentTrigger("speed_read"));
private static <T extends CriterionTriggerBase<?>> T add(T instance) {
triggers.add(instance);
return instance;
}
public static void register(){
triggers.forEach(CriteriaTriggers::register);
}
}

View file

@ -0,0 +1,79 @@
package com.simibubi.create.foundation.advancement;
import com.google.common.collect.Maps;
import com.simibubi.create.Create;
import net.minecraft.advancements.ICriterionTrigger;
import net.minecraft.advancements.PlayerAdvancements;
import net.minecraft.advancements.criterion.CriterionInstance;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.util.ResourceLocation;
import java.util.*;
import java.util.function.Supplier;
public abstract class CriterionTriggerBase<T extends CriterionTriggerBase.Instance> implements ICriterionTrigger<T> {
public CriterionTriggerBase(String id) {
this.ID = new ResourceLocation(Create.ID, id);
}
private ResourceLocation ID;
protected final Map<PlayerAdvancements, Set<Listener<T>>> listeners = Maps.newHashMap();
@Override
public void addListener(PlayerAdvancements playerAdvancementsIn, Listener<T> listener) {
Set<Listener<T>> playerListeners = this.listeners.computeIfAbsent(playerAdvancementsIn, k -> new HashSet<>());
playerListeners.add(listener);
}
@Override
public void removeListener(PlayerAdvancements playerAdvancementsIn, Listener<T> listener) {
Set<Listener<T>> playerListeners = this.listeners.get(playerAdvancementsIn);
if (playerListeners != null){
playerListeners.remove(listener);
if (playerListeners.isEmpty()){
this.listeners.remove(playerAdvancementsIn);
}
}
}
@Override
public void removeAllListeners(PlayerAdvancements playerAdvancementsIn) {
this.listeners.remove(playerAdvancementsIn);
}
@Override
public ResourceLocation getId() {
return ID;
}
protected void trigger(ServerPlayerEntity player, List<Supplier<Object>> suppliers){
PlayerAdvancements playerAdvancements = player.getAdvancements();
Set<Listener<T>> playerListeners = this.listeners.get(playerAdvancements);
if (playerListeners != null){
List<Listener<T>> list = new LinkedList<>();
for (Listener<T> listener :
playerListeners) {
if (listener.getCriterionInstance().test(suppliers)) {
list.add(listener);
}
}
list.forEach(listener -> listener.grantCriterion(playerAdvancements));
}
}
protected abstract static class Instance extends CriterionInstance {
public Instance(ResourceLocation idIn) {
super(idIn);
}
protected abstract boolean test(List<Supplier<Object>> suppliers);
}
}

View file

@ -0,0 +1,37 @@
package com.simibubi.create.foundation.advancement;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonObject;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.util.ResourceLocation;
import java.util.List;
import java.util.function.Supplier;
public class NoArgumentTrigger extends CriterionTriggerBase<NoArgumentTrigger.Instance> {
public NoArgumentTrigger(String id) {
super(id);
}
@Override
public Instance deserializeInstance(JsonObject json, JsonDeserializationContext context) {
return new Instance(getId());
}
public void trigger(ServerPlayerEntity player){
super.trigger(player, null);
}
public static class Instance extends CriterionTriggerBase.Instance {
public Instance(ResourceLocation idIn) {
super(idIn);
}
@Override
protected boolean test(List<Supplier<Object>> suppliers) {
return true;
}
}
}

View file

@ -0,0 +1,66 @@
package com.simibubi.create.foundation.advancement;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonObject;
import net.minecraft.advancements.PlayerAdvancements;
import net.minecraft.advancements.criterion.CriterionInstance;
import net.minecraft.advancements.criterion.ItemPredicate;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import java.util.function.Supplier;
public class SandpaperUseTrigger extends CriterionTriggerBase<SandpaperUseTrigger.Instance> {
public SandpaperUseTrigger(String id) {
super(id);
}
@Override
public Instance deserializeInstance(JsonObject json, JsonDeserializationContext context) {
return new SandpaperUseTrigger.Instance(getId(), ItemPredicate.deserialize(json.get("target")),ItemPredicate.deserialize(json.get("result")));
}
public void trigger(ServerPlayerEntity player, ItemStack target, ItemStack result){
trigger(player, Arrays.asList(() -> target, () -> result));
/*PlayerAdvancements playerAdvancements = player.getAdvancements();
Set<Listener<Instance>> playerListeners = this.listeners.get(playerAdvancements);
if (playerListeners != null){
List<Listener<Instance>> list = new LinkedList<>();
for (Listener<Instance> listener :
playerListeners) {
if (listener.getCriterionInstance().test(target, result)) {
list.add(listener);
}
}
list.forEach(listener -> listener.grantCriterion(playerAdvancements));
}*/
}
public static class Instance extends CriterionTriggerBase.Instance {
private final ItemPredicate target;
private final ItemPredicate result;
public Instance(ResourceLocation idIn, ItemPredicate target, ItemPredicate result) {
super(idIn);
this.target = target;
this.result = result;
}
@Override
protected boolean test(List<Supplier<Object>> suppliers) {
return this.target.test((ItemStack) suppliers.get(0).get()) &&
this.result.test((ItemStack) suppliers.get(1).get());
}
}
}

View file

@ -4,7 +4,6 @@ import com.mojang.brigadier.arguments.BoolArgumentType;
import com.mojang.brigadier.builder.ArgumentBuilder; import com.mojang.brigadier.builder.ArgumentBuilder;
import com.simibubi.create.AllPackets; import com.simibubi.create.AllPackets;
import com.simibubi.create.config.AllConfigs; import com.simibubi.create.config.AllConfigs;
import net.minecraft.command.CommandSource; import net.minecraft.command.CommandSource;
import net.minecraft.command.Commands; import net.minecraft.command.Commands;
import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.entity.player.ServerPlayerEntity;
@ -16,21 +15,21 @@ import net.minecraftforge.fml.network.PacketDistributor;
public class ToggleDebugCommand { public class ToggleDebugCommand {
static ArgumentBuilder<CommandSource, ?> register() { static ArgumentBuilder<CommandSource, ?> register() {
return Commands.literal("toggleDebug").requires(cs -> cs.hasPermissionLevel(0)) return Commands.literal("toggleDebug")
.then(Commands.argument("value", BoolArgumentType.bool()).executes(ctx -> { .requires(cs -> cs.hasPermissionLevel(0))
.then(Commands.argument("value", BoolArgumentType.bool())
.executes(ctx -> {
boolean value = BoolArgumentType.getBool(ctx, "value"); boolean value = BoolArgumentType.getBool(ctx, "value");
System.out.println("Command toggleDebug " + value); System.out.println("Command toggleDebug " + value);
DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> AllConfigs.CLIENT.rainbowDebug.set(value)); DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> AllConfigs.CLIENT.rainbowDebug.set(value));
DistExecutor.runWhenOn(Dist.DEDICATED_SERVER, DistExecutor.runWhenOn(Dist.DEDICATED_SERVER, () -> () ->
() -> () -> AllPackets.channel.send( AllPackets.channel.send(
PacketDistributor.PLAYER PacketDistributor.PLAYER.with(() -> (ServerPlayerEntity) ctx.getSource().getEntity()),
.with(() -> (ServerPlayerEntity) ctx.getSource().getEntity()),
new ConfigureConfigPacket("rainbowDebug", String.valueOf(value)))); new ConfigureConfigPacket("rainbowDebug", String.valueOf(value))));
ctx.getSource().sendFeedback( ctx.getSource().sendFeedback(new StringTextComponent((value ? "enabled" : "disabled") + " rainbow debug"), true);
new StringTextComponent((value ? "enabled" : "disabled") + " rainbow debug"), true);
return 1; return 1;
})); }));

View file

@ -9,6 +9,9 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.simibubi.create.foundation.advancement.AllCriterionTriggers;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.tileentity.TileEntity;
import org.apache.commons.lang3.tuple.Pair; import org.apache.commons.lang3.tuple.Pair;
import com.google.common.collect.Multimap; import com.google.common.collect.Multimap;
@ -81,6 +84,7 @@ public class DeployerTileEntity extends KineticTileEntity {
protected DeployerFakePlayer player; protected DeployerFakePlayer player;
protected int timer; protected int timer;
protected float reach; protected float reach;
protected boolean boop = false;
protected List<ItemStack> overflowItems = new ArrayList<>(); protected List<ItemStack> overflowItems = new ArrayList<>();
protected Pair<BlockPos, Float> blockBreakingProgress; protected Pair<BlockPos, Float> blockBreakingProgress;
@ -203,6 +207,28 @@ public class DeployerTileEntity extends KineticTileEntity {
} }
} }
//Check for advancement conditions
if (mode == Mode.PUNCH && !boop) {
if (world.isAirBlock(pos.offset(facing,1)) && world.isAirBlock(pos.offset(facing,2))) {
BlockPos otherDeployer = pos.offset(facing, 4);
if (world.isBlockPresent(otherDeployer)){
TileEntity otherTile = world.getTileEntity(otherDeployer);
if (otherTile instanceof DeployerTileEntity){
DeployerTileEntity deployerTile = (DeployerTileEntity) otherTile;
if (world.getBlockState(otherDeployer).get(FACING).getOpposite() == facing && deployerTile.mode == Mode.PUNCH) {
//two facing deployer
boop = true;
reach = 1f;
timer = 1000;
state = State.EXPANDING;
sendData();
return;
}
}
}
}
}
state = State.EXPANDING; state = State.EXPANDING;
Vec3d movementVector = getMovementVector(); Vec3d movementVector = getMovementVector();
Vec3d rayOrigin = VecHelper.getCenterOf(pos).add(movementVector.scale(3 / 2f)); Vec3d rayOrigin = VecHelper.getCenterOf(pos).add(movementVector.scale(3 / 2f));
@ -218,6 +244,31 @@ public class DeployerTileEntity extends KineticTileEntity {
} }
if (state == State.EXPANDING) { if (state == State.EXPANDING) {
if (boop){
TileEntity otherTile = world.getTileEntity(pos.offset(getBlockState().get(FACING),4));
if (otherTile instanceof DeployerTileEntity){
DeployerTileEntity deployerTile = (DeployerTileEntity) otherTile;
if (deployerTile.boop && deployerTile.state == State.EXPANDING){
if(deployerTile.timer <= 0){
//everything should be met
boop = false;
state = State.RETRACTING;
timer = 1000;
deployerTile.boop = false;
deployerTile.state = State.RETRACTING;
deployerTile.timer = 1000;
deployerTile.sendData();
sendData();
//award nearby players
List<ServerPlayerEntity> players = world.getEntitiesWithinAABB(ServerPlayerEntity.class, new AxisAlignedBB(pos).grow(9));
players.forEach(AllCriterionTriggers.DEPLOYER_BOOP::trigger);
}
}
}
return;
}
Multimap<String, AttributeModifier> attributeModifiers = stack Multimap<String, AttributeModifier> attributeModifiers = stack
.getAttributeModifiers(EquipmentSlotType.MAINHAND); .getAttributeModifiers(EquipmentSlotType.MAINHAND);
player.getAttributes().applyAttributeModifiers(attributeModifiers); player.getAttributes().applyAttributeModifiers(attributeModifiers);

View file

@ -2,11 +2,18 @@ package com.simibubi.create.modules.contraptions.relays.gauge;
import com.simibubi.create.AllTileEntities; import com.simibubi.create.AllTileEntities;
import com.simibubi.create.config.AllConfigs; import com.simibubi.create.config.AllConfigs;
import com.simibubi.create.foundation.advancement.AllCriterionTriggers;
import com.simibubi.create.foundation.utility.ColorHelper; import com.simibubi.create.foundation.utility.ColorHelper;
import com.simibubi.create.modules.contraptions.GogglesItem;
import com.simibubi.create.modules.contraptions.base.IRotate.SpeedLevel; import com.simibubi.create.modules.contraptions.base.IRotate.SpeedLevel;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
import java.util.List;
public class SpeedGaugeTileEntity extends GaugeTileEntity { public class SpeedGaugeTileEntity extends GaugeTileEntity {
public SpeedGaugeTileEntity() { public SpeedGaugeTileEntity() {
@ -22,6 +29,12 @@ public class SpeedGaugeTileEntity extends GaugeTileEntity {
float max = AllConfigs.SERVER.kinetics.maxRotationSpeed.get().floatValue(); float max = AllConfigs.SERVER.kinetics.maxRotationSpeed.get().floatValue();
color = ColorHelper.mixColors(SpeedLevel.of(speed).getColor(), 0xffffff, .25f); color = ColorHelper.mixColors(SpeedLevel.of(speed).getColor(), 0xffffff, .25f);
if (speed == 666){
assert world != null;
List<ServerPlayerEntity> players = world.getEntitiesWithinAABB(ServerPlayerEntity.class, new AxisAlignedBB(pos).grow(6));
players.stream().filter(GogglesItem::canSeeParticles).forEach(AllCriterionTriggers.SPEED_READ::trigger);
}
if (speed == 0) { if (speed == 0) {
dialTarget = 0; dialTarget = 0;
color = 0x333333; color = 0x333333;

View file

@ -1,10 +1,12 @@
package com.simibubi.create.modules.curiosities; package com.simibubi.create.modules.curiosities;
import java.util.List;
import java.util.Random; import java.util.Random;
import com.simibubi.create.AllItems; import com.simibubi.create.AllItems;
import com.simibubi.create.config.AllConfigs; import com.simibubi.create.config.AllConfigs;
import com.simibubi.create.config.CCuriosities; import com.simibubi.create.config.CCuriosities;
import com.simibubi.create.foundation.advancement.AllCriterionTriggers;
import com.simibubi.create.foundation.item.IItemWithColorHandler; import com.simibubi.create.foundation.item.IItemWithColorHandler;
import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.AnimationTickHolder;
import com.simibubi.create.foundation.utility.ColorHelper; import com.simibubi.create.foundation.utility.ColorHelper;
@ -15,6 +17,7 @@ import net.minecraft.block.Blocks;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.color.IItemColor; import net.minecraft.client.renderer.color.IItemColor;
import net.minecraft.entity.item.ItemEntity; import net.minecraft.entity.item.ItemEntity;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT; import net.minecraft.nbt.CompoundNBT;
@ -22,13 +25,10 @@ import net.minecraft.particles.ParticleTypes;
import net.minecraft.tileentity.BeaconTileEntity; import net.minecraft.tileentity.BeaconTileEntity;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.*;
import net.minecraft.util.math.BlockPos.MutableBlockPos; import net.minecraft.util.math.BlockPos.MutableBlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.RayTraceContext;
import net.minecraft.util.math.RayTraceContext.BlockMode; import net.minecraft.util.math.RayTraceContext.BlockMode;
import net.minecraft.util.math.RayTraceContext.FluidMode; import net.minecraft.util.math.RayTraceContext.FluidMode;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
@ -157,6 +157,10 @@ public class ChromaticCompoundCubeItem extends Item implements IItemWithColorHan
newStack.setCount(stack.getCount()); newStack.setCount(stack.getCount());
data.putBoolean("FromLight", true); data.putBoolean("FromLight", true);
entity.setItem(newStack); entity.setItem(newStack);
List<ServerPlayerEntity> players = world.getEntitiesWithinAABB(ServerPlayerEntity.class, new AxisAlignedBB(entity.getPosition()).grow(8));
players.forEach(AllCriterionTriggers.ABSORBED_LIGHT::trigger);
return false; return false;
} }

View file

@ -1,5 +1,7 @@
package com.simibubi.create.modules.curiosities.tools; package com.simibubi.create.modules.curiosities.tools;
import com.simibubi.create.foundation.advancement.AllCriterionTriggers;
import com.simibubi.create.foundation.advancement.SandpaperUseTrigger;
import com.simibubi.create.foundation.block.render.CustomRenderedItemModel; import com.simibubi.create.foundation.block.render.CustomRenderedItemModel;
import com.simibubi.create.foundation.item.IHaveCustomItemModel; import com.simibubi.create.foundation.item.IHaveCustomItemModel;
import com.simibubi.create.foundation.utility.VecHelper; import com.simibubi.create.foundation.utility.VecHelper;
@ -12,6 +14,7 @@ import net.minecraft.enchantment.Enchantments;
import net.minecraft.entity.LivingEntity; import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.item.ItemEntity; import net.minecraft.entity.item.ItemEntity;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemUseContext; import net.minecraft.item.ItemUseContext;
@ -132,9 +135,12 @@ public class SandPaperItem extends Item implements IHaveCustomItemModel {
if (!polished.isEmpty()) { if (!polished.isEmpty()) {
if (player instanceof DeployerFakePlayer) { if (player instanceof DeployerFakePlayer) {
player.dropItem(polished, false, false); player.dropItem(polished, false, false);
} else } else {
AllCriterionTriggers.SANDPAPER_USE.trigger((ServerPlayerEntity) player, toPolish, polished);
player.inventory.placeItemBackInInventory(worldIn, polished); player.inventory.placeItemBackInInventory(worldIn, polished);
} }
}
tag.remove("Polishing"); tag.remove("Polishing");
stack.damageItem(1, entityLiving, p -> p.sendBreakAnimation(p.getActiveHand())); stack.damageItem(1, entityLiving, p -> p.sendBreakAnimation(p.getActiveHand()));
} }

View file

@ -569,9 +569,43 @@
"create.command.killTPSCommand.argument.tickTime": "tickTime", "create.command.killTPSCommand.argument.tickTime": "tickTime",
"advancement.create:root": "Create Advancements", "advancement.create:root": "Create Advancements",
"advancement.create:root.desc": "~ todo", "advancement.create:root.desc": "~ Root Description",
"advancement.create:test": "test advancement", "advancement.create:andesite_alloy": "Andesite Alloy",
"advancement.create:test.desc": "test advancement description", "advancement.create:andesite_alloy.desc": "A basic building block of Create",
"advancement.create:andesite_casing": "Andesite Casing",
"advancement.create:andesite_casing.desc": "Use some Andesite, Metal and Wood to create a basic Casing",
"advancement.create:crushing_wheel": "I've got a crush on you",
"advancement.create:crushing_wheel.desc": "Create a pair of Crushing Wheels",
"advancement.create:gear": "Know what really grinds my Gears?",
"advancement.create:gear.desc": "~ Oh you don't care? Fine then..",
"advancement.create:sand_paper": "Sand Paper",
"advancement.create:sand_paper.desc": "~ Description",
"advancement.create:polished_rose_quartz": "Polished Rose Quartz",
"advancement.create:polished_rose_quartz.desc": "~ Description",
"advancement.create:sand_paper_secret": "Sandier Paper?",
"advancement.create:sand_paper_secret.desc": "Use your Sand Paper to sand some Sand Paper",
"advancement.create:press": "Squeezing real hard",
"advancement.create:press.desc": "Make a Mechanical Press and use it to create some Plates",
"advancement.create:mixer": "Don't get this mixed up!",
"advancement.create:mixer.desc": "Make a Mechanical Mixer",
"advancement.create:brass": "Brass",
"advancement.create:brass.desc": "~ Description",
"advancement.create:brass_casing": "Brass Casing",
"advancement.create:brass_casing.desc": "~ Description",
"advancement.create:deployer": "Deployer",
"advancement.create:deployer.desc": "~ Description",
"advancement.create:deployer_secret": "Pound it, brother",
"advancement.create:deployer_secret.desc": "~ Description",
"advancement.create:chromatic_compound": "Chromatic Compound",
"advancement.create:chromatic_compound.desc": "~ Description",
"advancement.create:shadow_steel": "Not quite as Shiny",
"advancement.create:shadow_steel.desc": "~ Description",
"advancement.create:refined_radiance": "SHINY!!",
"advancement.create:refined_radiance.desc": "~ Description",
"advancement.create:refined_radiance_secret": "~ Name",
"advancement.create:refined_radiance_secret.desc": "Find the alternative way to make Refined Radiance",
"advancement.create:speed_secret": "Hella fast",
"advancement.create:speed_secret.desc": "Watch a Speedometer reach exactly 666 speed",
"_comment": "-------------------------] ITEM DESCRIPTIONS [------------------------------------------------", "_comment": "-------------------------] ITEM DESCRIPTIONS [------------------------------------------------",

View file

@ -1,10 +1,10 @@
{ {
"display": { "display": {
"title": { "title": {
"text": "Andesite Alloy" "translate": "advancement.create:andesite_alloy"
}, },
"description": { "description": {
"text": "A basic building block of create" "translate": "advancement.create:andesite_alloy.desc"
}, },
"icon": { "icon": {
"item": "create:andesite_alloy" "item": "create:andesite_alloy"

View file

@ -1,18 +1,18 @@
{ {
"display": { "display": {
"title": { "title": {
"text": "Andesite Casing", "translate": "advancement.create:andesite_casing",
"color": "gray" "color": "gray"
}, },
"description": { "description": {
"text": "Use some Andesite, Metal and Wood to create a basic Casing" "translate": "advancement.create:andesite_casing.desc"
}, },
"icon": { "icon": {
"item": "create:andesite_casing" "item": "create:andesite_casing"
}, },
"frame": "task", "frame": "task",
"show_toast": true, "show_toast": true,
"announce_to_chat": true, "announce_to_chat": false,
"hidden": false "hidden": false
}, },
"criteria": { "criteria": {

View file

@ -1,11 +1,11 @@
{ {
"display": { "display": {
"title": { "title": {
"text": "brass", "translate": "advancement.create:brass",
"color": "gold" "color": "gold"
}, },
"description": { "description": {
"text": "Description" "translate": "advancement.create:brass.desc"
}, },
"icon": { "icon": {
"item": "create:crushed_brass" "item": "create:crushed_brass"

View file

@ -11,7 +11,7 @@
}, },
"frame": "task", "frame": "task",
"show_toast": true, "show_toast": true,
"announce_to_chat": true, "announce_to_chat": false,
"hidden": false "hidden": false
}, },
"criteria": { "criteria": {

View file

@ -1,23 +1,22 @@
{ {
"display": { "display": {
"title": { "title": {
"text": "Chromatic Compound", "translate": "advancement.create:chromatic_compound",
"color": "dark_purple" "color": "dark_purple"
}, },
"description": { "description": {
"text": "Description" "translate": "advancement.create:chromatic_compound.desc"
}, },
"icon": { "icon": {
"item": "create:chromatic_compound" "item": "create:chromatic_compound"
}, },
"frame": "task", "frame": "task",
"show_toast": true, "show_toast": true,
"announce_to_chat": true, "announce_to_chat": false,
"hidden": false "hidden": false
}, },
"criteria": { "criteria": {
"alloy": { "alloy": {
"comment_": "TODO introduce trigger for mixer recipes",
"trigger": "minecraft:inventory_changed", "trigger": "minecraft:inventory_changed",
"conditions": { "conditions": {
"items": [ "items": [

View file

@ -1,17 +1,17 @@
{ {
"display": { "display": {
"title": { "title": {
"text": "I've got a crush on you" "translate": "advancement.create:crushing_wheel"
}, },
"description": { "description": {
"text": "create a pair of crushing wheels" "translate": "advancement.create:crushing_wheel.desc"
}, },
"icon": { "icon": {
"item": "create:crushing_wheel" "item": "create:crushing_wheel"
}, },
"frame": "task", "frame": "task",
"show_toast": true, "show_toast": true,
"announce_to_chat": true, "announce_to_chat": false,
"hidden": false "hidden": false
}, },
"criteria": { "criteria": {
@ -23,7 +23,7 @@
"item": "create:crushing_wheel", "item": "create:crushing_wheel",
"count": { "count": {
"min": 2, "min": 2,
"max": 2 "max": 64
} }
} }
] ]

View file

@ -1,10 +1,10 @@
{ {
"display": { "display": {
"title": { "title": {
"text": "deployer" "translate": "advancement.create:deployer"
}, },
"description": { "description": {
"text": "Description" "translate": "advancement.create:deployer.desc"
}, },
"icon": { "icon": {
"item": "create:deployer" "item": "create:deployer"

View file

@ -1,13 +1,13 @@
{ {
"display": { "display": {
"title": { "title": {
"text": "deployer_secret" "translate": "advancement.create:deployer_secret"
}, },
"description": { "description": {
"text": "Description" "translate": "advancement.create:deployer_secret.desc"
}, },
"icon": { "icon": {
"item": "minecraft:stone" "item": "create:deployer"
}, },
"frame": "goal", "frame": "goal",
"show_toast": true, "show_toast": true,
@ -16,8 +16,7 @@
}, },
"criteria": { "criteria": {
"touching": { "touching": {
"comment_": "custom trigger needed", "trigger": "create:deployer"
"trigger": "minecraft:impossible"
} }
}, },
"parent": "create:deployer" "parent": "create:deployer"

View file

@ -1,17 +1,17 @@
{ {
"display": { "display": {
"title": { "title": {
"text": "Know what really grinds my Gears?" "translate": "advancement.create:gear"
}, },
"description": { "description": {
"text": "sand paper." "translate": "advancement.create:gear.desc"
}, },
"icon": { "icon": {
"item": "create:cogwheel" "item": "create:cogwheel"
}, },
"frame": "task", "frame": "task",
"show_toast": true, "show_toast": true,
"announce_to_chat": true, "announce_to_chat": false,
"hidden": true "hidden": true
}, },
"criteria": { "criteria": {

View file

@ -1,17 +1,17 @@
{ {
"display": { "display": {
"title": { "title": {
"text": "mixer" "translate": "advancement.create:mixer"
}, },
"description": { "description": {
"text": "mixer_desc" "translate": "advancement.create:mixer.desc"
}, },
"icon": { "icon": {
"item": "create:mechanical_mixer" "item": "create:mechanical_mixer"
}, },
"frame": "task", "frame": "task",
"show_toast": true, "show_toast": true,
"announce_to_chat": true, "announce_to_chat": false,
"hidden": false "hidden": false
}, },
"criteria": { "criteria": {

View file

@ -1,10 +1,10 @@
{ {
"display": { "display": {
"title": { "title": {
"text": "Squeezing real hard" "translate": "advancement.create:press"
}, },
"description": { "description": {
"text": "Make a Mechanical Press and use it to create some plates" "translate": "advancement.create:press.desc"
}, },
"icon": { "icon": {
"item": "create:mechanical_press" "item": "create:mechanical_press"

View file

@ -1,11 +1,11 @@
{ {
"display": { "display": {
"title": { "title": {
"text": "Polished Rose Quartz", "translate": "advancement.create:polished_rose_quartz",
"color": "red" "color": "red"
}, },
"description": { "description": {
"text": "Description" "translate": "advancement.create:polished_rose_quartz.desc"
}, },
"icon": { "icon": {
"item": "create:polished_rose_quartz" "item": "create:polished_rose_quartz"
@ -17,14 +17,14 @@
}, },
"criteria": { "criteria": {
"quartz": { "quartz": {
"comment_": "TODO replace this with a custom trigger for sand paper use or maybe item durability change", "trigger": "create:sandpaper_use",
"trigger": "minecraft:inventory_changed",
"conditions": { "conditions": {
"items": [ "target": {
{ "item": "create:rose_quartz"
},
"result": {
"item": "create:polished_rose_quartz" "item": "create:polished_rose_quartz"
} }
]
} }
} }
}, },

View file

@ -1,18 +1,18 @@
{ {
"display": { "display": {
"title": { "title": {
"text": "SHINY!!!", "translate": "advancement.create:refined_radiance",
"color": "white" "color": "white"
}, },
"description": { "description": {
"text": "Description" "translate": "advancement.create:refined_radiance.desc"
}, },
"icon": { "icon": {
"item": "create:refined_radiance" "item": "create:refined_radiance"
}, },
"frame": "goal", "frame": "goal",
"show_toast": true, "show_toast": true,
"announce_to_chat": true, "announce_to_chat": false,
"hidden": false "hidden": false
}, },
"criteria": { "criteria": {

View file

@ -1,10 +1,11 @@
{ {
"display": { "display": {
"title": { "title": {
"text": "shiny secret" "translate": "advancement.create:refined_radiance_secret",
"color": "white"
}, },
"description": { "description": {
"text": "find the alternative way to make refined radiance" "translate": "advancement.create:refined_radiance_secret.desc"
}, },
"icon": { "icon": {
"item": "create:refined_radiance" "item": "create:refined_radiance"
@ -16,8 +17,7 @@
}, },
"criteria": { "criteria": {
"ritual": { "ritual": {
"comment_": "custom trigger needed", "trigger": "create:light_absorbed"
"trigger": "minecraft:impossible"
} }
}, },
"parent": "create:chromatic_compound" "parent": "create:chromatic_compound"

View file

@ -1,7 +1,7 @@
{ {
"display": { "display": {
"icon": { "icon": {
"item": "create:cogwheel" "item": "create:placement_handgun"
}, },
"title": { "title": {
"translate": "advancement.create:root" "translate": "advancement.create:root"
@ -9,7 +9,7 @@
"description": { "description": {
"translate": "advancement.create:root.desc" "translate": "advancement.create:root.desc"
}, },
"background": "create:textures/block/brass_casing_side.png", "background": "create:textures/block/gabbro_layers.png",
"show_toast": false, "show_toast": false,
"announce_to_chat": false "announce_to_chat": false
}, },

View file

@ -1,11 +1,11 @@
{ {
"display": { "display": {
"title": { "title": {
"text": "Sand Paper", "translate": "advancement.create:sand_paper",
"color": "yellow" "color": "yellow"
}, },
"description": { "description": {
"text": "Description" "translate": "advancement.create:sand_paper.desc"
}, },
"icon": { "icon": {
"item": "create:sand_paper" "item": "create:sand_paper"

View file

@ -0,0 +1,43 @@
{
"display": {
"title": {
"translate": "advancement.create:sand_paper_secret",
"color": "yellow"
},
"description": {
"translate": "advancement.create:sand_paper_secret.desc"
},
"icon": {
"item": "create:sand_paper"
},
"frame": "goal",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
},
"criteria": {
"normal": {
"trigger": "create:sandpaper_use",
"conditions": {
"result": {
"item": "create:sand_paper"
}
}
},
"red": {
"trigger": "create:sandpaper_use",
"conditions": {
"result": {
"item": "create:red_sand_paper"
}
}
}
},
"requirements": [
[
"normal",
"red"
]
],
"parent": "create:sand_paper"
}

View file

@ -1,11 +1,11 @@
{ {
"display": { "display": {
"title": { "title": {
"text": "Not quite as shiny", "translate": "advancement.create:shadow_steel",
"color": "black" "color": "black"
}, },
"description": { "description": {
"text": "Description" "translate": "advancement.create:shadow_steel.desc"
}, },
"icon": { "icon": {
"item": "create:shadow_steel" "item": "create:shadow_steel"

View file

@ -0,0 +1,24 @@
{
"display": {
"title": {
"translate": "advancement.create:speed_secret",
"color": "red"
},
"description": {
"translate": "advancement.create:speed_secret.desc"
},
"icon": {
"item": "create:rose_quartz"
},
"frame": "goal",
"show_toast": true,
"announce_to_chat": true,
"hidden": true
},
"criteria": {
"alloy": {
"trigger": "create:speed_read"
}
},
"parent": "create:root"
}

View file

@ -1,26 +0,0 @@
{
"display": {
"icon": {
"item": "create:wrench"
},
"title": {
"translate": "advancement.create:test"
},
"description": {
"translate": "advancement.create:test.desc"
}
},
"parent": "create:root",
"criteria": {
"flower": {
"trigger": "minecraft:inventory_changed",
"conditions": {
"items": [
{
"item": "create:wrench"
}
]
}
}
}
}