+ Recipes
+ Advancements
This commit is contained in:
parent
eb5176c589
commit
ca6d7328bc
|
|
@ -2,13 +2,13 @@
|
||||||
This is the unfinished port of the WebDisplays mod for Minecraft 1.12.2. The text below is my "TODO" list.
|
This is the unfinished port of the WebDisplays mod for Minecraft 1.12.2. The text below is my "TODO" list.
|
||||||
|
|
||||||
### Missing features
|
### Missing features
|
||||||
* Crafts: upgrades, laser pointer, peripherals
|
|
||||||
* ~~Peripheral: ComputerCraft interface~~ (CC not up to date)
|
* ~~Peripheral: ComputerCraft interface~~ (CC not up to date)
|
||||||
* Peripheral: OpenComputers interface
|
* Peripheral: OpenComputers interface
|
||||||
* Server blocks (to store some of the player's web pages)
|
* Server blocks (to store some of the player's web pages)
|
||||||
* Read config (see "Config elements" below)
|
* Read config (see "Config elements" below)
|
||||||
|
|
||||||
### TODO
|
### TODO
|
||||||
|
* Center camera to screen when using keyboard
|
||||||
* Achievements (minePad 2 and all that stuff)
|
* Achievements (minePad 2 and all that stuff)
|
||||||
* Top/bottom screen orientation
|
* Top/bottom screen orientation
|
||||||
* GuiSetURL2 missing buttons
|
* GuiSetURL2 missing buttons
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,16 @@
|
||||||
|
|
||||||
package net.montoyo.wd;
|
package net.montoyo.wd;
|
||||||
|
|
||||||
|
import net.minecraft.advancements.CriteriaTriggers;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.SoundEvent;
|
import net.minecraft.util.SoundEvent;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.event.RegistryEvent;
|
import net.minecraftforge.event.RegistryEvent;
|
||||||
|
import net.minecraftforge.event.entity.item.ItemTossEvent;
|
||||||
import net.minecraftforge.event.world.WorldEvent;
|
import net.minecraftforge.event.world.WorldEvent;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
import net.minecraftforge.fml.common.SidedProxy;
|
import net.minecraftforge.fml.common.SidedProxy;
|
||||||
|
|
@ -23,6 +27,7 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||||
import net.montoyo.wd.block.BlockKeyboardRight;
|
import net.montoyo.wd.block.BlockKeyboardRight;
|
||||||
import net.montoyo.wd.block.BlockPeripheral;
|
import net.montoyo.wd.block.BlockPeripheral;
|
||||||
import net.montoyo.wd.block.BlockScreen;
|
import net.montoyo.wd.block.BlockScreen;
|
||||||
|
import net.montoyo.wd.core.Criterion;
|
||||||
import net.montoyo.wd.core.DefaultPeripheral;
|
import net.montoyo.wd.core.DefaultPeripheral;
|
||||||
import net.montoyo.wd.core.WDCreativeTab;
|
import net.montoyo.wd.core.WDCreativeTab;
|
||||||
import net.montoyo.wd.entity.TileEntityScreen;
|
import net.montoyo.wd.entity.TileEntityScreen;
|
||||||
|
|
@ -32,6 +37,11 @@ import net.montoyo.wd.utilities.Log;
|
||||||
import net.montoyo.wd.utilities.Util;
|
import net.montoyo.wd.utilities.Util;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
import java.lang.reflect.Modifier;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Optional;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
@Mod(modid = "webdisplays", version = WebDisplays.MOD_VERSION, dependencies = "required-after:mcef;")
|
@Mod(modid = "webdisplays", version = WebDisplays.MOD_VERSION, dependencies = "required-after:mcef;")
|
||||||
public class WebDisplays {
|
public class WebDisplays {
|
||||||
|
|
@ -56,10 +66,10 @@ public class WebDisplays {
|
||||||
public ItemScreenConfigurator itemScreenCfg;
|
public ItemScreenConfigurator itemScreenCfg;
|
||||||
public ItemOwnershipThief itemOwnerThief;
|
public ItemOwnershipThief itemOwnerThief;
|
||||||
public ItemLinker itemLinker;
|
public ItemLinker itemLinker;
|
||||||
public Item itemStoneKey;
|
|
||||||
public ItemMinePad2 itemMinePad;
|
public ItemMinePad2 itemMinePad;
|
||||||
public ItemUpgrade itemUpgrade;
|
public ItemUpgrade itemUpgrade;
|
||||||
public ItemLaserPointer itemLaserPointer;
|
public ItemLaserPointer itemLaserPointer;
|
||||||
|
public ItemCraftComponent itemCraftComp;
|
||||||
|
|
||||||
//Sounds
|
//Sounds
|
||||||
public SoundEvent soundTyping;
|
public SoundEvent soundTyping;
|
||||||
|
|
@ -67,6 +77,9 @@ public class WebDisplays {
|
||||||
public SoundEvent soundUpgradeDel;
|
public SoundEvent soundUpgradeDel;
|
||||||
public SoundEvent soundScreenCfg;
|
public SoundEvent soundScreenCfg;
|
||||||
|
|
||||||
|
//Criterions
|
||||||
|
public Criterion criterionPadBreak;
|
||||||
|
|
||||||
//Config
|
//Config
|
||||||
public static final double PAD_RATIO = 59.0 / 30.0;
|
public static final double PAD_RATIO = 59.0 / 30.0;
|
||||||
public String homePage = "mod://webdisplays/main.html"; //TODO: Read from config
|
public String homePage = "mod://webdisplays/main.html"; //TODO: Read from config
|
||||||
|
|
@ -78,7 +91,11 @@ public class WebDisplays {
|
||||||
public void onPreInit(FMLPreInitializationEvent ev) {
|
public void onPreInit(FMLPreInitializationEvent ev) {
|
||||||
CREATIVE_TAB = new WDCreativeTab();
|
CREATIVE_TAB = new WDCreativeTab();
|
||||||
|
|
||||||
//TODO: Read configuration
|
//Criterions
|
||||||
|
criterionPadBreak = new Criterion("pad_break");
|
||||||
|
registerTrigger(criterionPadBreak);
|
||||||
|
|
||||||
|
//Read configuration TODO
|
||||||
final int padHeight = 480;
|
final int padHeight = 480;
|
||||||
padResY = (double) padHeight;
|
padResY = (double) padHeight;
|
||||||
padResX = padResY * PAD_RATIO;
|
padResX = padResY * PAD_RATIO;
|
||||||
|
|
@ -99,11 +116,7 @@ public class WebDisplays {
|
||||||
itemMinePad = new ItemMinePad2();
|
itemMinePad = new ItemMinePad2();
|
||||||
itemUpgrade = new ItemUpgrade();
|
itemUpgrade = new ItemUpgrade();
|
||||||
itemLaserPointer = new ItemLaserPointer();
|
itemLaserPointer = new ItemLaserPointer();
|
||||||
|
itemCraftComp = new ItemCraftComponent();
|
||||||
itemStoneKey = new Item();
|
|
||||||
itemStoneKey.setCreativeTab(CREATIVE_TAB);
|
|
||||||
itemStoneKey.setUnlocalizedName("webdisplays.stonekey");
|
|
||||||
itemStoneKey.setRegistryName("stonekey");
|
|
||||||
|
|
||||||
PROXY.preInit();
|
PROXY.preInit();
|
||||||
MinecraftForge.EVENT_BUS.register(this);
|
MinecraftForge.EVENT_BUS.register(this);
|
||||||
|
|
@ -137,7 +150,7 @@ public class WebDisplays {
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public void onRegisterItems(RegistryEvent.Register<Item> ev) {
|
public void onRegisterItems(RegistryEvent.Register<Item> ev) {
|
||||||
ev.getRegistry().registerAll(blockScreen.getItem(), blockPeripheral.getItem());
|
ev.getRegistry().registerAll(blockScreen.getItem(), blockPeripheral.getItem());
|
||||||
ev.getRegistry().registerAll(itemScreenCfg, itemOwnerThief, itemLinker, itemStoneKey, itemMinePad, itemUpgrade, itemLaserPointer);
|
ev.getRegistry().registerAll(itemScreenCfg, itemOwnerThief, itemLinker, itemMinePad, itemUpgrade, itemLaserPointer, itemCraftComp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
|
|
@ -191,6 +204,27 @@ public class WebDisplays {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public void onToss(ItemTossEvent ev) {
|
||||||
|
if(!ev.getEntityItem().world.isRemote) {
|
||||||
|
ItemStack is = ev.getEntityItem().getItem();
|
||||||
|
|
||||||
|
if(is.getItem() == itemMinePad) {
|
||||||
|
NBTTagCompound tag = is.getTagCompound();
|
||||||
|
|
||||||
|
if(tag == null) {
|
||||||
|
tag = new NBTTagCompound();
|
||||||
|
is.setTagCompound(tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
UUID thrower = ev.getPlayer().getGameProfile().getId();
|
||||||
|
tag.setLong("ThrowerMSB", thrower.getMostSignificantBits());
|
||||||
|
tag.setLong("ThrowerLSB", thrower.getLeastSignificantBits());
|
||||||
|
tag.setDouble("ThrowHeight", ev.getPlayer().posY + ev.getPlayer().getEyeHeight());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static int getNextAvailablePadID() {
|
public static int getNextAvailablePadID() {
|
||||||
return INSTANCE.lastPadId++;
|
return INSTANCE.lastPadId++;
|
||||||
}
|
}
|
||||||
|
|
@ -204,4 +238,22 @@ public class WebDisplays {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void registerTrigger(Criterion ... criteria) {
|
||||||
|
Method[] methods = CriteriaTriggers.class.getDeclaredMethods();
|
||||||
|
Optional<Method> register = Arrays.stream(methods).filter(m -> Modifier.isPrivate(m.getModifiers()) && Modifier.isStatic(m.getModifiers()) && m.getParameterTypes().length == 1).findAny();
|
||||||
|
if(!register.isPresent())
|
||||||
|
throw new RuntimeException("Could not register advancement criterion triggers");
|
||||||
|
|
||||||
|
try {
|
||||||
|
Method m = register.get();
|
||||||
|
m.setAccessible(true);
|
||||||
|
|
||||||
|
for(Criterion c: criteria)
|
||||||
|
m.invoke(null, c);
|
||||||
|
} catch(Throwable t) {
|
||||||
|
throw new RuntimeException(t);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,6 +41,7 @@ import net.montoyo.wd.client.gui.GuiSetURL2;
|
||||||
import net.montoyo.wd.client.gui.WDScreen;
|
import net.montoyo.wd.client.gui.WDScreen;
|
||||||
import net.montoyo.wd.client.gui.loading.GuiLoader;
|
import net.montoyo.wd.client.gui.loading.GuiLoader;
|
||||||
import net.montoyo.wd.client.renderers.*;
|
import net.montoyo.wd.client.renderers.*;
|
||||||
|
import net.montoyo.wd.core.CraftComponent;
|
||||||
import net.montoyo.wd.core.DefaultUpgrade;
|
import net.montoyo.wd.core.DefaultUpgrade;
|
||||||
import net.montoyo.wd.core.JSServerRequest;
|
import net.montoyo.wd.core.JSServerRequest;
|
||||||
import net.montoyo.wd.data.GuiData;
|
import net.montoyo.wd.data.GuiData;
|
||||||
|
|
@ -336,13 +337,16 @@ public class ClientProxy extends SharedProxy implements IResourceManagerReloadLi
|
||||||
registerItemModel(wd.itemScreenCfg, 0, "normal");
|
registerItemModel(wd.itemScreenCfg, 0, "normal");
|
||||||
registerItemModel(wd.itemOwnerThief, 0, "normal");
|
registerItemModel(wd.itemOwnerThief, 0, "normal");
|
||||||
registerItemModel(wd.itemLinker, 0, "normal");
|
registerItemModel(wd.itemLinker, 0, "normal");
|
||||||
registerItemModel(wd.itemStoneKey, 0, "normal");
|
|
||||||
registerItemModel(wd.itemMinePad, 0, "normal");
|
registerItemModel(wd.itemMinePad, 0, "normal");
|
||||||
registerItemModel(wd.itemLaserPointer, 0, "normal");
|
registerItemModel(wd.itemLaserPointer, 0, "normal");
|
||||||
|
|
||||||
DefaultUpgrade[] upgrades = DefaultUpgrade.values();
|
DefaultUpgrade[] upgrades = DefaultUpgrade.values();
|
||||||
for(int i = 0; i < upgrades.length; i++)
|
for(int i = 0; i < upgrades.length; i++)
|
||||||
ModelLoader.setCustomModelResourceLocation(wd.itemUpgrade, i, new ModelResourceLocation("webdisplays:upgrade_" + upgrades[i].getName(), "normal"));
|
ModelLoader.setCustomModelResourceLocation(wd.itemUpgrade, i, new ModelResourceLocation("webdisplays:upgrade_" + upgrades[i].getName(), "normal"));
|
||||||
|
|
||||||
|
CraftComponent[] components = CraftComponent.values();
|
||||||
|
for(int i = 0; i < components.length; i++)
|
||||||
|
ModelLoader.setCustomModelResourceLocation(wd.itemCraftComp, i, new ModelResourceLocation("webdisplays:craftcomp_" + components[i].getName(), "normal"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
|
|
|
||||||
27
src/main/java/net/montoyo/wd/core/CraftComponent.java
Normal file
27
src/main/java/net/montoyo/wd/core/CraftComponent.java
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2018 BARBOTIN Nicolas
|
||||||
|
*/
|
||||||
|
|
||||||
|
package net.montoyo.wd.core;
|
||||||
|
|
||||||
|
public enum CraftComponent {
|
||||||
|
|
||||||
|
STONE_KEY("stonekey"),
|
||||||
|
BLANK_UPGRADE("upgrade"),
|
||||||
|
PERIPHERAL_BASE("peripheral"),
|
||||||
|
BATTERY_CELL("batcell"),
|
||||||
|
BATTERY_PACK("batpack"),
|
||||||
|
LASER_DIODE("laserdiode"),
|
||||||
|
BACKLIGHT("backlight");
|
||||||
|
|
||||||
|
private final String name;
|
||||||
|
|
||||||
|
CraftComponent(String n) {
|
||||||
|
name = n;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
75
src/main/java/net/montoyo/wd/core/Criterion.java
Normal file
75
src/main/java/net/montoyo/wd/core/Criterion.java
Normal file
|
|
@ -0,0 +1,75 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2018 BARBOTIN Nicolas
|
||||||
|
*/
|
||||||
|
|
||||||
|
package net.montoyo.wd.core;
|
||||||
|
|
||||||
|
import com.google.gson.JsonDeserializationContext;
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import net.minecraft.advancements.ICriterionTrigger;
|
||||||
|
import net.minecraft.advancements.PlayerAdvancements;
|
||||||
|
import net.minecraft.advancements.critereon.AbstractCriterionInstance;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
public class Criterion implements ICriterionTrigger<Criterion.Instance> {
|
||||||
|
|
||||||
|
public static class Instance extends AbstractCriterionInstance {
|
||||||
|
|
||||||
|
public Instance(ResourceLocation id) {
|
||||||
|
super(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private final ResourceLocation id;
|
||||||
|
private final HashMap<PlayerAdvancements, ArrayList<Listener<Instance>>> map = new HashMap<>();
|
||||||
|
|
||||||
|
public Criterion(@Nonnull String name) {
|
||||||
|
id = new ResourceLocation("webdisplays", name);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Nonnull
|
||||||
|
public ResourceLocation getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addListener(@Nonnull PlayerAdvancements adv, @Nonnull Listener<Instance> l) {
|
||||||
|
map.computeIfAbsent(adv, k -> new ArrayList<>()).add(l);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void removeListener(@Nonnull PlayerAdvancements adv, @Nonnull Listener<Instance> l) {
|
||||||
|
map.computeIfPresent(adv, (k, v) -> {
|
||||||
|
v.remove(l);
|
||||||
|
return v.isEmpty() ? null : v;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void removeAllListeners(@Nonnull PlayerAdvancements adv) {
|
||||||
|
map.remove(adv);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Nonnull
|
||||||
|
public Instance deserializeInstance(@Nonnull JsonObject json, @Nonnull JsonDeserializationContext ctx) {
|
||||||
|
return new Instance(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void trigger(PlayerAdvancements ply) {
|
||||||
|
ArrayList<Listener<Instance>> listeners = map.get(ply);
|
||||||
|
|
||||||
|
if(listeners != null) {
|
||||||
|
Listener[] copy = listeners.toArray(new Listener[0]); //We need to make a copy, otherwise we get a ConcurrentModificationException
|
||||||
|
Arrays.stream(copy).forEach(l -> l.grantCriterion(ply));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -10,6 +10,8 @@ import net.montoyo.wd.entity.TileEntityPeripheralBase;
|
||||||
import net.montoyo.wd.entity.TileEntityRCtrl;
|
import net.montoyo.wd.entity.TileEntityRCtrl;
|
||||||
import net.montoyo.wd.entity.TileEntityRedCtrl;
|
import net.montoyo.wd.entity.TileEntityRedCtrl;
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
|
||||||
public enum DefaultPeripheral implements IStringSerializable {
|
public enum DefaultPeripheral implements IStringSerializable {
|
||||||
|
|
||||||
KEYBOARD("keyboard", TileEntityKeyboard.class), //WITH FACING (< 3)
|
KEYBOARD("keyboard", TileEntityKeyboard.class), //WITH FACING (< 3)
|
||||||
|
|
@ -34,6 +36,7 @@ public enum DefaultPeripheral implements IStringSerializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Nonnull
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
60
src/main/java/net/montoyo/wd/item/ItemCraftComponent.java
Normal file
60
src/main/java/net/montoyo/wd/item/ItemCraftComponent.java
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2018 BARBOTIN Nicolas
|
||||||
|
*/
|
||||||
|
|
||||||
|
package net.montoyo.wd.item;
|
||||||
|
|
||||||
|
import com.mojang.realmsclient.gui.ChatFormatting;
|
||||||
|
import net.minecraft.client.resources.I18n;
|
||||||
|
import net.minecraft.client.util.ITooltipFlag;
|
||||||
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.NonNullList;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.montoyo.wd.WebDisplays;
|
||||||
|
import net.montoyo.wd.core.CraftComponent;
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class ItemCraftComponent extends Item {
|
||||||
|
|
||||||
|
public ItemCraftComponent() {
|
||||||
|
setUnlocalizedName("webdisplays.craftcomp");
|
||||||
|
setRegistryName("craftcomp");
|
||||||
|
setHasSubtypes(true);
|
||||||
|
setMaxDamage(0);
|
||||||
|
setCreativeTab(WebDisplays.CREATIVE_TAB);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Nonnull
|
||||||
|
public String getUnlocalizedName(ItemStack stack) {
|
||||||
|
int meta = stack.getMetadata();
|
||||||
|
CraftComponent[] names = CraftComponent.values();
|
||||||
|
String ret = getUnlocalizedName();
|
||||||
|
|
||||||
|
if(meta >= 0 && meta < names.length)
|
||||||
|
return ret + '.' + names[meta].getName();
|
||||||
|
else
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void getSubItems(@Nonnull CreativeTabs tab, @Nonnull NonNullList<ItemStack> items) {
|
||||||
|
if(isInCreativeTab(tab)) {
|
||||||
|
int cnt = CraftComponent.values().length;
|
||||||
|
|
||||||
|
for(int i = 0; i < cnt; i++)
|
||||||
|
items.add(new ItemStack(this, 1, i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInformation(ItemStack is, @Nullable World world, List<String> tt, ITooltipFlag ttFlags) {
|
||||||
|
tt.add("" + ChatFormatting.ITALIC + I18n.format("item.webdisplays.craftcomp.name"));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -7,17 +7,24 @@ package net.montoyo.wd.item;
|
||||||
import com.mojang.realmsclient.gui.ChatFormatting;
|
import com.mojang.realmsclient.gui.ChatFormatting;
|
||||||
import net.minecraft.client.resources.I18n;
|
import net.minecraft.client.resources.I18n;
|
||||||
import net.minecraft.client.util.ITooltipFlag;
|
import net.minecraft.client.util.ITooltipFlag;
|
||||||
|
import net.minecraft.entity.item.EntityItem;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.entity.player.EntityPlayerMP;
|
||||||
|
import net.minecraft.init.SoundEvents;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.util.ActionResult;
|
import net.minecraft.util.ActionResult;
|
||||||
import net.minecraft.util.EnumActionResult;
|
import net.minecraft.util.EnumActionResult;
|
||||||
import net.minecraft.util.EnumHand;
|
import net.minecraft.util.EnumHand;
|
||||||
|
import net.minecraft.util.SoundCategory;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.montoyo.wd.WebDisplays;
|
import net.montoyo.wd.WebDisplays;
|
||||||
|
import net.montoyo.wd.utilities.Log;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
public class ItemMinePad2 extends Item {
|
public class ItemMinePad2 extends Item {
|
||||||
|
|
||||||
|
|
@ -56,4 +63,40 @@ public class ItemMinePad2 extends Item {
|
||||||
tt.add("" + ChatFormatting.ITALIC + ChatFormatting.GRAY + I18n.format("webdisplays.minepad.turnon"));
|
tt.add("" + ChatFormatting.ITALIC + ChatFormatting.GRAY + I18n.format("webdisplays.minepad.turnon"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onEntityItemUpdate(EntityItem ent) {
|
||||||
|
if(ent.onGround && !ent.world.isRemote) {
|
||||||
|
NBTTagCompound tag = ent.getItem().getTagCompound();
|
||||||
|
|
||||||
|
if(tag != null && tag.hasKey("ThrowHeight")) {
|
||||||
|
//Delete it, it touched the ground
|
||||||
|
double height = tag.getDouble("ThrowHeight");
|
||||||
|
UUID thrower = null;
|
||||||
|
|
||||||
|
if(tag.hasKey("ThrowerMSB") && tag.hasKey("ThrowerLSB"))
|
||||||
|
thrower = new UUID(tag.getLong("ThrowerMSB"), tag.getLong("ThrowerLSB"));
|
||||||
|
|
||||||
|
if(tag.hasKey("PadID") || tag.hasKey("PadURL")) {
|
||||||
|
tag.removeTag("ThrowerMSB");
|
||||||
|
tag.removeTag("ThrowerLSB");
|
||||||
|
tag.removeTag("ThrowHeight");
|
||||||
|
} else //We can delete the whole tag
|
||||||
|
ent.getItem().setTagCompound(null);
|
||||||
|
|
||||||
|
if(thrower != null && height - ent.posY >= 20.0) {
|
||||||
|
ent.world.playSound(null, ent.posX, ent.posY, ent.posZ, SoundEvents.BLOCK_GLASS_BREAK, SoundCategory.BLOCKS, 4.0f, 1.0f);
|
||||||
|
ent.setDead();
|
||||||
|
//TODO: Drop an extension card
|
||||||
|
|
||||||
|
EntityPlayer ply = ent.world.getPlayerEntityByUUID(thrower);
|
||||||
|
|
||||||
|
if(ply != null && ply instanceof EntityPlayerMP)
|
||||||
|
WebDisplays.INSTANCE.criterionPadBreak.trigger(((EntityPlayerMP) ply).getAdvancements());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
package net.montoyo.wd.item;
|
package net.montoyo.wd.item;
|
||||||
|
|
||||||
|
import com.mojang.realmsclient.gui.ChatFormatting;
|
||||||
import net.minecraft.client.resources.I18n;
|
import net.minecraft.client.resources.I18n;
|
||||||
import net.minecraft.client.util.ITooltipFlag;
|
import net.minecraft.client.util.ITooltipFlag;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
|
@ -50,6 +51,7 @@ public class ItemUpgrade extends Item implements IUpgrade {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Nonnull
|
||||||
public String getUnlocalizedName(ItemStack stack) {
|
public String getUnlocalizedName(ItemStack stack) {
|
||||||
int meta = stack.getMetadata();
|
int meta = stack.getMetadata();
|
||||||
DefaultUpgrade[] names = DefaultUpgrade.values();
|
DefaultUpgrade[] names = DefaultUpgrade.values();
|
||||||
|
|
@ -63,11 +65,11 @@ public class ItemUpgrade extends Item implements IUpgrade {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addInformation(ItemStack is, @Nullable World world, List<String> tt, ITooltipFlag ttFlags) {
|
public void addInformation(ItemStack is, @Nullable World world, List<String> tt, ITooltipFlag ttFlags) {
|
||||||
tt.add(I18n.format("item.webdisplays.upgrade.name"));
|
tt.add("" + ChatFormatting.ITALIC + I18n.format("item.webdisplays.upgrade.name"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> items) {
|
public void getSubItems(@Nonnull CreativeTabs tab, @Nonnull NonNullList<ItemStack> items) {
|
||||||
if(isInCreativeTab(tab)) {
|
if(isInCreativeTab(tab)) {
|
||||||
int cnt = DefaultUpgrade.values().length;
|
int cnt = DefaultUpgrade.values().length;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"display": {
|
||||||
|
"icon": { "item": "webdisplays:minepad" },
|
||||||
|
"title": { "translate": "advancements.webdisplays.minepad.title" },
|
||||||
|
"description": { "translate": "advancements.webdisplays.minepad.description" }
|
||||||
|
},
|
||||||
|
"parent": "webdisplays:webdisplays/root",
|
||||||
|
"criteria": {
|
||||||
|
"has_glass_pane": {
|
||||||
|
"trigger": "minecraft:inventory_changed",
|
||||||
|
"conditions": {
|
||||||
|
"items": [ { "item": "webdisplays:minepad" } ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"display": {
|
||||||
|
"icon": { "item": "webdisplays:minepad" },
|
||||||
|
"title": { "translate": "advancements.webdisplays.padbreak.title" },
|
||||||
|
"description": { "translate": "advancements.webdisplays.padbreak.description" }
|
||||||
|
},
|
||||||
|
"parent": "webdisplays:webdisplays/minepad",
|
||||||
|
"criteria": {
|
||||||
|
"pad_break": {
|
||||||
|
"trigger": "webdisplays:pad_break"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"display": {
|
||||||
|
"icon": { "item": "webdisplays:screen" },
|
||||||
|
"title": { "translate": "advancements.webdisplays.root.title" },
|
||||||
|
"description": { "translate": "advancements.webdisplays.root.description" },
|
||||||
|
"background": "minecraft:textures/gui/advancements/backgrounds/stone.png",
|
||||||
|
"show_toast": false,
|
||||||
|
"announce_to_chat": false
|
||||||
|
},
|
||||||
|
"criteria": {
|
||||||
|
"has_glass_pane": {
|
||||||
|
"trigger": "minecraft:inventory_changed",
|
||||||
|
"conditions": {
|
||||||
|
"items": [ { "item": "minecraft:glass_pane" } ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rewards": {
|
||||||
|
"recipes": [
|
||||||
|
"webdisplays:backlight",
|
||||||
|
"webdisplays:screen",
|
||||||
|
"webdisplays:batcell",
|
||||||
|
"webdisplays:batpack",
|
||||||
|
"webdisplays:minepad"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"display": {
|
||||||
|
"icon": { "item": "webdisplays:screen" },
|
||||||
|
"title": { "translate": "advancements.webdisplays.screen.title" },
|
||||||
|
"description": { "translate": "advancements.webdisplays.screen.description" }
|
||||||
|
},
|
||||||
|
"parent": "webdisplays:webdisplays/root",
|
||||||
|
"criteria": {
|
||||||
|
"has_glass_pane": {
|
||||||
|
"trigger": "minecraft:inventory_changed",
|
||||||
|
"conditions": {
|
||||||
|
"items": [ { "item": "webdisplays:screen" } ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rewards": {
|
||||||
|
"recipes": [
|
||||||
|
"webdisplays:linker",
|
||||||
|
"webdisplays:screencfg",
|
||||||
|
"webdisplays:rctrl",
|
||||||
|
"webdisplays:ccinterface",
|
||||||
|
"webdisplays:ocinterface",
|
||||||
|
"webdisplays:redctrl1",
|
||||||
|
"webdisplays:redctrl2"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -9,7 +9,14 @@ tile.webdisplays.peripheral.redstonectrl.name=Redstone Controller
|
||||||
item.webdisplays.screencfg.name=Screen Configurator
|
item.webdisplays.screencfg.name=Screen Configurator
|
||||||
item.webdisplays.ownerthief.name=Ownership Thief [ADMIN]
|
item.webdisplays.ownerthief.name=Ownership Thief [ADMIN]
|
||||||
item.webdisplays.linker.name=Linking Tool
|
item.webdisplays.linker.name=Linking Tool
|
||||||
item.webdisplays.stonekey.name=Stone Key
|
item.webdisplays.craftcomp.name=Craft Component
|
||||||
|
item.webdisplays.craftcomp.stonekey.name=Stone Key
|
||||||
|
item.webdisplays.craftcomp.upgrade.name=Blank Upgrade
|
||||||
|
item.webdisplays.craftcomp.peripheral.name=Peripheral Base
|
||||||
|
item.webdisplays.craftcomp.batcell.name=Battery Cell
|
||||||
|
item.webdisplays.craftcomp.batpack.name=Battery Pack
|
||||||
|
item.webdisplays.craftcomp.laserdiode.name=650nm Laser Diode
|
||||||
|
item.webdisplays.craftcomp.backlight.name=Backlight
|
||||||
item.webdisplays.minepad.name=minePad
|
item.webdisplays.minepad.name=minePad
|
||||||
item.webdisplays.upgrade.name=Screen Upgrade
|
item.webdisplays.upgrade.name=Screen Upgrade
|
||||||
item.webdisplays.upgrade.lasermouse.name=Laser Sensor
|
item.webdisplays.upgrade.lasermouse.name=Laser Sensor
|
||||||
|
|
@ -61,3 +68,11 @@ webdisplays.gui.keyboard.warning1=WARNING! Typed data are sent in PLAIN TEXT to
|
||||||
webdisplays.gui.keyboard.warning2=This means anyone can know what you're up to.
|
webdisplays.gui.keyboard.warning2=This means anyone can know what you're up to.
|
||||||
webdisplays.gui.keyboard.warning3=NEVER write one of your passwords using this keyboard.
|
webdisplays.gui.keyboard.warning3=NEVER write one of your passwords using this keyboard.
|
||||||
webdisplays.gui.keyboard.gotcha=Got ya
|
webdisplays.gui.keyboard.gotcha=Got ya
|
||||||
|
advancements.webdisplays.root.title=WebDisplays
|
||||||
|
advancements.webdisplays.root.description=The WebDisplays mod advancements
|
||||||
|
advancements.webdisplays.screen.title=The internet is for...
|
||||||
|
advancements.webdisplays.screen.description=Craft your first web display
|
||||||
|
advancements.webdisplays.minepad.title=This is a revolution
|
||||||
|
advancements.webdisplays.minepad.description=Get your hands on the newest technology: the minePad
|
||||||
|
advancements.webdisplays.padbreak.title=Reverse Engineering
|
||||||
|
advancements.webdisplays.padbreak.description=These things are fragile! Don't drop a minePad from high place to unlock the upgrade recipes
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "webdisplays:items/backlight"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "webdisplays:items/batcell"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "webdisplays:items/batpack"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "webdisplays:items/laserdiode"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "webdisplays:items/peripheral"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "webdisplays:items/upgrade"
|
||||||
|
}
|
||||||
|
}
|
||||||
19
src/main/resources/assets/webdisplays/recipes/backlight.json
Normal file
19
src/main/resources/assets/webdisplays/recipes/backlight.json
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
"PPP",
|
||||||
|
"GGG"
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"P": {
|
||||||
|
"item": "minecraft:glass_pane"
|
||||||
|
},
|
||||||
|
"G": {
|
||||||
|
"item": "minecraft:glowstone_dust"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "webdisplays:craftcomp",
|
||||||
|
"data": 6
|
||||||
|
}
|
||||||
|
}
|
||||||
24
src/main/resources/assets/webdisplays/recipes/batcell.json
Normal file
24
src/main/resources/assets/webdisplays/recipes/batcell.json
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
"RGR",
|
||||||
|
"RIR",
|
||||||
|
"RGR"
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"I": {
|
||||||
|
"item": "minecraft:iron_ingot"
|
||||||
|
},
|
||||||
|
"G": {
|
||||||
|
"item": "minecraft:gold_ingot"
|
||||||
|
},
|
||||||
|
"R": {
|
||||||
|
"item": "minecraft:redstone"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "webdisplays:craftcomp",
|
||||||
|
"data": 3,
|
||||||
|
"count": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
15
src/main/resources/assets/webdisplays/recipes/batpack.json
Normal file
15
src/main/resources/assets/webdisplays/recipes/batpack.json
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [ "BBB" ],
|
||||||
|
"key": {
|
||||||
|
"B": {
|
||||||
|
"item": "webdisplays:craftcomp",
|
||||||
|
"data": 3
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "webdisplays:craftcomp",
|
||||||
|
"data": 4,
|
||||||
|
"count": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -7,7 +7,8 @@
|
||||||
],
|
],
|
||||||
"key": {
|
"key": {
|
||||||
"K": {
|
"K": {
|
||||||
"item": "webdisplays:stonekey"
|
"item": "webdisplays:craftcomp",
|
||||||
|
"data": 0
|
||||||
},
|
},
|
||||||
"R": {
|
"R": {
|
||||||
"item": "minecraft:redstone"
|
"item": "minecraft:redstone"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
"IGI",
|
||||||
|
"IRI",
|
||||||
|
" A "
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"I": {
|
||||||
|
"item": "minecraft:iron_ingot"
|
||||||
|
},
|
||||||
|
"G": {
|
||||||
|
"item": "minecraft:glowstone_dust"
|
||||||
|
},
|
||||||
|
"R": {
|
||||||
|
"item": "minecraft:redstone"
|
||||||
|
},
|
||||||
|
"A": {
|
||||||
|
"item": "minecraft:gold_ingot"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "webdisplays:craftcomp",
|
||||||
|
"data": 5,
|
||||||
|
"count": 2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
"D",
|
||||||
|
"C",
|
||||||
|
"B"
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"D": {
|
||||||
|
"item": "webdisplays:craftcomp",
|
||||||
|
"data": 5
|
||||||
|
},
|
||||||
|
"C": {
|
||||||
|
"item": "webdisplays:craftcomp",
|
||||||
|
"data": 3
|
||||||
|
},
|
||||||
|
"B": {
|
||||||
|
"item": "minecraft:wooden_button"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "webdisplays:laserpointer",
|
||||||
|
"count": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{
|
||||||
"type": "minecraft:crafting_shaped",
|
"type": "minecraft:crafting_shaped",
|
||||||
"pattern": [
|
"pattern": [
|
||||||
"PRP",
|
"PPP",
|
||||||
"PGP",
|
"RGB",
|
||||||
"DBD"
|
"DCD"
|
||||||
],
|
],
|
||||||
"key": {
|
"key": {
|
||||||
"P": {
|
"P": {
|
||||||
|
|
@ -23,6 +23,10 @@
|
||||||
},
|
},
|
||||||
"D": {
|
"D": {
|
||||||
"item": "minecraft:diamond"
|
"item": "minecraft:diamond"
|
||||||
|
},
|
||||||
|
"C": {
|
||||||
|
"item": "webdisplays:craftcomp",
|
||||||
|
"data": 4
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"result": {
|
"result": {
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
"pattern": [
|
"pattern": [
|
||||||
"PPP",
|
"PPP",
|
||||||
"RGB",
|
"RGB",
|
||||||
"PPP"
|
"LLL"
|
||||||
],
|
],
|
||||||
"key": {
|
"key": {
|
||||||
"P": {
|
"P": {
|
||||||
|
|
@ -20,6 +20,10 @@
|
||||||
"B": {
|
"B": {
|
||||||
"item": "minecraft:dye",
|
"item": "minecraft:dye",
|
||||||
"data": 4
|
"data": 4
|
||||||
|
},
|
||||||
|
"L": {
|
||||||
|
"item": "webdisplays:craftcomp",
|
||||||
|
"data": 6
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"result": {
|
"result": {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"result": {
|
"result": {
|
||||||
"item": "webdisplays:stonekey",
|
"item": "webdisplays:craftcomp",
|
||||||
|
"data": 0,
|
||||||
"count": 9
|
"count": 9
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
21
src/main/resources/assets/webdisplays/recipes/upgrade.json
Normal file
21
src/main/resources/assets/webdisplays/recipes/upgrade.json
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
"QIQ",
|
||||||
|
"I I",
|
||||||
|
"QIQ"
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"Q": {
|
||||||
|
"item": "minecraft:quartz"
|
||||||
|
},
|
||||||
|
"I": {
|
||||||
|
"item": "minecraft:iron_nugget"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "webdisplays:craftcomp",
|
||||||
|
"data": 1,
|
||||||
|
"count": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [ "UE" ],
|
||||||
|
"key": {
|
||||||
|
"U": {
|
||||||
|
"item": "webdisplays:craftcomp",
|
||||||
|
"data": 1
|
||||||
|
},
|
||||||
|
"E": {
|
||||||
|
"item": "minecraft:ender_eye"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "webdisplays:upgrade",
|
||||||
|
"data": 3,
|
||||||
|
"count": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [ "UL" ],
|
||||||
|
"key": {
|
||||||
|
"U": {
|
||||||
|
"item": "webdisplays:craftcomp",
|
||||||
|
"data": 1
|
||||||
|
},
|
||||||
|
"L": {
|
||||||
|
"item": "webdisplays:craftcomp",
|
||||||
|
"data": 5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "webdisplays:upgrade",
|
||||||
|
"data": 0,
|
||||||
|
"count": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [ "UR" ],
|
||||||
|
"key": {
|
||||||
|
"U": {
|
||||||
|
"item": "webdisplays:craftcomp",
|
||||||
|
"data": 1
|
||||||
|
},
|
||||||
|
"R": {
|
||||||
|
"item": "minecraft:redstone"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "webdisplays:upgrade",
|
||||||
|
"data": 1,
|
||||||
|
"count": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [ "UR" ],
|
||||||
|
"key": {
|
||||||
|
"U": {
|
||||||
|
"item": "webdisplays:craftcomp",
|
||||||
|
"data": 1
|
||||||
|
},
|
||||||
|
"R": {
|
||||||
|
"item": "minecraft:redstone_torch"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "webdisplays:upgrade",
|
||||||
|
"data": 2,
|
||||||
|
"count": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 619 B |
|
Before Width: | Height: | Size: 228 B After Width: | Height: | Size: 228 B |
Binary file not shown.
|
After Width: | Height: | Size: 310 B |
Binary file not shown.
|
After Width: | Height: | Size: 300 B |
Loading…
Reference in New Issue
Block a user