From d38b15ec26d9ceae2789e610bafb3460b797c3fa Mon Sep 17 00:00:00 2001 From: m1919810 Date: Sun, 6 Oct 2024 15:20:00 +0800 Subject: [PATCH] fix :progress --- .idea/workspace.xml | 103 +- .../logitech/Listeners/ListenerManager.java | 2 + .../Listeners/SuperSpongeDryListener.java | 59 + .../java/me/matl114/logitech/MyAddon.java | 9 +- .../logitech/SlimefunItem/AddGroups.java | 1343 +++--- .../logitech/SlimefunItem/AddItem.java | 1263 +++--- .../SlimefunItem/AddSlimefunItems.java | 97 + .../logitech/SlimefunItem/Blocks/Laser.java | 348 +- .../Blocks/MultiBlock/FinalAltarCore.java | 466 +- .../SlimefunItem/Blocks/SpreadBlock.java | 303 +- .../SlimefunItem/Items/ChargableProps.java | 35 +- .../logitech/SlimefunItem/Items/LaserGun.java | 309 +- .../Items/TrackingArrowLauncher.java | 183 + .../SpecialMachines/TntGenerator.java | 4 +- .../java/me/matl114/logitech/Unittest.java | 29 +- .../me/matl114/logitech/Utils/AddUtils.java | 1764 ++++---- .../me/matl114/logitech/Utils/CraftUtils.java | 3841 +++++++++-------- .../me/matl114/logitech/Utils/WorldUtils.java | 60 +- src/main/resources/language.yml | 2317 +++++----- 19 files changed, 6522 insertions(+), 6013 deletions(-) create mode 100644 src/main/java/me/matl114/logitech/Listeners/Listeners/SuperSpongeDryListener.java create mode 100644 src/main/java/me/matl114/logitech/SlimefunItem/Items/TrackingArrowLauncher.java diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 2278708..ba84fcf 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,11 +5,24 @@ + + + + + + + + + + + - + + + - + - { - "keyToString": { - "Application.Run Test.executor": "Run", - "Maven.Algorithm test.executor": "Run", - "Maven.Clean.executor": "Run", - "Maven.LogiTech [-Dtest=Tests#main,test,-e].executor": "Run", - "Maven.LogiTech [-Dtest=Tests#main,test].executor": "Run", - "Maven.LogiTech [-Dtest=Tests,test].executor": "Run", - "Maven.LogiTech [clean].executor": "Run", - "Maven.LogiTech [compile].executor": "Run", - "Maven.LogiTech [install,-Dmaven.test.skip=true].executor": "Run", - "Maven.LogiTech [install].executor": "Run", - "Maven.LogiTech [package].executor": "Run", - "Maven.SlimefunAddon [install].executor": "Run", - "Maven.TestAddon [install].executor": "Run", - "RunOnceActivity.ShowReadmeOnStart": "true", - "Shell Script.Build and Start Server.executor": "Run", - "Shell Script.Unnamed.executor": "Run", - "git-widget-placeholder": "master", - "kotlin-language-version-configured": "true", - "last_opened_file_path": "C:/Intellij_Idea/workspace/NetworksExpansion-master3", - "node.js.detected.package.eslint": "true", - "node.js.detected.package.tslint": "true", - "node.js.selected.package.eslint": "(autodetect)", - "node.js.selected.package.tslint": "(autodetect)", - "nodejs_package_manager_path": "npm", - "project.structure.last.edited": "Libraries", - "project.structure.proportion": "0.15", - "project.structure.side.proportion": "0.2", - "settings.editor.selected.configurable": "editor.preferences.completion", - "vue.rearranger.settings.migration": "true" + +}]]> @@ -289,14 +302,10 @@ - - - - diff --git a/src/main/java/me/matl114/logitech/Listeners/ListenerManager.java b/src/main/java/me/matl114/logitech/Listeners/ListenerManager.java index 478820c..074de21 100644 --- a/src/main/java/me/matl114/logitech/Listeners/ListenerManager.java +++ b/src/main/java/me/matl114/logitech/Listeners/ListenerManager.java @@ -24,6 +24,7 @@ public static void registerListeners(Plugin plugin,PluginManager manager){ register(VANILLACRAFT_ALLOW); register(ENTITYFEAT_LISTENER); register(LASER_ON_HEAD_LISTENER); + register(SUPERSPONGE_DRY_LISTENER); } public static Plugin plugin; public static PluginManager manager; @@ -40,4 +41,5 @@ public static void register(Listener listener){ public static final Listener VANILLACRAFT_ALLOW=new CraftingListener(); public static final Listener ENTITYFEAT_LISTENER=new SpawnerListener(); public static final Listener LASER_ON_HEAD_LISTENER=new LaserGunOnHeadListener(); + public static final Listener SUPERSPONGE_DRY_LISTENER=new SuperSpongeDryListener(); } diff --git a/src/main/java/me/matl114/logitech/Listeners/Listeners/SuperSpongeDryListener.java b/src/main/java/me/matl114/logitech/Listeners/Listeners/SuperSpongeDryListener.java new file mode 100644 index 0000000..2adbf69 --- /dev/null +++ b/src/main/java/me/matl114/logitech/Listeners/Listeners/SuperSpongeDryListener.java @@ -0,0 +1,59 @@ +package me.matl114.logitech.Listeners.Listeners; + +import me.matl114.logitech.SlimefunItem.AddItem; +import me.matl114.logitech.Utils.CraftUtils; +import me.matl114.logitech.Utils.Debug; +import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.block.BlockState; +import org.bukkit.block.Container; +import org.bukkit.block.data.BlockData; +import org.bukkit.block.data.type.Furnace; +import org.bukkit.event.EventHandler; +import org.bukkit.event.Listener; +import org.bukkit.event.inventory.FurnaceBurnEvent; +import org.bukkit.event.inventory.FurnaceSmeltEvent; +import org.bukkit.inventory.FurnaceInventory; +import org.bukkit.inventory.Inventory; +import org.bukkit.inventory.InventoryHolder; +import org.bukkit.inventory.ItemStack; + +public class SuperSpongeDryListener implements Listener { + @EventHandler + public void onFurnaceDryFinish(FurnaceSmeltEvent event){ + ItemStack stack=event.getSource(); + if(stack.getType()== Material.WET_SPONGE&& CraftUtils.matchItemStack(stack,AddItem.SUPERSPONGE_USED,false)){ + Block block=event.getBlock(); + BlockState blockData=block.getState(); + if(blockData instanceof Container ih){ + Inventory inventory=ih.getInventory(); + if(inventory instanceof FurnaceInventory fi){ + ItemStack fuelSlot=fi.getFuel(); + ItemStack outputSlot=fi.getResult(); + if(outputSlot==null||outputSlot.getType()==Material.AIR){ + //槽位是空的,直接输入该输出就行 + event.setResult(AddItem.SUPERSPONGE.clone()); + if(fuelSlot!=null&&fuelSlot.getType()== Material.BUCKET){ + //燃料修改 + fuelSlot.setType(Material.POWDER_SNOW_BUCKET); + } + } + else if( CraftUtils.matchItemStack(outputSlot,AddItem.SUPERSPONGE,false)){ + //由于bukkit特性,需要我们自己设置数量 + ItemStack source=fi.getSmelting(); + if(CraftUtils.matchItemStack(source,AddItem.SUPERSPONGE_USED,false)){ + outputSlot.setAmount(outputSlot.getAmount()+1); + source.setAmount(source.getAmount()-1); + if(fuelSlot!=null&&fuelSlot.getType()== Material.BUCKET){ + //燃料修改 + fuelSlot.setType(Material.POWDER_SNOW_BUCKET); + } + event.setCancelled(true); + } + } + } + } + } + } + +} diff --git a/src/main/java/me/matl114/logitech/MyAddon.java b/src/main/java/me/matl114/logitech/MyAddon.java index 5b26c2d..14bac61 100644 --- a/src/main/java/me/matl114/logitech/MyAddon.java +++ b/src/main/java/me/matl114/logitech/MyAddon.java @@ -14,10 +14,7 @@ import me.matl114.logitech.SlimefunItem.AddSlimefunItems; import me.matl114.logitech.SlimefunItem.Blocks.MultiBlockTypes; import me.matl114.logitech.SlimefunItem.Cargo.Storages; -import me.matl114.logitech.Utils.BukkitUtils; -import me.matl114.logitech.Utils.CraftUtils; -import me.matl114.logitech.Utils.DataCache; -import me.matl114.logitech.Utils.Debug; +import me.matl114.logitech.Utils.*; import me.matl114.logitech.Utils.UtilClass.MultiBlockClass.MultiBlockService; import net.guizhanss.guizhanlibplugin.updater.GuizhanUpdater; import org.bukkit.Bukkit; @@ -106,7 +103,9 @@ public void onEnable() { RadiationRegion.setup(); //加载配方工具 CraftUtils.setup(); - //加载原版工作台注入 + //加载世界操作工具 + WorldUtils.setup(); + //加载Bukkit操作工具 BukkitUtils.setup(); Debug.logger("指令注册完毕"); command.register(); diff --git a/src/main/java/me/matl114/logitech/SlimefunItem/AddGroups.java b/src/main/java/me/matl114/logitech/SlimefunItem/AddGroups.java index 13e8e0f..dd41727 100644 --- a/src/main/java/me/matl114/logitech/SlimefunItem/AddGroups.java +++ b/src/main/java/me/matl114/logitech/SlimefunItem/AddGroups.java @@ -1,668 +1,675 @@ -package me.matl114.logitech.SlimefunItem; - -import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon; -import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup; -import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile; -import io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuide; -import io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuideMode; -import io.github.thebusybiscuit.slimefun4.implementation.Slimefun; -import io.github.thebusybiscuit.slimefun4.libraries.dough.chat.ChatInput; -import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack; -import io.github.thebusybiscuit.slimefun4.utils.ChestMenuUtils; -import me.matl114.logitech.Items.CustomHead; -import me.matl114.logitech.Listeners.Listeners.PlayerQuiteListener; -import me.matl114.logitech.Schedule.PersistentEffects.AbstractEffect; -import me.matl114.logitech.Schedule.PersistentEffects.CustomEffects; -import me.matl114.logitech.Schedule.PersistentEffects.PlayerEffects; -import me.matl114.logitech.Schedule.SchedulePostRegister; -import me.matl114.logitech.Schedule.Schedules; -import me.matl114.logitech.SlimefunItem.Machines.WorkBenchs.BugCrafter; -import me.matl114.logitech.Utils.*; -import me.matl114.logitech.Utils.UtilClass.MenuClass.*; -import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu; -import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ClickAction; -import net.md_5.bungee.api.ChatColor; -import net.md_5.bungee.api.chat.ClickEvent; -import net.md_5.bungee.api.chat.TextComponent; -import org.bukkit.Material; -import org.bukkit.NamespacedKey; -import org.bukkit.damage.DamageSource; -import org.bukkit.damage.DamageType; -import org.bukkit.entity.Player; -import org.bukkit.event.entity.EntityDamageByEntityEvent; -import org.bukkit.event.entity.EntityDamageEvent; -import org.bukkit.event.entity.PlayerDeathEvent; -import org.bukkit.inventory.ItemStack; -import org.bukkit.inventory.meta.ItemMeta; -import org.bukkit.scheduler.BukkitRunnable; - -import java.util.*; - -public class AddGroups { - public static void registerGroups(SlimefunAddon plugin){ - ROOT.register(plugin); - INFO.register(plugin); - MATERIAL.register(plugin); - BASIC.register(plugin); - CARGO.register(plugin); - SINGULARITY.register(plugin); - ADVANCED.register(plugin); - BEYOND.register(plugin); - VANILLA.register(plugin); - MANUAL.register(plugin); - SPECIAL.register(plugin); - SPACE.register(plugin); - GENERATORS.register(plugin); - ENERGY.register(plugin); - FUNCTIONAL.register(plugin); - } - // 给你的分类提供一个独一无二的ID - protected static final NamespacedKey itemGroupId = AddUtils.getNameKey("addon_category"); - protected static final NamespacedKey bugcrafterId = AddUtils.getNameKey("bugcrafter"); - - public static final ItemGroup MATERIAL =new DummyItemGroup(AddUtils.getNameKey("material" ), AddItem.MATERIAL); - - public static final ItemGroup BASIC =new DummyItemGroup(AddUtils.getNameKey("basic" ), AddItem.BASIC); - - public static final ItemGroup CARGO = new DummyItemGroup(AddUtils.getNameKey("cargo" ), AddItem.CARGO); - - public static final ItemGroup SINGULARITY= new DummyItemGroup(AddUtils.getNameKey("singularity"),AddItem.SINGULARITY); - - public static final ItemGroup ADVANCED= new DummyItemGroup(AddUtils.getNameKey("advanced" ), AddItem.ADVANCED); - - public static final ItemGroup BEYOND= new DummyItemGroup(AddUtils.getNameKey("beyond" ), AddItem.BEYOND); - - public static final ItemGroup VANILLA= new DummyItemGroup(AddUtils.getNameKey("vanilla" ), AddItem.VANILLA); - - public static final ItemGroup MANUAL = new DummyItemGroup(AddUtils.getNameKey("manual" ), AddItem.MANUAL); - - public static final ItemGroup SPECIAL = new DummyItemGroup(AddUtils.getNameKey("special" ), AddItem.SPECIAL); - - public static final ItemGroup SPACE = new DummyItemGroup(AddUtils.getNameKey("space"),AddItem.SPACE); - - public static final ItemGroup GENERATORS = new DummyItemGroup(AddUtils.getNameKey("generators"),AddItem.GENERATORS); - - public static final ItemGroup ENERGY= new DummyItemGroup(AddUtils.getNameKey("energy"),AddItem.ENERGY); - - public static final ItemGroup FUNCTIONAL=new DummyItemGroup(AddUtils.getNameKey("functional"),AddItem.FUNCTIONAL); - public static ItemGroup MORE2=new CustomItemGroup(AddUtils.getNameKey("more2"),AddUtils.color("更多说明"),AddItem.MORE2,54,36,new LinkedHashMap<>()) { - @Override - protected void init(MenuFactory menuFactory) { - menuFactory.addInventory(0,AddUtils.getInfoShow("&f致歉说明", - "&7感谢您能点开到这里,看到这份说明", - "&7本附属为我开发的首个附属,无人问津是应该的", - "&7您能点进这一分类已经是对我最大的鼓励和支持", - "&7本人水平很次,也没有很好的创作能力创作让玩家满意的附属", - "&7还请包容")); - menuFactory.addInventory(1,AddUtils.getInfoShow("&f致歉说明", - "&7这个附属很烂", - "&7他拥有冗长的机制说明书和昂贵的合成表", - "&7以及作者乱填的,毫无道理的材料消耗", - "&7为什么呢", - "&7因为作者并不知道怎么编一个让玩家满意的合成表", - "&7很可能有些时候,在这方面给玩家带来很大的困扰")); - menuFactory.addInventory(2,AddUtils.getInfoShow("&f致歉说明", - "&7作者也不知道为什么作者要写这一个附属", - "&7作者已经投入整个暑假的晚上8点到凌晨4点来进行附属编写", - "&7作者也&a希望这个附属能变得更好&7,而不是更恶心", - "&7作者&a希望附属对玩家有帮助,而不是对玩家造成困扰" - )); - menuFactory.addInventory(3,AddUtils.getInfoShow("&f致歉说明", - "&7作者在此恳请大家", - "&a多多包容作者,并把自己的想法跟作者讨论", - "&a不管如何,作者都会听取玩家的意见,争取将附属做得更好")); - menuFactory.addInventory(4,AddUtils.getInfoShow("&f致歉说明", - "&7这个附属还是很烂", - "&7他既没有乱码科技的制造台,也没有乱序技艺的尘埃反应堆", - "&7作者一开始的目标是制作优秀的机器,虽然现在改为了制作高效的机器", - "&7但是并没有非常超标的机器存在", - "&7还请玩家包容", - "&7如果你只是想找op机器", - "&7那么本附属可能并不符合你的心意")); - menuFactory.addInventory(5,AddUtils.getInfoShow("&f致歉说明", - "&7作者能拿的出手的机制就这几个", - "&7虽说抱歉,但是作者也不会因此而做op机器和刷物机器", - "&a但是玩家有什么好的想法或者急切的机器需求", - "&a也是可以和作者提的", - "", - "&7作者真心希望该附属越做越好,而不是越来越烂", - "&a所以我在此恳请大家主动发表自己的看法")); - menuFactory.addInventory(6,AddUtils.getInfoShow("&f致歉说明", - "&7虽说致歉,但是作者还是会&a坚定的继续开发和维护这个附属", - "&7虽然作者也曾想过放弃该附属", - "&7但是也只是一时之念,大家不要当真", - "&7请大家放心,作者并不会丢下一堆烂摊子跑路")); - menuFactory.addInventory(7,AddUtils.getInfoShow("&f致歉说明", - "&7最后,在此对&e所有觉得这个附属没救的玩家&7致辞","", - "&7粘液圈虽然不大,但是比本附属好的附属也是比比皆是", - "&7作者的生活中也不只是有粘液,作者也要有自己的生活,并不能帮你救活这个附属", - "&7您也不必拘泥于我的附属,我们好聚好散,对大家都好")); - menuFactory.addInventory(8,AddUtils.getInfoShow("&f致歉说明", - "&7最后声明:本说明并不针对某一特定玩家", - "&7当您对号入座时,请不要座岔了,谢谢." - )); - } - - @Override - protected void addGuideRelated(ChestMenu menu, Player p, PlayerProfile profile, SlimefunGuideMode mode, int pages) { - - } - }; - public static ItemGroup UPDATELOG=new CustomItemGroup(AddUtils.getNameKey("log"),AddUtils.colorful("更新日志"),AddItem.UPDATELOG,54,36,new LinkedHashMap<>()) { - @Override - protected void init(MenuFactory factory) { - factory.addInventory(0,AddUtils.getInfoShow("&f更新日志","&7此页为简易的更新日志","&7你或许可以找到你想要的新特性")); - factory.addInventory(1,AddUtils.getInfoShow("&f2024.8.28", - "&7创建日志", - "&7创建新的终极机器用于测试", - "&7大型配方展示组增加历史记录", - "&7修复模拟合成台不显示黑名单的bug", - "&7修复原版配方读取,将矿辞读为等价物品组") - ); - factory.addInventory(2,AddUtils.getInfoShow("&f2024.8.29", - "&7修改部分描述", - "&7修复了自定义菜单历史记录bug", - "&7平衡性调整", - "&7修改了等价物品组配置的读取方式", - "&7修改了语言文件读取方式,并研发了自动提取字符串脚本", - "&7研发出乱码科技的英文版\"乱翻科技\"", - "&7我没有痴呆症" - ) - ); - factory.addInventory(3,AddUtils.getInfoShow("&f2024.8.30", - "&7进行平衡性调整", - "&7修复分拣机与糟糕sft导致的冲突", - "&7新增若干货运机器与其配方", - "&7遇见了芯片最优解", - "&7与玩家交流,获得反馈", - "&7出现了手残破坏多方块结构的玩家", - "&7大家一定要小心谨慎,少得痴呆症" - ) - ); - factory.addInventory(4,AddUtils.getInfoShow("&f&m2024.8.30 &r&f2024.8.31", - "&7增加了可调节的货运机器", - "&7开始研发逻辑奇点部分的机器", - "&7发现远古测试机器的bug", - "&7中午出门把身份证丢了,晦气", - "&7下午治疗身份证去了,没更新痴呆症", - "&7大家一定要小心谨慎,少得身份症", - "&7晚上和haiman整了SlimefunEssentials", - "&7JEI十分的强劲,我觉得我都不用写搜索了" - ) - ); - factory.addInventory(5,AddUtils.getInfoShow("&f2024.9.1", - "&7修复薯片核心配方无法原版自动化", - "&7到处转转,学会怎么上传头颅", - "&7完成终极机制之远程接入存储,但是出现了小的bug", - "&7修一个小bug 花费了我好久。实际上这是我算法架构的问题", - "&7但是我还是尝试了若干方案之后,最终决定这么搞,希望不会炸", - "&7经过了亿点重构,准备开始测试了,希望人没事" - ) - ); - factory.addInventory(6,AddUtils.getInfoShow("&f2024.9.1", - "&7今天是几号来着", - "&7方案全部无效", - "&7新特性不能就这么寄了", - "&7躺下睡觉吧还是" - ) - ); - factory.addInventory(7,AddUtils.getInfoShow("&f2024.9.3", - "&7哈哈哈哈哈哈哈哈", - "&7终于想到一个方法了", - "&7既然他提供超过两个引用会寄,那我就要根据menu和slots为单位控制产生的引用数", - "&7不要再对引用位置做无所谓的控制,这没有必要", - "&7只要将cache生成器包装入一个方法 然后在方法里狠狠注入检测代码就可以了!", - "&7我他娘的还真是小机灵鬼", - "&7开干", - "&7终于,,,修好了!" - ) - ); - factory.addInventory(8,AddUtils.getInfoShow("&f2024.9.3", - "&7我一定是记错日期了,不然为什么一觉醒来日期没变呢", - "&7继续完善存储链接体系", - "&7应广大玩家要求,修改逻辑反应堆为运行中不销耗布尔组件,只在搜索阶段消耗", - "&7发现配方搜素算法一个cache未及时同步的bug", - "&7好在在新测试员的帮助下很快解决.", - "&7比Tmatsuki_rui能干多了." - ) - ); - factory.addInventory(9,AddUtils.getInfoShow("&f2024.9.4", - "&7一不小心忘了写了", - "&7还能写啥呢", - "&7修bug,完善终极科技线", - "&7修复超新星不同步bug", - "&7修复了存储缓存生成后dirty位错误的bug" - ) - ); - factory.addInventory(10,AddUtils.getInfoShow("&f2024.9.5", - "&7是时候给附属加一点强力的生产机器了", - "&7不然都没人玩,成本太高了", - "&7开发了多线程机器,虽然就是复制粘贴", - "&7研究一下同化方块机制", - "&7尝试优化push方法" - ) - ); - factory.addInventory(11,AddUtils.getInfoShow("&f2024.9.6", - "&7整了一些机器 想必玩家们会喜欢", - "&7开发了一些数值比较好看的机器", - "&7希望是这样的", - "&7" - ) - ); - factory.addInventory(12,AddUtils.getInfoShow("&f2024.9.7", - "&7整了一些机器 想必玩家们会喜欢", - "&7整了一款全新的高端多方块", - "&7包括两个等级和一些激发机制", - "&7我觉得那真是太酷啦" - ) - ); - factory.addInventory(13,AddUtils.getInfoShow("&f2024.9.7", - "&7开发了LogiTech shell", - "&7一款基于原神(bushi)的shell命令行工具", - "&7可以查询和修改类/对象的成员等等,支持设置变量", - "&7紧急修复了因dataload导致的卡服", - "&7这就是依托" - ) - ); - factory.addInventory(14,AddUtils.getInfoShow("&f2024.9.9", - "&7开学了", - "&7开学第一天没课", - "&7兼容构思rsc生成器随机输出", - "&7我希望开启一个计划,让大家一起完善machine堆叠列表" - ) - ); - factory.addInventory(15,AddUtils.getInfoShow("&f2024.9.12", - "&7增加了内置文件", - "&7增加了乱码的机器列表", - "&7恕我直言,起名真乱", - "&7还有ag科技,一个配方机器都找不到", - "&7纯懒狗附属" - ) - ); - factory.addInventory(16,AddUtils.getInfoShow("&f2024.9.27", - "&7显然 我忘了记录日志", - "&7这甜蜜确实挺糟糕的", - "&7不如之后我就写更新日志" - )); - factory.addInventory(18,AddUtils.getInfoShow("&f2024.9.27更新", - "&7修复存储交互接口潜在bug", - "&7修复堆叠机器列表导入重复bug", - "&7修复反概念物质扩散不会继承玩家权限bug", - "&7增加shell玩家权限检测", - "&7修复简易堆叠破烂的bug", - "&7增加星辰金熔炉的槽位推送限制", - "&7修复了未插入货运配置卡时code读取异常bug", - "&7还修了啥不太记得了", - "&7增加了烘干机到快捷综合机器", - "&7增加赤石科技道具", - "&7减少超频刷怪笼的合成需求", - "&7修复了堆叠机器无法支持非消耗物品的bug", - "&7准备增加分拣机", - "&7增加堆叠机器配置文件直接导入配方类型的功能", - "&7增加tnt复制机", - "&7增加破基岩棒", - "&7修复逻辑反应堆槽位提供异常", - "")); - } - - @Override - protected void addGuideRelated(ChestMenu menu, Player p, PlayerProfile profile, SlimefunGuideMode mode, int pages) { - - } - }; - public static ItemGroup BUGCRAFTER=new CustomItemGroup(bugcrafterId,AddUtils.colorful(AddUtils.ADDON_NAME),AddItem.ALLBIGRECIPES,54,36,new LinkedHashMap<>()) { - public PlayerHistoryRecord historyHandler=new PlayerHistoryRecord() { - HashMap> records=new HashMap<>(); - { - PlayerQuiteListener.addHandler((player)->{ - UUID uid=player.getUniqueId(); - synchronized(records) { - records.remove(uid); - } - }); - } - public CustomMenu getRecord(Player player){ - UUID uuid=player.getUniqueId(); - synchronized(records){ - List list=records.get(uuid); - if(list==null){ - list=new ArrayList(); - } - if(list.isEmpty()){ - return null; - } - return list.get(list.size()-1); - } - } - public void addRecord(Player player, CustomMenu record){ - UUID uuid=player.getUniqueId(); - synchronized(records){ - List list=records.get(uuid); - if(list==null){ - list=new ArrayList<>(); - records.put(uuid,list); - } - list.add(record); - - } - } - public CustomMenu deleteRecord(Player player,CustomMenu record){ - UUID uuid=player.getUniqueId(); - synchronized(records){ - List list=records.get(uuid); - if(list==null||list.isEmpty()){ - return null; - } - return list.remove(list.size()-1); - } - } - }; - MenuFactory subRecipes=null; - public void initCustomMenus(){ - subRecipes=MenuUtils.createMRecipeListDisplay(AddItem.BUG_CRAFTER,RecipeSupporter.PROVIDED_SHAPED_RECIPES.get(BugCrafter.TYPE), - null,historyHandler,MenuUtils::createMRecipeDisplay); - } - public MenuFactory getSubRecipes() { - if(subRecipes==null){ - initCustomMenus(); - } - return subRecipes; - } - protected void init(MenuFactory factory) { - ItemStack menuBackGround=new CustomItemStack(Material.PURPLE_STAINED_GLASS_PANE,""); - factory.addOverrides(4,AddItem.URL,(Player player1, int i1, ItemStack itemstack1, ClickAction clickAction) -> { - final TextComponent link = new TextComponent("单击此处访问Github"); - link.setColor(ChatColor.YELLOW); - link.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://github.com/m1919810/LogiTech")); - player1.spigot().sendMessage(link); - return false; - }); - factory.setBackGround(menuBackGround); - SchedulePostRegister.addPostRegisterTask(this::initCustomMenus); - } - public void openPage(Player var1, PlayerProfile var2, SlimefunGuideMode var3,int page){ - - var2.getGuideHistory().add(this,1); - CustomMenu menu= historyHandler.getRecord(var1); - if(menu!=null){ - ChestMenu historyMenu=menu.constructPage(-1); - historyMenu.open(var1); - return; - } - CustomMenu menu2=getSubRecipes().build(); - menu2.setBackSlot(1); - menu2.setBackHandler(((player, i, itemStack, clickAction) -> { - var2.getGuideHistory().goBack(Slimefun.getRegistry().getSlimefunGuide(var3)); - return false; - })); - menu2.openPages(var1,1); - } - @Override - protected void addGuideRelated(ChestMenu menu, Player p, PlayerProfile profile, SlimefunGuideMode mode, int pages) { - - } - }; - - public static final ItemGroup INFO =new CustomItemGroup(AddUtils.getNameKey("info"),null, AddItem.INFO,54,36,new LinkedHashMap<>()) { - @Override - protected void init(MenuFactory factory) { - this.setVisble(false); - factory.addInventory(1,AddItem.INFO1); - factory.addInventory(11,AddItem.INFO2); - factory.addInventory(21,AddItem.INFO3); - factory.addInventory(7,AddItem.INFO4); - factory.addInventory(15,AddItem.INFO5); - factory.addInventory(23,AddItem.INFO6); - factory.addInventory(13,AddItem.URL,(Player player1, int i1, ItemStack itemstack1, ClickAction clickAction) -> { - final TextComponent link = new TextComponent("单击此处访问Github"); - link.setColor(ChatColor.YELLOW); - link.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://github.com/m1919810/LogiTech")); - player1.spigot().sendMessage(link); - return false; - }); - factory.addInventory(27,AddItem.FEAT1); - factory.addInventory(28,AddItem.FEAT2); - factory.addInventory(29,AddItem.FEAT3); - factory.addInventory(30,AddItem.FEAT4); - factory.addInventory(31,AddItem.FEAT5); - factory.addInventory(32,AddItem.FEAT6); - factory.addInventory(33,AddItem.FEAT7); - factory.addInventory(34,AddItem.FEAT8); - factory.addInventory(35,AddItem.FEAT9); - factory.addOverrides(4,AddItem.MATL114); - } - @Override - protected void addGuideRelated(ChestMenu menu, Player p, PlayerProfile profile, SlimefunGuideMode mode, int pages) { - for(int s=0;s<2;++s){ - int rand=AddUtils.random(36); - if(menu.getItemInSlot(rand+9)==null){ - menu.replaceExistingItem(rand+9,AddItem.BUG); - menu.addMenuClickHandler(rand+9,((player, i, itemStack, clickAction) -> { - AddUtils.forceGive(player,AddItem.BUG,1); - menu.replaceExistingItem(rand+9,null); - menu.addMenuClickHandler(rand+9,ChestMenuUtils.getEmptyClickHandler()); - return false; - })); - break; - } - } - } - }; - public static final ItemGroup ROOT=new CustomItemGroup(itemGroupId,AddUtils.colorful(AddUtils.ADDON_NAME), AddItem.ROOT,54,108, - new LinkedHashMap<>(){{ - put(2,MATERIAL); - put(0,INFO); - put(27,BUGCRAFTER); - put(4,BASIC); - put(3,MANUAL); - put(6,ENERGY); - put(5,GENERATORS); - put(22, SPACE); - put(21,VANILLA); - put(8,SPECIAL); - put(20,CARGO); - put(23,ADVANCED); - put(24,SINGULARITY); - put(31,BEYOND); - put(36,UPDATELOG); - put(26,MORE2); - }} - ){ - public MenuFactory MACHINEMENU=null; - public MenuFactory RECIPEMENU=null; - public void initCustomMenus(){ - MACHINEMENU=MenuUtils.createMachineListDisplay(RecipeSupporter.MACHINE_RECIPELIST.keySet().stream().toList(),null).setBack(1); - RECIPEMENU=MenuUtils.createRecipeTypeDisplay(RecipeSupporter.RECIPE_TYPES.stream().toList(),null).setBack(1); -// BUGCRAFTER=MenuUtils.createMRecipeListDisplay(AddItem.BUG_CRAFTER,RecipeSupporter.PROVIDED_SHAPED_RECIPES.get(BugCrafter.TYPE), -// null,MenuUtils::createMRecipeDisplay); - } - public MenuFactory getMachineMenu(){ - if(MACHINEMENU==null){ - initCustomMenus(); - } - return MACHINEMENU; - } - public MenuFactory getRecipeMenu(){ - if(RECIPEMENU==null){ - initCustomMenus(); - } - return RECIPEMENU; - } -// public MenuFactory getBugCrafterMenu(){ -// if(BUGCRAFTER==null){ -// initCustomMenus(); -// } -// return BUGCRAFTER; -// } - //used to set common handlers and common params - public void init(MenuFactory factory){ - this.setVisble(true); - //对模板进行最高级别的覆写 - ItemStack menuBackGround=new CustomItemStack(Material.PURPLE_STAINED_GLASS_PANE,""); - factory.addOverrides(4,AddItem.URL,(Player player1, int i1, ItemStack itemstack1, ClickAction clickAction) -> { - final TextComponent link = new TextComponent("单击此处访问Github"); - link.setColor(ChatColor.YELLOW); - link.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://github.com/m1919810/LogiTech")); - player1.spigot().sendMessage(link); - return false; - }); - factory.setBackGround(menuBackGround); - final int[] BORDER=new int[]{ - 1,7,10,11,12,13,14,15,16,19,25,28,34 - }; - int len=BORDER.length; - for (int i=0;i new ChestMenu.MenuClickHandler() { - boolean has=false; - @Override - public boolean onClick(Player player, int i, ItemStack itemStack, ClickAction clickAction) { - if(!has&&itemStack!=null){has=true;itemStack.setItemMeta(s1);} - return false; - } - }); - factory.addInventory(57, h2,(cm)-> new ChestMenu.MenuClickHandler() { - boolean has=false; - @Override - public boolean onClick(Player player, int i, ItemStack itemStack, ClickAction clickAction) { - if(!has&&itemStack!=null){has=true;itemStack.setItemMeta(s2);} - return false; - } - }); - factory.addInventory(58, h3,(cm)-> new ChestMenu.MenuClickHandler() { - boolean has=false; - @Override - public boolean onClick(Player player, int i, ItemStack itemStack, ClickAction clickAction) { - if(!has&&itemStack!=null){has=true; - itemStack.setType(Material.REPEATING_COMMAND_BLOCK); - itemStack.setItemMeta(s3);} - return false; - } - }); - factory.addInventory(59, h4,(cm)-> new ChestMenu.MenuClickHandler() { - boolean has=false; - @Override - public boolean onClick(Player player, int i, ItemStack itemStack, ClickAction clickAction) { - if(!has&&itemStack!=null){ - has=true; - itemStack.setItemMeta(s4);} - return false; - } - }); - factory.addInventory(60, h5,(cm)-> new ChestMenu.MenuClickHandler() { - boolean has=false; - @Override - public boolean onClick(Player player, int i, ItemStack itemStack, ClickAction clickAction) { - if(!has&&itemStack!=null){ - has=true;itemStack.setItemMeta(s5); - AddUtils.sendMessage(player,"&eTmatsuki_rui就是纯纯的____"); - if(AddUtils.standardRandom()<0.3){ - AddUtils.forceGive(player,head.clone(),AddUtils.random(4)); - } - PlayerEffects.grantEffect(CustomEffects.WRONG_BUTTON,player,1,1); - } - return false; - } - }); - factory.addInventory(63, h6,(cm)-> new ChestMenu.MenuClickHandler() { - boolean has=false; - @Override - public boolean onClick(Player player, int i, ItemStack itemStack, ClickAction clickAction) { - if(!has&&itemStack!=null){has=true;itemStack.setItemMeta(s6);} - return false; - } - }); - factory.addInventory(67, h8,(cm)-> new ChestMenu.MenuClickHandler() { - boolean has=false; - @Override - public boolean onClick(Player player, int i, ItemStack itemStack, ClickAction clickAction) { - if(!has&&itemStack!=null){has=true; - itemStack.setItemMeta(s8); - Schedules.launchSchedules(()->{ - PlayerEffects.grantEffect(CustomEffects.WRONG_BUTTON,player,2,1); - },100,true,0); - } - return false; - } - }); - this.s7metas=new ItemMeta[6]; - String continueStr="&7点击继续"; - ItemStack it=new CustomItemStack(AddItem.MATL114,AddUtils.color("你觉得..."),continueStr); - factory.addInventory(71,it,(cm)->new ChestMenu.MenuClickHandler() { - int index=0; - @Override - public boolean onClick(Player player, int i, ItemStack itemStack, ClickAction clickAction) { - if(itemStack!=null) - itemStack.setItemMeta(s7metas[index]); - index=(index+1)%5; - return false; - } - }); - it=new CustomItemStack(AddItem.MATL114,AddUtils.color("我能在患有痴呆症的情况下完成逻辑工艺的编写吗?"),continueStr); - s7metas[0]=it.getItemMeta(); - it=new CustomItemStack(AddItem.MATL114,AddUtils.color("这能被完成么,这可能完成么?"),continueStr); - s7metas[1]=it.getItemMeta(); - it=new CustomItemStack(AddItem.MATL114,AddUtils.color("我知道这有点难"),continueStr); - s7metas[2]=it.getItemMeta(); - it=new CustomItemStack(AddItem.MATL114,AddUtils.color("所以,我想"),continueStr); - s7metas[3]=it.getItemMeta(); - it=new CustomItemStack(AddItem.MATL114,AddUtils.color("今年我要进行一项从未有人达成过的挑战"),continueStr); - s7metas[4]=it.getItemMeta(); - } - final ItemMeta s1=new CustomItemStack(CustomHead.getHead("fd524332cdb381c9e51f77d4cec9bc6d4d1c5bdec1499d206d8383e9176bdfb0"),AddUtils.color("haiman"),"&7haiman科技作者","&7海曼科技会为你提供足够的物质支持").getItemMeta(); - final ItemMeta s2=new CustomItemStack(CustomHead.getHead("a9b046531a6182de634d6fed1f3b4f885ee99bfe2bc0c1684f7b97d396c2059f"),AddUtils.color("mmmjjkx"),"&7rsc开发者","&3纯大蛇\uD83D\uDE0B").getItemMeta(); - final ItemMeta s3=new CustomItemStack(Material.REPEATING_COMMAND_BLOCK,AddUtils.color("tinalness"),"&7大香蕉的本质是命令方块\uD83D\uDE0B(确信","&7但是你或许会需要他的网络拓展").getItemMeta(); - final ItemMeta s4=new CustomItemStack(CustomHead.SUPPORTER2.getItem(),AddUtils.color("HgTlPbBi"),"&7逻辑工艺的支持者","&7提出了很多有用的点子").getItemMeta(); - final ItemMeta s5=new CustomItemStack(CustomHead.getHead("8e434215b5616bf37dccbacdb240bd16de59507e62a5371ceca80327b398e65"),AddUtils.color("Tmatsuki_rui"),"&7凉城服的祸源","&7纯傻逼,给爷死啊\uD83D\uDE21").getItemMeta(); - final ItemMeta s6=new CustomItemStack(CustomHead.BUSHIGEMEN.getItem()," ","&7看得出你的视力很好","&7所以一定要仔细阅读","&7版本说明与机器说明哦").getItemMeta(); - final ItemStack head=new CustomItemStack(Material.PLAYER_HEAD,AddUtils.color("逝者的头颅")); - final ItemMeta s8=new CustomItemStack(CustomHead.BIG_SNAKE.getItem(),AddUtils.color("taitaia"),"&7刷物?你在想屁吃\uD83D\uDE0B").getItemMeta(); - ItemMeta[] s7metas; - //used to set GUIDE based handlers,an interface to adapt CustomMenu menus - public void addGuideRelated(ChestMenu menu, Player p, PlayerProfile profile, SlimefunGuideMode mode, int page){ - //加入实例化之后的handler和item,同打开玩家等数据有关的handler - if(page==1){ - menu.addMenuClickHandler(27 ,((Player player1, int i1, ItemStack itemstack1, ClickAction clickAction) -> { - getRecipeMenu().build().setBackHandler(((player, i, itemStack, clickAction1) -> { - this.openPage(player1,profile,mode,page); - return false; - })).open(player1); - return false; - })); - menu.addMenuClickHandler(18,((Player player1, int i1, ItemStack itemstack1, ClickAction clickAction) -> { - getMachineMenu().build().setBackHandler(((player, i, itemStack, clickAction1) -> { - this.openPage(player1,profile,mode,page); - return false; - })).open(player1); - return false; - })); - }else if(page==2){ - - } - } - }; - - - -} - +package me.matl114.logitech.SlimefunItem; + +import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon; +import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup; +import io.github.thebusybiscuit.slimefun4.api.player.PlayerProfile; +import io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuide; +import io.github.thebusybiscuit.slimefun4.core.guide.SlimefunGuideMode; +import io.github.thebusybiscuit.slimefun4.implementation.Slimefun; +import io.github.thebusybiscuit.slimefun4.libraries.dough.chat.ChatInput; +import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack; +import io.github.thebusybiscuit.slimefun4.utils.ChestMenuUtils; +import me.matl114.logitech.Items.CustomHead; +import me.matl114.logitech.Listeners.Listeners.PlayerQuiteListener; +import me.matl114.logitech.Schedule.PersistentEffects.AbstractEffect; +import me.matl114.logitech.Schedule.PersistentEffects.CustomEffects; +import me.matl114.logitech.Schedule.PersistentEffects.PlayerEffects; +import me.matl114.logitech.Schedule.SchedulePostRegister; +import me.matl114.logitech.Schedule.Schedules; +import me.matl114.logitech.SlimefunItem.Machines.WorkBenchs.BugCrafter; +import me.matl114.logitech.Utils.*; +import me.matl114.logitech.Utils.UtilClass.MenuClass.*; +import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ChestMenu; +import me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.ClickAction; +import net.md_5.bungee.api.ChatColor; +import net.md_5.bungee.api.chat.ClickEvent; +import net.md_5.bungee.api.chat.TextComponent; +import org.bukkit.Material; +import org.bukkit.NamespacedKey; +import org.bukkit.damage.DamageSource; +import org.bukkit.damage.DamageType; +import org.bukkit.entity.Player; +import org.bukkit.event.entity.EntityDamageByEntityEvent; +import org.bukkit.event.entity.EntityDamageEvent; +import org.bukkit.event.entity.PlayerDeathEvent; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.scheduler.BukkitRunnable; + +import java.util.*; + +public class AddGroups { + public static void registerGroups(SlimefunAddon plugin){ + ROOT.register(plugin); + INFO.register(plugin); + MATERIAL.register(plugin); + BASIC.register(plugin); + CARGO.register(plugin); + SINGULARITY.register(plugin); + ADVANCED.register(plugin); + BEYOND.register(plugin); + VANILLA.register(plugin); + MANUAL.register(plugin); + SPECIAL.register(plugin); + SPACE.register(plugin); + GENERATORS.register(plugin); + ENERGY.register(plugin); + FUNCTIONAL.register(plugin); + } + // 给你的分类提供一个独一无二的ID + protected static final NamespacedKey itemGroupId = AddUtils.getNameKey("addon_category"); + protected static final NamespacedKey bugcrafterId = AddUtils.getNameKey("bugcrafter"); + + public static final ItemGroup MATERIAL =new DummyItemGroup(AddUtils.getNameKey("material" ), AddItem.MATERIAL); + + public static final ItemGroup BASIC =new DummyItemGroup(AddUtils.getNameKey("basic" ), AddItem.BASIC); + + public static final ItemGroup CARGO = new DummyItemGroup(AddUtils.getNameKey("cargo" ), AddItem.CARGO); + + public static final ItemGroup SINGULARITY= new DummyItemGroup(AddUtils.getNameKey("singularity"),AddItem.SINGULARITY); + + public static final ItemGroup ADVANCED= new DummyItemGroup(AddUtils.getNameKey("advanced" ), AddItem.ADVANCED); + + public static final ItemGroup BEYOND= new DummyItemGroup(AddUtils.getNameKey("beyond" ), AddItem.BEYOND); + + public static final ItemGroup VANILLA= new DummyItemGroup(AddUtils.getNameKey("vanilla" ), AddItem.VANILLA); + + public static final ItemGroup MANUAL = new DummyItemGroup(AddUtils.getNameKey("manual" ), AddItem.MANUAL); + + public static final ItemGroup SPECIAL = new DummyItemGroup(AddUtils.getNameKey("special" ), AddItem.SPECIAL); + + public static final ItemGroup SPACE = new DummyItemGroup(AddUtils.getNameKey("space"),AddItem.SPACE); + + public static final ItemGroup GENERATORS = new DummyItemGroup(AddUtils.getNameKey("generators"),AddItem.GENERATORS); + + public static final ItemGroup ENERGY= new DummyItemGroup(AddUtils.getNameKey("energy"),AddItem.ENERGY); + + public static final ItemGroup FUNCTIONAL=new DummyItemGroup(AddUtils.getNameKey("functional"),AddItem.FUNCTIONAL); + public static ItemGroup MORE2=new CustomItemGroup(AddUtils.getNameKey("more2"),AddUtils.color("更多说明"),AddItem.MORE2,54,36,new LinkedHashMap<>()) { + @Override + protected void init(MenuFactory menuFactory) { + menuFactory.addInventory(0,AddUtils.getInfoShow("&f致歉说明", + "&7感谢您能点开到这里,看到这份说明", + "&7本附属为我开发的首个附属,无人问津是应该的", + "&7您能点进这一分类已经是对我最大的鼓励和支持", + "&7本人水平很次,也没有很好的创作能力创作让玩家满意的附属", + "&7还请包容")); + menuFactory.addInventory(1,AddUtils.getInfoShow("&f致歉说明", + "&7这个附属很烂", + "&7他拥有冗长的机制说明书和昂贵的合成表", + "&7以及作者乱填的,毫无道理的材料消耗", + "&7为什么呢", + "&7因为作者并不知道怎么编一个让玩家满意的合成表", + "&7很可能有些时候,在这方面给玩家带来很大的困扰")); + menuFactory.addInventory(2,AddUtils.getInfoShow("&f致歉说明", + "&7作者也不知道为什么作者要写这一个附属", + "&7作者已经投入整个暑假的晚上8点到凌晨4点来进行附属编写", + "&7作者也&a希望这个附属能变得更好&7,而不是更恶心", + "&7作者&a希望附属对玩家有帮助,而不是对玩家造成困扰" + )); + menuFactory.addInventory(3,AddUtils.getInfoShow("&f致歉说明", + "&7作者在此恳请大家", + "&a多多包容作者,并把自己的想法跟作者讨论", + "&a不管如何,作者都会听取玩家的意见,争取将附属做得更好")); + menuFactory.addInventory(4,AddUtils.getInfoShow("&f致歉说明", + "&7这个附属还是很烂", + "&7他既没有乱码科技的制造台,也没有乱序技艺的尘埃反应堆", + "&7作者一开始的目标是制作优秀的机器,虽然现在改为了制作高效的机器", + "&7但是并没有非常超标的机器存在", + "&7还请玩家包容", + "&7如果你只是想找op机器", + "&7那么本附属可能并不符合你的心意")); + menuFactory.addInventory(5,AddUtils.getInfoShow("&f致歉说明", + "&7作者能拿的出手的机制就这几个", + "&7虽说抱歉,但是作者也不会因此而做op机器和刷物机器", + "&a但是玩家有什么好的想法或者急切的机器需求", + "&a也是可以和作者提的", + "", + "&7作者真心希望该附属越做越好,而不是越来越烂", + "&a所以我在此恳请大家主动发表自己的看法")); + menuFactory.addInventory(6,AddUtils.getInfoShow("&f致歉说明", + "&7虽说致歉,但是作者还是会&a坚定的继续开发和维护这个附属", + "&7虽然作者也曾想过放弃该附属", + "&7但是也只是一时之念,大家不要当真", + "&7请大家放心,作者并不会丢下一堆烂摊子跑路")); + menuFactory.addInventory(7,AddUtils.getInfoShow("&f致歉说明", + "&7最后,在此对&e所有觉得这个附属没救的玩家&7致辞","", + "&7粘液圈虽然不大,但是比本附属好的附属也是比比皆是", + "&7作者的生活中也不只是有粘液,作者也要有自己的生活,并不能帮你救活这个附属", + "&7您也不必拘泥于我的附属,我们好聚好散,对大家都好")); + menuFactory.addInventory(8,AddUtils.getInfoShow("&f致歉说明", + "&7最后声明:本说明并不针对某一特定玩家", + "&7当您对号入座时,请不要座岔了,谢谢." + )); + } + + @Override + protected void addGuideRelated(ChestMenu menu, Player p, PlayerProfile profile, SlimefunGuideMode mode, int pages) { + + } + }; + public static ItemGroup UPDATELOG=new CustomItemGroup(AddUtils.getNameKey("log"),AddUtils.colorful("更新日志"),AddItem.UPDATELOG,54,36,new LinkedHashMap<>()) { + @Override + protected void init(MenuFactory factory) { + factory.addInventory(0,AddUtils.getInfoShow("&f更新日志","&7此页为简易的更新日志","&7你或许可以找到你想要的新特性")); + factory.addInventory(1,AddUtils.getInfoShow("&f2024.8.28", + "&7创建日志", + "&7创建新的终极机器用于测试", + "&7大型配方展示组增加历史记录", + "&7修复模拟合成台不显示黑名单的bug", + "&7修复原版配方读取,将矿辞读为等价物品组") + ); + factory.addInventory(2,AddUtils.getInfoShow("&f2024.8.29", + "&7修改部分描述", + "&7修复了自定义菜单历史记录bug", + "&7平衡性调整", + "&7修改了等价物品组配置的读取方式", + "&7修改了语言文件读取方式,并研发了自动提取字符串脚本", + "&7研发出乱码科技的英文版\"乱翻科技\"", + "&7我没有痴呆症" + ) + ); + factory.addInventory(3,AddUtils.getInfoShow("&f2024.8.30", + "&7进行平衡性调整", + "&7修复分拣机与糟糕sft导致的冲突", + "&7新增若干货运机器与其配方", + "&7遇见了芯片最优解", + "&7与玩家交流,获得反馈", + "&7出现了手残破坏多方块结构的玩家", + "&7大家一定要小心谨慎,少得痴呆症" + ) + ); + factory.addInventory(4,AddUtils.getInfoShow("&f&m2024.8.30 &r&f2024.8.31", + "&7增加了可调节的货运机器", + "&7开始研发逻辑奇点部分的机器", + "&7发现远古测试机器的bug", + "&7中午出门把身份证丢了,晦气", + "&7下午治疗身份证去了,没更新痴呆症", + "&7大家一定要小心谨慎,少得身份症", + "&7晚上和haiman整了SlimefunEssentials", + "&7JEI十分的强劲,我觉得我都不用写搜索了" + ) + ); + factory.addInventory(5,AddUtils.getInfoShow("&f2024.9.1", + "&7修复薯片核心配方无法原版自动化", + "&7到处转转,学会怎么上传头颅", + "&7完成终极机制之远程接入存储,但是出现了小的bug", + "&7修一个小bug 花费了我好久。实际上这是我算法架构的问题", + "&7但是我还是尝试了若干方案之后,最终决定这么搞,希望不会炸", + "&7经过了亿点重构,准备开始测试了,希望人没事" + ) + ); + factory.addInventory(6,AddUtils.getInfoShow("&f2024.9.1", + "&7今天是几号来着", + "&7方案全部无效", + "&7新特性不能就这么寄了", + "&7躺下睡觉吧还是" + ) + ); + factory.addInventory(7,AddUtils.getInfoShow("&f2024.9.3", + "&7哈哈哈哈哈哈哈哈", + "&7终于想到一个方法了", + "&7既然他提供超过两个引用会寄,那我就要根据menu和slots为单位控制产生的引用数", + "&7不要再对引用位置做无所谓的控制,这没有必要", + "&7只要将cache生成器包装入一个方法 然后在方法里狠狠注入检测代码就可以了!", + "&7我他娘的还真是小机灵鬼", + "&7开干", + "&7终于,,,修好了!" + ) + ); + factory.addInventory(8,AddUtils.getInfoShow("&f2024.9.3", + "&7我一定是记错日期了,不然为什么一觉醒来日期没变呢", + "&7继续完善存储链接体系", + "&7应广大玩家要求,修改逻辑反应堆为运行中不销耗布尔组件,只在搜索阶段消耗", + "&7发现配方搜素算法一个cache未及时同步的bug", + "&7好在在新测试员的帮助下很快解决.", + "&7比Tmatsuki_rui能干多了." + ) + ); + factory.addInventory(9,AddUtils.getInfoShow("&f2024.9.4", + "&7一不小心忘了写了", + "&7还能写啥呢", + "&7修bug,完善终极科技线", + "&7修复超新星不同步bug", + "&7修复了存储缓存生成后dirty位错误的bug" + ) + ); + factory.addInventory(10,AddUtils.getInfoShow("&f2024.9.5", + "&7是时候给附属加一点强力的生产机器了", + "&7不然都没人玩,成本太高了", + "&7开发了多线程机器,虽然就是复制粘贴", + "&7研究一下同化方块机制", + "&7尝试优化push方法" + ) + ); + factory.addInventory(11,AddUtils.getInfoShow("&f2024.9.6", + "&7整了一些机器 想必玩家们会喜欢", + "&7开发了一些数值比较好看的机器", + "&7希望是这样的", + "&7" + ) + ); + factory.addInventory(12,AddUtils.getInfoShow("&f2024.9.7", + "&7整了一些机器 想必玩家们会喜欢", + "&7整了一款全新的高端多方块", + "&7包括两个等级和一些激发机制", + "&7我觉得那真是太酷啦" + ) + ); + factory.addInventory(13,AddUtils.getInfoShow("&f2024.9.7", + "&7开发了LogiTech shell", + "&7一款基于原神(bushi)的shell命令行工具", + "&7可以查询和修改类/对象的成员等等,支持设置变量", + "&7紧急修复了因dataload导致的卡服", + "&7这就是依托" + ) + ); + factory.addInventory(14,AddUtils.getInfoShow("&f2024.9.9", + "&7开学了", + "&7开学第一天没课", + "&7兼容构思rsc生成器随机输出", + "&7我希望开启一个计划,让大家一起完善machine堆叠列表" + ) + ); + factory.addInventory(15,AddUtils.getInfoShow("&f2024.9.12", + "&7增加了内置文件", + "&7增加了乱码的机器列表", + "&7恕我直言,起名真乱", + "&7还有ag科技,一个配方机器都找不到", + "&7纯懒狗附属" + ) + ); + factory.addInventory(16,AddUtils.getInfoShow("&f2024.9.27", + "&7显然 我忘了记录日志", + "&7这甜蜜确实挺糟糕的", + "&7不如之后我就写更新日志" + )); + factory.addInventory(18,AddUtils.getInfoShow("&f2024.9.27更新", + "&7修复存储交互接口潜在bug", + "&7修复堆叠机器列表导入重复bug", + "&7修复反概念物质扩散不会继承玩家权限bug", + "&7增加shell玩家权限检测", + "&7修复简易堆叠破烂的bug", + "&7增加星辰金熔炉的槽位推送限制", + "&7修复了未插入货运配置卡时code读取异常bug", + "&7还修了啥不太记得了", + "&7增加了烘干机到快捷综合机器", + "&7增加赤石科技道具", + "&7减少超频刷怪笼的合成需求", + "&7修复了堆叠机器无法支持非消耗物品的bug", + "&7准备增加分拣机", + "&7增加堆叠机器配置文件直接导入配方类型的功能", + "&7增加tnt复制机", + "&7增加破基岩棒", + "&7修复逻辑反应堆槽位提供异常", + "")); + factory.addInventory(16,AddUtils.getInfoShow("&f2024.?", + "&7修复部分bug,虽然忘了修了啥了", + "&7增加了激光发射器 进阶版", + "&7增加桃花飞针", + "&7增加更多的赤石道具", + "&7更新啥了忘了" + )); + } + + @Override + protected void addGuideRelated(ChestMenu menu, Player p, PlayerProfile profile, SlimefunGuideMode mode, int pages) { + + } + }; + public static ItemGroup BUGCRAFTER=new CustomItemGroup(bugcrafterId,AddUtils.colorful(AddUtils.ADDON_NAME),AddItem.ALLBIGRECIPES,54,36,new LinkedHashMap<>()) { + public PlayerHistoryRecord historyHandler=new PlayerHistoryRecord() { + HashMap> records=new HashMap<>(); + { + PlayerQuiteListener.addHandler((player)->{ + UUID uid=player.getUniqueId(); + synchronized(records) { + records.remove(uid); + } + }); + } + public CustomMenu getRecord(Player player){ + UUID uuid=player.getUniqueId(); + synchronized(records){ + List list=records.get(uuid); + if(list==null){ + list=new ArrayList(); + } + if(list.isEmpty()){ + return null; + } + return list.get(list.size()-1); + } + } + public void addRecord(Player player, CustomMenu record){ + UUID uuid=player.getUniqueId(); + synchronized(records){ + List list=records.get(uuid); + if(list==null){ + list=new ArrayList<>(); + records.put(uuid,list); + } + list.add(record); + + } + } + public CustomMenu deleteRecord(Player player,CustomMenu record){ + UUID uuid=player.getUniqueId(); + synchronized(records){ + List list=records.get(uuid); + if(list==null||list.isEmpty()){ + return null; + } + return list.remove(list.size()-1); + } + } + }; + MenuFactory subRecipes=null; + public void initCustomMenus(){ + subRecipes=MenuUtils.createMRecipeListDisplay(AddItem.BUG_CRAFTER,RecipeSupporter.PROVIDED_SHAPED_RECIPES.get(BugCrafter.TYPE), + null,historyHandler,MenuUtils::createMRecipeDisplay); + } + public MenuFactory getSubRecipes() { + if(subRecipes==null){ + initCustomMenus(); + } + return subRecipes; + } + protected void init(MenuFactory factory) { + ItemStack menuBackGround=new CustomItemStack(Material.PURPLE_STAINED_GLASS_PANE,""); + factory.addOverrides(4,AddItem.URL,(Player player1, int i1, ItemStack itemstack1, ClickAction clickAction) -> { + final TextComponent link = new TextComponent("单击此处访问Github"); + link.setColor(ChatColor.YELLOW); + link.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://github.com/m1919810/LogiTech")); + player1.spigot().sendMessage(link); + return false; + }); + factory.setBackGround(menuBackGround); + SchedulePostRegister.addPostRegisterTask(this::initCustomMenus); + } + public void openPage(Player var1, PlayerProfile var2, SlimefunGuideMode var3,int page){ + + var2.getGuideHistory().add(this,1); + CustomMenu menu= historyHandler.getRecord(var1); + if(menu!=null){ + ChestMenu historyMenu=menu.constructPage(-1); + historyMenu.open(var1); + return; + } + CustomMenu menu2=getSubRecipes().build(); + menu2.setBackSlot(1); + menu2.setBackHandler(((player, i, itemStack, clickAction) -> { + var2.getGuideHistory().goBack(Slimefun.getRegistry().getSlimefunGuide(var3)); + return false; + })); + menu2.openPages(var1,1); + } + @Override + protected void addGuideRelated(ChestMenu menu, Player p, PlayerProfile profile, SlimefunGuideMode mode, int pages) { + + } + }; + + public static final ItemGroup INFO =new CustomItemGroup(AddUtils.getNameKey("info"),null, AddItem.INFO,54,36,new LinkedHashMap<>()) { + @Override + protected void init(MenuFactory factory) { + this.setVisble(false); + factory.addInventory(1,AddItem.INFO1); + factory.addInventory(11,AddItem.INFO2); + factory.addInventory(21,AddItem.INFO3); + factory.addInventory(7,AddItem.INFO4); + factory.addInventory(15,AddItem.INFO5); + factory.addInventory(23,AddItem.INFO6); + factory.addInventory(13,AddItem.URL,(Player player1, int i1, ItemStack itemstack1, ClickAction clickAction) -> { + final TextComponent link = new TextComponent("单击此处访问Github"); + link.setColor(ChatColor.YELLOW); + link.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://github.com/m1919810/LogiTech")); + player1.spigot().sendMessage(link); + return false; + }); + factory.addInventory(27,AddItem.FEAT1); + factory.addInventory(28,AddItem.FEAT2); + factory.addInventory(29,AddItem.FEAT3); + factory.addInventory(30,AddItem.FEAT4); + factory.addInventory(31,AddItem.FEAT5); + factory.addInventory(32,AddItem.FEAT6); + factory.addInventory(33,AddItem.FEAT7); + factory.addInventory(34,AddItem.FEAT8); + factory.addInventory(35,AddItem.FEAT9); + factory.addOverrides(4,AddItem.MATL114); + } + @Override + protected void addGuideRelated(ChestMenu menu, Player p, PlayerProfile profile, SlimefunGuideMode mode, int pages) { + for(int s=0;s<2;++s){ + int rand=AddUtils.random(36); + if(menu.getItemInSlot(rand+9)==null){ + menu.replaceExistingItem(rand+9,AddItem.BUG); + menu.addMenuClickHandler(rand+9,((player, i, itemStack, clickAction) -> { + AddUtils.forceGive(player,AddItem.BUG,1); + menu.replaceExistingItem(rand+9,null); + menu.addMenuClickHandler(rand+9,ChestMenuUtils.getEmptyClickHandler()); + return false; + })); + break; + } + } + } + }; + public static final ItemGroup ROOT=new CustomItemGroup(itemGroupId,AddUtils.colorful(AddUtils.ADDON_NAME), AddItem.ROOT,54,108, + new LinkedHashMap<>(){{ + put(2,MATERIAL); + put(0,INFO); + put(27,BUGCRAFTER); + put(4,BASIC); + put(3,MANUAL); + put(6,ENERGY); + put(5,GENERATORS); + put(22, SPACE); + put(21,VANILLA); + put(8,SPECIAL); + put(20,CARGO); + put(23,ADVANCED); + put(24,SINGULARITY); + put(31,BEYOND); + put(36,UPDATELOG); + put(26,MORE2); + }} + ){ + public MenuFactory MACHINEMENU=null; + public MenuFactory RECIPEMENU=null; + public void initCustomMenus(){ + MACHINEMENU=MenuUtils.createMachineListDisplay(RecipeSupporter.MACHINE_RECIPELIST.keySet().stream().toList(),null).setBack(1); + RECIPEMENU=MenuUtils.createRecipeTypeDisplay(RecipeSupporter.RECIPE_TYPES.stream().toList(),null).setBack(1); +// BUGCRAFTER=MenuUtils.createMRecipeListDisplay(AddItem.BUG_CRAFTER,RecipeSupporter.PROVIDED_SHAPED_RECIPES.get(BugCrafter.TYPE), +// null,MenuUtils::createMRecipeDisplay); + } + public MenuFactory getMachineMenu(){ + if(MACHINEMENU==null){ + initCustomMenus(); + } + return MACHINEMENU; + } + public MenuFactory getRecipeMenu(){ + if(RECIPEMENU==null){ + initCustomMenus(); + } + return RECIPEMENU; + } +// public MenuFactory getBugCrafterMenu(){ +// if(BUGCRAFTER==null){ +// initCustomMenus(); +// } +// return BUGCRAFTER; +// } + //used to set common handlers and common params + public void init(MenuFactory factory){ + this.setVisble(true); + //对模板进行最高级别的覆写 + ItemStack menuBackGround=new CustomItemStack(Material.PURPLE_STAINED_GLASS_PANE,""); + factory.addOverrides(4,AddItem.URL,(Player player1, int i1, ItemStack itemstack1, ClickAction clickAction) -> { + final TextComponent link = new TextComponent("单击此处访问Github"); + link.setColor(ChatColor.YELLOW); + link.setClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://github.com/m1919810/LogiTech")); + player1.spigot().sendMessage(link); + return false; + }); + factory.setBackGround(menuBackGround); + final int[] BORDER=new int[]{ + 1,7,10,11,12,13,14,15,16,19,25,28,34 + }; + int len=BORDER.length; + for (int i=0;i new ChestMenu.MenuClickHandler() { + boolean has=false; + @Override + public boolean onClick(Player player, int i, ItemStack itemStack, ClickAction clickAction) { + if(!has&&itemStack!=null){has=true;itemStack.setItemMeta(s1);} + return false; + } + }); + factory.addInventory(57, h2,(cm)-> new ChestMenu.MenuClickHandler() { + boolean has=false; + @Override + public boolean onClick(Player player, int i, ItemStack itemStack, ClickAction clickAction) { + if(!has&&itemStack!=null){has=true;itemStack.setItemMeta(s2);} + return false; + } + }); + factory.addInventory(58, h3,(cm)-> new ChestMenu.MenuClickHandler() { + boolean has=false; + @Override + public boolean onClick(Player player, int i, ItemStack itemStack, ClickAction clickAction) { + if(!has&&itemStack!=null){has=true; + itemStack.setType(Material.REPEATING_COMMAND_BLOCK); + itemStack.setItemMeta(s3);} + return false; + } + }); + factory.addInventory(59, h4,(cm)-> new ChestMenu.MenuClickHandler() { + boolean has=false; + @Override + public boolean onClick(Player player, int i, ItemStack itemStack, ClickAction clickAction) { + if(!has&&itemStack!=null){ + has=true; + itemStack.setItemMeta(s4);} + return false; + } + }); + factory.addInventory(60, h5,(cm)-> new ChestMenu.MenuClickHandler() { + boolean has=false; + @Override + public boolean onClick(Player player, int i, ItemStack itemStack, ClickAction clickAction) { + if(!has&&itemStack!=null){ + has=true;itemStack.setItemMeta(s5); + AddUtils.sendMessage(player,"&eTmatsuki_rui就是纯纯的____"); + if(AddUtils.standardRandom()<0.3){ + AddUtils.forceGive(player,head.clone(),AddUtils.random(4)); + } + PlayerEffects.grantEffect(CustomEffects.WRONG_BUTTON,player,1,1); + } + return false; + } + }); + factory.addInventory(63, h6,(cm)-> new ChestMenu.MenuClickHandler() { + boolean has=false; + @Override + public boolean onClick(Player player, int i, ItemStack itemStack, ClickAction clickAction) { + if(!has&&itemStack!=null){has=true;itemStack.setItemMeta(s6);} + return false; + } + }); + factory.addInventory(67, h8,(cm)-> new ChestMenu.MenuClickHandler() { + boolean has=false; + @Override + public boolean onClick(Player player, int i, ItemStack itemStack, ClickAction clickAction) { + if(!has&&itemStack!=null){has=true; + itemStack.setItemMeta(s8); + Schedules.launchSchedules(()->{ + PlayerEffects.grantEffect(CustomEffects.WRONG_BUTTON,player,2,1); + },100,true,0); + } + return false; + } + }); + this.s7metas=new ItemMeta[6]; + String continueStr="&7点击继续"; + ItemStack it=new CustomItemStack(AddItem.MATL114,AddUtils.color("你觉得..."),continueStr); + factory.addInventory(71,it,(cm)->new ChestMenu.MenuClickHandler() { + int index=0; + @Override + public boolean onClick(Player player, int i, ItemStack itemStack, ClickAction clickAction) { + if(itemStack!=null) + itemStack.setItemMeta(s7metas[index]); + index=(index+1)%5; + return false; + } + }); + it=new CustomItemStack(AddItem.MATL114,AddUtils.color("我能在患有痴呆症的情况下完成逻辑工艺的编写吗?"),continueStr); + s7metas[0]=it.getItemMeta(); + it=new CustomItemStack(AddItem.MATL114,AddUtils.color("这能被完成么,这可能完成么?"),continueStr); + s7metas[1]=it.getItemMeta(); + it=new CustomItemStack(AddItem.MATL114,AddUtils.color("我知道这有点难"),continueStr); + s7metas[2]=it.getItemMeta(); + it=new CustomItemStack(AddItem.MATL114,AddUtils.color("所以,我想"),continueStr); + s7metas[3]=it.getItemMeta(); + it=new CustomItemStack(AddItem.MATL114,AddUtils.color("今年我要进行一项从未有人达成过的挑战"),continueStr); + s7metas[4]=it.getItemMeta(); + } + final ItemMeta s1=new CustomItemStack(CustomHead.getHead("fd524332cdb381c9e51f77d4cec9bc6d4d1c5bdec1499d206d8383e9176bdfb0"),AddUtils.color("haiman"),"&7haiman科技作者","&7海曼科技会为你提供足够的物质支持").getItemMeta(); + final ItemMeta s2=new CustomItemStack(CustomHead.getHead("a9b046531a6182de634d6fed1f3b4f885ee99bfe2bc0c1684f7b97d396c2059f"),AddUtils.color("mmmjjkx"),"&7rsc开发者","&3纯大蛇\uD83D\uDE0B").getItemMeta(); + final ItemMeta s3=new CustomItemStack(Material.REPEATING_COMMAND_BLOCK,AddUtils.color("tinalness"),"&7大香蕉的本质是命令方块\uD83D\uDE0B(确信","&7但是你或许会需要他的网络拓展").getItemMeta(); + final ItemMeta s4=new CustomItemStack(CustomHead.SUPPORTER2.getItem(),AddUtils.color("HgTlPbBi"),"&7逻辑工艺的支持者","&7提出了很多有用的点子").getItemMeta(); + final ItemMeta s5=new CustomItemStack(CustomHead.getHead("8e434215b5616bf37dccbacdb240bd16de59507e62a5371ceca80327b398e65"),AddUtils.color("Tmatsuki_rui"),"&7凉城服的祸源","&7纯傻逼,给爷死啊\uD83D\uDE21").getItemMeta(); + final ItemMeta s6=new CustomItemStack(CustomHead.BUSHIGEMEN.getItem()," ","&7看得出你的视力很好","&7所以一定要仔细阅读","&7版本说明与机器说明哦").getItemMeta(); + final ItemStack head=new CustomItemStack(Material.PLAYER_HEAD,AddUtils.color("逝者的头颅")); + final ItemMeta s8=new CustomItemStack(CustomHead.BIG_SNAKE.getItem(),AddUtils.color("taitaia"),"&7刷物?你在想屁吃\uD83D\uDE0B").getItemMeta(); + ItemMeta[] s7metas; + //used to set GUIDE based handlers,an interface to adapt CustomMenu menus + public void addGuideRelated(ChestMenu menu, Player p, PlayerProfile profile, SlimefunGuideMode mode, int page){ + //加入实例化之后的handler和item,同打开玩家等数据有关的handler + if(page==1){ + menu.addMenuClickHandler(27 ,((Player player1, int i1, ItemStack itemstack1, ClickAction clickAction) -> { + getRecipeMenu().build().setBackHandler(((player, i, itemStack, clickAction1) -> { + this.openPage(player1,profile,mode,page); + return false; + })).open(player1); + return false; + })); + menu.addMenuClickHandler(18,((Player player1, int i1, ItemStack itemstack1, ClickAction clickAction) -> { + getMachineMenu().build().setBackHandler(((player, i, itemStack, clickAction1) -> { + this.openPage(player1,profile,mode,page); + return false; + })).open(player1); + return false; + })); + }else if(page==2){ + + } + } + }; + + + +} + diff --git a/src/main/java/me/matl114/logitech/SlimefunItem/AddItem.java b/src/main/java/me/matl114/logitech/SlimefunItem/AddItem.java index 31b5623..e5bd628 100644 --- a/src/main/java/me/matl114/logitech/SlimefunItem/AddItem.java +++ b/src/main/java/me/matl114/logitech/SlimefunItem/AddItem.java @@ -1,628 +1,635 @@ -package me.matl114.logitech.SlimefunItem; - -import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; -import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems; -import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack; -import me.matl114.logitech.Items.CustomHead; -import me.matl114.logitech.Language; -import me.matl114.logitech.Utils.AddUtils; -import org.bukkit.Material; -import org.bukkit.inventory.ItemStack; - -import java.util.HashSet; - -public class AddItem { - - public static void registerItemStack(){ - for (ItemStack it :ADDGLOW){ - AddUtils.addGlow(it); - } - AddUtils.hideAllFlags(CARGO_CONFIG); - AddUtils.hideAllFlags(ENTITY_FEAT); - } - - //Groups - public static final ItemStack ROOT=new CustomItemStack(Material.BUDDING_AMETHYST, - Language.get("Groups.ROOT.Name"),Language.getList("Groups.ROOT.Lore")); - public static final ItemStack INFO=AddUtils.themed(Material.PAPER,AddUtils.Theme.INFO1, - Language.get("Groups.INFO.Name"), Language.getList("Groups.INFO.Lore")); - public static final ItemStack MATERIAL=AddUtils.themed(Material.END_CRYSTAL,AddUtils.Theme.CATEGORY2, - Language.get("Groups.MATERIAL.Name"), Language.getList("Groups.MATERIAL.Lore")); - public static final ItemStack INFO1=AddUtils.themed(Material.PAPER,AddUtils.Theme.NONE, - Language.get("Groups.INFO1.Name"), Language.getList("Groups.INFO1.Lore")); - public static final ItemStack INFO2=AddUtils.themed(Material.PAPER,AddUtils.Theme.NONE, - Language.get("Groups.INFO2.Name"), Language.getList("Groups.INFO2.Lore")); - public static final ItemStack INFO3=AddUtils.themed(Material.PAPER,AddUtils.Theme.NONE, - Language.get("Groups.INFO3.Name"), Language.getList("Groups.INFO3.Lore")); - public static final ItemStack INFO4=AddUtils.themed(Material.PAPER,AddUtils.Theme.NONE, - Language.get("Groups.INFO4.Name"), Language.getList("Groups.INFO4.Lore")); - public static final ItemStack INFO5=AddUtils.themed(Material.PAPER,AddUtils.Theme.NONE, - Language.get("Groups.INFO5.Name"), Language.getList("Groups.INFO5.Lore")); - public static final ItemStack INFO6=AddUtils.themed(Material.PAPER,AddUtils.Theme.NONE, - Language.get("Groups.INFO6.Name"), Language.getList("Groups.INFO6.Lore")); - public static final ItemStack URL=AddUtils.themed(Material.BOOK,AddUtils.Theme.NONE, - Language.get("Groups.URL.Name"), Language.getList("Groups.URL.Lore")); - public static final ItemStack ALLMACHINE=AddUtils.themed(Material.BLAST_FURNACE,AddUtils.Theme.MENU1, - Language.get("Groups.ALLMACHINE.Name"), Language.getList("Groups.ALLMACHINE.Lore")); - public static final ItemStack ALLRECIPE=AddUtils.themed(Material.KNOWLEDGE_BOOK,AddUtils.Theme.MENU1, - Language.get("Groups.ALLRECIPE.Name"), Language.getList("Groups.ALLRECIPE.Lore")); - public static final ItemStack BASIC=AddUtils.themed(Material.FURNACE,AddUtils.Theme.CATEGORY2, - Language.get("Groups.BASIC.Name"),Language.getList("Groups.BASIC.Lore") ); - public static final ItemStack ALLBIGRECIPES =AddUtils.themed(Material.LODESTONE, AddUtils.Theme.CATEGORY2, - Language.get("Groups.ALLBIGRECIPES.Name"),Language.getList("Groups.ALLBIGRECIPES.Lore")); - public static final ItemStack CARGO=AddUtils.themed(Material.BAMBOO_CHEST_RAFT,AddUtils.Theme.CATEGORY2, - Language.get("Groups.CARGO.Name"),Language.getList("Groups.CARGO.Lore")); - public static final ItemStack SINGULARITY=AddUtils.themed(Material.NETHER_STAR,AddUtils.Theme.CATEGORY2, - Language.get("Groups.SINGULARITY.Name"),Language.getList("Groups.SINGULARITY.Lore")); - public static final ItemStack ADVANCED=AddUtils.themed(Material.BEACON,AddUtils.Theme.CATEGORY2, - Language.get("Groups.ADVANCED.Name"),Language.getList("Groups.ADVANCED.Lore")); - public static final ItemStack BEYOND=AddUtils.themed(Material.REPEATING_COMMAND_BLOCK,AddUtils.Theme.CATEGORY2, - Language.get("Groups.BEYOND.Name"),Language.getList("Groups.BEYOND.Lore")); - public static final ItemStack VANILLA=AddUtils.themed(Material.OBSERVER,AddUtils.Theme.CATEGORY2, - Language.get("Groups.VANILLA.Name"),Language.getList("Groups.VANILLA.Lore")); - public static final ItemStack MANUAL=AddUtils.themed(Material.CRAFTING_TABLE,AddUtils.Theme.CATEGORY2, - Language.get("Groups.MANUAL.Name"),Language.getList("Groups.MANUAL.Lore") ); - public static final ItemStack SPECIAL=AddUtils.themed(Material.SCULK_CATALYST,AddUtils.Theme.CATEGORY2, - Language.get("Groups.SPECIAL.Name"),Language.getList("Groups.SPECIAL.Lore")); - //public static final ItemStack TEMPLATE=AddUtils.themed() - public static final ItemStack TOBECONTINUE=AddUtils.themed(Material.STRUCTURE_VOID,AddUtils.Theme.CATEGORY2, - Language.get("Groups.TOBECONTINUE.Name"),Language.getList("Groups.TOBECONTINUE.Lore")); - public static final ItemStack SPACE =AddUtils.themed(Material.TOTEM_OF_UNDYING, AddUtils.Theme.CATEGORY2, - Language.get("Groups.SPACE.Name"),Language.getList("Groups.SPACE.Lore")); - public static final ItemStack GENERATORS=AddUtils.themed(Material.LAVA_BUCKET, AddUtils.Theme.CATEGORY2, - Language.get("Groups.GENERATORS.Name"),Language.getList("Groups.GENERATORS.Lore")); - public static final ItemStack ENERGY=AddUtils.themed(Material.LIGHTNING_ROD, AddUtils.Theme.CATEGORY2, - Language.get("Groups.ENERGY.Name"),Language.getList("Groups.ENERGY.Lore")); - public static final ItemStack FUNCTIONAL=AddUtils.themed(Material.STRUCTURE_VOID, AddUtils.Theme.CATEGORY2, - Language.get("Groups.FUNCTIONAL.Name"),Language.getList("Groups.FUNCTIONAL.Lore")); - public static final ItemStack UPDATELOG=AddUtils.themed(Material.WRITABLE_BOOK,AddUtils.Theme.NONE, - Language.get("Groups.UPDATELOG.Name"), Language.getList("Groups.UPDATELOG.Lore")); - public static final ItemStack MORE2=AddUtils.themed("MORE2",Material.WRITABLE_BOOK, AddUtils.Theme.NONE, - Language.get("Groups.MORE2.Name"),Language.getList("Groups.MORE2.Lore")); - //feat - public static final ItemStack FEAT1=AddUtils.themed(Material.BOOK, AddUtils.Theme.NONE, - Language.get("Groups.FEAT1.Name"),Language.getList("Groups.FEAT1.Lore")); - public static final ItemStack FEAT2=AddUtils.themed(Material.BOOK, AddUtils.Theme.NONE, - Language.get("Groups.FEAT2.Name"),Language.getList("Groups.FEAT2.Lore")); - public static final ItemStack FEAT3=AddUtils.themed(Material.BOOK, AddUtils.Theme.NONE, - Language.get("Groups.FEAT3.Name"),Language.getList("Groups.FEAT3.Lore")); - public static final ItemStack FEAT4=AddUtils.themed(Material.BOOK, AddUtils.Theme.NONE, - Language.get("Groups.FEAT4.Name"),Language.getList("Groups.FEAT4.Lore")); - public static final ItemStack FEAT5=AddUtils.themed(Material.BOOK, AddUtils.Theme.NONE, - Language.get("Groups.FEAT5.Name"),Language.getList("Groups.FEAT5.Lore")); - public static final ItemStack FEAT6=AddUtils.themed(Material.BOOK, AddUtils.Theme.NONE, - Language.get("Groups.FEAT6.Name"),Language.getList("Groups.FEAT6.Lore")); - public static final ItemStack FEAT7=AddUtils.themed(Material.BOOK, AddUtils.Theme.NONE, - Language.get("Groups.FEAT7.Name"),Language.getList("Groups.FEAT7.Lore")); - public static final ItemStack FEAT8=AddUtils.themed(Material.BOOK, AddUtils.Theme.NONE, - Language.get("Groups.FEAT8.Name"),Language.getList("Groups.FEAT8.Lore")); - public static final ItemStack FEAT9=AddUtils.themed(Material.BOOK, AddUtils.Theme.NONE, - Language.get("Groups.FEAT9.Name"),Language.getList("Groups.FEAT9.Lore")); - - - //items - public static final SlimefunItemStack ENTITY_FEAT=AddUtils.themed("ENTITY_FEAT",Material.SPAWNER,AddUtils.Theme.ITEM1, - Language.get("Items.ENTITY_FEAT.Name"),Language.getList("Items.ENTITY_FEAT.Lore")); - public static final SlimefunItemStack BUG= AddUtils.themed("BUG", Material.BONE_MEAL, AddUtils.Theme.ITEM1, - Language.get("Items.BUG.Name"),Language.getList("Items.BUG.Lore")); - public static final SlimefunItemStack MATL114 = AddUtils.themed("MATL114", CustomHead.MATL114.getItem(), AddUtils.Theme.ITEM1, - Language.get("Items.MATL114.Name"),Language.getList("Items.MATL114.Lore")); - public static final SlimefunItemStack CHIP_INGOT=AddUtils.themed("CHIP_INGOT",Material.BAKED_POTATO,AddUtils.Theme.ITEM1, - Language.get("Items.CHIP_INGOT.Name"),Language.getList("Items.CHIP_INGOT.Lore")); - public static final SlimefunItemStack TITANIUM_INGOT=AddUtils.themed("TITANIUM_INGOT",Material.IRON_INGOT,AddUtils.Theme.ITEM1, - Language.get("Items.TITANIUM_INGOT.Name"),Language.getList("Items.TITANIUM_INGOT.Lore")); - public static final SlimefunItemStack TUNGSTEN_INGOT=AddUtils.themed("TUNGSTEN_INGOT",Material.NETHERITE_INGOT,AddUtils.Theme.ITEM1, - Language.get("Items.TUNGSTEN_INGOT.Name"),Language.getList("Items.TUNGSTEN_INGOT.Lore")); - public static final SlimefunItemStack LOGIC= AddUtils.themed("LOGIC",Material.STRING,AddUtils.Theme.ITEM1, - Language.get("Items.LOGIC.Name"),Language.getList("Items.LOGIC.Lore")); - public static final SlimefunItemStack TRUE_ =AddUtils.themed("TRUE_",Material.MUSIC_DISC_5,AddUtils.Theme.ITEM1, - Language.get("Items.TRUE_.Name"),Language.getList("Items.TRUE_.Lore")); - public static final SlimefunItemStack FALSE_ =AddUtils.themed("FALSE_",Material.MUSIC_DISC_5,AddUtils.Theme.ITEM1, - Language.get("Items.FALSE_.Name"),Language.getList("Items.FALSE_.Lore")); - public static final SlimefunItemStack LOGIGATE=AddUtils.themed("LOGIGATE",Material.COMPARATOR,AddUtils.Theme.ITEM1, - Language.get("Items.LOGIGATE.Name"),Language.getList("Items.LOGIGATE.Lore")); - //generated items - public static final SlimefunItemStack EXISTE=AddUtils.themed("EXISTE",Material.SLIME_BALL,AddUtils.Theme.ITEM1, - Language.get("Items.EXISTE.Name"),Language.getList("Items.EXISTE.Lore")); - public static final SlimefunItemStack UNIQUE=AddUtils.themed("UNIQUE",Material.MAGMA_CREAM,AddUtils.Theme.ITEM1, - Language.get("Items.UNIQUE.Name"),Language.getList("Items.UNIQUE.Lore")); - public static final SlimefunItemStack PARADOX=AddUtils.themed("PARADOX",Material.NAUTILUS_SHELL,AddUtils.Theme.ITEM1, - Language.get("Items.PARADOX.Name"),Language.getList("Items.PARADOX.Lore")); - public static final SlimefunItemStack NOLOGIC=AddUtils.themed("NOLOGIC",Material.STRING,AddUtils.Theme.ITEM1, - Language.get("Items.NOLOGIC.Name"),Language.getList("Items.NOLOGIC.Lore")); - public static final SlimefunItemStack LENGINE=AddUtils.themed("LENGINE",Material.MAGENTA_GLAZED_TERRACOTTA,AddUtils.Theme.ITEM1, - Language.get("Items.LENGINE.Name"),Language.getList("Items.LENGINE.Lore")); - public static final SlimefunItemStack LFIELD=AddUtils.themed("LFIELD",Material.END_CRYSTAL,AddUtils.Theme.ITEM1, - Language.get("Items.LFIELD.Name"),Language.getList("Items.LFIELD.Lore")); - public static final SlimefunItemStack LSCHEDULER=AddUtils.themed("LSCHEDULER",Material.RECOVERY_COMPASS,AddUtils.Theme.ITEM1, - Language.get("Items.LSCHEDULER.Name"),Language.getList("Items.LSCHEDULER.Lore")); - public static final SlimefunItemStack LCRAFT=AddUtils.themed("LCRAFT",Material.CONDUIT,AddUtils.Theme.ITEM1, - Language.get("Items.LCRAFT.Name"),Language.getList("Items.LCRAFT.Lore")); - public static final SlimefunItemStack LDIGITIZER=AddUtils.themed("LDIGITIZER",Material.TARGET,AddUtils.Theme.ITEM1, - Language.get("Items.LDIGITIZER.Name"),Language.getList("Items.LDIGITIZER.Lore")); - public static final SlimefunItemStack LBOOLIZER=AddUtils.themed("LBOOLIZER",Material.LEVER,AddUtils.Theme.ITEM1, - Language.get("Items.LBOOLIZER.Name"),Language.getList("Items.LBOOLIZER.Lore")); - public static final SlimefunItemStack LIOPORT=AddUtils.themed("LIOPORT",Material.CALIBRATED_SCULK_SENSOR,AddUtils.Theme.ITEM1, - Language.get("Items.LIOPORT.Name"),Language.getList("Items.LIOPORT.Lore")); - public static final SlimefunItemStack PALLADIUM_INGOT=AddUtils.themed("PALLADIUM_INGOT",Material.COPPER_INGOT,AddUtils.Theme.ITEM1, - Language.get("Items.PALLADIUM_INGOT.Name"),Language.getList("Items.PALLADIUM_INGOT.Lore")); - public static final SlimefunItemStack PLATINUM_INGOT=AddUtils.themed("PLATINUM_INGOT",Material.GOLD_INGOT,AddUtils.Theme.ITEM1, - Language.get("Items.PLATINUM_INGOT.Name"),Language.getList("Items.PLATINUM_INGOT.Lore")); - public static final SlimefunItemStack MOLYBDENUM=AddUtils.themed("MOLYBDENUM",Material.GUNPOWDER,AddUtils.Theme.ITEM1, - Language.get("Items.MOLYBDENUM.Name"),Language.getList("Items.MOLYBDENUM.Lore")); - public static final SlimefunItemStack CERIUM=AddUtils.themed("CERIUM",Material.GUNPOWDER,AddUtils.Theme.ITEM1, - Language.get("Items.CERIUM.Name"),Language.getList("Items.CERIUM.Lore")); - public static final SlimefunItemStack CADMIUM_INGOT=AddUtils.themed("CADMIUM_INGOT",Material.NETHERITE_INGOT,AddUtils.Theme.ITEM1, - Language.get("Items.CADMIUM_INGOT.Name"),Language.getList("Items.CADMIUM_INGOT.Lore")); - public static final SlimefunItemStack MENDELEVIUM=AddUtils.themed("MENDELEVIUM",Material.GLOWSTONE_DUST,AddUtils.Theme.ITEM1, - Language.get("Items.MENDELEVIUM.Name"),Language.getList("Items.MENDELEVIUM.Lore")); - public static final SlimefunItemStack DYSPROSIUM=AddUtils.themed("DYSPROSIUM",Material.REDSTONE,AddUtils.Theme.ITEM1, - Language.get("Items.DYSPROSIUM.Name"),Language.getList("Items.DYSPROSIUM.Lore")); - public static final SlimefunItemStack BISMUTH_INGOT=AddUtils.themed("BISMUTH_INGOT",Material.IRON_INGOT,AddUtils.Theme.ITEM1, - Language.get("Items.BISMUTH_INGOT.Name"),Language.getList("Items.BISMUTH_INGOT.Lore")); - public static final SlimefunItemStack ANTIMONY_INGOT=AddUtils.themed("ANTIMONY_INGOT",Material.IRON_INGOT,AddUtils.Theme.ITEM1, - Language.get("Items.ANTIMONY_INGOT.Name"),Language.getList("Items.ANTIMONY_INGOT.Lore")); - public static final SlimefunItemStack BORON=AddUtils.themed("BORON",Material.CLAY_BALL,AddUtils.Theme.ITEM1, - Language.get("Items.BORON.Name"),Language.getList("Items.BORON.Lore")); - public static final SlimefunItemStack THALLIUM=AddUtils.themed("THALLIUM",Material.BRICK,AddUtils.Theme.ITEM1, - Language.get("Items.THALLIUM.Name"),Language.getList("Items.THALLIUM.Lore")); - public static final SlimefunItemStack HYDRAGYRUM=AddUtils.themed("HYDRAGYRUM",Material.PRISMARINE_CRYSTALS,AddUtils.Theme.ITEM1, - Language.get("Items.HYDRAGYRUM.Name"),Language.getList("Items.HYDRAGYRUM.Lore")); - public static final SlimefunItemStack HGTLPBBI=AddUtils.themed("HGTLPBBI",CustomHead.SUPPORTER2.getItem(), AddUtils.Theme.ITEM1, - Language.get("Items.HGTLPBBI.Name"),Language.getList("Items.HGTLPBBI.Lore")); - public static final SlimefunItemStack DIMENSIONAL_SHARD=AddUtils.themed("DIMENSIONAL_SHARD",Material.PRISMARINE_SHARD,AddUtils.Theme.ITEM1, - Language.get("Items.DIMENSIONAL_SHARD.Name"),Language.getList("Items.DIMENSIONAL_SHARD.Lore")); - public static final SlimefunItemStack STAR_GOLD=AddUtils.themed("STAR_GOLD",Material.NETHER_STAR,AddUtils.Theme.ITEM1, - Language.get("Items.STAR_GOLD.Name"),Language.getList("Items.STAR_GOLD.Lore")); - public static final SlimefunItemStack VIRTUAL_SPACE=AddUtils.themed("VIRTUAL_SPACE",CustomHead.VSPACE.getItem(), AddUtils.Theme.ITEM1, - Language.get("Items.VIRTUAL_SPACE.Name"),Language.getList("Items.VIRTUAL_SPACE.Lore")); - public static final SlimefunItemStack WORLD_FEAT=AddUtils.themed("WORLD_FEAT",Material.GRASS_BLOCK,AddUtils.Theme.ITEM1, - Language.get("Items.WORLD_FEAT.Name"),Language.getList("Items.WORLD_FEAT.Lore")); - public static final SlimefunItemStack NETHER_FEAT=AddUtils.themed("NETHER_FEAT",Material.NETHERITE_SCRAP,AddUtils.Theme.ITEM1, - Language.get("Items.NETHER_FEAT.Name"),Language.getList("Items.NETHER_FEAT.Lore")); - public static final SlimefunItemStack END_FEAT=AddUtils.themed("END_FEAT",Material.CHORUS_PLANT,AddUtils.Theme.ITEM1, - Language.get("Items.END_FEAT.Name"),Language.getList("Items.END_FEAT.Lore")); - public static final SlimefunItemStack STACKFRAME=AddUtils.themed("STACKFRAME",Material.BEDROCK,AddUtils.Theme.ITEM1, - Language.get("Items.STACKFRAME.Name"),Language.getList("Items.STACKFRAME.Lore")); - - public static final SlimefunItemStack STAR_GOLD_INGOT=AddUtils.themed("STAR_GOLD_INGOT",Material.GOLD_INGOT,AddUtils.Theme.ITEM1, - Language.get("Items.STAR_GOLD_INGOT.Name"),Language.getList("Items.STAR_GOLD_INGOT.Lore")); - public static final SlimefunItemStack ABSTRACT_INGOT=AddUtils.themed("ABSTRACT_INGOT",Material.IRON_INGOT,AddUtils.Theme.ITEM1, - Language.get("Items.ABSTRACT_INGOT.Name"),Language.getList("Items.ABSTRACT_INGOT.Lore")); - public static final SlimefunItemStack PDCECDMD=AddUtils.themed("PDCECDMD",CustomHead.BUSHIGEMEN.getItem(), AddUtils.Theme.ITEM1, - Language.get("Items.PDCECDMD.Name"),Language.getList("Items.PDCECDMD.Lore")); - public static final SlimefunItemStack REINFORCED_CHIP_INGOT=AddUtils.themed("REINFORCED_CHIP_INGOT",Material.POISONOUS_POTATO,AddUtils.Theme.ITEM1, - Language.get("Items.REINFORCED_CHIP_INGOT.Name"),Language.getList("Items.REINFORCED_CHIP_INGOT.Lore")); - public static final SlimefunItemStack ATOM_INGOT=AddUtils.themed("ATOM_INGOT",Material.ECHO_SHARD,AddUtils.Theme.ITEM1, - Language.get("Items.ATOM_INGOT.Name"),Language.getList("Items.ATOM_INGOT.Lore")); - - public static final SlimefunItemStack LMOTOR=AddUtils.themed("LMOTOR",CustomHead.MOTOR.getItem(),AddUtils.Theme.ITEM1, - Language.get("Items.LMOTOR.Name"),Language.getList("Items.LMOTOR.Lore")); - public static final SlimefunItemStack LPLATE=AddUtils.themed("LPLATE",Material.PAPER,AddUtils.Theme.ITEM1, - Language.get("Items.LPLATE.Name"),Language.getList("Items.LPLATE.Lore")); - public static final SlimefunItemStack METAL_CORE=AddUtils.themed("METAL_CORE",Material.NETHERITE_BLOCK,AddUtils.Theme.ITEM1, - Language.get("Items.METAL_CORE.Name"),Language.getList("Items.METAL_CORE.Lore")); - public static final SlimefunItemStack SMELERY_CORE=AddUtils.themed("SMELERY_CORE",Material.IRON_BLOCK,AddUtils.Theme.ITEM1, - Language.get("Items.SMELERY_CORE.Name"),Language.getList("Items.SMELERY_CORE.Lore")); - public static final SlimefunItemStack MASS_CORE=AddUtils.themed("MASS_CORE",Material.COAL_BLOCK,AddUtils.Theme.ITEM1, - Language.get("Items.MASS_CORE.Name"),Language.getList("Items.MASS_CORE.Lore")); - public static final SlimefunItemStack TECH_CORE=AddUtils.themed("TECH_CORE",Material.BEACON,AddUtils.Theme.ITEM1, - Language.get("Items.TECH_CORE.Name"),Language.getList("Items.TECH_CORE.Lore")); - public static final SlimefunItemStack SPACE_PLATE=AddUtils.themed("SPACE_PLATE",Material.PAPER,AddUtils.Theme.ITEM1, - Language.get("Items.SPACE_PLATE.Name"),Language.getList("Items.SPACE_PLATE.Lore")); - public static final SlimefunItemStack LOGIC_CORE=AddUtils.themed("LOGIC_CORE",Material.NETHER_STAR,AddUtils.Theme.ITEM1, - Language.get("Items.LOGIC_CORE.Name"),Language.getList("Items.LOGIC_CORE.Lore")); - public static final SlimefunItemStack FINAL_FRAME=AddUtils.themed("FINAL_FRAME",Material.BUDDING_AMETHYST,AddUtils.Theme.MULTIBLOCK1, - Language.get("Items.FINAL_FRAME.Name"),Language.getList("Items.FINAL_FRAME.Lore")); - public static final SlimefunItemStack REDSTONE_ENGINE=AddUtils.themed("REDSTONE_ENGINE",Material.SLIME_BLOCK,AddUtils.Theme.ITEM1, - Language.get("Items.REDSTONE_ENGINE.Name"),Language.getList("Items.REDSTONE_ENGINE.Lore")); - public static final SlimefunItemStack HYPER_LINK=AddUtils.themed("HYPER_LINK",Material.NETHER_STAR,AddUtils.Theme.ITEM1, - Language.get("Items.HYPER_LINK.Name"),Language.getList("Items.HYPER_LINK.Lore")); - - public static final SlimefunItemStack SAMPLE_HEAD=AddUtils.themed("SAMPLE_HEAD",Material.PLAYER_HEAD,AddUtils.Theme.ITEM1, - Language.get("Items.SAMPLE_HEAD.Name"),Language.getList("Items.SAMPLE_HEAD.Lore")); - public static final SlimefunItemStack CHIP=AddUtils.themed("CHIP",Material.NAME_TAG,AddUtils.Theme.ITEM1, - Language.get("Items.CHIP.Name"),Language.getList("Items.CHIP.Lore")); - public static final SlimefunItemStack CHIP_CORE=AddUtils.themed("CHIP_CORE",CustomHead.CORE.getItem(), AddUtils.Theme.ITEM1, - Language.get("Items.CHIP_CORE.Name"),Language.getList("Items.CHIP_CORE.Lore")); - public static final SlimefunItemStack LSINGULARITY=AddUtils.themed("LSINGULARITY",Material.FIREWORK_STAR,AddUtils.Theme.ITEM1, - Language.get("Items.LSINGULARITY.Name"),Language.getList("Items.LSINGULARITY.Lore")); - public static final SlimefunItemStack RADIATION_CLEAR=AddUtils.themed("RADIATION_CLEAR",Material.GLASS_BOTTLE,AddUtils.Theme.ITEM1, - Language.get("Items.RADIATION_CLEAR.Name"),Language.getList("Items.RADIATION_CLEAR.Lore")); - public static final SlimefunItemStack ANTIMASS_CLEAR=AddUtils.themed("ANTIMASS_CLEAR",Material.GLASS_BOTTLE,AddUtils.Theme.ITEM1, - Language.get("Items.ANTIMASS_CLEAR.Name"),Language.getList("Items.ANTIMASS_CLEAR.Lore")); - public static final SlimefunItemStack BISILVER=AddUtils.themed("BISILVER",Material.IRON_INGOT,AddUtils.Theme.ITEM1, - Language.get("Items.BISILVER.Name"),Language.getList("Items.BISILVER.Lore")); - public static final SlimefunItemStack PAGOLD=AddUtils.themed("PAGOLD",Material.GOLD_INGOT,AddUtils.Theme.ITEM1, - Language.get("Items.PAGOLD.Name"),Language.getList("Items.PAGOLD.Lore")); - public static final SlimefunItemStack LASER=AddUtils.themed("LASER",CustomHead.LASER.getItem(), AddUtils.Theme.ITEM1, - Language.get("Items.LASER.Name"),Language.getList("Items.LASER.Lore")); - public static final SlimefunItemStack ANTIMASS=AddUtils.themed("ANTIMASS",Material.SCULK,AddUtils.Theme.ITEM1, - Language.get("Items.ANTIMASS.Name"),Language.getList("Items.ANTIMASS.Lore")); - public static final SlimefunItemStack VIRTUALWORLD=AddUtils.themed("VIRTUALWORLD",CustomHead.END_BLOCK.getItem(), AddUtils.Theme.ITEM1, - Language.get("Items.VIRTUALWORLD.Name"),Language.getList("Items.VIRTUALWORLD.Lore")); - public static final SlimefunItemStack SAMPLE_SPAWNER=AddUtils.themed("SAMPLE_SPAWNER",Material.SPAWNER,AddUtils.Theme.ITEM1, - Language.get("Items.SAMPLE_SPAWNER.Name"),Language.getList("Items.SAMPLE_SPAWNER.Lore")); - public static final SlimefunItemStack HOLOGRAM_REMOVER=AddUtils.themed("HOLOGRAM_REMOVER",Material.LIGHT,AddUtils.Theme.ITEM1, - Language.get("Items.HOLOGRAM_REMOVER.Name"),Language.getList("Items.HOLOGRAM_REMOVER.Lore")); - public static final SlimefunItemStack WITHERPROOF_REDSTONE=AddUtils.themed("WITHERPROOF_REDSTONE",Material.REDSTONE_BLOCK,AddUtils.Theme.ITEM1, - Language.get("Items.WITHERPROOF_REDSTONE.Name"),Language.getList("Items.WITHERPROOF_REDSTONE.Lore")); - public static final SlimefunItemStack WITHERPROOF_REDS=AddUtils.themed("WITHERPROOF_REDS",Material.REDSTONE,AddUtils.Theme.ITEM1, - Language.get("Items.WITHERPROOF_REDS.Name"),Language.getList("Items.WITHERPROOF_REDS.Lore")); - public static final SlimefunItemStack BEDROCK_BREAKER=AddUtils.themed("BEDROCK_BREAKER",Material.PISTON,AddUtils.Theme.ITEM1, - Language.get("Items.BEDROCK_BREAKER.Name"),Language.getList("Items.BEDROCK_BREAKER.Lore")); - public static final SlimefunItemStack LASER_GUN=AddUtils.themed("LASER_GUN",CustomHead.LASER_GUN.getItem(), AddUtils.Theme.ITEM1, - Language.get("Items.LASER_GUN.Name"),Language.getList("Items.LASER_GUN.Lore")); - //nachines - public static final SlimefunItemStack HEAD_ANALYZER=AddUtils.themed("HEAD_ANALYZER",Material.SOUL_CAMPFIRE, AddUtils.Theme.MACHINE1, - Language.get("Machines.HEAD_ANALYZER.Name"),Language.getList("Machines.HEAD_ANALYZER.Lore")); - public static final SlimefunItemStack RECIPE_LOGGER=AddUtils.themed("RECIPE_LOGGER",Material.FLETCHING_TABLE, AddUtils.Theme.MACHINE1, - Language.get("Machines.RECIPE_LOGGER.Name"),Language.getList("Machines.RECIPE_LOGGER.Lore")); - public static final SlimefunItemStack BOOL_GENERATOR=AddUtils.themed("BOOL_GENERATOR",Material.REDSTONE_TORCH,AddUtils.Theme.MACHINE1, - Language.get("Machines.BOOL_GENERATOR.Name"),Language.getList("Machines.BOOL_GENERATOR.Lore")); - public static final SlimefunItemStack LOGIC_REACTOR=AddUtils.themed("LOGIC_REACTOR",CustomHead.LOGIC_REACTOR.getItem(),AddUtils.Theme.MACHINE1, - Language.get("Machines.LOGIC_REACTOR.Name"),Language.getList("Machines.LOGIC_REACTOR.Lore")); - public static final SlimefunItemStack BUG_CRAFTER=AddUtils.themed("BUG_CRAFTER",CustomHead.BUG_CRATFER.getItem(),AddUtils.Theme.MACHINE1, - Language.get("Machines.BUG_CRAFTER.Name"),Language.getList("Machines.BUG_CRAFTER.Lore")); - public static final SlimefunItemStack ENDFRAME_MACHINE=AddUtils.themed("ENDFRAME_MACHINE",Material.END_PORTAL_FRAME,AddUtils.Theme.MACHINE1, - Language.get("Machines.ENDFRAME_MACHINE.Name"),Language.getList("Machines.ENDFRAME_MACHINE.Lore")); - public static final SlimefunItemStack LVOID_GENERATOR=AddUtils.themed("LVOID_GENERATOR",Material.SOUL_LANTERN,AddUtils.Theme.MACHINE1, - Language.get("Machines.LVOID_GENERATOR.Name"),Language.getList("Machines.LVOID_GENERATOR.Lore")); - public static final SlimefunItemStack SPECIAL_CRAFTER=AddUtils.themed("SPECIAL_CRAFTER",Material.LOOM,AddUtils.Theme.MACHINE1, - Language.get("Machines.SPECIAL_CRAFTER.Name"),Language.getList("Machines.SPECIAL_CRAFTER.Lore")); - public static final SlimefunItemStack STAR_SMELTERY=AddUtils.themed("STAR_SMELTERY",Material.BLAST_FURNACE,AddUtils.Theme.MACHINE1, - Language.get("Machines.STAR_SMELTERY.Name"),Language.getList("Machines.STAR_SMELTERY.Lore")); - - public static final SlimefunItemStack INFINITY_AUTOCRAFT=AddUtils.themed("INFINITY_AUTOCRAFT",Material.CRYING_OBSIDIAN,AddUtils.Theme.MACHINE1, - Language.get("Machines.INFINITY_AUTOCRAFT.Name"),Language.getList("Machines.INFINITY_AUTOCRAFT.Lore")); - public static final SlimefunItemStack CHIP_MAKER=AddUtils.themed("CHIP_MAKER",Material.CHISELED_BOOKSHELF,AddUtils.Theme.MACHINE1, - Language.get("Machines.CHIP_MAKER.Name"),Language.getList("Machines.CHIP_MAKER.Lore")); - public static final SlimefunItemStack CHIP_CONSUMER=AddUtils.themed("CHIP_CONSUMER",Material.TORCH,AddUtils.Theme.MACHINE1, - Language.get("Machines.CHIP_CONSUMER.Name"),Language.getList("Machines.CHIP_CONSUMER.Lore")); - public static final SlimefunItemStack CHIP_BICONSUMER=AddUtils.themed("CHIP_BICONSUMER",Material.LANTERN,AddUtils.Theme.MACHINE1, - Language.get("Machines.CHIP_BICONSUMER.Name"),Language.getList("Machines.CHIP_BICONSUMER.Lore")); - public static final SlimefunItemStack SEQ_CONSTRUCTOR=AddUtils.themed("SEQ_CONSTRUCTOR",Material.BAMBOO_MOSAIC,AddUtils.Theme.MACHINE1, - Language.get("Machines.SEQ_CONSTRUCTOR.Name"),Language.getList("Machines.SEQ_CONSTRUCTOR.Lore")); - public static final SlimefunItemStack STACKMACHINE=AddUtils.themed("STACKMACHINE",Material.FURNACE,AddUtils.Theme.MACHINE1, - Language.get("Machines.STACKMACHINE.Name"),Language.getList("Machines.STACKMACHINE.Lore")); - public static final SlimefunItemStack ENERGY_TRASH=AddUtils.themed("ENERGY_TRASH", SlimefunItems.PORTABLE_DUSTBIN.getItem().getItem().clone() - ,AddUtils.Theme.MACHINE1, Language.get("Machines.ENERGY_TRASH.Name"),Language.getList("Machines.ENERGY_TRASH.Lore")); - public static final SlimefunItemStack OPPO_GEN=AddUtils.themed("OPPO_GEN",CustomHead.HOT_MACHINE.getItem(), AddUtils.Theme.MACHINE1, - Language.get("Machines.OPPO_GEN.Name"),Language.getList("Machines.OPPO_GEN.Lore")); - public static final SlimefunItemStack ARC_REACTOR=AddUtils.themed("ARC_REACTOR",CustomHead.REACTOR.getItem(),AddUtils.Theme.MACHINE1, - Language.get("Machines.ARC_REACTOR.Name"),Language.getList("Machines.ARC_REACTOR.Lore")); - public static final SlimefunItemStack ENERGY_AMPLIFIER=AddUtils.themed("ENERGY_AMPLIFIER",Material.NETHERITE_BLOCK,AddUtils.Theme.MACHINE1, - Language.get("Machines.ENERGY_AMPLIFIER.Name"),Language.getList("Machines.ENERGY_AMPLIFIER.Lore")); - public static final SlimefunItemStack ADVANCED_CHIP_MAKER=AddUtils.themed("ADVANCED_CHIP_MAKER",Material.CHISELED_BOOKSHELF,AddUtils.Theme.MACHINE1, - Language.get("Machines.ADVANCED_CHIP_MAKER.Name"),Language.getList("Machines.ADVANCED_CHIP_MAKER.Lore")); - public static final SlimefunItemStack CHIP_REACTOR=AddUtils.themed("CHIP_REACTOR",Material.JUKEBOX,AddUtils.Theme.MACHINE1, - Language.get("Machines.CHIP_REACTOR.Name"),Language.getList("Machines.CHIP_REACTOR.Lore")); - public static final SlimefunItemStack DUST_EXTRACTOR=AddUtils.themed("DUST_EXTRACTOR",Material.CHISELED_STONE_BRICKS,AddUtils.Theme.MACHINE1, - Language.get("Machines.DUST_EXTRACTOR.Name"),Language.getList("Machines.DUST_EXTRACTOR.Lore")); - public static final SlimefunItemStack FURNACE_FACTORY=AddUtils.themed("FURNACE_FACTORY",Material.FURNACE,AddUtils.Theme.MACHINE1, - Language.get("Machines.FURNACE_FACTORY.Name"),Language.getList("Machines.FURNACE_FACTORY.Lore")); - public static final SlimefunItemStack INGOT_FACTORY=AddUtils.themed("INGOT_FACTORY",Material.RED_GLAZED_TERRACOTTA,AddUtils.Theme.MACHINE1, - Language.get("Machines.INGOT_FACTORY.Name"),Language.getList("Machines.INGOT_FACTORY.Lore")); - public static final SlimefunItemStack FINAL_LASER=AddUtils.themed("FINAL_LASER",Material.DROPPER,AddUtils.Theme.MACHINE1, - Language.get("Machines.FINAL_LASER.Name"),Language.getList("Machines.FINAL_LASER.Lore")); - public static final SlimefunItemStack FINAL_CONVERTOR=AddUtils.themed("FINAL_CONVERTOR",Material.WARPED_HYPHAE,AddUtils.Theme.MACHINE1, - Language.get("Machines.FINAL_CONVERTOR.Name"),Language.getList("Machines.FINAL_CONVERTOR.Lore")); - public static final SlimefunItemStack PRESSOR_FACTORY=AddUtils.themed("PRESSOR_FACTORY",Material.PISTON,AddUtils.Theme.MACHINE1, - Language.get("Machines.PRESSOR_FACTORY.Name"),Language.getList("Machines.PRESSOR_FACTORY.Lore")); - public static final SlimefunItemStack CRAFTER=AddUtils.themed("CRAFTER",Material.CRAFTING_TABLE,AddUtils.Theme.MACHINE1, - Language.get("Machines.CRAFTER.Name"),Language.getList("Machines.CRAFTER.Lore")); - public static final SlimefunItemStack EASYSTACKMACHINE=AddUtils.themed("EASYSTACKMACHINE",Material.FURNACE,AddUtils.Theme.MACHINE1, - Language.get("Machines.EASYSTACKMACHINE.Name"),Language.getList("Machines.EASYSTACKMACHINE.Lore")); - public static final SlimefunItemStack CONVERTOR=AddUtils.themed("CONVERTOR",Material.SEA_LANTERN,AddUtils.Theme.MACHINE1, - Language.get("Machines.CONVERTOR.Name"),Language.getList("Machines.CONVERTOR.Lore")); - public static final SlimefunItemStack VIRTUAL_KILLER=AddUtils.themed("VIRTUAL_KILLER",Material.STONECUTTER,AddUtils.Theme.MACHINE1, - Language.get("Machines.VIRTUAL_KILLER.Name"),Language.getList("Machines.VIRTUAL_KILLER.Lore")); - public static final SlimefunItemStack INF_MOBSIMULATION=AddUtils.themed("INF_MOBSIMULATION",Material.GILDED_BLACKSTONE,AddUtils.Theme.MACHINE1, - Language.get("Machines.INF_MOBSIMULATION.Name"),Language.getList("Machines.INF_MOBSIMULATION.Lore")); - public static final SlimefunItemStack INF_GEOQUARRY=AddUtils.themed("INF_GEOQUARRY",Material.CHISELED_QUARTZ_BLOCK,AddUtils.Theme.MACHINE1, - Language.get("Machines.INF_GEOQUARRY.Name"),Language.getList("Machines.INF_GEOQUARRY.Lore")); - public static final SlimefunItemStack RAND_EDITOR=AddUtils.themed("RAND_EDITOR",Material.ENCHANTING_TABLE,AddUtils.Theme.MACHINE1, - Language.get("Machines.RAND_EDITOR.Name"),Language.getList("Machines.RAND_EDITOR.Lore")); - public static final SlimefunItemStack ATTR_OP=AddUtils.themed("ATTR_OP",Material.ANVIL,AddUtils.Theme.MACHINE1, - Language.get("Machines.ATTR_OP.Name"),Language.getList("Machines.ATTR_OP.Lore")); - public static final SlimefunItemStack GRIND_FACTORY=AddUtils.themed("GRIND_FACTORY",Material.GRINDSTONE,AddUtils.Theme.MACHINE1, - Language.get("Machines.GRIND_FACTORY.Name"),Language.getList("Machines.GRIND_FACTORY.Lore")); - public static final SlimefunItemStack TNT_GEN=AddUtils.themed("TNT_GEN",Material.NOTE_BLOCK,AddUtils.Theme.MACHINE1, - Language.get("Machines.TNT_GEN.Name"),Language.getList("Machines.TNT_GEN.Lore")); - public static final SlimefunItemStack ADVANCE_BREWER=AddUtils.themed("ADVANCE_BREWER",Material.SMOKER,AddUtils.Theme.MACHINE1, - Language.get("Machines.ADVANCE_BREWER.Name"),Language.getList("Machines.ADVANCE_BREWER.Lore")); - public static final SlimefunItemStack SIMU_LVOID=AddUtils.themed("SIMU_LVOID",Material.SOUL_TORCH,AddUtils.Theme.MACHINE1, - Language.get("Machines.SIMU_LVOID.Name"),Language.getList("Machines.SIMU_LVOID.Lore")); - //manuals - public static final SlimefunItemStack MANUAL_CORE=AddUtils.themed("MANUAL_CORE",Material.AMETHYST_SHARD,AddUtils.Theme.ITEM1, - Language.get("Manuals.MANUAL_CORE.Name"),Language.getList("Manuals.MANUAL_CORE.Lore")); - public static final SlimefunItemStack CRAFT_MANUAL=AddUtils.themed("CRAFT_MANUAL",Material.CRAFTING_TABLE,AddUtils.Theme.MANUAL1, - Language.get("Manuals.CRAFT_MANUAL.Name"),Language.getList("Manuals.CRAFT_MANUAL.Lore")); - public static final SlimefunItemStack FURNACE_MANUAL=AddUtils.themed("FURNACE_MANUAL",Material.FURNACE,AddUtils.Theme.MANUAL1, - Language.get("Manuals.FURNACE_MANUAL.Name"),Language.getList("Manuals.FURNACE_MANUAL.Lore")); - public static final SlimefunItemStack ENHANCED_CRAFT_MANUAL=AddUtils.themed("ENHANCED_CRAFT_MANUAL",Material.CRAFTING_TABLE,AddUtils.Theme.MANUAL1, - Language.get("Manuals.ENHANCED_CRAFT_MANUAL.Name"),Language.getList("Manuals.ENHANCED_CRAFT_MANUAL.Lore")); - public static final SlimefunItemStack GRIND_MANUAL=AddUtils.themed("GRIND_MANUAL",Material.DISPENSER,AddUtils.Theme.MANUAL1, - Language.get("Manuals.GRIND_MANUAL.Name"),Language.getList("Manuals.GRIND_MANUAL.Lore")); - public static final SlimefunItemStack ARMOR_FORGE_MANUAL=AddUtils.themed("ARMOR_FORGE_MANUAL",Material.ANVIL,AddUtils.Theme.MANUAL1, - Language.get("Manuals.ARMOR_FORGE_MANUAL.Name"),Language.getList("Manuals.ARMOR_FORGE_MANUAL.Lore")); - public static final SlimefunItemStack ORE_CRUSHER_MANUAL=AddUtils.themed("ORE_CRUSHER_MANUAL",Material.DROPPER,AddUtils.Theme.MANUAL1, - Language.get("Manuals.ORE_CRUSHER_MANUAL.Name"),Language.getList("Manuals.ORE_CRUSHER_MANUAL.Lore")); - public static final SlimefunItemStack COMPRESSOR_MANUAL=AddUtils.themed("COMPRESSOR_MANUAL",Material.PISTON,AddUtils.Theme.MANUAL1, - Language.get("Manuals.COMPRESSOR_MANUAL.Name"),Language.getList("Manuals.COMPRESSOR_MANUAL.Lore")); - public static final SlimefunItemStack PRESSURE_MANUAL=AddUtils.themed("PRESSURE_MANUAL",Material.GLASS,AddUtils.Theme.MANUAL1, - Language.get("Manuals.PRESSURE_MANUAL.Name"),Language.getList("Manuals.PRESSURE_MANUAL.Lore")); - public static final SlimefunItemStack MAGIC_WORKBENCH_MANUAL=AddUtils.themed("MAGIC_WORKBENCH_MANUAL",Material.BOOKSHELF,AddUtils.Theme.MANUAL1, - Language.get("Manuals.MAGIC_WORKBENCH_MANUAL.Name"),Language.getList("Manuals.MAGIC_WORKBENCH_MANUAL.Lore")); - public static final SlimefunItemStack ORE_WASHER_MANUAL=AddUtils.themed("ORE_WASHER_MANUAL",Material.BLUE_STAINED_GLASS,AddUtils.Theme.MANUAL1, - Language.get("Manuals.ORE_WASHER_MANUAL.Name"),Language.getList("Manuals.ORE_WASHER_MANUAL.Lore")); - public static final SlimefunItemStack GOLD_PAN_MANUAL=AddUtils.themed("GOLD_PAN_MANUAL",Material.BROWN_TERRACOTTA,AddUtils.Theme.MANUAL1, - Language.get("Manuals.GOLD_PAN_MANUAL.Name"),Language.getList("Manuals.GOLD_PAN_MANUAL.Lore")); - public static final SlimefunItemStack ANCIENT_ALTAR_MANUAL=AddUtils.themed("ANCIENT_ALTAR_MANUAL",Material.ENCHANTING_TABLE,AddUtils.Theme.MANUAL1, - Language.get("Manuals.ANCIENT_ALTAR_MANUAL.Name"),Language.getList("Manuals.ANCIENT_ALTAR_MANUAL.Lore")); - public static final SlimefunItemStack SMELTERY_MANUAL=AddUtils.themed("SMELTERY_MANUAL",Material.BLAST_FURNACE,AddUtils.Theme.MANUAL1, - Language.get("Manuals.SMELTERY_MANUAL.Name"),Language.getList("Manuals.SMELTERY_MANUAL.Lore")); - public static final SlimefunItemStack CRUCIBLE_MANUAL=AddUtils.themed("CRUCIBLE_MANUAL",Material.RED_TERRACOTTA,AddUtils.Theme.MANUAL1, - Language.get("Manuals.CRUCIBLE_MANUAL.Name"),Language.getList("Manuals.CRUCIBLE_MANUAL.Lore")); - public static final SlimefunItemStack PULVERIZER_MANUAL=AddUtils.themed("PULVERIZER_MANUAL",Material.GRINDSTONE,AddUtils.Theme.MANUAL1, - Language.get("Manuals.PULVERIZER_MANUAL.Name"),Language.getList("Manuals.PULVERIZER_MANUAL.Lore")); - public static final SlimefunItemStack MULTICRAFTTABLE_MANUAL=AddUtils.themed("MULTICRAFTTABLE_MANUAL",Material.CRAFTING_TABLE,AddUtils.Theme.MANUAL1, - Language.get("Manuals.MULTICRAFTTABLE_MANUAL.Name"),Language.getList("Manuals.MULTICRAFTTABLE_MANUAL.Lore")); - public static final SlimefunItemStack TABLESAW_MANUAL=AddUtils.themed("TABLESAW_MANUAL",Material.STONECUTTER,AddUtils.Theme.MANUAL1, - Language.get("Manuals.TABLESAW_MANUAL.Name"),Language.getList("Manuals.TABLESAW_MANUAL.Lore")); - public static final SlimefunItemStack COMPOSTER=AddUtils.themed("COMPOSTER",Material.CAULDRON,AddUtils.Theme.MANUAL1, - Language.get("Manuals.COMPOSTER.Name"),Language.getList("Manuals.COMPOSTER.Lore")); - public static final SlimefunItemStack MULTIMACHINE_MANUAL=AddUtils.themed("MULTIMACHINE_MANUAL",Material.GRAY_STAINED_GLASS,AddUtils.Theme.MANUAL1, - Language.get("Manuals.MULTIMACHINE_MANUAL.Name"),Language.getList("Manuals.MULTIMACHINE_MANUAL.Lore")); - public static final SlimefunItemStack MOBDATA_MANUAL=AddUtils.themed("MOBDATA_MANUAL",Material.LODESTONE,AddUtils.Theme.MANUAL1, - Language.get("Manuals.MOBDATA_MANUAL.Name"),Language.getList("Manuals.MOBDATA_MANUAL.Lore")); - public static final SlimefunItemStack INFINITY_MANUAL=AddUtils.themed("INFINITY_MANUAL",Material.RESPAWN_ANCHOR,AddUtils.Theme.MANUAL1, - Language.get("Manuals.INFINITY_MANUAL.Name"),Language.getList("Manuals.INFINITY_MANUAL.Lore")); - public static final SlimefunItemStack NTWWORKBENCH_MANUAL=AddUtils.themed("NTWWORKBENCH_MANUAL",Material.BAMBOO_BLOCK,AddUtils.Theme.MANUAL1, - Language.get("Manuals.NTWWORKBENCH_MANUAL.Name"),Language.getList("Manuals.NTWWORKBENCH_MANUAL.Lore")); - public static final SlimefunItemStack MULTIBLOCK_MANUAL=AddUtils.themed("MULTIBLOCK_MANUAL",Material.BRICKS,AddUtils.Theme.MANUAL1, - Language.get("Manuals.MULTIBLOCK_MANUAL.Name"),Language.getList("Manuals.MULTIBLOCK_MANUAL.Lore")); - public static final SlimefunItemStack FINAL_MANUAL=AddUtils.themed("FINAL_MANUAL",Material.REINFORCED_DEEPSLATE,AddUtils.Theme.MANUAL1, - Language.get("Manuals.FINAL_MANUAL.Name"),Language.getList("Manuals.FINAL_MANUAL.Lore")); - public static final SlimefunItemStack REPLACE_CARD=AddUtils.themed("REPLACE_CARD",Material.PRIZE_POTTERY_SHERD,AddUtils.Theme.ITEM1, - Language.get("Manuals.REPLACE_CARD.Name"),Language.getList("Manuals.REPLACE_CARD.Lore")); - public static final SlimefunItemStack CARD_MAKER=AddUtils.themed("CARD_MAKER",Material.FLETCHING_TABLE,AddUtils.Theme.MACHINE1, - Language.get("Manuals.CARD_MAKER.Name"),Language.getList("Manuals.CARD_MAKER.Lore")); - //generators - public static final SlimefunItemStack MAGIC_STONE=AddUtils.themed("MAGIC_STONE",Material.COBBLESTONE,AddUtils.Theme.MACHINE2, - Language.get("Generators.MAGIC_STONE.Name"),Language.getList("Generators.MAGIC_STONE.Lore")); - public static final SlimefunItemStack BOOL_MG=AddUtils.themed("BOOL_MG",Material.REDSTONE_TORCH,AddUtils.Theme.MACHINE2, - Language.get("Generators.BOOL_MG.Name"),Language.getList("Generators.BOOL_MG.Lore")); - public static final SlimefunItemStack OVERWORLD_MINER=AddUtils.themed("OVERWORLD_MINER",Material.SMOOTH_STONE,AddUtils.Theme.MACHINE2, - Language.get("Generators.OVERWORLD_MINER.Name"),Language.getList("Generators.OVERWORLD_MINER.Lore")); - public static final SlimefunItemStack NETHER_MINER=AddUtils.themed("NETHER_MINER",Material.CRIMSON_NYLIUM,AddUtils.Theme.MACHINE2, - Language.get("Generators.NETHER_MINER.Name"),Language.getList("Generators.NETHER_MINER.Lore")); - public static final SlimefunItemStack END_MINER =AddUtils.themed("END_MINER",Material.END_STONE_BRICKS,AddUtils.Theme.MACHINE2, - Language.get("Generators.END_MINER.Name"),Language.getList("Generators.END_MINER.Lore")); - public static final SlimefunItemStack DIMENSION_MINER=AddUtils.themed("DIMENSION_MINER",Material.CRYING_OBSIDIAN,AddUtils.Theme.MACHINE2, - Language.get("Generators.DIMENSION_MINER.Name"),Language.getList("Generators.DIMENSION_MINER.Lore")); - public static final SlimefunItemStack REDSTONE_MG=AddUtils.themed("REDSTONE_MG",Material.OBSERVER,AddUtils.Theme.MACHINE2, - Language.get("Generators.REDSTONE_MG.Name"),Language.getList("Generators.REDSTONE_MG.Lore")); - public static final SlimefunItemStack DUPE_MG=AddUtils.themed("DUPE_MG",Material.STICKY_PISTON,AddUtils.Theme.MACHINE2, - Language.get("Generators.DUPE_MG.Name"),Language.getList("Generators.DUPE_MG.Lore")); - public static final SlimefunItemStack ENDDUPE_MG=AddUtils.themed("ENDDUPE_MG",Material.END_PORTAL_FRAME,AddUtils.Theme.MACHINE2, - Language.get("Generators.ENDDUPE_MG.Name"),Language.getList("Generators.ENDDUPE_MG.Lore")); - public static final SlimefunItemStack STACKMGENERATOR=AddUtils.themed("STACKMGENERATOR",Material.SMOOTH_STONE,AddUtils.Theme.MACHINE2, - Language.get("Generators.STACKMGENERATOR.Name"),Language.getList("Generators.STACKMGENERATOR.Lore")); - public static final SlimefunItemStack REVERSE_GENERATOR=AddUtils.themed("REVERSE_GENERATOR",CustomHead.REVERSE.getItem(), AddUtils.Theme.MACHINE2, - Language.get("Generators.REVERSE_GENERATOR.Name"),Language.getList("Generators.REVERSE_GENERATOR.Lore")); - public static final SlimefunItemStack VIRTUAL_MINER=AddUtils.themed("VIRTUAL_MINER",Material.CHERRY_WOOD,AddUtils.Theme.MACHINE2, - Language.get("Generators.VIRTUAL_MINER.Name"),Language.getList("Generators.VIRTUAL_MINER.Lore")); - public static final SlimefunItemStack VIRTUAL_PLANT=AddUtils.themed("VIRTUAL_PLANT",Material.STRIPPED_CHERRY_WOOD,AddUtils.Theme.MACHINE2, - Language.get("Generators.VIRTUAL_PLANT.Name"),Language.getList("Generators.VIRTUAL_PLANT.Lore")); - public static final SlimefunItemStack MAGIC_PLANT=AddUtils.themed("MAGIC_PLANT",Material.DIRT,AddUtils.Theme.MACHINE2, - Language.get("Generators.MAGIC_PLANT.Name"),Language.getList("Generators.MAGIC_PLANT.Lore")); - public static final SlimefunItemStack OVERWORLD_PLANT=AddUtils.themed("OVERWORLD_PLANT",Material.PODZOL,AddUtils.Theme.MACHINE2, - Language.get("Generators.OVERWORLD_PLANT.Name"),Language.getList("Generators.OVERWORLD_PLANT.Lore")); - public static final SlimefunItemStack NETHER_PLANT=AddUtils.themed("NETHER_PLANT",Material.WARPED_NYLIUM,AddUtils.Theme.MACHINE2, - Language.get("Generators.NETHER_PLANT.Name"),Language.getList("Generators.NETHER_PLANT.Lore")); - public static final SlimefunItemStack END_PLANT=AddUtils.themed("END_PLANT",Material.END_STONE,AddUtils.Theme.MACHINE2, - Language.get("Generators.END_PLANT.Name"),Language.getList("Generators.END_PLANT.Lore")); - public static final SlimefunItemStack SMELTRY=AddUtils.themed("SMELTRY",Material.FURNACE,AddUtils.Theme.MACHINE1, - Language.get("Machines.SMELTRY.Name"),Language.getList("Machines.SMELTRY.Lore")); - public static final SlimefunItemStack STONE_FACTORY=AddUtils.themed("STONE_FACTORY",Material.STONE_BRICKS,AddUtils.Theme.MACHINE2, - Language.get("Generators.STONE_FACTORY.Name"),Language.getList("Generators.STONE_FACTORY.Lore")); - public static final SlimefunItemStack TNT_MG=AddUtils.themed("TNT_MG",Material.ANCIENT_DEBRIS,AddUtils.Theme.MACHINE2, - Language.get("Generators.TNT_MG.Name"),Language.getList("Generators.TNT_MG.Lore")); - //cargos - public static final SlimefunItemStack CARGO_PART=AddUtils.themed("CARGO_PART",Material.SHAPER_ARMOR_TRIM_SMITHING_TEMPLATE,AddUtils.Theme.ITEM1, - Language.get("Items.CARGO_PART.Name"),Language.getList("Items.CARGO_PART.Lore")); - public static final SlimefunItemStack CARGO_CONFIG=AddUtils.themed("CARGO_CONFIG",Material.TIDE_ARMOR_TRIM_SMITHING_TEMPLATE,AddUtils.Theme.ITEM1, - Language.get("Items.CARGO_CONFIG.Name"),Language.getList("Items.CARGO_CONFIG.Lore")); - public static final SlimefunItemStack CARGO_CONFIGURATOR=AddUtils.themed("CARGO_CONFIGURATOR",Material.JUKEBOX,AddUtils.Theme.CARGO1, - Language.get("Items.CARGO_CONFIGURATOR.Name"),Language.getList("Items.CARGO_CONFIGURATOR.Lore")); - public static final SlimefunItemStack SIMPLE_CARGO=AddUtils.themed("SIMPLE_CARGO",Material.TARGET,AddUtils.Theme.CARGO1, - Language.get("Cargo.SIMPLE_CARGO.Name"),Language.getList("Cargo.SIMPLE_CARGO.Lore")); - public static final SlimefunItemStack REMOTE_CARGO=AddUtils.themed("REMOTE_CARGO",Material.CALIBRATED_SCULK_SENSOR,AddUtils.Theme.CARGO1, - Language.get("Cargo.REMOTE_CARGO.Name"),Language.getList("Cargo.REMOTE_CARGO.Lore")); - public static final SlimefunItemStack LINE_CARGO=AddUtils.themed("LINE_CARGO",Material.OBSERVER,AddUtils.Theme.CARGO1, - Language.get("Cargo.LINE_CARGO.Name"),Language.getList("Cargo.LINE_CARGO.Lore")); - public static final SlimefunItemStack BISORTER=AddUtils.themed("BISORTER",Material.VERDANT_FROGLIGHT,AddUtils.Theme.CARGO1, - Language.get("Cargo.BISORTER.Name"),Language.getList("Cargo.BISORTER.Lore")); - public static final SlimefunItemStack QUARSORTER=AddUtils.themed("QUARSORTER",Material.PEARLESCENT_FROGLIGHT,AddUtils.Theme.CARGO1, - Language.get("Cargo.QUARSORTER.Name"),Language.getList("Cargo.QUARSORTER.Lore")); - public static final SlimefunItemStack OCTASORTER=AddUtils.themed("OCTASORTER",Material.OCHRE_FROGLIGHT,AddUtils.Theme.CARGO1, - Language.get("Cargo.OCTASORTER.Name"),Language.getList("Cargo.OCTASORTER.Lore")); - public static final SlimefunItemStack ADV_TRASH=AddUtils.themed("ADV_TRASH",CustomHead.FIRE_GENERATOR.getItem(), AddUtils.Theme.CARGO1, - Language.get("Cargo.ADV_TRASH.Name"),Language.getList("Cargo.ADV_TRASH.Lore")); - public static final SlimefunItemStack STORAGE_OPERATOR=AddUtils.themed("STORAGE_OPERATOR",Material.CARTOGRAPHY_TABLE,AddUtils.Theme.CARGO1, - Language.get("Cargo.STORAGE_OPERATOR.Name"),Language.getList("Cargo.STORAGE_OPERATOR.Lore")); - public static final SlimefunItemStack ADV_ADJACENT_CARGO=AddUtils.themed("ADV_ADJACENT_CARGO",Material.TARGET,AddUtils.Theme.CARGO1, - Language.get("Cargo.ADV_ADJACENT_CARGO.Name"),Language.getList("Cargo.ADV_ADJACENT_CARGO.Lore")); - public static final SlimefunItemStack ADV_REMOTE_CARGO=AddUtils.themed("ADV_REMOTE_CARGO",Material.CALIBRATED_SCULK_SENSOR,AddUtils.Theme.CARGO1, - Language.get("Cargo.ADV_REMOTE_CARGO.Name"),Language.getList("Cargo.ADV_REMOTE_CARGO.Lore")); - public static final SlimefunItemStack ADV_LINE_CARGO=AddUtils.themed("ADV_LINE_CARGO",Material.OBSERVER,AddUtils.Theme.CARGO1, - Language.get("Cargo.ADV_LINE_CARGO.Name"),Language.getList("Cargo.ADV_LINE_CARGO.Lore")); - public static final SlimefunItemStack REDSTONE_ADJACENT_CARGO=AddUtils.themed("REDSTONE_ADJACENT_CARGO",Material.REDSTONE_LAMP,AddUtils.Theme.CARGO1, - Language.get("Cargo.REDSTONE_ADJACENT_CARGO.Name"),Language.getList("Cargo.REDSTONE_ADJACENT_CARGO.Lore")); - public static final SlimefunItemStack CHIP_ADJ_CARGO=AddUtils.themed("CHIP_ADJ_CARGO",Material.SHROOMLIGHT,AddUtils.Theme.CARGO1, - Language.get("Cargo.CHIP_ADJ_CARGO.Name"),Language.getList("Cargo.CHIP_ADJ_CARGO.Lore")); - public static final SlimefunItemStack RESETTER=AddUtils.themed("RESETTER",Material.FLETCHING_TABLE,AddUtils.Theme.CARGO1, - Language.get("Cargo.RESETTER.Name"),Language.getList("Cargo.RESETTER.Lore")); - public static final SlimefunItemStack STORAGE_SINGULARITY= AddUtils.themed("STORAGE_SINGULARITY",Material.NETHER_STAR,AddUtils.Theme.ITEM1, - Language.get("Cargo.STORAGE_SINGULARITY.Name"),Language.getList("Cargo.STORAGE_SINGULARITY.Lore")); - public static final SlimefunItemStack QUANTUM_LINK=AddUtils.themed("QUANTUM_LINK",Material.NETHER_STAR,AddUtils.Theme.ITEM1, - Language.get("Cargo.QUANTUM_LINK.Name"),Language.getList("Cargo.QUANTUM_LINK.Lore")); - public static final SlimefunItemStack INPORT=AddUtils.themed("INPORT",Material.END_STONE,AddUtils.Theme.MACHINE1, - Language.get("Cargo.INPORT.Name"),Language.getList("Cargo.INPORT.Lore")); - public static final SlimefunItemStack OUTPORT=AddUtils.themed("OUTPORT",Material.END_STONE,AddUtils.Theme.MACHINE1, - Language.get("Cargo.OUTPORT.Name"),Language.getList("Cargo.OUTPORT.Lore")); - public static final SlimefunItemStack IOPORT=AddUtils.themed("IOPORT",Material.PURPUR_PILLAR,AddUtils.Theme.ITEM1, - Language.get("Cargo.IOPORT.Name"),Language.getList("Cargo.IOPORT.Lore")); - public static final SlimefunItemStack STORAGE=AddUtils.themed("STORAGE",Material.LIGHT_GRAY_STAINED_GLASS,AddUtils.Theme.CARGO1, - Language.get("Cargo.STORAGE.Name"),Language.getList("Cargo.STORAGE.Lore")); - public static final SlimefunItemStack STORAGE_INPUT=AddUtils.themed("STORAGE_INPUT",Material.BLUE_STAINED_GLASS,AddUtils.Theme.CARGO1, - Language.get("Cargo.STORAGE_INPUT.Name"),Language.getList("Cargo.STORAGE_INPUT.Lore")); - public static final SlimefunItemStack STORAGE_OUTPUT=AddUtils.themed("STORAGE_OUTPUT",Material.RED_STAINED_GLASS,AddUtils.Theme.CARGO1, - Language.get("Cargo.STORAGE_OUTPUT.Name"),Language.getList("Cargo.STORAGE_OUTPUT.Lore")); - public static final SlimefunItemStack BIFILTER=AddUtils.themed("BIFILTER",Material.PRISMARINE,AddUtils.Theme.ITEM1, - Language.get("Cargo.BIFILTER.Name"),Language.getList("Cargo.BIFILTER.Lore")); - public static final SlimefunItemStack QUARFILTER=AddUtils.themed("QUARFILTER",Material.PRISMARINE_BRICKS,AddUtils.Theme.ITEM1, - Language.get("Cargo.QUARFILTER.Name"),Language.getList("Cargo.QUARFILTER.Lore")); - public static final SlimefunItemStack OCTAFILTER=AddUtils.themed("OCTAFILTER",Material.DARK_PRISMARINE,AddUtils.Theme.ITEM1, - Language.get("Cargo.OCTAFILTER.Name"),Language.getList("Cargo.OCTAFILTER.Lore")); - //multiblock - public static final SlimefunItemStack PORTAL_CORE=AddUtils.themed("PORTAL_CORE",Material.CRYING_OBSIDIAN,AddUtils.Theme.MULTIBLOCK1, - Language.get("MultiBlock.PORTAL_CORE.Name"),Language.getList("MultiBlock.PORTAL_CORE.Lore")); - public static final SlimefunItemStack PORTAL_FRAME=AddUtils.themed("PORTAL_FRAME",Material.IRON_BLOCK,AddUtils.Theme.MULTIBLOCK2, - Language.get("MultiBlock.PORTAL_FRAME.Name"),Language.getList("MultiBlock.PORTAL_FRAME.Lore")); - public static final SlimefunItemStack SOLAR_REACTOR=AddUtils.themed("SOLAR_REACTOR",Material.LODESTONE,AddUtils.Theme.MULTIBLOCK1, - Language.get("MultiBlock.SOLAR_REACTOR.Name"),Language.getList("MultiBlock.SOLAR_REACTOR.Lore")); - public static final SlimefunItemStack SOLAR_REACTOR_FRAME=AddUtils.themed("SOLAR_REACTOR_FRAME",Material.CHISELED_QUARTZ_BLOCK,AddUtils.Theme.MULTIBLOCK2, - Language.get("MultiBlock.SOLAR_REACTOR_FRAME.Name"),Language.getList("MultiBlock.SOLAR_REACTOR_FRAME.Lore")); - public static final SlimefunItemStack SOLAR_REACTOR_GLASS=AddUtils.themed("SOLAR_REACTOR_GLASS",Material.TINTED_GLASS,AddUtils.Theme.MULTIBLOCK2, - Language.get("MultiBlock.SOLAR_REACTOR_GLASS.Name"),Language.getList("MultiBlock.SOLAR_REACTOR_GLASS.Lore")); - public static final SlimefunItemStack SOLAR_INPUT=AddUtils.themed("SOLAR_INPUT",Material.WAXED_OXIDIZED_COPPER,AddUtils.Theme.MULTIBLOCK2, - Language.get("MultiBlock.SOLAR_INPUT.Name"),Language.getList("MultiBlock.SOLAR_INPUT.Lore")); - public static final SlimefunItemStack SOLAR_OUTPUT=AddUtils.themed("SOLAR_OUTPUT",Material.WAXED_COPPER_BLOCK,AddUtils.Theme.MULTIBLOCK2, - Language.get("MultiBlock.SOLAR_OUTPUT.Name"),Language.getList("MultiBlock.SOLAR_OUTPUT.Lore")); - public static final SlimefunItemStack TRANSMUTATOR_FRAME=AddUtils.themed("TRANSMUTATOR_FRAME",Material.SMOOTH_STONE, AddUtils.Theme.MULTIBLOCK2, - Language.get("MultiBlock.TRANSMUTATOR_FRAME.Name"),Language.getList("MultiBlock.TRANSMUTATOR_FRAME.Lore")); - public static final SlimefunItemStack TRANSMUTATOR_GLASS=AddUtils.themed("TRANSMUTATOR_GLASS",Material.LIGHT_GRAY_STAINED_GLASS,AddUtils.Theme.MULTIBLOCK2, - Language.get("MultiBlock.TRANSMUTATOR_GLASS.Name"),Language.getList("MultiBlock.TRANSMUTATOR_GLASS.Lore")); - public static final SlimefunItemStack TRANSMUTATOR_ROD=AddUtils.themed("TRANSMUTATOR_ROD",Material.REINFORCED_DEEPSLATE,AddUtils.Theme.MULTIBLOCK2, - Language.get("MultiBlock.TRANSMUTATOR_ROD.Name"),Language.getList("MultiBlock.TRANSMUTATOR_ROD.Lore")); - public static final SlimefunItemStack TRANSMUTATOR=AddUtils.themed("TRANSMUTATOR",Material.FURNACE,AddUtils.Theme.MULTIBLOCK1, - Language.get("MultiBlock.TRANSMUTATOR.Name"),Language.getList("MultiBlock.TRANSMUTATOR.Lore")); - public static final SlimefunItemStack FINAL_BASE=AddUtils.themed("FINAL_BASE",Material.POLISHED_DEEPSLATE,AddUtils.Theme.MULTIBLOCK1, - Language.get("MultiBlock.FINAL_BASE.Name"),Language.getList("MultiBlock.FINAL_BASE.Lore")); - public static final SlimefunItemStack FINAL_ALTAR=AddUtils.themed("FINAL_ALTAR",Material.CHISELED_DEEPSLATE,AddUtils.Theme.MULTIBLOCK2, - Language.get("MultiBlock.FINAL_ALTAR.Name"),Language.getList("MultiBlock.FINAL_ALTAR.Lore")); - - //feat - public static final SlimefunItemStack CUSTOM1= - AddUtils.themed("CUSTOM1",new ItemStack(Material.COMMAND_BLOCK),AddUtils.Theme.ITEM1,"测试物件1","只是一个简单的测试"); - public static final SlimefunItemStack MACHINE1= - AddUtils.themed("MACHINE1",new ItemStack(Material.FURNACE),AddUtils.Theme.MACHINE1,"测试机器1","tnnd对照组"); - public static final SlimefunItemStack MACHINE2= - AddUtils.themed("MACHINE2",new ItemStack(Material.FURNACE),AddUtils.Theme.MACHINE1,"测试机2","tnnd实验组"); - public static final SlimefunItemStack MACHINE3= - AddUtils.themed("MACHINE3",new ItemStack(Material.FURNACE),AddUtils.Theme.MACHINE1,"测试机3","tnnd测试组 AbstractProcessor"); - public static final SlimefunItemStack MACHINE4= - AddUtils.themed("MACHINE4",new ItemStack(Material.FURNACE),AddUtils.Theme.MACHINE1,"测试机4","tnnd测试组 AbstractAdvancedProcessor"); - public static final SlimefunItemStack SMG1= - AddUtils.themed("SMG1",new ItemStack(Material.DIAMOND_BLOCK),AddUtils.Theme.MACHINE2,"测试生成器1","测测我的"); - public static final SlimefunItemStack MMG1= - AddUtils.themed("MMG1",new ItemStack(Material.EMERALD_BLOCK),AddUtils.Theme.MACHINE2,"定向生成器1","测测我的"); - public static final SlimefunItemStack MANUAL1= - AddUtils.themed("MANUAL1",new ItemStack(Material.CRAFTING_TABLE),AddUtils.Theme.MANUAL1,"测试快捷机器","强化工作台"); - public static final SlimefunItemStack MANUAL_MULTI= - AddUtils.themed("MANUAL_MULTI",new ItemStack(Material.CRAFTING_TABLE),AddUtils.Theme.MANUAL1,"测试快捷机器","多方块机器"); - public static final SlimefunItemStack MANUAL_KILL= - AddUtils.themed("MANUAL_KILL",new ItemStack(Material.RESPAWN_ANCHOR),AddUtils.Theme.MANUAL1,"测试快捷机器","击杀掉落"); - public static final SlimefunItemStack MANUAL_INF= - AddUtils.themed("MANUAL_INF",new ItemStack(Material.RESPAWN_ANCHOR),AddUtils.Theme.MANUAL1,"测试快捷机器","无尽工作台"); - public static final SlimefunItemStack MANUAL_MOB= - AddUtils.themed("MANUAL_MOB",new ItemStack(Material.LODESTONE),AddUtils.Theme.MANUAL1,"测试快捷机器","无尽芯片注入"); - public static final SlimefunItemStack MANUAL_NTWBENCH= - AddUtils.themed("MANUAL_NTWBENCH",new ItemStack(Material.DRIED_KELP_BLOCK),AddUtils.Theme.MANUAL1,"测试快捷机器","网络工作台"); - public static final SlimefunItemStack AUTOSMELTING1= - AddUtils.themed("AUTOCRAFT_SMELT",new ItemStack(Material.FURNACE),AddUtils.Theme.MANUAL1,"测试AutoCraft","冶炼炉"); - public static final SlimefunItemStack AUTO_INF= - AddUtils.themed("AUTOCRAFT_INF",new ItemStack(Material.RESPAWN_ANCHOR),AddUtils.Theme.MANUAL1,"测试定向合成机","无尽工作台"); - -// public static final SlimefunItemStack INPORT= -// AddUtils.themed("INPORT",new ItemStack(Material.END_STONE),AddUtils.Theme.CARGO1,"存入接口","较快的将物品存入奇点..."); -// public static final SlimefunItemStack OUTPORT= -// AddUtils.themed("OUTPORT",new ItemStack(Material.END_STONE),AddUtils.Theme.CARGO1,"取出接口","较快的将物品取出奇点..."); - public static final SlimefunItemStack TESTUNIT1= - AddUtils.themed("TESTUNIT1",new ItemStack(Material.GLASS),AddUtils.Theme.CARGO1,"测试存储单元","啥用都没"); - public static final SlimefunItemStack TESTUNIT2= - AddUtils.themed("TESTUNIT2",new ItemStack(Material.GLASS),AddUtils.Theme.CARGO1,"测试存储单元2","啥用都没"); - public static final SlimefunItemStack TESTUNIT3= - AddUtils.themed("TESTUNIT3",new ItemStack(Material.GLASS),AddUtils.Theme.CARGO1,"测试存储单元3","啥用都没"); - public static final SlimefunItemStack AUTO_SPECIAL= - AddUtils.themed("AUTOCRAFT_SPECIAL",new ItemStack(Material.LOOM),AddUtils.Theme.MACHINE2,"测试特殊合成机","测试测试"); - public static final SlimefunItemStack AUTO_MULTIBLOCK= - AddUtils.themed("AUTOCRAFT_MULTIBLOCK",new ItemStack(Material.BRICKS),AddUtils.Theme.MANUAL1,"测试快捷多方块","测试测试"); - public static final SlimefunItemStack ANTIGRAVITY= - AddUtils.themed("ANTI_GRAVITY_ITEM",new ItemStack(Material.NETHERITE_INGOT),AddUtils.Theme.ITEM1,"反重力装置","测试测试"); - public static final SlimefunItemStack WORKBENCH1= - AddUtils.themed("WORKBENCH1",new ItemStack(Material.ENCHANTING_TABLE),AddUtils.Theme.BENCH1,"测试工作站","测试测试"); - //final - public static final SlimefunItemStack FINAL_SEQUENTIAL=AddUtils.themed("FINAL_SEQUENTIAL",Material.STRIPPED_BAMBOO_BLOCK,AddUtils.Theme.MACHINE1, - Language.get("Machines.FINAL_SEQUENTIAL.Name"),Language.getList("Machines.FINAL_SEQUENTIAL.Lore")); - - public static final SlimefunItemStack FINAL_STACKMACHINE=AddUtils.themed("FINAL_STACKMACHINE",Material.BLAST_FURNACE,AddUtils.Theme.MACHINE1, - Language.get("Machines.FINAL_STACKMACHINE.Name"),Language.getList("Machines.FINAL_STACKMACHINE.Lore")); - public static final SlimefunItemStack FINAL_STACKMGENERATOR=AddUtils.themed("FINAL_STACKMGENERATOR",Material.POLISHED_ANDESITE,AddUtils.Theme.MACHINE2, - Language.get("Generators.FINAL_STACKMGENERATOR.Name"),Language.getList("Generators.FINAL_STACKMGENERATOR.Lore")); - public static final SlimefunItemStack FINAL_STONE_MG=AddUtils.themed("FINAL_STONE_MG",Material.DEEPSLATE_TILES,AddUtils.Theme.MACHINE2, - Language.get("Generators.FINAL_STONE_MG.Name"),Language.getList("Generators.FINAL_STONE_MG.Lore")); - - public static final SlimefunItemStack TESTPART=AddUtils.themed("TEST_MPART",Material.OBSIDIAN,AddUtils.Theme.MACHINE1,"测试多方块部件","测试测试"); - public static final SlimefunItemStack TESTCORE=AddUtils.themed("TEST_MCORE",Material.IRON_BLOCK,AddUtils.Theme.MACHINE1,"测试多方块核心","测试测试"); - public static final SlimefunItemStack TEST_SEQ=AddUtils.themed("TEST_SEQ",Material.LOOM,AddUtils.Theme.MACHINE1, - Language.get("Items.TEST_SEQ.Name"),Language.getList("Items.TEST_SEQ.Lore")); - - //tmp占位符 - public static final SlimefunItemStack TMP1= new SlimefunItemStack("TMP1",Material.STONE,"&b占位符","&7暂未开发"); - public static final SlimefunItemStack RESOLVE_FAILED=AddUtils.themed("RESOLVE_FAILED",Material.STRUCTURE_VOID,AddUtils.Theme.NONE, - Language.get("Items.RESOLVE_FAILED.Name"),Language.getList("Items.RESOLVE_FAILED.Lore")); - public static final SlimefunItemStack SHELL=AddUtils.themed("SHELL",Material.BOOK,AddUtils.Theme.ITEM1, - Language.get("Items.SHELL.Name"),Language.getList("Items.SHELL.Lore")); - public static final HashSet ADDGLOW=new HashSet<>(){{ - add(RESOLVE_FAILED); - add(BUG); - add(INFO); - add(BEYOND); - add(TRUE_); - add(CHIP_INGOT); - add(PARADOX); - add(NOLOGIC); - add(DIMENSIONAL_SHARD); - add(WORLD_FEAT); - add(NETHER_FEAT); - add(END_FEAT); - add(REINFORCED_CHIP_INGOT); - add(ABSTRACT_INGOT); - add(STAR_GOLD_INGOT); - add(METAL_CORE); - add(TECH_CORE); - add(SMELERY_CORE); - add(MASS_CORE); - add(PORTAL_FRAME); - add(LSINGULARITY); - add(ATOM_INGOT); - add(PAGOLD); - add(BISILVER); - add(STACKFRAME); - add(MULTIBLOCK_MANUAL); - add(ADVANCED_CHIP_MAKER); - add(ADV_ADJACENT_CARGO); - add(ADV_REMOTE_CARGO); - add(ADV_LINE_CARGO); - add(ENERGY_AMPLIFIER); - add(MORE2); - add(INF_MOBSIMULATION); - add(ENTITY_FEAT); - add(WITHERPROOF_REDSTONE); - add(WITHERPROOF_REDS); - add(BEDROCK_BREAKER); - }}; -} +package me.matl114.logitech.SlimefunItem; + +import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; +import io.github.thebusybiscuit.slimefun4.implementation.SlimefunItems; +import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack; +import me.matl114.logitech.Items.CustomHead; +import me.matl114.logitech.Language; +import me.matl114.logitech.Utils.AddUtils; +import org.bukkit.Material; +import org.bukkit.inventory.ItemStack; + +import java.util.HashSet; + +public class AddItem { + + public static void registerItemStack(){ + for (ItemStack it :ADDGLOW){ + AddUtils.addGlow(it); + } + AddUtils.hideAllFlags(CARGO_CONFIG); + AddUtils.hideAllFlags(ENTITY_FEAT); + } + + //Groups + public static final ItemStack ROOT=new CustomItemStack(Material.BUDDING_AMETHYST, + Language.get("Groups.ROOT.Name"),Language.getList("Groups.ROOT.Lore")); + public static final ItemStack INFO=AddUtils.themed(Material.PAPER,AddUtils.Theme.INFO1, + Language.get("Groups.INFO.Name"), Language.getList("Groups.INFO.Lore")); + public static final ItemStack MATERIAL=AddUtils.themed(Material.END_CRYSTAL,AddUtils.Theme.CATEGORY2, + Language.get("Groups.MATERIAL.Name"), Language.getList("Groups.MATERIAL.Lore")); + public static final ItemStack INFO1=AddUtils.themed(Material.PAPER,AddUtils.Theme.NONE, + Language.get("Groups.INFO1.Name"), Language.getList("Groups.INFO1.Lore")); + public static final ItemStack INFO2=AddUtils.themed(Material.PAPER,AddUtils.Theme.NONE, + Language.get("Groups.INFO2.Name"), Language.getList("Groups.INFO2.Lore")); + public static final ItemStack INFO3=AddUtils.themed(Material.PAPER,AddUtils.Theme.NONE, + Language.get("Groups.INFO3.Name"), Language.getList("Groups.INFO3.Lore")); + public static final ItemStack INFO4=AddUtils.themed(Material.PAPER,AddUtils.Theme.NONE, + Language.get("Groups.INFO4.Name"), Language.getList("Groups.INFO4.Lore")); + public static final ItemStack INFO5=AddUtils.themed(Material.PAPER,AddUtils.Theme.NONE, + Language.get("Groups.INFO5.Name"), Language.getList("Groups.INFO5.Lore")); + public static final ItemStack INFO6=AddUtils.themed(Material.PAPER,AddUtils.Theme.NONE, + Language.get("Groups.INFO6.Name"), Language.getList("Groups.INFO6.Lore")); + public static final ItemStack URL=AddUtils.themed(Material.BOOK,AddUtils.Theme.NONE, + Language.get("Groups.URL.Name"), Language.getList("Groups.URL.Lore")); + public static final ItemStack ALLMACHINE=AddUtils.themed(Material.BLAST_FURNACE,AddUtils.Theme.MENU1, + Language.get("Groups.ALLMACHINE.Name"), Language.getList("Groups.ALLMACHINE.Lore")); + public static final ItemStack ALLRECIPE=AddUtils.themed(Material.KNOWLEDGE_BOOK,AddUtils.Theme.MENU1, + Language.get("Groups.ALLRECIPE.Name"), Language.getList("Groups.ALLRECIPE.Lore")); + public static final ItemStack BASIC=AddUtils.themed(Material.FURNACE,AddUtils.Theme.CATEGORY2, + Language.get("Groups.BASIC.Name"),Language.getList("Groups.BASIC.Lore") ); + public static final ItemStack ALLBIGRECIPES =AddUtils.themed(Material.LODESTONE, AddUtils.Theme.CATEGORY2, + Language.get("Groups.ALLBIGRECIPES.Name"),Language.getList("Groups.ALLBIGRECIPES.Lore")); + public static final ItemStack CARGO=AddUtils.themed(Material.BAMBOO_CHEST_RAFT,AddUtils.Theme.CATEGORY2, + Language.get("Groups.CARGO.Name"),Language.getList("Groups.CARGO.Lore")); + public static final ItemStack SINGULARITY=AddUtils.themed(Material.NETHER_STAR,AddUtils.Theme.CATEGORY2, + Language.get("Groups.SINGULARITY.Name"),Language.getList("Groups.SINGULARITY.Lore")); + public static final ItemStack ADVANCED=AddUtils.themed(Material.BEACON,AddUtils.Theme.CATEGORY2, + Language.get("Groups.ADVANCED.Name"),Language.getList("Groups.ADVANCED.Lore")); + public static final ItemStack BEYOND=AddUtils.themed(Material.REPEATING_COMMAND_BLOCK,AddUtils.Theme.CATEGORY2, + Language.get("Groups.BEYOND.Name"),Language.getList("Groups.BEYOND.Lore")); + public static final ItemStack VANILLA=AddUtils.themed(Material.OBSERVER,AddUtils.Theme.CATEGORY2, + Language.get("Groups.VANILLA.Name"),Language.getList("Groups.VANILLA.Lore")); + public static final ItemStack MANUAL=AddUtils.themed(Material.CRAFTING_TABLE,AddUtils.Theme.CATEGORY2, + Language.get("Groups.MANUAL.Name"),Language.getList("Groups.MANUAL.Lore") ); + public static final ItemStack SPECIAL=AddUtils.themed(Material.SCULK_CATALYST,AddUtils.Theme.CATEGORY2, + Language.get("Groups.SPECIAL.Name"),Language.getList("Groups.SPECIAL.Lore")); + //public static final ItemStack TEMPLATE=AddUtils.themed() + public static final ItemStack TOBECONTINUE=AddUtils.themed(Material.STRUCTURE_VOID,AddUtils.Theme.CATEGORY2, + Language.get("Groups.TOBECONTINUE.Name"),Language.getList("Groups.TOBECONTINUE.Lore")); + public static final ItemStack SPACE =AddUtils.themed(Material.TOTEM_OF_UNDYING, AddUtils.Theme.CATEGORY2, + Language.get("Groups.SPACE.Name"),Language.getList("Groups.SPACE.Lore")); + public static final ItemStack GENERATORS=AddUtils.themed(Material.LAVA_BUCKET, AddUtils.Theme.CATEGORY2, + Language.get("Groups.GENERATORS.Name"),Language.getList("Groups.GENERATORS.Lore")); + public static final ItemStack ENERGY=AddUtils.themed(Material.LIGHTNING_ROD, AddUtils.Theme.CATEGORY2, + Language.get("Groups.ENERGY.Name"),Language.getList("Groups.ENERGY.Lore")); + public static final ItemStack FUNCTIONAL=AddUtils.themed(Material.STRUCTURE_VOID, AddUtils.Theme.CATEGORY2, + Language.get("Groups.FUNCTIONAL.Name"),Language.getList("Groups.FUNCTIONAL.Lore")); + public static final ItemStack UPDATELOG=AddUtils.themed(Material.WRITABLE_BOOK,AddUtils.Theme.NONE, + Language.get("Groups.UPDATELOG.Name"), Language.getList("Groups.UPDATELOG.Lore")); + public static final ItemStack MORE2=AddUtils.themed("MORE2",Material.WRITABLE_BOOK, AddUtils.Theme.NONE, + Language.get("Groups.MORE2.Name"),Language.getList("Groups.MORE2.Lore")); + //feat + public static final ItemStack FEAT1=AddUtils.themed(Material.BOOK, AddUtils.Theme.NONE, + Language.get("Groups.FEAT1.Name"),Language.getList("Groups.FEAT1.Lore")); + public static final ItemStack FEAT2=AddUtils.themed(Material.BOOK, AddUtils.Theme.NONE, + Language.get("Groups.FEAT2.Name"),Language.getList("Groups.FEAT2.Lore")); + public static final ItemStack FEAT3=AddUtils.themed(Material.BOOK, AddUtils.Theme.NONE, + Language.get("Groups.FEAT3.Name"),Language.getList("Groups.FEAT3.Lore")); + public static final ItemStack FEAT4=AddUtils.themed(Material.BOOK, AddUtils.Theme.NONE, + Language.get("Groups.FEAT4.Name"),Language.getList("Groups.FEAT4.Lore")); + public static final ItemStack FEAT5=AddUtils.themed(Material.BOOK, AddUtils.Theme.NONE, + Language.get("Groups.FEAT5.Name"),Language.getList("Groups.FEAT5.Lore")); + public static final ItemStack FEAT6=AddUtils.themed(Material.BOOK, AddUtils.Theme.NONE, + Language.get("Groups.FEAT6.Name"),Language.getList("Groups.FEAT6.Lore")); + public static final ItemStack FEAT7=AddUtils.themed(Material.BOOK, AddUtils.Theme.NONE, + Language.get("Groups.FEAT7.Name"),Language.getList("Groups.FEAT7.Lore")); + public static final ItemStack FEAT8=AddUtils.themed(Material.BOOK, AddUtils.Theme.NONE, + Language.get("Groups.FEAT8.Name"),Language.getList("Groups.FEAT8.Lore")); + public static final ItemStack FEAT9=AddUtils.themed(Material.BOOK, AddUtils.Theme.NONE, + Language.get("Groups.FEAT9.Name"),Language.getList("Groups.FEAT9.Lore")); + + + //items + public static final SlimefunItemStack ENTITY_FEAT=AddUtils.themed("ENTITY_FEAT",Material.SPAWNER,AddUtils.Theme.ITEM1, + Language.get("Items.ENTITY_FEAT.Name"),Language.getList("Items.ENTITY_FEAT.Lore")); + public static final SlimefunItemStack BUG= AddUtils.themed("BUG", Material.BONE_MEAL, AddUtils.Theme.ITEM1, + Language.get("Items.BUG.Name"),Language.getList("Items.BUG.Lore")); + public static final SlimefunItemStack MATL114 = AddUtils.themed("MATL114", CustomHead.MATL114.getItem(), AddUtils.Theme.ITEM1, + Language.get("Items.MATL114.Name"),Language.getList("Items.MATL114.Lore")); + public static final SlimefunItemStack CHIP_INGOT=AddUtils.themed("CHIP_INGOT",Material.BAKED_POTATO,AddUtils.Theme.ITEM1, + Language.get("Items.CHIP_INGOT.Name"),Language.getList("Items.CHIP_INGOT.Lore")); + public static final SlimefunItemStack TITANIUM_INGOT=AddUtils.themed("TITANIUM_INGOT",Material.IRON_INGOT,AddUtils.Theme.ITEM1, + Language.get("Items.TITANIUM_INGOT.Name"),Language.getList("Items.TITANIUM_INGOT.Lore")); + public static final SlimefunItemStack TUNGSTEN_INGOT=AddUtils.themed("TUNGSTEN_INGOT",Material.NETHERITE_INGOT,AddUtils.Theme.ITEM1, + Language.get("Items.TUNGSTEN_INGOT.Name"),Language.getList("Items.TUNGSTEN_INGOT.Lore")); + public static final SlimefunItemStack LOGIC= AddUtils.themed("LOGIC",Material.STRING,AddUtils.Theme.ITEM1, + Language.get("Items.LOGIC.Name"),Language.getList("Items.LOGIC.Lore")); + public static final SlimefunItemStack TRUE_ =AddUtils.themed("TRUE_",Material.MUSIC_DISC_5,AddUtils.Theme.ITEM1, + Language.get("Items.TRUE_.Name"),Language.getList("Items.TRUE_.Lore")); + public static final SlimefunItemStack FALSE_ =AddUtils.themed("FALSE_",Material.MUSIC_DISC_5,AddUtils.Theme.ITEM1, + Language.get("Items.FALSE_.Name"),Language.getList("Items.FALSE_.Lore")); + public static final SlimefunItemStack LOGIGATE=AddUtils.themed("LOGIGATE",Material.COMPARATOR,AddUtils.Theme.ITEM1, + Language.get("Items.LOGIGATE.Name"),Language.getList("Items.LOGIGATE.Lore")); + //generated items + public static final SlimefunItemStack EXISTE=AddUtils.themed("EXISTE",Material.SLIME_BALL,AddUtils.Theme.ITEM1, + Language.get("Items.EXISTE.Name"),Language.getList("Items.EXISTE.Lore")); + public static final SlimefunItemStack UNIQUE=AddUtils.themed("UNIQUE",Material.MAGMA_CREAM,AddUtils.Theme.ITEM1, + Language.get("Items.UNIQUE.Name"),Language.getList("Items.UNIQUE.Lore")); + public static final SlimefunItemStack PARADOX=AddUtils.themed("PARADOX",Material.NAUTILUS_SHELL,AddUtils.Theme.ITEM1, + Language.get("Items.PARADOX.Name"),Language.getList("Items.PARADOX.Lore")); + public static final SlimefunItemStack NOLOGIC=AddUtils.themed("NOLOGIC",Material.STRING,AddUtils.Theme.ITEM1, + Language.get("Items.NOLOGIC.Name"),Language.getList("Items.NOLOGIC.Lore")); + public static final SlimefunItemStack LENGINE=AddUtils.themed("LENGINE",Material.MAGENTA_GLAZED_TERRACOTTA,AddUtils.Theme.ITEM1, + Language.get("Items.LENGINE.Name"),Language.getList("Items.LENGINE.Lore")); + public static final SlimefunItemStack LFIELD=AddUtils.themed("LFIELD",Material.END_CRYSTAL,AddUtils.Theme.ITEM1, + Language.get("Items.LFIELD.Name"),Language.getList("Items.LFIELD.Lore")); + public static final SlimefunItemStack LSCHEDULER=AddUtils.themed("LSCHEDULER",Material.RECOVERY_COMPASS,AddUtils.Theme.ITEM1, + Language.get("Items.LSCHEDULER.Name"),Language.getList("Items.LSCHEDULER.Lore")); + public static final SlimefunItemStack LCRAFT=AddUtils.themed("LCRAFT",Material.CONDUIT,AddUtils.Theme.ITEM1, + Language.get("Items.LCRAFT.Name"),Language.getList("Items.LCRAFT.Lore")); + public static final SlimefunItemStack LDIGITIZER=AddUtils.themed("LDIGITIZER",Material.TARGET,AddUtils.Theme.ITEM1, + Language.get("Items.LDIGITIZER.Name"),Language.getList("Items.LDIGITIZER.Lore")); + public static final SlimefunItemStack LBOOLIZER=AddUtils.themed("LBOOLIZER",Material.LEVER,AddUtils.Theme.ITEM1, + Language.get("Items.LBOOLIZER.Name"),Language.getList("Items.LBOOLIZER.Lore")); + public static final SlimefunItemStack LIOPORT=AddUtils.themed("LIOPORT",Material.CALIBRATED_SCULK_SENSOR,AddUtils.Theme.ITEM1, + Language.get("Items.LIOPORT.Name"),Language.getList("Items.LIOPORT.Lore")); + public static final SlimefunItemStack PALLADIUM_INGOT=AddUtils.themed("PALLADIUM_INGOT",Material.COPPER_INGOT,AddUtils.Theme.ITEM1, + Language.get("Items.PALLADIUM_INGOT.Name"),Language.getList("Items.PALLADIUM_INGOT.Lore")); + public static final SlimefunItemStack PLATINUM_INGOT=AddUtils.themed("PLATINUM_INGOT",Material.GOLD_INGOT,AddUtils.Theme.ITEM1, + Language.get("Items.PLATINUM_INGOT.Name"),Language.getList("Items.PLATINUM_INGOT.Lore")); + public static final SlimefunItemStack MOLYBDENUM=AddUtils.themed("MOLYBDENUM",Material.GUNPOWDER,AddUtils.Theme.ITEM1, + Language.get("Items.MOLYBDENUM.Name"),Language.getList("Items.MOLYBDENUM.Lore")); + public static final SlimefunItemStack CERIUM=AddUtils.themed("CERIUM",Material.GUNPOWDER,AddUtils.Theme.ITEM1, + Language.get("Items.CERIUM.Name"),Language.getList("Items.CERIUM.Lore")); + public static final SlimefunItemStack CADMIUM_INGOT=AddUtils.themed("CADMIUM_INGOT",Material.NETHERITE_INGOT,AddUtils.Theme.ITEM1, + Language.get("Items.CADMIUM_INGOT.Name"),Language.getList("Items.CADMIUM_INGOT.Lore")); + public static final SlimefunItemStack MENDELEVIUM=AddUtils.themed("MENDELEVIUM",Material.GLOWSTONE_DUST,AddUtils.Theme.ITEM1, + Language.get("Items.MENDELEVIUM.Name"),Language.getList("Items.MENDELEVIUM.Lore")); + public static final SlimefunItemStack DYSPROSIUM=AddUtils.themed("DYSPROSIUM",Material.REDSTONE,AddUtils.Theme.ITEM1, + Language.get("Items.DYSPROSIUM.Name"),Language.getList("Items.DYSPROSIUM.Lore")); + public static final SlimefunItemStack BISMUTH_INGOT=AddUtils.themed("BISMUTH_INGOT",Material.IRON_INGOT,AddUtils.Theme.ITEM1, + Language.get("Items.BISMUTH_INGOT.Name"),Language.getList("Items.BISMUTH_INGOT.Lore")); + public static final SlimefunItemStack ANTIMONY_INGOT=AddUtils.themed("ANTIMONY_INGOT",Material.IRON_INGOT,AddUtils.Theme.ITEM1, + Language.get("Items.ANTIMONY_INGOT.Name"),Language.getList("Items.ANTIMONY_INGOT.Lore")); + public static final SlimefunItemStack BORON=AddUtils.themed("BORON",Material.CLAY_BALL,AddUtils.Theme.ITEM1, + Language.get("Items.BORON.Name"),Language.getList("Items.BORON.Lore")); + public static final SlimefunItemStack THALLIUM=AddUtils.themed("THALLIUM",Material.BRICK,AddUtils.Theme.ITEM1, + Language.get("Items.THALLIUM.Name"),Language.getList("Items.THALLIUM.Lore")); + public static final SlimefunItemStack HYDRAGYRUM=AddUtils.themed("HYDRAGYRUM",Material.PRISMARINE_CRYSTALS,AddUtils.Theme.ITEM1, + Language.get("Items.HYDRAGYRUM.Name"),Language.getList("Items.HYDRAGYRUM.Lore")); + public static final SlimefunItemStack HGTLPBBI=AddUtils.themed("HGTLPBBI",CustomHead.SUPPORTER2.getItem(), AddUtils.Theme.ITEM1, + Language.get("Items.HGTLPBBI.Name"),Language.getList("Items.HGTLPBBI.Lore")); + public static final SlimefunItemStack DIMENSIONAL_SHARD=AddUtils.themed("DIMENSIONAL_SHARD",Material.PRISMARINE_SHARD,AddUtils.Theme.ITEM1, + Language.get("Items.DIMENSIONAL_SHARD.Name"),Language.getList("Items.DIMENSIONAL_SHARD.Lore")); + public static final SlimefunItemStack STAR_GOLD=AddUtils.themed("STAR_GOLD",Material.NETHER_STAR,AddUtils.Theme.ITEM1, + Language.get("Items.STAR_GOLD.Name"),Language.getList("Items.STAR_GOLD.Lore")); + public static final SlimefunItemStack VIRTUAL_SPACE=AddUtils.themed("VIRTUAL_SPACE",CustomHead.VSPACE.getItem(), AddUtils.Theme.ITEM1, + Language.get("Items.VIRTUAL_SPACE.Name"),Language.getList("Items.VIRTUAL_SPACE.Lore")); + public static final SlimefunItemStack WORLD_FEAT=AddUtils.themed("WORLD_FEAT",Material.GRASS_BLOCK,AddUtils.Theme.ITEM1, + Language.get("Items.WORLD_FEAT.Name"),Language.getList("Items.WORLD_FEAT.Lore")); + public static final SlimefunItemStack NETHER_FEAT=AddUtils.themed("NETHER_FEAT",Material.NETHERITE_SCRAP,AddUtils.Theme.ITEM1, + Language.get("Items.NETHER_FEAT.Name"),Language.getList("Items.NETHER_FEAT.Lore")); + public static final SlimefunItemStack END_FEAT=AddUtils.themed("END_FEAT",Material.CHORUS_PLANT,AddUtils.Theme.ITEM1, + Language.get("Items.END_FEAT.Name"),Language.getList("Items.END_FEAT.Lore")); + public static final SlimefunItemStack STACKFRAME=AddUtils.themed("STACKFRAME",Material.BEDROCK,AddUtils.Theme.ITEM1, + Language.get("Items.STACKFRAME.Name"),Language.getList("Items.STACKFRAME.Lore")); + + public static final SlimefunItemStack STAR_GOLD_INGOT=AddUtils.themed("STAR_GOLD_INGOT",Material.GOLD_INGOT,AddUtils.Theme.ITEM1, + Language.get("Items.STAR_GOLD_INGOT.Name"),Language.getList("Items.STAR_GOLD_INGOT.Lore")); + public static final SlimefunItemStack ABSTRACT_INGOT=AddUtils.themed("ABSTRACT_INGOT",Material.IRON_INGOT,AddUtils.Theme.ITEM1, + Language.get("Items.ABSTRACT_INGOT.Name"),Language.getList("Items.ABSTRACT_INGOT.Lore")); + public static final SlimefunItemStack PDCECDMD=AddUtils.themed("PDCECDMD",CustomHead.BUSHIGEMEN.getItem(), AddUtils.Theme.ITEM1, + Language.get("Items.PDCECDMD.Name"),Language.getList("Items.PDCECDMD.Lore")); + public static final SlimefunItemStack REINFORCED_CHIP_INGOT=AddUtils.themed("REINFORCED_CHIP_INGOT",Material.POISONOUS_POTATO,AddUtils.Theme.ITEM1, + Language.get("Items.REINFORCED_CHIP_INGOT.Name"),Language.getList("Items.REINFORCED_CHIP_INGOT.Lore")); + public static final SlimefunItemStack ATOM_INGOT=AddUtils.themed("ATOM_INGOT",Material.ECHO_SHARD,AddUtils.Theme.ITEM1, + Language.get("Items.ATOM_INGOT.Name"),Language.getList("Items.ATOM_INGOT.Lore")); + + public static final SlimefunItemStack LMOTOR=AddUtils.themed("LMOTOR",CustomHead.MOTOR.getItem(),AddUtils.Theme.ITEM1, + Language.get("Items.LMOTOR.Name"),Language.getList("Items.LMOTOR.Lore")); + public static final SlimefunItemStack LPLATE=AddUtils.themed("LPLATE",Material.PAPER,AddUtils.Theme.ITEM1, + Language.get("Items.LPLATE.Name"),Language.getList("Items.LPLATE.Lore")); + public static final SlimefunItemStack METAL_CORE=AddUtils.themed("METAL_CORE",Material.NETHERITE_BLOCK,AddUtils.Theme.ITEM1, + Language.get("Items.METAL_CORE.Name"),Language.getList("Items.METAL_CORE.Lore")); + public static final SlimefunItemStack SMELERY_CORE=AddUtils.themed("SMELERY_CORE",Material.IRON_BLOCK,AddUtils.Theme.ITEM1, + Language.get("Items.SMELERY_CORE.Name"),Language.getList("Items.SMELERY_CORE.Lore")); + public static final SlimefunItemStack MASS_CORE=AddUtils.themed("MASS_CORE",Material.COAL_BLOCK,AddUtils.Theme.ITEM1, + Language.get("Items.MASS_CORE.Name"),Language.getList("Items.MASS_CORE.Lore")); + public static final SlimefunItemStack TECH_CORE=AddUtils.themed("TECH_CORE",Material.BEACON,AddUtils.Theme.ITEM1, + Language.get("Items.TECH_CORE.Name"),Language.getList("Items.TECH_CORE.Lore")); + public static final SlimefunItemStack SPACE_PLATE=AddUtils.themed("SPACE_PLATE",Material.PAPER,AddUtils.Theme.ITEM1, + Language.get("Items.SPACE_PLATE.Name"),Language.getList("Items.SPACE_PLATE.Lore")); + public static final SlimefunItemStack LOGIC_CORE=AddUtils.themed("LOGIC_CORE",Material.NETHER_STAR,AddUtils.Theme.ITEM1, + Language.get("Items.LOGIC_CORE.Name"),Language.getList("Items.LOGIC_CORE.Lore")); + public static final SlimefunItemStack FINAL_FRAME=AddUtils.themed("FINAL_FRAME",Material.BUDDING_AMETHYST,AddUtils.Theme.MULTIBLOCK1, + Language.get("Items.FINAL_FRAME.Name"),Language.getList("Items.FINAL_FRAME.Lore")); + public static final SlimefunItemStack REDSTONE_ENGINE=AddUtils.themed("REDSTONE_ENGINE",Material.SLIME_BLOCK,AddUtils.Theme.ITEM1, + Language.get("Items.REDSTONE_ENGINE.Name"),Language.getList("Items.REDSTONE_ENGINE.Lore")); + public static final SlimefunItemStack HYPER_LINK=AddUtils.themed("HYPER_LINK",Material.NETHER_STAR,AddUtils.Theme.ITEM1, + Language.get("Items.HYPER_LINK.Name"),Language.getList("Items.HYPER_LINK.Lore")); + + public static final SlimefunItemStack SAMPLE_HEAD=AddUtils.themed("SAMPLE_HEAD",Material.PLAYER_HEAD,AddUtils.Theme.ITEM1, + Language.get("Items.SAMPLE_HEAD.Name"),Language.getList("Items.SAMPLE_HEAD.Lore")); + public static final SlimefunItemStack CHIP=AddUtils.themed("CHIP",Material.NAME_TAG,AddUtils.Theme.ITEM1, + Language.get("Items.CHIP.Name"),Language.getList("Items.CHIP.Lore")); + public static final SlimefunItemStack CHIP_CORE=AddUtils.themed("CHIP_CORE",CustomHead.CORE.getItem(), AddUtils.Theme.ITEM1, + Language.get("Items.CHIP_CORE.Name"),Language.getList("Items.CHIP_CORE.Lore")); + public static final SlimefunItemStack LSINGULARITY=AddUtils.themed("LSINGULARITY",Material.FIREWORK_STAR,AddUtils.Theme.ITEM1, + Language.get("Items.LSINGULARITY.Name"),Language.getList("Items.LSINGULARITY.Lore")); + public static final SlimefunItemStack RADIATION_CLEAR=AddUtils.themed("RADIATION_CLEAR",Material.GLASS_BOTTLE,AddUtils.Theme.ITEM1, + Language.get("Items.RADIATION_CLEAR.Name"),Language.getList("Items.RADIATION_CLEAR.Lore")); + public static final SlimefunItemStack ANTIMASS_CLEAR=AddUtils.themed("ANTIMASS_CLEAR",Material.GLASS_BOTTLE,AddUtils.Theme.ITEM1, + Language.get("Items.ANTIMASS_CLEAR.Name"),Language.getList("Items.ANTIMASS_CLEAR.Lore")); + public static final SlimefunItemStack BISILVER=AddUtils.themed("BISILVER",Material.IRON_INGOT,AddUtils.Theme.ITEM1, + Language.get("Items.BISILVER.Name"),Language.getList("Items.BISILVER.Lore")); + public static final SlimefunItemStack PAGOLD=AddUtils.themed("PAGOLD",Material.GOLD_INGOT,AddUtils.Theme.ITEM1, + Language.get("Items.PAGOLD.Name"),Language.getList("Items.PAGOLD.Lore")); + public static final SlimefunItemStack LASER=AddUtils.themed("LASER",CustomHead.LASER.getItem(), AddUtils.Theme.ITEM1, + Language.get("Items.LASER.Name"),Language.getList("Items.LASER.Lore")); + public static final SlimefunItemStack ANTIMASS=AddUtils.themed("ANTIMASS",Material.SCULK,AddUtils.Theme.ITEM1, + Language.get("Items.ANTIMASS.Name"),Language.getList("Items.ANTIMASS.Lore")); + public static final SlimefunItemStack VIRTUALWORLD=AddUtils.themed("VIRTUALWORLD",CustomHead.END_BLOCK.getItem(), AddUtils.Theme.ITEM1, + Language.get("Items.VIRTUALWORLD.Name"),Language.getList("Items.VIRTUALWORLD.Lore")); + public static final SlimefunItemStack SAMPLE_SPAWNER=AddUtils.themed("SAMPLE_SPAWNER",Material.SPAWNER,AddUtils.Theme.ITEM1, + Language.get("Items.SAMPLE_SPAWNER.Name"),Language.getList("Items.SAMPLE_SPAWNER.Lore")); + public static final SlimefunItemStack HOLOGRAM_REMOVER=AddUtils.themed("HOLOGRAM_REMOVER",Material.LIGHT,AddUtils.Theme.ITEM1, + Language.get("Items.HOLOGRAM_REMOVER.Name"),Language.getList("Items.HOLOGRAM_REMOVER.Lore")); + public static final SlimefunItemStack WITHERPROOF_REDSTONE=AddUtils.themed("WITHERPROOF_REDSTONE",Material.REDSTONE_BLOCK,AddUtils.Theme.ITEM1, + Language.get("Items.WITHERPROOF_REDSTONE.Name"),Language.getList("Items.WITHERPROOF_REDSTONE.Lore")); + public static final SlimefunItemStack WITHERPROOF_REDS=AddUtils.themed("WITHERPROOF_REDS",Material.REDSTONE,AddUtils.Theme.ITEM1, + Language.get("Items.WITHERPROOF_REDS.Name"),Language.getList("Items.WITHERPROOF_REDS.Lore")); + public static final SlimefunItemStack BEDROCK_BREAKER=AddUtils.themed("BEDROCK_BREAKER",Material.PISTON,AddUtils.Theme.ITEM1, + Language.get("Items.BEDROCK_BREAKER.Name"),Language.getList("Items.BEDROCK_BREAKER.Lore")); + public static final SlimefunItemStack LASER_GUN=AddUtils.themed("LASER_GUN",CustomHead.LASER_GUN.getItem(), AddUtils.Theme.ITEM1, + Language.get("Items.LASER_GUN.Name"),Language.getList("Items.LASER_GUN.Lore")); + public static final SlimefunItemStack SUPERSPONGE=AddUtils.themed("SUPERSPONGE",Material.SPONGE,AddUtils.Theme.ITEM1, + Language.get("Items.SUPERSPONGE.Name"),Language.getList("Items.SUPERSPONGE.Lore")); + public static final SlimefunItemStack SUPERSPONGE_USED=AddUtils.themed("SUPERSPONGE_USED",Material.WET_SPONGE,AddUtils.Theme.ITEM1, + Language.get("Items.SUPERSPONGE_USED.Name"),Language.getList("Items.SUPERSPONGE_USED.Lore")); + public static final SlimefunItemStack TRACE_ARROW=AddUtils.themed("TRACE_ARROW",Material.CHERRY_SAPLING,AddUtils.Theme.ITEM1, + Language.get("Items.TRACE_ARROW.Name"),Language.getList("Items.TRACE_ARROW.Lore")); + //nachines + public static final SlimefunItemStack HEAD_ANALYZER=AddUtils.themed("HEAD_ANALYZER",Material.SOUL_CAMPFIRE, AddUtils.Theme.MACHINE1, + Language.get("Machines.HEAD_ANALYZER.Name"),Language.getList("Machines.HEAD_ANALYZER.Lore")); + public static final SlimefunItemStack RECIPE_LOGGER=AddUtils.themed("RECIPE_LOGGER",Material.FLETCHING_TABLE, AddUtils.Theme.MACHINE1, + Language.get("Machines.RECIPE_LOGGER.Name"),Language.getList("Machines.RECIPE_LOGGER.Lore")); + public static final SlimefunItemStack BOOL_GENERATOR=AddUtils.themed("BOOL_GENERATOR",Material.REDSTONE_TORCH,AddUtils.Theme.MACHINE1, + Language.get("Machines.BOOL_GENERATOR.Name"),Language.getList("Machines.BOOL_GENERATOR.Lore")); + public static final SlimefunItemStack LOGIC_REACTOR=AddUtils.themed("LOGIC_REACTOR",CustomHead.LOGIC_REACTOR.getItem(),AddUtils.Theme.MACHINE1, + Language.get("Machines.LOGIC_REACTOR.Name"),Language.getList("Machines.LOGIC_REACTOR.Lore")); + public static final SlimefunItemStack BUG_CRAFTER=AddUtils.themed("BUG_CRAFTER",CustomHead.BUG_CRATFER.getItem(),AddUtils.Theme.MACHINE1, + Language.get("Machines.BUG_CRAFTER.Name"),Language.getList("Machines.BUG_CRAFTER.Lore")); + public static final SlimefunItemStack ENDFRAME_MACHINE=AddUtils.themed("ENDFRAME_MACHINE",Material.END_PORTAL_FRAME,AddUtils.Theme.MACHINE1, + Language.get("Machines.ENDFRAME_MACHINE.Name"),Language.getList("Machines.ENDFRAME_MACHINE.Lore")); + public static final SlimefunItemStack LVOID_GENERATOR=AddUtils.themed("LVOID_GENERATOR",Material.SOUL_LANTERN,AddUtils.Theme.MACHINE1, + Language.get("Machines.LVOID_GENERATOR.Name"),Language.getList("Machines.LVOID_GENERATOR.Lore")); + public static final SlimefunItemStack SPECIAL_CRAFTER=AddUtils.themed("SPECIAL_CRAFTER",Material.LOOM,AddUtils.Theme.MACHINE1, + Language.get("Machines.SPECIAL_CRAFTER.Name"),Language.getList("Machines.SPECIAL_CRAFTER.Lore")); + public static final SlimefunItemStack STAR_SMELTERY=AddUtils.themed("STAR_SMELTERY",Material.BLAST_FURNACE,AddUtils.Theme.MACHINE1, + Language.get("Machines.STAR_SMELTERY.Name"),Language.getList("Machines.STAR_SMELTERY.Lore")); + + public static final SlimefunItemStack INFINITY_AUTOCRAFT=AddUtils.themed("INFINITY_AUTOCRAFT",Material.CRYING_OBSIDIAN,AddUtils.Theme.MACHINE1, + Language.get("Machines.INFINITY_AUTOCRAFT.Name"),Language.getList("Machines.INFINITY_AUTOCRAFT.Lore")); + public static final SlimefunItemStack CHIP_MAKER=AddUtils.themed("CHIP_MAKER",Material.CHISELED_BOOKSHELF,AddUtils.Theme.MACHINE1, + Language.get("Machines.CHIP_MAKER.Name"),Language.getList("Machines.CHIP_MAKER.Lore")); + public static final SlimefunItemStack CHIP_CONSUMER=AddUtils.themed("CHIP_CONSUMER",Material.TORCH,AddUtils.Theme.MACHINE1, + Language.get("Machines.CHIP_CONSUMER.Name"),Language.getList("Machines.CHIP_CONSUMER.Lore")); + public static final SlimefunItemStack CHIP_BICONSUMER=AddUtils.themed("CHIP_BICONSUMER",Material.LANTERN,AddUtils.Theme.MACHINE1, + Language.get("Machines.CHIP_BICONSUMER.Name"),Language.getList("Machines.CHIP_BICONSUMER.Lore")); + public static final SlimefunItemStack SEQ_CONSTRUCTOR=AddUtils.themed("SEQ_CONSTRUCTOR",Material.BAMBOO_MOSAIC,AddUtils.Theme.MACHINE1, + Language.get("Machines.SEQ_CONSTRUCTOR.Name"),Language.getList("Machines.SEQ_CONSTRUCTOR.Lore")); + public static final SlimefunItemStack STACKMACHINE=AddUtils.themed("STACKMACHINE",Material.FURNACE,AddUtils.Theme.MACHINE1, + Language.get("Machines.STACKMACHINE.Name"),Language.getList("Machines.STACKMACHINE.Lore")); + public static final SlimefunItemStack ENERGY_TRASH=AddUtils.themed("ENERGY_TRASH", SlimefunItems.PORTABLE_DUSTBIN.getItem().getItem().clone() + ,AddUtils.Theme.MACHINE1, Language.get("Machines.ENERGY_TRASH.Name"),Language.getList("Machines.ENERGY_TRASH.Lore")); + public static final SlimefunItemStack OPPO_GEN=AddUtils.themed("OPPO_GEN",CustomHead.HOT_MACHINE.getItem(), AddUtils.Theme.MACHINE1, + Language.get("Machines.OPPO_GEN.Name"),Language.getList("Machines.OPPO_GEN.Lore")); + public static final SlimefunItemStack ARC_REACTOR=AddUtils.themed("ARC_REACTOR",CustomHead.REACTOR.getItem(),AddUtils.Theme.MACHINE1, + Language.get("Machines.ARC_REACTOR.Name"),Language.getList("Machines.ARC_REACTOR.Lore")); + public static final SlimefunItemStack ENERGY_AMPLIFIER=AddUtils.themed("ENERGY_AMPLIFIER",Material.NETHERITE_BLOCK,AddUtils.Theme.MACHINE1, + Language.get("Machines.ENERGY_AMPLIFIER.Name"),Language.getList("Machines.ENERGY_AMPLIFIER.Lore")); + public static final SlimefunItemStack ADVANCED_CHIP_MAKER=AddUtils.themed("ADVANCED_CHIP_MAKER",Material.CHISELED_BOOKSHELF,AddUtils.Theme.MACHINE1, + Language.get("Machines.ADVANCED_CHIP_MAKER.Name"),Language.getList("Machines.ADVANCED_CHIP_MAKER.Lore")); + public static final SlimefunItemStack CHIP_REACTOR=AddUtils.themed("CHIP_REACTOR",Material.JUKEBOX,AddUtils.Theme.MACHINE1, + Language.get("Machines.CHIP_REACTOR.Name"),Language.getList("Machines.CHIP_REACTOR.Lore")); + public static final SlimefunItemStack DUST_EXTRACTOR=AddUtils.themed("DUST_EXTRACTOR",Material.CHISELED_STONE_BRICKS,AddUtils.Theme.MACHINE1, + Language.get("Machines.DUST_EXTRACTOR.Name"),Language.getList("Machines.DUST_EXTRACTOR.Lore")); + public static final SlimefunItemStack FURNACE_FACTORY=AddUtils.themed("FURNACE_FACTORY",Material.FURNACE,AddUtils.Theme.MACHINE1, + Language.get("Machines.FURNACE_FACTORY.Name"),Language.getList("Machines.FURNACE_FACTORY.Lore")); + public static final SlimefunItemStack INGOT_FACTORY=AddUtils.themed("INGOT_FACTORY",Material.RED_GLAZED_TERRACOTTA,AddUtils.Theme.MACHINE1, + Language.get("Machines.INGOT_FACTORY.Name"),Language.getList("Machines.INGOT_FACTORY.Lore")); + public static final SlimefunItemStack FINAL_LASER=AddUtils.themed("FINAL_LASER",Material.DROPPER,AddUtils.Theme.MACHINE1, + Language.get("Machines.FINAL_LASER.Name"),Language.getList("Machines.FINAL_LASER.Lore")); + public static final SlimefunItemStack FINAL_CONVERTOR=AddUtils.themed("FINAL_CONVERTOR",Material.WARPED_HYPHAE,AddUtils.Theme.MACHINE1, + Language.get("Machines.FINAL_CONVERTOR.Name"),Language.getList("Machines.FINAL_CONVERTOR.Lore")); + public static final SlimefunItemStack PRESSOR_FACTORY=AddUtils.themed("PRESSOR_FACTORY",Material.PISTON,AddUtils.Theme.MACHINE1, + Language.get("Machines.PRESSOR_FACTORY.Name"),Language.getList("Machines.PRESSOR_FACTORY.Lore")); + public static final SlimefunItemStack CRAFTER=AddUtils.themed("CRAFTER",Material.CRAFTING_TABLE,AddUtils.Theme.MACHINE1, + Language.get("Machines.CRAFTER.Name"),Language.getList("Machines.CRAFTER.Lore")); + public static final SlimefunItemStack EASYSTACKMACHINE=AddUtils.themed("EASYSTACKMACHINE",Material.FURNACE,AddUtils.Theme.MACHINE1, + Language.get("Machines.EASYSTACKMACHINE.Name"),Language.getList("Machines.EASYSTACKMACHINE.Lore")); + public static final SlimefunItemStack CONVERTOR=AddUtils.themed("CONVERTOR",Material.SEA_LANTERN,AddUtils.Theme.MACHINE1, + Language.get("Machines.CONVERTOR.Name"),Language.getList("Machines.CONVERTOR.Lore")); + public static final SlimefunItemStack VIRTUAL_KILLER=AddUtils.themed("VIRTUAL_KILLER",Material.STONECUTTER,AddUtils.Theme.MACHINE1, + Language.get("Machines.VIRTUAL_KILLER.Name"),Language.getList("Machines.VIRTUAL_KILLER.Lore")); + public static final SlimefunItemStack INF_MOBSIMULATION=AddUtils.themed("INF_MOBSIMULATION",Material.GILDED_BLACKSTONE,AddUtils.Theme.MACHINE1, + Language.get("Machines.INF_MOBSIMULATION.Name"),Language.getList("Machines.INF_MOBSIMULATION.Lore")); + public static final SlimefunItemStack INF_GEOQUARRY=AddUtils.themed("INF_GEOQUARRY",Material.CHISELED_QUARTZ_BLOCK,AddUtils.Theme.MACHINE1, + Language.get("Machines.INF_GEOQUARRY.Name"),Language.getList("Machines.INF_GEOQUARRY.Lore")); + public static final SlimefunItemStack RAND_EDITOR=AddUtils.themed("RAND_EDITOR",Material.ENCHANTING_TABLE,AddUtils.Theme.MACHINE1, + Language.get("Machines.RAND_EDITOR.Name"),Language.getList("Machines.RAND_EDITOR.Lore")); + public static final SlimefunItemStack ATTR_OP=AddUtils.themed("ATTR_OP",Material.ANVIL,AddUtils.Theme.MACHINE1, + Language.get("Machines.ATTR_OP.Name"),Language.getList("Machines.ATTR_OP.Lore")); + public static final SlimefunItemStack GRIND_FACTORY=AddUtils.themed("GRIND_FACTORY",Material.GRINDSTONE,AddUtils.Theme.MACHINE1, + Language.get("Machines.GRIND_FACTORY.Name"),Language.getList("Machines.GRIND_FACTORY.Lore")); + public static final SlimefunItemStack TNT_GEN=AddUtils.themed("TNT_GEN",Material.NOTE_BLOCK,AddUtils.Theme.MACHINE1, + Language.get("Machines.TNT_GEN.Name"),Language.getList("Machines.TNT_GEN.Lore")); + public static final SlimefunItemStack ADVANCE_BREWER=AddUtils.themed("ADVANCE_BREWER",Material.SMOKER,AddUtils.Theme.MACHINE1, + Language.get("Machines.ADVANCE_BREWER.Name"),Language.getList("Machines.ADVANCE_BREWER.Lore")); + public static final SlimefunItemStack SIMU_LVOID=AddUtils.themed("SIMU_LVOID",Material.SOUL_TORCH,AddUtils.Theme.MACHINE1, + Language.get("Machines.SIMU_LVOID.Name"),Language.getList("Machines.SIMU_LVOID.Lore")); + //manuals + public static final SlimefunItemStack MANUAL_CORE=AddUtils.themed("MANUAL_CORE",Material.AMETHYST_SHARD,AddUtils.Theme.ITEM1, + Language.get("Manuals.MANUAL_CORE.Name"),Language.getList("Manuals.MANUAL_CORE.Lore")); + public static final SlimefunItemStack CRAFT_MANUAL=AddUtils.themed("CRAFT_MANUAL",Material.CRAFTING_TABLE,AddUtils.Theme.MANUAL1, + Language.get("Manuals.CRAFT_MANUAL.Name"),Language.getList("Manuals.CRAFT_MANUAL.Lore")); + public static final SlimefunItemStack FURNACE_MANUAL=AddUtils.themed("FURNACE_MANUAL",Material.FURNACE,AddUtils.Theme.MANUAL1, + Language.get("Manuals.FURNACE_MANUAL.Name"),Language.getList("Manuals.FURNACE_MANUAL.Lore")); + public static final SlimefunItemStack ENHANCED_CRAFT_MANUAL=AddUtils.themed("ENHANCED_CRAFT_MANUAL",Material.CRAFTING_TABLE,AddUtils.Theme.MANUAL1, + Language.get("Manuals.ENHANCED_CRAFT_MANUAL.Name"),Language.getList("Manuals.ENHANCED_CRAFT_MANUAL.Lore")); + public static final SlimefunItemStack GRIND_MANUAL=AddUtils.themed("GRIND_MANUAL",Material.DISPENSER,AddUtils.Theme.MANUAL1, + Language.get("Manuals.GRIND_MANUAL.Name"),Language.getList("Manuals.GRIND_MANUAL.Lore")); + public static final SlimefunItemStack ARMOR_FORGE_MANUAL=AddUtils.themed("ARMOR_FORGE_MANUAL",Material.ANVIL,AddUtils.Theme.MANUAL1, + Language.get("Manuals.ARMOR_FORGE_MANUAL.Name"),Language.getList("Manuals.ARMOR_FORGE_MANUAL.Lore")); + public static final SlimefunItemStack ORE_CRUSHER_MANUAL=AddUtils.themed("ORE_CRUSHER_MANUAL",Material.DROPPER,AddUtils.Theme.MANUAL1, + Language.get("Manuals.ORE_CRUSHER_MANUAL.Name"),Language.getList("Manuals.ORE_CRUSHER_MANUAL.Lore")); + public static final SlimefunItemStack COMPRESSOR_MANUAL=AddUtils.themed("COMPRESSOR_MANUAL",Material.PISTON,AddUtils.Theme.MANUAL1, + Language.get("Manuals.COMPRESSOR_MANUAL.Name"),Language.getList("Manuals.COMPRESSOR_MANUAL.Lore")); + public static final SlimefunItemStack PRESSURE_MANUAL=AddUtils.themed("PRESSURE_MANUAL",Material.GLASS,AddUtils.Theme.MANUAL1, + Language.get("Manuals.PRESSURE_MANUAL.Name"),Language.getList("Manuals.PRESSURE_MANUAL.Lore")); + public static final SlimefunItemStack MAGIC_WORKBENCH_MANUAL=AddUtils.themed("MAGIC_WORKBENCH_MANUAL",Material.BOOKSHELF,AddUtils.Theme.MANUAL1, + Language.get("Manuals.MAGIC_WORKBENCH_MANUAL.Name"),Language.getList("Manuals.MAGIC_WORKBENCH_MANUAL.Lore")); + public static final SlimefunItemStack ORE_WASHER_MANUAL=AddUtils.themed("ORE_WASHER_MANUAL",Material.BLUE_STAINED_GLASS,AddUtils.Theme.MANUAL1, + Language.get("Manuals.ORE_WASHER_MANUAL.Name"),Language.getList("Manuals.ORE_WASHER_MANUAL.Lore")); + public static final SlimefunItemStack GOLD_PAN_MANUAL=AddUtils.themed("GOLD_PAN_MANUAL",Material.BROWN_TERRACOTTA,AddUtils.Theme.MANUAL1, + Language.get("Manuals.GOLD_PAN_MANUAL.Name"),Language.getList("Manuals.GOLD_PAN_MANUAL.Lore")); + public static final SlimefunItemStack ANCIENT_ALTAR_MANUAL=AddUtils.themed("ANCIENT_ALTAR_MANUAL",Material.ENCHANTING_TABLE,AddUtils.Theme.MANUAL1, + Language.get("Manuals.ANCIENT_ALTAR_MANUAL.Name"),Language.getList("Manuals.ANCIENT_ALTAR_MANUAL.Lore")); + public static final SlimefunItemStack SMELTERY_MANUAL=AddUtils.themed("SMELTERY_MANUAL",Material.BLAST_FURNACE,AddUtils.Theme.MANUAL1, + Language.get("Manuals.SMELTERY_MANUAL.Name"),Language.getList("Manuals.SMELTERY_MANUAL.Lore")); + public static final SlimefunItemStack CRUCIBLE_MANUAL=AddUtils.themed("CRUCIBLE_MANUAL",Material.RED_TERRACOTTA,AddUtils.Theme.MANUAL1, + Language.get("Manuals.CRUCIBLE_MANUAL.Name"),Language.getList("Manuals.CRUCIBLE_MANUAL.Lore")); + public static final SlimefunItemStack PULVERIZER_MANUAL=AddUtils.themed("PULVERIZER_MANUAL",Material.GRINDSTONE,AddUtils.Theme.MANUAL1, + Language.get("Manuals.PULVERIZER_MANUAL.Name"),Language.getList("Manuals.PULVERIZER_MANUAL.Lore")); + public static final SlimefunItemStack MULTICRAFTTABLE_MANUAL=AddUtils.themed("MULTICRAFTTABLE_MANUAL",Material.CRAFTING_TABLE,AddUtils.Theme.MANUAL1, + Language.get("Manuals.MULTICRAFTTABLE_MANUAL.Name"),Language.getList("Manuals.MULTICRAFTTABLE_MANUAL.Lore")); + public static final SlimefunItemStack TABLESAW_MANUAL=AddUtils.themed("TABLESAW_MANUAL",Material.STONECUTTER,AddUtils.Theme.MANUAL1, + Language.get("Manuals.TABLESAW_MANUAL.Name"),Language.getList("Manuals.TABLESAW_MANUAL.Lore")); + public static final SlimefunItemStack COMPOSTER=AddUtils.themed("COMPOSTER",Material.CAULDRON,AddUtils.Theme.MANUAL1, + Language.get("Manuals.COMPOSTER.Name"),Language.getList("Manuals.COMPOSTER.Lore")); + public static final SlimefunItemStack MULTIMACHINE_MANUAL=AddUtils.themed("MULTIMACHINE_MANUAL",Material.GRAY_STAINED_GLASS,AddUtils.Theme.MANUAL1, + Language.get("Manuals.MULTIMACHINE_MANUAL.Name"),Language.getList("Manuals.MULTIMACHINE_MANUAL.Lore")); + public static final SlimefunItemStack MOBDATA_MANUAL=AddUtils.themed("MOBDATA_MANUAL",Material.LODESTONE,AddUtils.Theme.MANUAL1, + Language.get("Manuals.MOBDATA_MANUAL.Name"),Language.getList("Manuals.MOBDATA_MANUAL.Lore")); + public static final SlimefunItemStack INFINITY_MANUAL=AddUtils.themed("INFINITY_MANUAL",Material.RESPAWN_ANCHOR,AddUtils.Theme.MANUAL1, + Language.get("Manuals.INFINITY_MANUAL.Name"),Language.getList("Manuals.INFINITY_MANUAL.Lore")); + public static final SlimefunItemStack NTWWORKBENCH_MANUAL=AddUtils.themed("NTWWORKBENCH_MANUAL",Material.BAMBOO_BLOCK,AddUtils.Theme.MANUAL1, + Language.get("Manuals.NTWWORKBENCH_MANUAL.Name"),Language.getList("Manuals.NTWWORKBENCH_MANUAL.Lore")); + public static final SlimefunItemStack MULTIBLOCK_MANUAL=AddUtils.themed("MULTIBLOCK_MANUAL",Material.BRICKS,AddUtils.Theme.MANUAL1, + Language.get("Manuals.MULTIBLOCK_MANUAL.Name"),Language.getList("Manuals.MULTIBLOCK_MANUAL.Lore")); + public static final SlimefunItemStack FINAL_MANUAL=AddUtils.themed("FINAL_MANUAL",Material.REINFORCED_DEEPSLATE,AddUtils.Theme.MANUAL1, + Language.get("Manuals.FINAL_MANUAL.Name"),Language.getList("Manuals.FINAL_MANUAL.Lore")); + public static final SlimefunItemStack REPLACE_CARD=AddUtils.themed("REPLACE_CARD",Material.PRIZE_POTTERY_SHERD,AddUtils.Theme.ITEM1, + Language.get("Manuals.REPLACE_CARD.Name"),Language.getList("Manuals.REPLACE_CARD.Lore")); + public static final SlimefunItemStack CARD_MAKER=AddUtils.themed("CARD_MAKER",Material.FLETCHING_TABLE,AddUtils.Theme.MACHINE1, + Language.get("Manuals.CARD_MAKER.Name"),Language.getList("Manuals.CARD_MAKER.Lore")); + //generators + public static final SlimefunItemStack MAGIC_STONE=AddUtils.themed("MAGIC_STONE",Material.COBBLESTONE,AddUtils.Theme.MACHINE2, + Language.get("Generators.MAGIC_STONE.Name"),Language.getList("Generators.MAGIC_STONE.Lore")); + public static final SlimefunItemStack BOOL_MG=AddUtils.themed("BOOL_MG",Material.REDSTONE_TORCH,AddUtils.Theme.MACHINE2, + Language.get("Generators.BOOL_MG.Name"),Language.getList("Generators.BOOL_MG.Lore")); + public static final SlimefunItemStack OVERWORLD_MINER=AddUtils.themed("OVERWORLD_MINER",Material.SMOOTH_STONE,AddUtils.Theme.MACHINE2, + Language.get("Generators.OVERWORLD_MINER.Name"),Language.getList("Generators.OVERWORLD_MINER.Lore")); + public static final SlimefunItemStack NETHER_MINER=AddUtils.themed("NETHER_MINER",Material.CRIMSON_NYLIUM,AddUtils.Theme.MACHINE2, + Language.get("Generators.NETHER_MINER.Name"),Language.getList("Generators.NETHER_MINER.Lore")); + public static final SlimefunItemStack END_MINER =AddUtils.themed("END_MINER",Material.END_STONE_BRICKS,AddUtils.Theme.MACHINE2, + Language.get("Generators.END_MINER.Name"),Language.getList("Generators.END_MINER.Lore")); + public static final SlimefunItemStack DIMENSION_MINER=AddUtils.themed("DIMENSION_MINER",Material.CRYING_OBSIDIAN,AddUtils.Theme.MACHINE2, + Language.get("Generators.DIMENSION_MINER.Name"),Language.getList("Generators.DIMENSION_MINER.Lore")); + public static final SlimefunItemStack REDSTONE_MG=AddUtils.themed("REDSTONE_MG",Material.OBSERVER,AddUtils.Theme.MACHINE2, + Language.get("Generators.REDSTONE_MG.Name"),Language.getList("Generators.REDSTONE_MG.Lore")); + public static final SlimefunItemStack DUPE_MG=AddUtils.themed("DUPE_MG",Material.STICKY_PISTON,AddUtils.Theme.MACHINE2, + Language.get("Generators.DUPE_MG.Name"),Language.getList("Generators.DUPE_MG.Lore")); + public static final SlimefunItemStack ENDDUPE_MG=AddUtils.themed("ENDDUPE_MG",Material.END_PORTAL_FRAME,AddUtils.Theme.MACHINE2, + Language.get("Generators.ENDDUPE_MG.Name"),Language.getList("Generators.ENDDUPE_MG.Lore")); + public static final SlimefunItemStack STACKMGENERATOR=AddUtils.themed("STACKMGENERATOR",Material.SMOOTH_STONE,AddUtils.Theme.MACHINE2, + Language.get("Generators.STACKMGENERATOR.Name"),Language.getList("Generators.STACKMGENERATOR.Lore")); + public static final SlimefunItemStack REVERSE_GENERATOR=AddUtils.themed("REVERSE_GENERATOR",CustomHead.REVERSE.getItem(), AddUtils.Theme.MACHINE2, + Language.get("Generators.REVERSE_GENERATOR.Name"),Language.getList("Generators.REVERSE_GENERATOR.Lore")); + public static final SlimefunItemStack VIRTUAL_MINER=AddUtils.themed("VIRTUAL_MINER",Material.CHERRY_WOOD,AddUtils.Theme.MACHINE2, + Language.get("Generators.VIRTUAL_MINER.Name"),Language.getList("Generators.VIRTUAL_MINER.Lore")); + public static final SlimefunItemStack VIRTUAL_PLANT=AddUtils.themed("VIRTUAL_PLANT",Material.STRIPPED_CHERRY_WOOD,AddUtils.Theme.MACHINE2, + Language.get("Generators.VIRTUAL_PLANT.Name"),Language.getList("Generators.VIRTUAL_PLANT.Lore")); + public static final SlimefunItemStack MAGIC_PLANT=AddUtils.themed("MAGIC_PLANT",Material.DIRT,AddUtils.Theme.MACHINE2, + Language.get("Generators.MAGIC_PLANT.Name"),Language.getList("Generators.MAGIC_PLANT.Lore")); + public static final SlimefunItemStack OVERWORLD_PLANT=AddUtils.themed("OVERWORLD_PLANT",Material.PODZOL,AddUtils.Theme.MACHINE2, + Language.get("Generators.OVERWORLD_PLANT.Name"),Language.getList("Generators.OVERWORLD_PLANT.Lore")); + public static final SlimefunItemStack NETHER_PLANT=AddUtils.themed("NETHER_PLANT",Material.WARPED_NYLIUM,AddUtils.Theme.MACHINE2, + Language.get("Generators.NETHER_PLANT.Name"),Language.getList("Generators.NETHER_PLANT.Lore")); + public static final SlimefunItemStack END_PLANT=AddUtils.themed("END_PLANT",Material.END_STONE,AddUtils.Theme.MACHINE2, + Language.get("Generators.END_PLANT.Name"),Language.getList("Generators.END_PLANT.Lore")); + public static final SlimefunItemStack SMELTRY=AddUtils.themed("SMELTRY",Material.FURNACE,AddUtils.Theme.MACHINE1, + Language.get("Machines.SMELTRY.Name"),Language.getList("Machines.SMELTRY.Lore")); + public static final SlimefunItemStack STONE_FACTORY=AddUtils.themed("STONE_FACTORY",Material.STONE_BRICKS,AddUtils.Theme.MACHINE2, + Language.get("Generators.STONE_FACTORY.Name"),Language.getList("Generators.STONE_FACTORY.Lore")); + public static final SlimefunItemStack TNT_MG=AddUtils.themed("TNT_MG",Material.ANCIENT_DEBRIS,AddUtils.Theme.MACHINE2, + Language.get("Generators.TNT_MG.Name"),Language.getList("Generators.TNT_MG.Lore")); + //cargos + public static final SlimefunItemStack CARGO_PART=AddUtils.themed("CARGO_PART",Material.SHAPER_ARMOR_TRIM_SMITHING_TEMPLATE,AddUtils.Theme.ITEM1, + Language.get("Items.CARGO_PART.Name"),Language.getList("Items.CARGO_PART.Lore")); + public static final SlimefunItemStack CARGO_CONFIG=AddUtils.themed("CARGO_CONFIG",Material.TIDE_ARMOR_TRIM_SMITHING_TEMPLATE,AddUtils.Theme.ITEM1, + Language.get("Items.CARGO_CONFIG.Name"),Language.getList("Items.CARGO_CONFIG.Lore")); + public static final SlimefunItemStack CARGO_CONFIGURATOR=AddUtils.themed("CARGO_CONFIGURATOR",Material.JUKEBOX,AddUtils.Theme.CARGO1, + Language.get("Items.CARGO_CONFIGURATOR.Name"),Language.getList("Items.CARGO_CONFIGURATOR.Lore")); + public static final SlimefunItemStack SIMPLE_CARGO=AddUtils.themed("SIMPLE_CARGO",Material.TARGET,AddUtils.Theme.CARGO1, + Language.get("Cargo.SIMPLE_CARGO.Name"),Language.getList("Cargo.SIMPLE_CARGO.Lore")); + public static final SlimefunItemStack REMOTE_CARGO=AddUtils.themed("REMOTE_CARGO",Material.CALIBRATED_SCULK_SENSOR,AddUtils.Theme.CARGO1, + Language.get("Cargo.REMOTE_CARGO.Name"),Language.getList("Cargo.REMOTE_CARGO.Lore")); + public static final SlimefunItemStack LINE_CARGO=AddUtils.themed("LINE_CARGO",Material.OBSERVER,AddUtils.Theme.CARGO1, + Language.get("Cargo.LINE_CARGO.Name"),Language.getList("Cargo.LINE_CARGO.Lore")); + public static final SlimefunItemStack BISORTER=AddUtils.themed("BISORTER",Material.VERDANT_FROGLIGHT,AddUtils.Theme.CARGO1, + Language.get("Cargo.BISORTER.Name"),Language.getList("Cargo.BISORTER.Lore")); + public static final SlimefunItemStack QUARSORTER=AddUtils.themed("QUARSORTER",Material.PEARLESCENT_FROGLIGHT,AddUtils.Theme.CARGO1, + Language.get("Cargo.QUARSORTER.Name"),Language.getList("Cargo.QUARSORTER.Lore")); + public static final SlimefunItemStack OCTASORTER=AddUtils.themed("OCTASORTER",Material.OCHRE_FROGLIGHT,AddUtils.Theme.CARGO1, + Language.get("Cargo.OCTASORTER.Name"),Language.getList("Cargo.OCTASORTER.Lore")); + public static final SlimefunItemStack ADV_TRASH=AddUtils.themed("ADV_TRASH",CustomHead.FIRE_GENERATOR.getItem(), AddUtils.Theme.CARGO1, + Language.get("Cargo.ADV_TRASH.Name"),Language.getList("Cargo.ADV_TRASH.Lore")); + public static final SlimefunItemStack STORAGE_OPERATOR=AddUtils.themed("STORAGE_OPERATOR",Material.CARTOGRAPHY_TABLE,AddUtils.Theme.CARGO1, + Language.get("Cargo.STORAGE_OPERATOR.Name"),Language.getList("Cargo.STORAGE_OPERATOR.Lore")); + public static final SlimefunItemStack ADV_ADJACENT_CARGO=AddUtils.themed("ADV_ADJACENT_CARGO",Material.TARGET,AddUtils.Theme.CARGO1, + Language.get("Cargo.ADV_ADJACENT_CARGO.Name"),Language.getList("Cargo.ADV_ADJACENT_CARGO.Lore")); + public static final SlimefunItemStack ADV_REMOTE_CARGO=AddUtils.themed("ADV_REMOTE_CARGO",Material.CALIBRATED_SCULK_SENSOR,AddUtils.Theme.CARGO1, + Language.get("Cargo.ADV_REMOTE_CARGO.Name"),Language.getList("Cargo.ADV_REMOTE_CARGO.Lore")); + public static final SlimefunItemStack ADV_LINE_CARGO=AddUtils.themed("ADV_LINE_CARGO",Material.OBSERVER,AddUtils.Theme.CARGO1, + Language.get("Cargo.ADV_LINE_CARGO.Name"),Language.getList("Cargo.ADV_LINE_CARGO.Lore")); + public static final SlimefunItemStack REDSTONE_ADJACENT_CARGO=AddUtils.themed("REDSTONE_ADJACENT_CARGO",Material.REDSTONE_LAMP,AddUtils.Theme.CARGO1, + Language.get("Cargo.REDSTONE_ADJACENT_CARGO.Name"),Language.getList("Cargo.REDSTONE_ADJACENT_CARGO.Lore")); + public static final SlimefunItemStack CHIP_ADJ_CARGO=AddUtils.themed("CHIP_ADJ_CARGO",Material.SHROOMLIGHT,AddUtils.Theme.CARGO1, + Language.get("Cargo.CHIP_ADJ_CARGO.Name"),Language.getList("Cargo.CHIP_ADJ_CARGO.Lore")); + public static final SlimefunItemStack RESETTER=AddUtils.themed("RESETTER",Material.FLETCHING_TABLE,AddUtils.Theme.CARGO1, + Language.get("Cargo.RESETTER.Name"),Language.getList("Cargo.RESETTER.Lore")); + public static final SlimefunItemStack STORAGE_SINGULARITY= AddUtils.themed("STORAGE_SINGULARITY",Material.NETHER_STAR,AddUtils.Theme.ITEM1, + Language.get("Cargo.STORAGE_SINGULARITY.Name"),Language.getList("Cargo.STORAGE_SINGULARITY.Lore")); + public static final SlimefunItemStack QUANTUM_LINK=AddUtils.themed("QUANTUM_LINK",Material.NETHER_STAR,AddUtils.Theme.ITEM1, + Language.get("Cargo.QUANTUM_LINK.Name"),Language.getList("Cargo.QUANTUM_LINK.Lore")); + public static final SlimefunItemStack INPORT=AddUtils.themed("INPORT",Material.END_STONE,AddUtils.Theme.MACHINE1, + Language.get("Cargo.INPORT.Name"),Language.getList("Cargo.INPORT.Lore")); + public static final SlimefunItemStack OUTPORT=AddUtils.themed("OUTPORT",Material.END_STONE,AddUtils.Theme.MACHINE1, + Language.get("Cargo.OUTPORT.Name"),Language.getList("Cargo.OUTPORT.Lore")); + public static final SlimefunItemStack IOPORT=AddUtils.themed("IOPORT",Material.PURPUR_PILLAR,AddUtils.Theme.ITEM1, + Language.get("Cargo.IOPORT.Name"),Language.getList("Cargo.IOPORT.Lore")); + public static final SlimefunItemStack STORAGE=AddUtils.themed("STORAGE",Material.LIGHT_GRAY_STAINED_GLASS,AddUtils.Theme.CARGO1, + Language.get("Cargo.STORAGE.Name"),Language.getList("Cargo.STORAGE.Lore")); + public static final SlimefunItemStack STORAGE_INPUT=AddUtils.themed("STORAGE_INPUT",Material.BLUE_STAINED_GLASS,AddUtils.Theme.CARGO1, + Language.get("Cargo.STORAGE_INPUT.Name"),Language.getList("Cargo.STORAGE_INPUT.Lore")); + public static final SlimefunItemStack STORAGE_OUTPUT=AddUtils.themed("STORAGE_OUTPUT",Material.RED_STAINED_GLASS,AddUtils.Theme.CARGO1, + Language.get("Cargo.STORAGE_OUTPUT.Name"),Language.getList("Cargo.STORAGE_OUTPUT.Lore")); + public static final SlimefunItemStack BIFILTER=AddUtils.themed("BIFILTER",Material.PRISMARINE,AddUtils.Theme.ITEM1, + Language.get("Cargo.BIFILTER.Name"),Language.getList("Cargo.BIFILTER.Lore")); + public static final SlimefunItemStack QUARFILTER=AddUtils.themed("QUARFILTER",Material.PRISMARINE_BRICKS,AddUtils.Theme.ITEM1, + Language.get("Cargo.QUARFILTER.Name"),Language.getList("Cargo.QUARFILTER.Lore")); + public static final SlimefunItemStack OCTAFILTER=AddUtils.themed("OCTAFILTER",Material.DARK_PRISMARINE,AddUtils.Theme.ITEM1, + Language.get("Cargo.OCTAFILTER.Name"),Language.getList("Cargo.OCTAFILTER.Lore")); + //multiblock + public static final SlimefunItemStack PORTAL_CORE=AddUtils.themed("PORTAL_CORE",Material.CRYING_OBSIDIAN,AddUtils.Theme.MULTIBLOCK1, + Language.get("MultiBlock.PORTAL_CORE.Name"),Language.getList("MultiBlock.PORTAL_CORE.Lore")); + public static final SlimefunItemStack PORTAL_FRAME=AddUtils.themed("PORTAL_FRAME",Material.IRON_BLOCK,AddUtils.Theme.MULTIBLOCK2, + Language.get("MultiBlock.PORTAL_FRAME.Name"),Language.getList("MultiBlock.PORTAL_FRAME.Lore")); + public static final SlimefunItemStack SOLAR_REACTOR=AddUtils.themed("SOLAR_REACTOR",Material.LODESTONE,AddUtils.Theme.MULTIBLOCK1, + Language.get("MultiBlock.SOLAR_REACTOR.Name"),Language.getList("MultiBlock.SOLAR_REACTOR.Lore")); + public static final SlimefunItemStack SOLAR_REACTOR_FRAME=AddUtils.themed("SOLAR_REACTOR_FRAME",Material.CHISELED_QUARTZ_BLOCK,AddUtils.Theme.MULTIBLOCK2, + Language.get("MultiBlock.SOLAR_REACTOR_FRAME.Name"),Language.getList("MultiBlock.SOLAR_REACTOR_FRAME.Lore")); + public static final SlimefunItemStack SOLAR_REACTOR_GLASS=AddUtils.themed("SOLAR_REACTOR_GLASS",Material.TINTED_GLASS,AddUtils.Theme.MULTIBLOCK2, + Language.get("MultiBlock.SOLAR_REACTOR_GLASS.Name"),Language.getList("MultiBlock.SOLAR_REACTOR_GLASS.Lore")); + public static final SlimefunItemStack SOLAR_INPUT=AddUtils.themed("SOLAR_INPUT",Material.WAXED_OXIDIZED_COPPER,AddUtils.Theme.MULTIBLOCK2, + Language.get("MultiBlock.SOLAR_INPUT.Name"),Language.getList("MultiBlock.SOLAR_INPUT.Lore")); + public static final SlimefunItemStack SOLAR_OUTPUT=AddUtils.themed("SOLAR_OUTPUT",Material.WAXED_COPPER_BLOCK,AddUtils.Theme.MULTIBLOCK2, + Language.get("MultiBlock.SOLAR_OUTPUT.Name"),Language.getList("MultiBlock.SOLAR_OUTPUT.Lore")); + public static final SlimefunItemStack TRANSMUTATOR_FRAME=AddUtils.themed("TRANSMUTATOR_FRAME",Material.SMOOTH_STONE, AddUtils.Theme.MULTIBLOCK2, + Language.get("MultiBlock.TRANSMUTATOR_FRAME.Name"),Language.getList("MultiBlock.TRANSMUTATOR_FRAME.Lore")); + public static final SlimefunItemStack TRANSMUTATOR_GLASS=AddUtils.themed("TRANSMUTATOR_GLASS",Material.LIGHT_GRAY_STAINED_GLASS,AddUtils.Theme.MULTIBLOCK2, + Language.get("MultiBlock.TRANSMUTATOR_GLASS.Name"),Language.getList("MultiBlock.TRANSMUTATOR_GLASS.Lore")); + public static final SlimefunItemStack TRANSMUTATOR_ROD=AddUtils.themed("TRANSMUTATOR_ROD",Material.REINFORCED_DEEPSLATE,AddUtils.Theme.MULTIBLOCK2, + Language.get("MultiBlock.TRANSMUTATOR_ROD.Name"),Language.getList("MultiBlock.TRANSMUTATOR_ROD.Lore")); + public static final SlimefunItemStack TRANSMUTATOR=AddUtils.themed("TRANSMUTATOR",Material.FURNACE,AddUtils.Theme.MULTIBLOCK1, + Language.get("MultiBlock.TRANSMUTATOR.Name"),Language.getList("MultiBlock.TRANSMUTATOR.Lore")); + public static final SlimefunItemStack FINAL_BASE=AddUtils.themed("FINAL_BASE",Material.POLISHED_DEEPSLATE,AddUtils.Theme.MULTIBLOCK1, + Language.get("MultiBlock.FINAL_BASE.Name"),Language.getList("MultiBlock.FINAL_BASE.Lore")); + public static final SlimefunItemStack FINAL_ALTAR=AddUtils.themed("FINAL_ALTAR",Material.CHISELED_DEEPSLATE,AddUtils.Theme.MULTIBLOCK2, + Language.get("MultiBlock.FINAL_ALTAR.Name"),Language.getList("MultiBlock.FINAL_ALTAR.Lore")); + + //feat + public static final SlimefunItemStack CUSTOM1= + AddUtils.themed("CUSTOM1",new ItemStack(Material.COMMAND_BLOCK),AddUtils.Theme.ITEM1,"测试物件1","只是一个简单的测试"); + public static final SlimefunItemStack MACHINE1= + AddUtils.themed("MACHINE1",new ItemStack(Material.FURNACE),AddUtils.Theme.MACHINE1,"测试机器1","tnnd对照组"); + public static final SlimefunItemStack MACHINE2= + AddUtils.themed("MACHINE2",new ItemStack(Material.FURNACE),AddUtils.Theme.MACHINE1,"测试机2","tnnd实验组"); + public static final SlimefunItemStack MACHINE3= + AddUtils.themed("MACHINE3",new ItemStack(Material.FURNACE),AddUtils.Theme.MACHINE1,"测试机3","tnnd测试组 AbstractProcessor"); + public static final SlimefunItemStack MACHINE4= + AddUtils.themed("MACHINE4",new ItemStack(Material.FURNACE),AddUtils.Theme.MACHINE1,"测试机4","tnnd测试组 AbstractAdvancedProcessor"); + public static final SlimefunItemStack SMG1= + AddUtils.themed("SMG1",new ItemStack(Material.DIAMOND_BLOCK),AddUtils.Theme.MACHINE2,"测试生成器1","测测我的"); + public static final SlimefunItemStack MMG1= + AddUtils.themed("MMG1",new ItemStack(Material.EMERALD_BLOCK),AddUtils.Theme.MACHINE2,"定向生成器1","测测我的"); + public static final SlimefunItemStack MANUAL1= + AddUtils.themed("MANUAL1",new ItemStack(Material.CRAFTING_TABLE),AddUtils.Theme.MANUAL1,"测试快捷机器","强化工作台"); + public static final SlimefunItemStack MANUAL_MULTI= + AddUtils.themed("MANUAL_MULTI",new ItemStack(Material.CRAFTING_TABLE),AddUtils.Theme.MANUAL1,"测试快捷机器","多方块机器"); + public static final SlimefunItemStack MANUAL_KILL= + AddUtils.themed("MANUAL_KILL",new ItemStack(Material.RESPAWN_ANCHOR),AddUtils.Theme.MANUAL1,"测试快捷机器","击杀掉落"); + public static final SlimefunItemStack MANUAL_INF= + AddUtils.themed("MANUAL_INF",new ItemStack(Material.RESPAWN_ANCHOR),AddUtils.Theme.MANUAL1,"测试快捷机器","无尽工作台"); + public static final SlimefunItemStack MANUAL_MOB= + AddUtils.themed("MANUAL_MOB",new ItemStack(Material.LODESTONE),AddUtils.Theme.MANUAL1,"测试快捷机器","无尽芯片注入"); + public static final SlimefunItemStack MANUAL_NTWBENCH= + AddUtils.themed("MANUAL_NTWBENCH",new ItemStack(Material.DRIED_KELP_BLOCK),AddUtils.Theme.MANUAL1,"测试快捷机器","网络工作台"); + public static final SlimefunItemStack AUTOSMELTING1= + AddUtils.themed("AUTOCRAFT_SMELT",new ItemStack(Material.FURNACE),AddUtils.Theme.MANUAL1,"测试AutoCraft","冶炼炉"); + public static final SlimefunItemStack AUTO_INF= + AddUtils.themed("AUTOCRAFT_INF",new ItemStack(Material.RESPAWN_ANCHOR),AddUtils.Theme.MANUAL1,"测试定向合成机","无尽工作台"); + +// public static final SlimefunItemStack INPORT= +// AddUtils.themed("INPORT",new ItemStack(Material.END_STONE),AddUtils.Theme.CARGO1,"存入接口","较快的将物品存入奇点..."); +// public static final SlimefunItemStack OUTPORT= +// AddUtils.themed("OUTPORT",new ItemStack(Material.END_STONE),AddUtils.Theme.CARGO1,"取出接口","较快的将物品取出奇点..."); + public static final SlimefunItemStack TESTUNIT1= + AddUtils.themed("TESTUNIT1",new ItemStack(Material.GLASS),AddUtils.Theme.CARGO1,"测试存储单元","啥用都没"); + public static final SlimefunItemStack TESTUNIT2= + AddUtils.themed("TESTUNIT2",new ItemStack(Material.GLASS),AddUtils.Theme.CARGO1,"测试存储单元2","啥用都没"); + public static final SlimefunItemStack TESTUNIT3= + AddUtils.themed("TESTUNIT3",new ItemStack(Material.GLASS),AddUtils.Theme.CARGO1,"测试存储单元3","啥用都没"); + public static final SlimefunItemStack AUTO_SPECIAL= + AddUtils.themed("AUTOCRAFT_SPECIAL",new ItemStack(Material.LOOM),AddUtils.Theme.MACHINE2,"测试特殊合成机","测试测试"); + public static final SlimefunItemStack AUTO_MULTIBLOCK= + AddUtils.themed("AUTOCRAFT_MULTIBLOCK",new ItemStack(Material.BRICKS),AddUtils.Theme.MANUAL1,"测试快捷多方块","测试测试"); + public static final SlimefunItemStack ANTIGRAVITY= + AddUtils.themed("ANTI_GRAVITY_ITEM",new ItemStack(Material.NETHERITE_INGOT),AddUtils.Theme.ITEM1,"反重力装置","测试测试"); + public static final SlimefunItemStack WORKBENCH1= + AddUtils.themed("WORKBENCH1",new ItemStack(Material.ENCHANTING_TABLE),AddUtils.Theme.BENCH1,"测试工作站","测试测试"); + //final + public static final SlimefunItemStack FINAL_SEQUENTIAL=AddUtils.themed("FINAL_SEQUENTIAL",Material.STRIPPED_BAMBOO_BLOCK,AddUtils.Theme.MACHINE1, + Language.get("Machines.FINAL_SEQUENTIAL.Name"),Language.getList("Machines.FINAL_SEQUENTIAL.Lore")); + + public static final SlimefunItemStack FINAL_STACKMACHINE=AddUtils.themed("FINAL_STACKMACHINE",Material.BLAST_FURNACE,AddUtils.Theme.MACHINE1, + Language.get("Machines.FINAL_STACKMACHINE.Name"),Language.getList("Machines.FINAL_STACKMACHINE.Lore")); + public static final SlimefunItemStack FINAL_STACKMGENERATOR=AddUtils.themed("FINAL_STACKMGENERATOR",Material.POLISHED_ANDESITE,AddUtils.Theme.MACHINE2, + Language.get("Generators.FINAL_STACKMGENERATOR.Name"),Language.getList("Generators.FINAL_STACKMGENERATOR.Lore")); + public static final SlimefunItemStack FINAL_STONE_MG=AddUtils.themed("FINAL_STONE_MG",Material.DEEPSLATE_TILES,AddUtils.Theme.MACHINE2, + Language.get("Generators.FINAL_STONE_MG.Name"),Language.getList("Generators.FINAL_STONE_MG.Lore")); + + public static final SlimefunItemStack TESTPART=AddUtils.themed("TEST_MPART",Material.OBSIDIAN,AddUtils.Theme.MACHINE1,"测试多方块部件","测试测试"); + public static final SlimefunItemStack TESTCORE=AddUtils.themed("TEST_MCORE",Material.IRON_BLOCK,AddUtils.Theme.MACHINE1,"测试多方块核心","测试测试"); + public static final SlimefunItemStack TEST_SEQ=AddUtils.themed("TEST_SEQ",Material.LOOM,AddUtils.Theme.MACHINE1, + Language.get("Items.TEST_SEQ.Name"),Language.getList("Items.TEST_SEQ.Lore")); + + //tmp占位符 + public static final SlimefunItemStack TMP1= new SlimefunItemStack("TMP1",Material.STONE,"&b占位符","&7暂未开发"); + public static final SlimefunItemStack RESOLVE_FAILED=AddUtils.themed("RESOLVE_FAILED",Material.STRUCTURE_VOID,AddUtils.Theme.NONE, + Language.get("Items.RESOLVE_FAILED.Name"),Language.getList("Items.RESOLVE_FAILED.Lore")); + public static final SlimefunItemStack SHELL=AddUtils.themed("SHELL",Material.BOOK,AddUtils.Theme.ITEM1, + Language.get("Items.SHELL.Name"),Language.getList("Items.SHELL.Lore")); + public static final HashSet ADDGLOW=new HashSet<>(){{ + add(RESOLVE_FAILED); + add(BUG); + add(INFO); + add(BEYOND); + add(TRUE_); + add(CHIP_INGOT); + add(PARADOX); + add(NOLOGIC); + add(DIMENSIONAL_SHARD); + add(WORLD_FEAT); + add(NETHER_FEAT); + add(END_FEAT); + add(REINFORCED_CHIP_INGOT); + add(ABSTRACT_INGOT); + add(STAR_GOLD_INGOT); + add(METAL_CORE); + add(TECH_CORE); + add(SMELERY_CORE); + add(MASS_CORE); + add(PORTAL_FRAME); + add(LSINGULARITY); + add(ATOM_INGOT); + add(PAGOLD); + add(BISILVER); + add(STACKFRAME); + add(MULTIBLOCK_MANUAL); + add(ADVANCED_CHIP_MAKER); + add(ADV_ADJACENT_CARGO); + add(ADV_REMOTE_CARGO); + add(ADV_LINE_CARGO); + add(ENERGY_AMPLIFIER); + add(MORE2); + add(INF_MOBSIMULATION); + add(ENTITY_FEAT); + add(WITHERPROOF_REDSTONE); + add(WITHERPROOF_REDS); + add(BEDROCK_BREAKER); + add(TRACE_ARROW); + }}; +} diff --git a/src/main/java/me/matl114/logitech/SlimefunItem/AddSlimefunItems.java b/src/main/java/me/matl114/logitech/SlimefunItem/AddSlimefunItems.java index 654b299..4ab3dd8 100644 --- a/src/main/java/me/matl114/logitech/SlimefunItem/AddSlimefunItems.java +++ b/src/main/java/me/matl114/logitech/SlimefunItem/AddSlimefunItems.java @@ -53,13 +53,18 @@ import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; import me.mrCookieSlime.Slimefun.api.inventory.DirtyChestMenu; import me.mrCookieSlime.Slimefun.api.item_transport.ItemTransportFlow; +import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.NamespacedKey; import org.bukkit.block.Biome; import org.bukkit.block.Block; +import org.bukkit.block.BlockState; +import org.bukkit.block.data.BlockData; +import org.bukkit.block.data.Waterlogged; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; +import org.bukkit.event.block.SpongeAbsorbEvent; import org.bukkit.inventory.ItemStack; import java.util.*; @@ -962,6 +967,94 @@ public void onClickAction(PlayerRightClickEvent event) { } } .register(); + public static final SlimefunItem SUPERSPONGE=new CustomProps(AddGroups.VANILLA,AddItem.SUPERSPONGE,RecipeType.ENHANCED_CRAFTING_TABLE, + recipe("SPONGE","PISTON","SPONGE",AddItem.WITHERPROOF_REDS,AddItem.REDSTONE_ENGINE,AddItem.WITHERPROOF_REDS, + "WET_SPONGE","PISTON","WET_SPONGE")){ + protected final int SEARCH_RANGE=10; + protected final Set COOL_DOWN=ConcurrentHashMap.newKeySet(); + public void onClickAction(PlayerRightClickEvent event){ + Player p=event.getPlayer(); + if(p!=null){ + if(COOL_DOWN.contains(p)){ + AddUtils.sendMessage(p,"&c物品冷却中"); + }else{ + + Location loc=p.getLocation(); + if(WorldUtils.hasPermission(p,loc,Interaction.INTERACT_BLOCK,Interaction.PLACE_BLOCK)&&canUse(p,true)){ + ItemStack stack= event.getItem(); + stack.setAmount(stack.getAmount()-1); + AddUtils.forceGive(p,AddItem.SUPERSPONGE_USED,1); + final HashSet liquids=new HashSet<>(); + final HashSet blockInLiquids=new HashSet<>(); + Schedules.launchSchedules(()->{ + COOL_DOWN.add(p); + try{ + int dx=loc.getBlockX(); + int dy=loc.getBlockY(); + int dz=loc.getBlockZ(); + AddUtils.sendMessage(p,"&a开始搜索"); + for(int i=-SEARCH_RANGE;i<=SEARCH_RANGE;i++){ + for(int j=-SEARCH_RANGE;j<=SEARCH_RANGE;j++){ + for(int k=-SEARCH_RANGE;k<=SEARCH_RANGE;k++){ + Block checkBlock=loc.getWorld().getBlockAt(dx+i,dy+j,dz+k); + if(checkBlock!=null){ + if(WorldUtils.isLiquid( checkBlock)){ + liquids.add(checkBlock); + } + else if(WorldUtils.isWaterLogged(checkBlock)){ + blockInLiquids.add(checkBlock); + } + } + + } + } + } + List blocksToBeChanged=new ArrayList<>(liquids.size()+blockInLiquids.size()+2); + for(Block b:liquids){ + blocksToBeChanged.add(b.getState()); + } + for(Block b:blockInLiquids){ + blocksToBeChanged.add(b.getState()); + } + if(!blocksToBeChanged.isEmpty()){ + AddUtils.sendMessage(p,"&a搜索完成,正在吸取液体"); + BukkitUtils.executeSync(()->{ + SpongeAbsorbEvent spongeAbsorbEvent=new SpongeAbsorbEvent(loc.getBlock(),blocksToBeChanged); + Bukkit.getPluginManager().callEvent(spongeAbsorbEvent); + if(spongeAbsorbEvent.isCancelled()){ + AddUtils.sendMessage(p,"&c抱歉,你没有在这里吸取液体的权限"); + }else { + for(Block b:liquids){ + b.setType(Material.AIR); + } + for(Block b:blockInLiquids){ + BlockData data=b.getBlockData(); + if(data instanceof Waterlogged wl){ + wl.setWaterlogged(false); + b.setBlockData(data,true); + } + } + AddUtils.sendMessage(p,"&a成功移除液体!"); + } + }); + }else{ + AddUtils.sendMessage(p,"&c附近没有剩余的液体"); + } + }finally { + COOL_DOWN.remove(p); + } + },0,false,0); + } + else{ + AddUtils.sendMessage(p,"&c抱歉,你没有在这里吸水的权限"); + } + + } + } + event.cancel(); + } + } + .register(); //Material Generators public static final SlimefunItem MAGIC_STONE=new SMGenerator(AddGroups.GENERATORS, AddItem.MAGIC_STONE,RecipeType.ENHANCED_CRAFTING_TABLE, @@ -2073,6 +2166,10 @@ public void onClickAction(PlayerRightClickEvent event) { recipe(AddItem.STAR_GOLD_INGOT, AddItem.LSINGULARITY, AddItem.STAR_GOLD_INGOT, "ENERGIZED_CAPACITOR", AddItem.LASER, "ENERGIZED_CAPACITOR", AddItem.STAR_GOLD_INGOT, AddItem.LSINGULARITY, AddItem.STAR_GOLD_INGOT)) .register(); + public static final SlimefunItem TRACE_ARROW=new TrackingArrowLauncher(AddGroups.SPECIAL,AddItem.TRACE_ARROW,RecipeType.ENHANCED_CRAFTING_TABLE, + recipe(AddItem.LSINGULARITY,"EXPLOSIVE_BOW",AddItem.LSINGULARITY,"ENERGIZED_CAPACITOR",AddItem.ATOM_INGOT,"ENERGIZED_CAPACITOR", + AddItem.LSINGULARITY,"ICY_BOW",AddItem.LSINGULARITY)) + .register(); public static final SlimefunItem RADIATION_CLEAR=new CustomProps(AddGroups.SPECIAL, AddItem.RADIATION_CLEAR, RecipeType.NULL, AddUtils.NULL_RECIPE.clone(), null) { public void onClickAction(PlayerRightClickEvent event) { diff --git a/src/main/java/me/matl114/logitech/SlimefunItem/Blocks/Laser.java b/src/main/java/me/matl114/logitech/SlimefunItem/Blocks/Laser.java index e66dcc3..5a98535 100644 --- a/src/main/java/me/matl114/logitech/SlimefunItem/Blocks/Laser.java +++ b/src/main/java/me/matl114/logitech/SlimefunItem/Blocks/Laser.java @@ -1,173 +1,175 @@ -package me.matl114.logitech.SlimefunItem.Blocks; - -import com.xzavier0722.mc.plugin.slimefun4.storage.controller.SlimefunBlockData; -import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup; -import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem; -import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; -import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType; -import me.matl114.logitech.Schedule.PersistentEffects.CustomEffects; -import me.matl114.logitech.Schedule.PersistentEffects.PlayerEffects; -import me.matl114.logitech.Schedule.Schedules; -import me.matl114.logitech.SlimefunItem.Blocks.MultiBlock.FinalAltarCore; -import me.matl114.logitech.SlimefunItem.Machines.AbstractMachine; -import me.matl114.logitech.SlimefunItem.Machines.MenuBlock; -import me.matl114.logitech.Utils.*; -import me.matl114.logitech.Utils.UtilClass.CargoClass.Directions; -import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.MachineRecipe; -import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; -import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset; -import org.bukkit.Location; -import org.bukkit.Particle; -import org.bukkit.block.Block; -import org.bukkit.block.data.BlockData; -import org.bukkit.block.data.Directional; -import org.bukkit.block.data.type.Dispenser; -import org.bukkit.entity.Damageable; -import org.bukkit.entity.Entity; -import org.bukkit.entity.Player; -import org.bukkit.event.block.BlockPlaceEvent; -import org.bukkit.inventory.ItemStack; -import org.bukkit.util.BoundingBox; - -import javax.annotation.Nullable; -import java.util.*; - -public class Laser extends AbstractMachine implements MultiBlockPart, FinalAltarCore.FinalAltarChargable, MenuBlock.MenuNotAccessible { - public int[] getInputSlots(){ - return new int[0]; - } - public int[] getOutputSlots(){ - return new int[0]; - } - public List getMachineRecipes(){ - return new ArrayList<>(); - } - public final String PARTID; - public Laser(ItemGroup category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, - int energybuffer, int energyConsumption,String partId) { - super(category, item, recipeType, recipe, energybuffer, energyConsumption); - this.PARTID=partId; - this.setDisplayRecipes(Utils.list( - AddUtils.getInfoShow("&f机制 - &c激光", - "&7该机器满足指定条件会发射激光并消耗电力", - "&7可选条件1: 被红石充能", - "&7可选条件2: 置于终极祭坛上", - "&7发射的激光等级lvl为%d+(祭坛等级)*%d".formatted(DEFAULT_LVL,FORCE_INCREASE), - "&7激光会杀死非玩家实体,并对玩家造成0.5*(lvl)^2的真实伤害", - "&7激光会沿该方块朝向进行延申,直至碰见首个非空气方块", - "&7或者达到最大长度 %d 格".formatted(MAX_SEARCH_LEN)),null, - AddUtils.getInfoShow("&f机制 - &c充能", - "&7当置于终极祭坛上时", - "&7该机器会尝试对激光最末端的机器尝试充能", - "&7仅有特定机器才能被激光充能", - "&7一般用于机器激活的前置条件"),null - )); - } - public String getPartId(){ - return PARTID; - } - public String POWERED_KEY="po"; - public String DIRECTION="dir"; - public int MAX_SEARCH_LEN=32; - public void process(Block b, @Nullable BlockMenu menu, SlimefunBlockData data){ - - } - protected final int DEFAULT_LVL=3; - protected final int FORCE_INCREASE=6; - protected static final HashMap DIR_KEYS=new LinkedHashMap<>(){{ - for(Directions dir:Directions.values()) { - put(dir, AddUtils.concat("f_",dir.toString())); - } - }}; - public interface LaserChargable{ - default int hasCharged(SlimefunBlockData data,Directions dir){ - return DataCache.getCustomData(data,Laser.DIR_KEYS.get(dir),0); - } - static void setCharged(SlimefunBlockData data ,Directions dir,int charge){ - DataCache.setCustomData(data,Laser.DIR_KEYS.get(dir),charge); - } - } - @Override - public void tick(Block b, BlockMenu menu, SlimefunBlockData data, int ticker){ - if(conditionHandle(b,menu)){ - final int force=this.mayForced(data); - Location loc=b.getLocation(); - int charged= DataCache.getCustomData(loc,POWERED_KEY,0); - if(force>0||charged!=0){ - int direction=DataCache.getCustomData(data,DIRECTION,-1); - if(direction>=0){ - progressorCost(b,menu); - Directions dir= Directions.fromInt(direction); - Schedules.launchSchedules(()->{ - Location loc2=loc.clone(); - int i=0; - for (;i0){ - //给机器充能 - // Debug.debug(loc2); - SlimefunItem it=DataCache.getSfItem(loc2); - if(it instanceof LaserChargable lc){ - SlimefunBlockData data2=DataCache.safeLoadBlock(loc2); - LaserChargable.setCharged(data2,dir,2); - } - } - Location end=dir.remote(launcher,i+1); - WorldUtils.spawnLineParticle(launcher,end, Particle.END_ROD,5*i); - Runnable killingThread=()->{ - BoundingBox box=new BoundingBox(loc.getX(),loc.getY(),loc.getZ(),end.getX()+0.5,end.getY()+0.5,end.getZ()+0.5); - Collection entities=loc.getWorld().getNearbyEntities(box); - for (Entity e :entities){ - if(e instanceof Player p){ - PlayerEffects.grantEffect(CustomEffects.LASER,p,DEFAULT_LVL+force*FORCE_INCREASE,1); - }else if(e instanceof Damageable dm){ - dm.damage(114); - }else { - e.remove(); - } - } - }; - Schedules.launchSchedules(killingThread,0,true,0); - Schedules.launchSchedules(killingThread,6,true,0); - //FIXME async thread of searching nonair blocks, and find out the killing bounding box - },0,false,0); - } - } - Schedules.launchSchedules(()->{ - //FIXME change this to observer or dropper - if(force>0){ - return; - } - BlockData data1=b.getBlockData(); - if(data1 instanceof Dispenser dp){ - DataCache.setCustomData(data,POWERED_KEY,dp.isTriggered()?1:0); - } - - },0,false,0); - } - } - public void onPlace(BlockPlaceEvent e,Block b){ - super.onPlace(e,b); - BlockData data1=b.getBlockData(); - if(data1 instanceof Directional dp){ - DataCache.setCustomData(b.getLocation(),DIRECTION,Directions.fromBlockFace(dp.getFacing()).toInt()); - } - } - public boolean redirectMenu(){ - return false; - } - public void constructMenu(BlockMenuPreset preset){ - - } - public void registerBlockMenu(SlimefunItem that){ - //handle blockPlaceEvent - handleBlock(that); - } - -} +package me.matl114.logitech.SlimefunItem.Blocks; + +import com.xzavier0722.mc.plugin.slimefun4.storage.controller.SlimefunBlockData; +import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup; +import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem; +import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; +import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType; +import me.matl114.logitech.Schedule.PersistentEffects.CustomEffects; +import me.matl114.logitech.Schedule.PersistentEffects.PlayerEffects; +import me.matl114.logitech.Schedule.Schedules; +import me.matl114.logitech.SlimefunItem.Blocks.MultiBlock.FinalAltarCore; +import me.matl114.logitech.SlimefunItem.Machines.AbstractMachine; +import me.matl114.logitech.SlimefunItem.Machines.MenuBlock; +import me.matl114.logitech.Utils.*; +import me.matl114.logitech.Utils.UtilClass.CargoClass.Directions; +import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.MachineRecipe; +import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; +import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset; +import org.bukkit.Location; +import org.bukkit.Particle; +import org.bukkit.block.Block; +import org.bukkit.block.data.BlockData; +import org.bukkit.block.data.Directional; +import org.bukkit.block.data.type.Dispenser; +import org.bukkit.entity.Damageable; +import org.bukkit.entity.Entity; +import org.bukkit.entity.Player; +import org.bukkit.event.block.BlockPlaceEvent; +import org.bukkit.inventory.ItemStack; +import org.bukkit.util.BoundingBox; + +import javax.annotation.Nullable; +import java.util.*; + +public class Laser extends AbstractMachine implements MultiBlockPart, FinalAltarCore.FinalAltarChargable, MenuBlock.MenuNotAccessible { + public int[] getInputSlots(){ + return new int[0]; + } + public int[] getOutputSlots(){ + return new int[0]; + } + public List getMachineRecipes(){ + return new ArrayList<>(); + } + public final String PARTID; + public Laser(ItemGroup category, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe, + int energybuffer, int energyConsumption,String partId) { + super(category, item, recipeType, recipe, energybuffer, energyConsumption); + this.PARTID=partId; + this.setDisplayRecipes(Utils.list( + AddUtils.getInfoShow("&f机制 - &c激光", + "&7该机器满足指定条件会发射激光并消耗电力", + "&7可选条件1: 被红石充能", + "&7可选条件2: 置于终极祭坛上", + "&7发射的激光等级lvl为%d+(祭坛等级)*%d".formatted(DEFAULT_LVL,FORCE_INCREASE), + "&7激光会杀死非玩家实体,并对玩家造成0.5*(lvl)^2的真实伤害", + "&7激光会沿该方块朝向进行延申,直至碰见首个非空气方块", + "&7或者达到最大长度 %d 格".formatted(MAX_SEARCH_LEN)),null, + AddUtils.getInfoShow("&f机制 - &c充能", + "&7当置于终极祭坛上时", + "&7该机器会尝试对激光最末端的机器尝试充能", + "&7仅有特定机器才能被激光充能", + "&7一般用于机器激活的前置条件"),null + )); + } + public String getPartId(){ + return PARTID; + } + public String POWERED_KEY="po"; + public String DIRECTION="dir"; + public int MAX_SEARCH_LEN=32; + public void process(Block b, @Nullable BlockMenu menu, SlimefunBlockData data){ + + } + protected final int DEFAULT_LVL=3; + protected final int FORCE_INCREASE=6; + protected static final HashMap DIR_KEYS=new LinkedHashMap<>(){{ + for(Directions dir:Directions.values()) { + put(dir, AddUtils.concat("f_",dir.toString())); + } + }}; + public interface LaserChargable{ + default int hasCharged(SlimefunBlockData data,Directions dir){ + return DataCache.getCustomData(data,Laser.DIR_KEYS.get(dir),0); + } + static void setCharged(SlimefunBlockData data ,Directions dir,int charge){ + DataCache.setCustomData(data,Laser.DIR_KEYS.get(dir),charge); + } + } + //FIXME powered wrongly + //FIXME charge machine wrongly + @Override + public void tick(Block b, BlockMenu menu, SlimefunBlockData data, int ticker){ + if(conditionHandle(b,menu)){ + final int force=this.mayForced(data); + Location loc=b.getLocation(); + int charged= DataCache.getCustomData(loc,POWERED_KEY,0); + if(force>0||charged!=0){ + int direction=DataCache.getCustomData(data,DIRECTION,-1); + if(direction>=0){ + progressorCost(b,menu); + Directions dir= Directions.fromInt(direction); + Schedules.launchSchedules(()->{ + Location loc2=loc.clone(); + int i=0; + for (;i0){ + //给机器充能 + // Debug.debug(loc2); + SlimefunItem it=DataCache.getSfItem(loc2); + if(it instanceof LaserChargable lc){ + SlimefunBlockData data2=DataCache.safeLoadBlock(loc2); + LaserChargable.setCharged(data2,dir,2); + } + } + Location end=dir.remote(launcher,i+1); + WorldUtils.spawnLineParticle(launcher,end, Particle.END_ROD,5*i); + Runnable killingThread=()->{ + BoundingBox box=new BoundingBox(loc.getX(),loc.getY(),loc.getZ(),end.getX()+0.5,end.getY()+0.5,end.getZ()+0.5); + Collection entities=loc.getWorld().getNearbyEntities(box); + for (Entity e :entities){ + if(e instanceof Player p){ + PlayerEffects.grantEffect(CustomEffects.LASER,p,DEFAULT_LVL+force*FORCE_INCREASE,1); + }else if(e instanceof Damageable dm){ + dm.damage(114); + }else { + e.remove(); + } + } + }; + Schedules.launchSchedules(killingThread,0,true,0); + Schedules.launchSchedules(killingThread,6,true,0); + //FIXME async thread of searching nonair blocks, and find out the killing bounding box + },0,false,0); + } + } + Schedules.launchSchedules(()->{ + //FIXME change this to observer or dropper + if(force>0){ + return; + } + BlockData data1=b.getBlockData(); + if(data1 instanceof Dispenser dp){ + DataCache.setCustomData(data,POWERED_KEY,dp.isTriggered()?1:0); + } + + },0,false,0); + } + } + public void onPlace(BlockPlaceEvent e,Block b){ + super.onPlace(e,b); + BlockData data1=b.getBlockData(); + if(data1 instanceof Directional dp){ + DataCache.setCustomData(b.getLocation(),DIRECTION,Directions.fromBlockFace(dp.getFacing()).toInt()); + } + } + public boolean redirectMenu(){ + return false; + } + public void constructMenu(BlockMenuPreset preset){ + + } + public void registerBlockMenu(SlimefunItem that){ + //handle blockPlaceEvent + handleBlock(that); + } + +} diff --git a/src/main/java/me/matl114/logitech/SlimefunItem/Blocks/MultiBlock/FinalAltarCore.java b/src/main/java/me/matl114/logitech/SlimefunItem/Blocks/MultiBlock/FinalAltarCore.java index 59dfb52..046d2a8 100644 --- a/src/main/java/me/matl114/logitech/SlimefunItem/Blocks/MultiBlock/FinalAltarCore.java +++ b/src/main/java/me/matl114/logitech/SlimefunItem/Blocks/MultiBlock/FinalAltarCore.java @@ -1,231 +1,235 @@ -package me.matl114.logitech.SlimefunItem.Blocks.MultiBlock; - -import com.xzavier0722.mc.plugin.slimefun4.storage.controller.SlimefunBlockData; -import com.xzavier0722.mc.plugin.slimefun4.storage.util.StorageCacheUtils; -import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup; -import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem; -import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; -import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType; -import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack; -import io.github.thebusybiscuit.slimefun4.utils.ChestMenuUtils; -import me.matl114.logitech.SlimefunItem.AddItem; -import me.matl114.logitech.SlimefunItem.Blocks.MultiBlockTypes; -import me.matl114.logitech.SlimefunItem.Blocks.MultiCore; -import me.matl114.logitech.Utils.AddUtils; -import me.matl114.logitech.Utils.DataCache; -import me.matl114.logitech.Utils.Settings; -import me.matl114.logitech.Utils.UtilClass.MultiBlockClass.*; -import me.matl114.logitech.Utils.UtilClass.MultiBlockClass.MultiLevelBlock.MultiLevelBlock; -import me.matl114.logitech.Utils.UtilClass.MultiBlockClass.MultiLevelBlock.MultiLevelBlockType; -import me.matl114.logitech.Utils.Utils; -import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; -import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset; -import org.bukkit.Location; -import org.bukkit.Material; -import org.bukkit.block.Block; -import org.bukkit.event.block.BlockBreakEvent; -import org.bukkit.inventory.ItemStack; - -import java.util.HashMap; - -public class FinalAltarCore extends MultiCore { - protected static final String LVL_KEY="lv"; - public interface FinalAltarChargable{ - public static String FORCE_STATE="fi"; - default int getForced(SlimefunBlockData data){ - return DataCache.getCustomData(data,FORCE_STATE,0); - } - static void setForced(SlimefunBlockData data,int lvl){ - DataCache.setCustomString(data,FORCE_STATE,String.valueOf(lvl)); - } - default int mayForced(SlimefunBlockData data){ - //TODO 完成多方块结构 完成多级激活模式 - //TODO 暂时不知道咋做,先写着 - int forcelvl=DataCache.getCustomData(data,FORCE_STATE,0); - if(forcelvl>0){ - return forcelvl; - } - Location loc=data.getLocation().clone().add(0,-1,0); - if(DataCache.getSfItem(loc) instanceof FinalAltarCore){ - int lv=DataCache.getCustomData(loc,FinalAltarCore.LVL_KEY,0); - if(lv>0){ - DataCache.setCustomData(data,FORCE_STATE,lv); - return lv; - } - } - return 0; - } - static void clearForced(Location loc){ - SlimefunItem it=DataCache.getSfItem(loc); - if(it instanceof FinalAltarChargable fac){ - DataCache.setCustomData(loc,FORCE_STATE,0); - } - } - } - //TODO set force level when mulitblock broke down - - protected final int[] BORDER=new int[]{0,1,2,3,5,6,7}; - protected final int HOLOGRAM_SLOT=8; - protected final int STATUS_SLOT=4; - protected final ItemStack STATUS_ITEM_ON_1=new CustomItemStack(Material.GREEN_STAINED_GLASS_PANE, - "&6点击切换祭坛状态","&6shift点击尝试刷新祭坛","&7祭坛状态: &a开启","&7等级: &6壹","&7关闭祭坛不会破坏祭坛本体,只会取消上方机器的激活状态"); - protected final ItemStack STATUS_ITEM_ON_2=new CustomItemStack(Material.GREEN_STAINED_GLASS_PANE, - "&6点击切换祭坛状态","&6shift点击尝试刷新祭坛","&7祭坛状态: &a开启","&7等级: &6贰","&7关闭祭坛不会破坏祭坛本体,只会取消上方机器的激活状态"); - protected final ItemStack STATUS_ITEM_OFF=new CustomItemStack(Material.RED_STAINED_GLASS_PANE, - "&6点击切换祭坛状态","&6shift点击尝试刷新祭坛","&7祭坛状态: &c关闭","&7关闭祭坛不会破坏祭坛本体,只会取消上方机器的激活状态"); - protected final ItemStack HOLOGRAM_ITEM_ON=new CustomItemStack(Material.GREEN_STAINED_GLASS_PANE,"&6点击切换全息投影","&7当前状态: &a一级祭坛"); - protected final ItemStack HOLOGRAM_ITEM_ON_2=new CustomItemStack(Material.GREEN_STAINED_GLASS_PANE,"&6点击切换全息投影","&7当前状态: &a二级祭坛"); - protected final ItemStack HOLOGRAM_ITEM_OFF=new CustomItemStack(Material.RED_STAINED_GLASS_PANE,"&6点击切换全息投影","&7当前状态: &c关闭"); - protected final MultiLevelBlockType MBTYPE; - public HashMap MBID_TO_ITEM=new HashMap<>(){{ - put("final.sub", AddItem.FINAL_LASER.clone()); - put("final.frame", AddItem.FINAL_FRAME.clone()); - put("final.base", AddItem.FINAL_BASE.clone()); - }}; - public int[] getInputSlots(){ - return new int[0]; - } - public int[] getOutputSlots(){ - return new int[0]; - } - public FinalAltarCore(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, - ItemStack[] recipe, String blockId){ - super(itemGroup, item, recipeType, recipe, blockId); - this.MBTYPE = MultiBlockTypes.FINAL_ALTAR; - this.setDisplayRecipes(Utils.list( - AddUtils.getInfoShow("&f机制 - &c多级多方块机器", - "&7终极祭坛拥有两个等级", - "&7其中,贰级终极祭坛需要在壹级终极祭坛上增加额外的多方块结构", - "&7两者的构造在内置的投影中均可查看", - "&7当你需要在壹,贰级终极祭坛切换时,请关闭多方块并重启,或者尝试点击刷新祭坛按钮") - )); - } - public MultiLevelBlockType getMultiBlockType(){ - return MBTYPE; - } - public MultiBlockService.MultiBlockBuilder BUILDER=( (core, type, uid) -> { - AbstractMultiBlockHandler blockHandler=MultiBlockHandler.createHandler(core,type,uid); - AbstractMultiBlock block=blockHandler.getMultiBlock(); - int level=0; - if(block instanceof MultiLevelBlock lb){ - level=lb.getLevel(); - } - DataCache.setCustomData(core,LVL_KEY,level); - return blockHandler; - }); - public MultiBlockService.MultiBlockBuilder getBuilder(){ - return BUILDER; - } - - public void constructMenu(BlockMenuPreset inv) { - int[] border = BORDER; - int len = border.length; - for (int i = 0; i < len; i++) { - inv.addItem(border[i], ChestMenuUtils.getBackground(), ChestMenuUtils.getEmptyClickHandler()); - } - inv.addItem(HOLOGRAM_SLOT, HOLOGRAM_ITEM_OFF); - } - public void onMultiBlockDisable(Location loc, AbstractMultiBlockHandler handler, MultiBlockService.DeleteCause cause){ - super.onMultiBlockDisable(loc,handler,cause); - //要设置上面的机器,清除里面的force level数据 - Location poweredLoc =loc.clone().add(0,1,0); - FinalAltarChargable.clearForced(poweredLoc); - BlockMenu inv= StorageCacheUtils.getMenu(loc); - if(inv!=null){ - inv.replaceExistingItem(STATUS_SLOT,STATUS_ITEM_OFF); - } - } - public void onMultiBlockEnable(Location loc,AbstractMultiBlockHandler handler){ - super.onMultiBlockEnable(loc,handler); - } - public void updateMenu(BlockMenu inv, Block block, Settings mod){ - int holoStatus=DataCache.getCustomData(inv.getLocation(),"holo",0); - if(holoStatus==0){ - inv.replaceExistingItem(HOLOGRAM_SLOT,HOLOGRAM_ITEM_OFF); - - }else if(holoStatus==1){ - inv.replaceExistingItem(HOLOGRAM_SLOT,HOLOGRAM_ITEM_ON); - - }else{ - inv.replaceExistingItem(HOLOGRAM_SLOT,HOLOGRAM_ITEM_ON_2); - } - } - public void newMenuInstance(BlockMenu inv, Block block){ - Location loc2=block.getLocation(); - if (MultiBlockService.getStatus(loc2)!=0){ - int lvl=DataCache.getCustomData(inv.getLocation(),LVL_KEY,0); - inv.replaceExistingItem(STATUS_SLOT,lvl==1? STATUS_ITEM_ON_1:STATUS_ITEM_ON_2); - }else { - inv.replaceExistingItem(STATUS_SLOT,STATUS_ITEM_OFF); - } - inv.addMenuClickHandler(STATUS_SLOT,((player, i, itemStack, clickAction) -> { - Location loc=inv.getLocation(); - if(MultiBlockService.getStatus(loc)==0){//not working - if(MultiBlockService.createNewHandler(loc,getBuilder(),getMultiBlockType())){ - int code=DataCache.getCustomData(loc,LVL_KEY,0); - if(code>0){ - inv.replaceExistingItem(STATUS_SLOT,code==1? STATUS_ITEM_ON_1:STATUS_ITEM_ON_2); - AddUtils.sendMessage(player,"&a成功激活终极祭坛!"); - }else { - MultiBlockService.deleteMultiBlock(loc,MultiBlockService.GENERIC); - AddUtils.sendMessage(player,"&c构建祭坛时出现未知方块数据错误!请联系管理员"); - } - }else { - AddUtils.sendMessage(player,"&c终极祭坛结构不完整或者结构冲突!"); - inv.replaceExistingItem(STATUS_SLOT,STATUS_ITEM_OFF); - } - - }else {//working toggle off - MultiBlockService.deleteMultiBlock(loc,MultiBlockService.MANUALLY); - AddUtils.sendMessage(player,"&a终极祭坛成功关闭"); - inv.replaceExistingItem(STATUS_SLOT,STATUS_ITEM_OFF); - } - return false; - })); - DataCache.setCustomData(inv.getLocation(),"holo",0); - inv.addMenuClickHandler(HOLOGRAM_SLOT,((player, i, itemStack, clickAction) -> { - Location loc=inv.getLocation(); - int holoStatus=DataCache.getCustomData(inv.getLocation(),"holo",0); - int statusCode=MultiBlockService.getStatus(loc); - MultiBlockService.removeHologramSync(loc); - if(statusCode==0){ - if(holoStatus==0){ - AddUtils.sendMessage(player,"&a全息投影已切换至一级祭坛!"); - MultiBlockService.createHologram(loc,MBTYPE.getSubParts(0), MultiBlockService.Direction.NORTH, MBID_TO_ITEM); - DataCache.setCustomData(loc,"holo",1); - }else if(holoStatus==1){ - AddUtils.sendMessage(player,"&a全息投影已切换至二级祭坛!"); - MultiBlockService.createHologram(loc,MBTYPE, MultiBlockService.Direction.WEST, MBID_TO_ITEM); - DataCache.setCustomData(loc,"holo",2); - }else { - AddUtils.sendMessage(player,"&a全息投影已关闭!"); - } - } - updateMenu(inv,block,Settings.RUN); - return false; - })); - updateMenu(inv,block,Settings.RUN); - } - public void tick(Block b, BlockMenu menu,SlimefunBlockData data, int tickCount){ - //in this case .blockMenu is null - - if(MultiBlockService.acceptCoreRequest(b.getLocation(),getBuilder(),getMultiBlockType())){ - int autoCode=DataCache.getCustomData(data,"auto",0); - runtimeCheck(menu.getLocation(),data,autoCode); - processCore(b,menu); - } - process(b,menu,data); - } - public void processCore(Block b, BlockMenu menu){ - if(menu.hasViewer()){ - updateMenu(menu,b,Settings.RUN); - } - } - - public void onBreak(BlockBreakEvent e, BlockMenu inv){ - super.onBreak(e,inv); - } - - - -} +package me.matl114.logitech.SlimefunItem.Blocks.MultiBlock; + +import com.xzavier0722.mc.plugin.slimefun4.storage.controller.SlimefunBlockData; +import com.xzavier0722.mc.plugin.slimefun4.storage.util.StorageCacheUtils; +import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup; +import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem; +import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; +import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType; +import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack; +import io.github.thebusybiscuit.slimefun4.utils.ChestMenuUtils; +import me.matl114.logitech.SlimefunItem.AddItem; +import me.matl114.logitech.SlimefunItem.Blocks.MultiBlockTypes; +import me.matl114.logitech.SlimefunItem.Blocks.MultiCore; +import me.matl114.logitech.Utils.AddUtils; +import me.matl114.logitech.Utils.DataCache; +import me.matl114.logitech.Utils.Settings; +import me.matl114.logitech.Utils.UtilClass.MultiBlockClass.*; +import me.matl114.logitech.Utils.UtilClass.MultiBlockClass.MultiLevelBlock.MultiLevelBlock; +import me.matl114.logitech.Utils.UtilClass.MultiBlockClass.MultiLevelBlock.MultiLevelBlockType; +import me.matl114.logitech.Utils.Utils; +import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; +import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset; +import org.bukkit.Location; +import org.bukkit.Material; +import org.bukkit.block.Block; +import org.bukkit.event.block.BlockBreakEvent; +import org.bukkit.inventory.ItemStack; + +import java.util.HashMap; + +public class FinalAltarCore extends MultiCore { + protected static final String LVL_KEY="lv"; + public interface FinalAltarChargable{ + public static String FORCE_STATE="fi"; + default int getForced(SlimefunBlockData data){ + return DataCache.getCustomData(data,FORCE_STATE,0); + } + static void setForced(SlimefunBlockData data,int lvl){ + DataCache.setCustomString(data,FORCE_STATE,String.valueOf(lvl)); + } + default int mayForced(SlimefunBlockData data){ + //TODO 完成多方块结构 完成多级激活模式 + //TODO 暂时不知道咋做,先写着 + int forcelvl=DataCache.getCustomData(data,FORCE_STATE,0); + if(forcelvl>0){ + return forcelvl; + } + Location loc=data.getLocation().clone().add(0,-1,0); + //check if multiblock active + if(DataCache.getSfItem(loc) instanceof FinalAltarCore && MultiBlockService.getStatus(loc)!=0){ + //get lvl key in active multiblock + int lv=DataCache.getCustomData(loc,FinalAltarCore.LVL_KEY,0); + if(lv>0){ + DataCache.setCustomData(data,FORCE_STATE,lv); + return lv; + } + } + return 0; + } + static void clearForced(Location loc){ + SlimefunItem it=DataCache.getSfItem(loc); + if(it instanceof FinalAltarChargable fac){ + DataCache.setCustomData(loc,FORCE_STATE,0); + } + } + } + //TODO set force level when mulitblock broke down + + protected final int[] BORDER=new int[]{0,1,2,3,5,6,7}; + protected final int HOLOGRAM_SLOT=8; + protected final int STATUS_SLOT=4; + protected final ItemStack STATUS_ITEM_ON_1=new CustomItemStack(Material.GREEN_STAINED_GLASS_PANE, + "&6点击切换祭坛状态","&6shift点击尝试刷新祭坛","&7祭坛状态: &a开启","&7等级: &6壹","&7关闭祭坛不会破坏祭坛本体,只会取消上方机器的激活状态"); + protected final ItemStack STATUS_ITEM_ON_2=new CustomItemStack(Material.GREEN_STAINED_GLASS_PANE, + "&6点击切换祭坛状态","&6shift点击尝试刷新祭坛","&7祭坛状态: &a开启","&7等级: &6贰","&7关闭祭坛不会破坏祭坛本体,只会取消上方机器的激活状态"); + protected final ItemStack STATUS_ITEM_OFF=new CustomItemStack(Material.RED_STAINED_GLASS_PANE, + "&6点击切换祭坛状态","&6shift点击尝试刷新祭坛","&7祭坛状态: &c关闭","&7关闭祭坛不会破坏祭坛本体,只会取消上方机器的激活状态"); + protected final ItemStack HOLOGRAM_ITEM_ON=new CustomItemStack(Material.GREEN_STAINED_GLASS_PANE,"&6点击切换全息投影","&7当前状态: &a一级祭坛"); + protected final ItemStack HOLOGRAM_ITEM_ON_2=new CustomItemStack(Material.GREEN_STAINED_GLASS_PANE,"&6点击切换全息投影","&7当前状态: &a二级祭坛"); + protected final ItemStack HOLOGRAM_ITEM_OFF=new CustomItemStack(Material.RED_STAINED_GLASS_PANE,"&6点击切换全息投影","&7当前状态: &c关闭"); + protected final MultiLevelBlockType MBTYPE; + public HashMap MBID_TO_ITEM=new HashMap<>(){{ + put("final.sub", AddItem.FINAL_LASER.clone()); + put("final.frame", AddItem.FINAL_FRAME.clone()); + put("final.base", AddItem.FINAL_BASE.clone()); + }}; + public int[] getInputSlots(){ + return new int[0]; + } + public int[] getOutputSlots(){ + return new int[0]; + } + public FinalAltarCore(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, + ItemStack[] recipe, String blockId){ + super(itemGroup, item, recipeType, recipe, blockId); + this.MBTYPE = MultiBlockTypes.FINAL_ALTAR; + this.setDisplayRecipes(Utils.list( + AddUtils.getInfoShow("&f机制 - &c多级多方块机器", + "&7终极祭坛拥有两个等级", + "&7其中,贰级终极祭坛需要在壹级终极祭坛上增加额外的多方块结构", + "&7两者的构造在内置的投影中均可查看", + "&7当你需要在壹,贰级终极祭坛切换时,请关闭多方块并重启,或者尝试点击刷新祭坛按钮") + )); + } + public MultiLevelBlockType getMultiBlockType(){ + return MBTYPE; + } + public MultiBlockService.MultiBlockBuilder BUILDER=( (core, type, uid) -> { + AbstractMultiBlockHandler blockHandler=MultiBlockHandler.createHandler(core,type,uid); + AbstractMultiBlock block=blockHandler.getMultiBlock(); + int level=0; + if(block instanceof MultiLevelBlock lb){ + level=lb.getLevel(); + } + DataCache.setCustomData(core,LVL_KEY,level); + return blockHandler; + }); + public MultiBlockService.MultiBlockBuilder getBuilder(){ + return BUILDER; + } + + public void constructMenu(BlockMenuPreset inv) { + int[] border = BORDER; + int len = border.length; + for (int i = 0; i < len; i++) { + inv.addItem(border[i], ChestMenuUtils.getBackground(), ChestMenuUtils.getEmptyClickHandler()); + } + inv.addItem(HOLOGRAM_SLOT, HOLOGRAM_ITEM_OFF); + } + public void onMultiBlockDisable(Location loc, AbstractMultiBlockHandler handler, MultiBlockService.DeleteCause cause){ + super.onMultiBlockDisable(loc,handler,cause); + //这里也要清除,lvl数据 防止上面重新读取回来 + DataCache.setCustomString(loc,LVL_KEY,"0"); + //要设置上面的机器,清除里面的force level数据 + Location poweredLoc =loc.clone().add(0,1,0); + FinalAltarChargable.clearForced(poweredLoc); + BlockMenu inv= StorageCacheUtils.getMenu(loc); + if(inv!=null){ + inv.replaceExistingItem(STATUS_SLOT,STATUS_ITEM_OFF); + } + } + public void onMultiBlockEnable(Location loc,AbstractMultiBlockHandler handler){ + super.onMultiBlockEnable(loc,handler); + } + public void updateMenu(BlockMenu inv, Block block, Settings mod){ + int holoStatus=DataCache.getCustomData(inv.getLocation(),"holo",0); + if(holoStatus==0){ + inv.replaceExistingItem(HOLOGRAM_SLOT,HOLOGRAM_ITEM_OFF); + + }else if(holoStatus==1){ + inv.replaceExistingItem(HOLOGRAM_SLOT,HOLOGRAM_ITEM_ON); + + }else{ + inv.replaceExistingItem(HOLOGRAM_SLOT,HOLOGRAM_ITEM_ON_2); + } + } + public void newMenuInstance(BlockMenu inv, Block block){ + Location loc2=block.getLocation(); + if (MultiBlockService.getStatus(loc2)!=0){ + int lvl=DataCache.getCustomData(inv.getLocation(),LVL_KEY,0); + inv.replaceExistingItem(STATUS_SLOT,lvl==1? STATUS_ITEM_ON_1:STATUS_ITEM_ON_2); + }else { + inv.replaceExistingItem(STATUS_SLOT,STATUS_ITEM_OFF); + } + inv.addMenuClickHandler(STATUS_SLOT,((player, i, itemStack, clickAction) -> { + Location loc=inv.getLocation(); + if(MultiBlockService.getStatus(loc)==0){//not working + if(MultiBlockService.createNewHandler(loc,getBuilder(),getMultiBlockType())){ + int code=DataCache.getCustomData(loc,LVL_KEY,0); + if(code>0){ + inv.replaceExistingItem(STATUS_SLOT,code==1? STATUS_ITEM_ON_1:STATUS_ITEM_ON_2); + AddUtils.sendMessage(player,"&a成功激活终极祭坛!"); + }else { + MultiBlockService.deleteMultiBlock(loc,MultiBlockService.GENERIC); + AddUtils.sendMessage(player,"&c构建祭坛时出现未知方块数据错误!请联系管理员"); + } + }else { + AddUtils.sendMessage(player,"&c终极祭坛结构不完整或者结构冲突!"); + inv.replaceExistingItem(STATUS_SLOT,STATUS_ITEM_OFF); + } + + }else {//working toggle off + MultiBlockService.deleteMultiBlock(loc,MultiBlockService.MANUALLY); + AddUtils.sendMessage(player,"&a终极祭坛成功关闭"); + inv.replaceExistingItem(STATUS_SLOT,STATUS_ITEM_OFF); + } + return false; + })); + DataCache.setCustomData(inv.getLocation(),"holo",0); + inv.addMenuClickHandler(HOLOGRAM_SLOT,((player, i, itemStack, clickAction) -> { + Location loc=inv.getLocation(); + int holoStatus=DataCache.getCustomData(inv.getLocation(),"holo",0); + int statusCode=MultiBlockService.getStatus(loc); + MultiBlockService.removeHologramSync(loc); + if(statusCode==0){ + if(holoStatus==0){ + AddUtils.sendMessage(player,"&a全息投影已切换至一级祭坛!"); + MultiBlockService.createHologram(loc,MBTYPE.getSubParts(0), MultiBlockService.Direction.NORTH, MBID_TO_ITEM); + DataCache.setCustomData(loc,"holo",1); + }else if(holoStatus==1){ + AddUtils.sendMessage(player,"&a全息投影已切换至二级祭坛!"); + MultiBlockService.createHologram(loc,MBTYPE, MultiBlockService.Direction.WEST, MBID_TO_ITEM); + DataCache.setCustomData(loc,"holo",2); + }else { + AddUtils.sendMessage(player,"&a全息投影已关闭!"); + } + } + updateMenu(inv,block,Settings.RUN); + return false; + })); + updateMenu(inv,block,Settings.RUN); + } + public void tick(Block b, BlockMenu menu,SlimefunBlockData data, int tickCount){ + //in this case .blockMenu is null + + if(MultiBlockService.acceptCoreRequest(b.getLocation(),getBuilder(),getMultiBlockType())){ + int autoCode=DataCache.getCustomData(data,"auto",0); + runtimeCheck(menu.getLocation(),data,autoCode); + processCore(b,menu); + } + process(b,menu,data); + } + public void processCore(Block b, BlockMenu menu){ + if(menu.hasViewer()){ + updateMenu(menu,b,Settings.RUN); + } + } + + public void onBreak(BlockBreakEvent e, BlockMenu inv){ + super.onBreak(e,inv); + } + + + +} diff --git a/src/main/java/me/matl114/logitech/SlimefunItem/Blocks/SpreadBlock.java b/src/main/java/me/matl114/logitech/SlimefunItem/Blocks/SpreadBlock.java index c0669d5..b1e2ccc 100644 --- a/src/main/java/me/matl114/logitech/SlimefunItem/Blocks/SpreadBlock.java +++ b/src/main/java/me/matl114/logitech/SlimefunItem/Blocks/SpreadBlock.java @@ -1,151 +1,152 @@ -package me.matl114.logitech.SlimefunItem.Blocks; - -import com.xzavier0722.mc.plugin.slimefun4.storage.controller.SlimefunBlockData; -import com.xzavier0722.mc.plugin.slimefun4.storage.util.StorageCacheUtils; -import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup; -import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem; -import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; -import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType; -import me.matl114.logitech.Schedule.Schedules; -import me.matl114.logitech.SlimefunItem.AddItem; -import me.matl114.logitech.SlimefunItem.AddSlimefunItems; -import me.matl114.logitech.Utils.*; -import me.matl114.logitech.Utils.UtilClass.TickerClass.Ticking; -import me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker; -import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu; -import org.bukkit.Location; -import org.bukkit.Material; -import org.bukkit.block.Block; -import org.bukkit.entity.Player; -import org.bukkit.event.block.BlockPlaceEvent; -import org.bukkit.inventory.ItemStack; -import org.bukkit.util.Vector; - -import javax.annotation.Nullable; -import javax.annotation.ParametersAreNonnullByDefault; -import java.util.HashSet; -import java.util.Map; -import java.util.Random; -import java.util.concurrent.ConcurrentHashMap; - -public class SpreadBlock extends AbstractBlock implements Ticking { - protected final SlimefunItem RESULT; - protected final Material SPREAD_MATERIAL; - protected final Material RESULT_MATERIAL; - public SpreadBlock(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe,SlimefunItem result, - Material spreadMaterial,Material finalMaterial) { - super(itemGroup, item, recipeType, recipe); - this.RESULT = result; - this.SPREAD_MATERIAL = spreadMaterial; - this.RESULT_MATERIAL = finalMaterial; - this.setDisplayRecipes( - Utils.list( - AddUtils.getInfoShow("&f机制 - &c同化", - "&7该物品拥有着将邻接的方块同化为自身的能力", - "&7方块尝试同化邻接方块的行为,我们称之为一次同化", - "&7被玩家放下或者被同化出来的方块会进行一次同化", - "&a进行同化行为后该位置的方块将将不会继续同化,也不会被同化", - "&7在随机的时长后被该位置的方块将会转变为目标物品", - "&e当转变为目标物品时,将有%d%%的概率不改变方块材质".formatted(CHANCE_KEEP_MATERIAL)),AddUtils.addLore( result.getItem(),"&a同化最终的结果"), - AddUtils.getInfoShow("&f机制 - &c反能量", - "&7该物品同化的能量来源是所谓的\"反能量值\"", - "&7当玩家放下时候,方块反能量值为%d".formatted(LIFE_DEFAULT), - "&7被同化出的方块将会继承同化者的反能量值,并有60%的概率衰减1", - "&7同化进行后的方块每sft将有60%的概率将自身反能量值衰减1", - "&7当反能量值为0的时候,方块将转变为目标物品"),null, - AddUtils.getInfoShow("&f机制 - &c数量阈值", - "&7整个服务器中最多有%d个方块同时进行同化行为".formatted(ONE_TICK_SPREAD_MAXCNT), - "&7当超过该阈值后余下的方块将&c停止运行", - "&a因此该物品并不会对服务器tps造成影响") - ) - ); - } - protected Random rand = new Random(); - protected final int LIFE_DEFAULT=13; - protected final int ONE_TICK_SPREAD_MAXCNT=2000; - protected final int CHANCE_KEEP_MATERIAL=5; - protected final ConcurrentHashMap SPREAD_PLAYER=new ConcurrentHashMap<>(); - public Map getSpreadOwner(){ - return SPREAD_PLAYER; - } - protected final ConcurrentHashMap SPREAD_TICKER=new ConcurrentHashMap<>(); - public Map getSpreadTicker(){ - return SPREAD_TICKER; - } - protected final Vector[] SPREAD_DELTA=new Vector[]{ - new Vector(1,0,0), - new Vector(0,0,1), - new Vector(-1,0,0), - new Vector(0,0,-1), - new Vector(0,1,0), - new Vector(0,-1,0), - }; - public void registerTick(SlimefunItem item){ - item.addItemHandler( - new BlockTicker() { - int runPerTick=0; - public boolean isSynchronized() { - return isSync(); - } - - @ParametersAreNonnullByDefault - public void tick(Block b, SlimefunItem item, SlimefunBlockData data) { - if(runPerTick>ONE_TICK_SPREAD_MAXCNT)return; - BlockMenu menu = data.getBlockMenu(); - //BlockMenu menu = BlockStorage.getInventory(b); - Location loc = data.getLocation(); - Integer life=SPREAD_TICKER.get(loc); - if(life==null||life==0){ - Player player=SPREAD_PLAYER.remove(loc); - SPREAD_TICKER.remove(loc); - WorldUtils.createSlimefunBlock(loc,player,RESULT,(rand.nextInt(100)<(100-CHANCE_KEEP_MATERIAL))? RESULT_MATERIAL:SPREAD_MATERIAL,true); - }else if(life<0){ - SPREAD_TICKER.put(loc, life+rand.nextInt(100)<60?1:0); - } - else { - int lifeToSet=life-(rand.nextInt(100)<60?1:0); - Player player=SPREAD_PLAYER.get(loc); - for (int i=0;i SPREAD_PLAYER=new ConcurrentHashMap<>(); + public Map getSpreadOwner(){ + return SPREAD_PLAYER; + } + protected final ConcurrentHashMap SPREAD_TICKER=new ConcurrentHashMap<>(); + public Map getSpreadTicker(){ + return SPREAD_TICKER; + } + protected final Vector[] SPREAD_DELTA=new Vector[]{ + new Vector(1,0,0), + new Vector(0,0,1), + new Vector(-1,0,0), + new Vector(0,0,-1), + new Vector(0,1,0), + new Vector(0,-1,0), + }; + public void registerTick(SlimefunItem item){ + item.addItemHandler( + new BlockTicker() { + int runPerTick=0; + public boolean isSynchronized() { + return isSync(); + } + + @ParametersAreNonnullByDefault + public void tick(Block b, SlimefunItem item, SlimefunBlockData data) { + if(runPerTick>ONE_TICK_SPREAD_MAXCNT)return; + BlockMenu menu = data.getBlockMenu(); + //BlockMenu menu = BlockStorage.getInventory(b); + Location loc = data.getLocation(); + Integer life=SPREAD_TICKER.get(loc); + if(life==null||life==0){ + Player player=SPREAD_PLAYER.remove(loc); + SPREAD_TICKER.remove(loc); + WorldUtils.createSlimefunBlock(loc,player,RESULT,(rand.nextInt(100)<(100-CHANCE_KEEP_MATERIAL))? RESULT_MATERIAL:SPREAD_MATERIAL,true); + }else if(life<0){ + SPREAD_TICKER.put(loc, life+rand.nextInt(100)<60?1:0); + } + else { + int lifeToSet=life-(rand.nextInt(100)<60?1:0); + Player player=SPREAD_PLAYER.get(loc); + for (int i=0;i PLAYERCOOLDOWN=ConcurrentHashMap.newKeySet(); - @Override - public void onClickAction(PlayerRightClickEvent event) { - event.cancel(); - Player p=event.getPlayer(); - ItemStack stack=event.getItem(); - if(p==null||stack==null){ - return; - } - onLaser(p,stack,false,true); - - } - public void onLaser(Player p,ItemStack stack,boolean onHead,boolean withWarning){ - if(PLAYERCOOLDOWN.contains(p)){ - if(withWarning){ - AddUtils.sendMessage(p,"&c物品冷却中"); - } - return; - } - float charge=getItemCharge(stack); - if(charge>=CONSUMPTION){ - //setItemCharge(stack,); - if(canUse(p,withWarning)){ - setItemCharge(stack,charge-CONSUMPTION); - launchLaser(p,onHead); - PLAYERCOOLDOWN.add(p); - Schedules.launchSchedules(()->{ - PLAYERCOOLDOWN.remove(p); - },10,false,0); - - } - }else { - if(withWarning){ - AddUtils.sendMessage(p,AddUtils.concat("&c电力不足! ",String.valueOf(charge),"J/",String.valueOf(CONSUMPTION),"J")); - } - } - } - public void launchLaser(Player p,boolean fromEye){ - Location loc=p.getEyeLocation().clone(); - if(!fromEye){ - Location playerLocation=p.getLocation(); - loc.add(playerLocation.subtract(loc).multiply(0.25).toVector()); - } - final Pair endLocaion=WorldUtils.rayTraceLocation(p.getLocation().getDirection(), loc, 0.25, 100, new Predicate() { - HashSet testHistory=new HashSet<>(); - public boolean testIsAir(Location loc){ - Location blockLocation=WorldUtils.getBlockLocation(loc); - if(testHistory.contains(loc)){ - return true; - }else if(WorldUtils.isLightPassableBlock(blockLocation.getBlock())) { - - testHistory.add(loc); - return true; - - }else return false; - } - @Override - public boolean test(Location location) { - if(testIsAir(location)){ - - Collection entities=location.getWorld().getNearbyEntities(location,0.4,0.4,0.4); - if(!entities.isEmpty()){ - boolean hasTarget=false; - for(Entity entity:entities){ - - if(entity instanceof Player player){ - if(p!=player){ - hasTarget=true; - - if(WorldUtils.testAttackPermission(p,player)){ - PlayerEffects.grantEffect(CustomEffects.LASER,player,6,1); - } - } - }else { - if(entity instanceof Damageable le){ - hasTarget=true; - if(WorldUtils.testAttackPermission(p,le)){ - le.damage(100,p); - } - } - } - } - return !hasTarget; - - }else { - return true; - } - }else { - return false; - } - } - }); - WorldUtils.spawnLineParticle(loc,endLocaion.getSecondValue(), Particle.END_ROD,endLocaion.getFirstValue()); - - } -} +package me.matl114.logitech.SlimefunItem.Items; + +import io.github.thebusybiscuit.slimefun4.api.events.PlayerRightClickEvent; +import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup; +import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; +import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType; +import io.github.thebusybiscuit.slimefun4.libraries.dough.collections.Pair; +import io.github.thebusybiscuit.slimefun4.libraries.dough.protection.Interaction; +import me.matl114.logitech.Schedule.PersistentEffects.CustomEffects; +import me.matl114.logitech.Schedule.PersistentEffects.PlayerEffects; +import me.matl114.logitech.Schedule.Schedules; +import me.matl114.logitech.Utils.AddUtils; +import me.matl114.logitech.Utils.Debug; +import me.matl114.logitech.Utils.WorldUtils; +import org.bukkit.*; +import org.bukkit.damage.DamageSource; +import org.bukkit.entity.*; +import org.bukkit.event.entity.EntityDamageEvent; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.persistence.PersistentDataContainer; +import org.bukkit.persistence.PersistentDataType; +import org.bukkit.util.Vector; + +import java.util.*; +import java.util.concurrent.ConcurrentHashMap; +import java.util.function.Predicate; + +public class LaserGun extends ChargableProps{ + protected final NamespacedKey LEVEL_KEY=AddUtils.getNameKey("laser-lvl"); + protected final String LEVEL_PREFIX= AddUtils.resolveColor("&x&E&B&3&3&E&B发射器功率: &a"); + protected final int getLevel(ItemMeta meta){ + PersistentDataContainer container = meta.getPersistentDataContainer(); + if(container.has(LEVEL_KEY, PersistentDataType.INTEGER)){ + return container.get(LEVEL_KEY, PersistentDataType.INTEGER); + }else { + return 0; + } + } + protected final void setLevel(ItemMeta meta, int level){ + PersistentDataContainer container = meta.getPersistentDataContainer(); + container.set(LEVEL_KEY, PersistentDataType.INTEGER, level); + List lores=meta.getLore(); + if(lores.size()>1){ + lores.set(lores.size()-2, AddUtils.concat(LEVEL_PREFIX,"第",String.valueOf(level+1),"档/共",String.valueOf(MAX_LEVEL),"档")); + } + meta.setLore(lores); + } + protected final int MAX_LEVEL=5; + public LaserGun(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe){ + super(itemGroup, item, recipeType, recipe); + } + public void addInfo(ItemStack stack){ + super.addInfo(stack); + ItemMeta meta=stack.getItemMeta(); + setLevel(meta,0); + stack.setItemMeta(meta); + } + float MAX_BUFFER=9_999_999.0F; + float CONSUMPTION=640.0F; + @Override + public float getMaxItemCharge(ItemStack var1) { + return MAX_BUFFER; + } + public Set PLAYERCOOLDOWN=ConcurrentHashMap.newKeySet(); + @Override + public void onClickAction(PlayerRightClickEvent event) { + event.cancel(); + Player p=event.getPlayer(); + ItemStack stack=event.getItem(); + if(p==null||stack==null){ + return; + } + if(!p.isSneaking()){ + onLaser(p,stack,false,true); + }else{ + onLaserLevelAdd(p,stack); + } + + } + public void onLaserLevelAdd(Player p,ItemStack stack){ + ItemMeta meta=stack.getItemMeta(); + int level=getLevel(meta); + level=(level+1)%MAX_LEVEL; + setLevel(meta,level); + stack.setItemMeta(meta); + AddUtils.sendMessage(p,"&a激光发射器功率切换成功.当前为 &6第%d档".formatted(level+1)); + } + public void onLaser(Player p,ItemStack stack,boolean onHead,boolean withWarning){ + if(PLAYERCOOLDOWN.contains(p)){ + if(withWarning){ + AddUtils.sendMessage(p,"&c物品冷却中"); + } + return; + } + float charge=getItemCharge(stack); + int level =getLevel(stack.getItemMeta()); + float consumption=CONSUMPTION*((float)Math.pow(10,level)); + if(charge>=consumption){ + //setItemCharge(stack,); + if(canUse(p,withWarning)){ + setItemCharge(stack,charge-consumption); + launchLaser(p,level,onHead); + PLAYERCOOLDOWN.add(p); + Schedules.launchSchedules(()->{ + PLAYERCOOLDOWN.remove(p); + },10,false,0); + + } + }else { + //if(withWarning){ + AddUtils.sendMessage(p,AddUtils.concat("&c电力不足! ",String.valueOf(charge),"J/",String.valueOf(consumption),"J")); + //} + } + } + public void launchLaser(Player p,int level,boolean fromEye){ + Location loc; + if(!fromEye){ + loc=WorldUtils.getHandLocation(p); + }else { + loc=p.getEyeLocation(); + } + final Pair endLocaion=WorldUtils.rayTraceLocation(p.getLocation().getDirection(), loc, 0.25, 100, new Predicate() { + HashSet testHistory=new HashSet<>(); + public boolean testIsAir(Location loc){ + Location blockLocation=WorldUtils.getBlockLocation(loc); + if(testHistory.contains(loc)){ + return true; + }else if(WorldUtils.isLightPassableBlock(blockLocation.getBlock())) { + + testHistory.add(loc); + return true; + + }else return false; + } + @Override + public boolean test(Location location) { + if(testIsAir(location)){ + + Collection entities=location.getWorld().getNearbyEntities(location,0.4,0.4,0.4); + if(!entities.isEmpty()){ + boolean hasTarget=false; + for(Entity entity:entities){ + + if(entity instanceof Player player){ + if(p!=player){ + hasTarget=true; + + if(WorldUtils.testAttackPermission(p,player)){ + PlayerEffects.grantEffect(CustomEffects.LASER,player,4*(level+1),1); + } + } + }else { + if(entity instanceof Damageable le){ + hasTarget=true; + if(WorldUtils.testAttackPermission(p,le)){ + le.damage(100*(level+1),p); + } + } + } + } + return !hasTarget; + + }else { + return true; + } + }else { + return false; + } + } + }); + WorldUtils.spawnLineParticle(loc,endLocaion.getSecondValue(), Particle.END_ROD,endLocaion.getFirstValue()); + + } +} diff --git a/src/main/java/me/matl114/logitech/SlimefunItem/Items/TrackingArrowLauncher.java b/src/main/java/me/matl114/logitech/SlimefunItem/Items/TrackingArrowLauncher.java new file mode 100644 index 0000000..3b773f9 --- /dev/null +++ b/src/main/java/me/matl114/logitech/SlimefunItem/Items/TrackingArrowLauncher.java @@ -0,0 +1,183 @@ +package me.matl114.logitech.SlimefunItem.Items; + +import io.github.thebusybiscuit.slimefun4.api.events.PlayerRightClickEvent; +import io.github.thebusybiscuit.slimefun4.api.items.ItemGroup; +import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; +import io.github.thebusybiscuit.slimefun4.api.recipes.RecipeType; +import me.matl114.logitech.Schedule.Schedules; +import me.matl114.logitech.Utils.AddUtils; +import me.matl114.logitech.Utils.BukkitUtils; +import me.matl114.logitech.Utils.Debug; +import me.matl114.logitech.Utils.WorldUtils; +import org.bukkit.Bukkit; +import org.bukkit.Location; +import org.bukkit.Particle; +import org.bukkit.enchantments.Enchantment; +import org.bukkit.entity.*; +import org.bukkit.event.player.PlayerMoveEvent; +import org.bukkit.inventory.ItemStack; +import org.bukkit.inventory.meta.ItemMeta; +import org.bukkit.scheduler.BukkitRunnable; + +import java.util.*; + +public class TrackingArrowLauncher extends ChargableProps { + public TrackingArrowLauncher(ItemGroup itemGroup, SlimefunItemStack item, RecipeType recipeType, ItemStack[] recipe){ + super(itemGroup, item, recipeType, recipe); + } + protected final float MAX_CHARGE=9_000_000.0f; + protected Random rand = new Random(); + protected final float ARROW_SPEED=1.2F; + protected final int ARROW_AMOUNT=10; + protected final int ARROW_EXIST_TIME=15; + protected final float RAYTRACE_RANGE=60; + protected final int MAX_TRACETIME=150; + protected final int PERIOD_TRACETIME=2; + protected final int BASIC_DAMAGE=80; + protected final float ENERGYCONSUMPTION=640.0f; + protected final float DEFLECTION_RATE=0.15f; + protected final float LOCATION_DELTA=0.4f; + protected final float SIGHT_DELTA=10f; + public float getMaxItemCharge(ItemStack var1){ + return MAX_CHARGE; + } + + @Override + public void onClickAction(PlayerRightClickEvent event) { + Player p=event.getPlayer(); + if(p!=null){ + ItemStack item=event.getItem(); + float charge=this.getItemCharge(item); + if(charge arrows=new HashSet<>(); + for(int i=0;i targetEntities= WorldUtils.getEntityInDistance(targetCenter,1.2*RAYTRACE_RANGE,(e)->{return e!=p + && WorldUtils.isLivingEntity(e);}); + //索敌算法 + HashSet livingEntities=new HashSet<>(); + for(Entity entity:targetEntities){ + if(entity instanceof LivingEntity li){ + livingEntities.add(li); + } + } + launchAutoTrace(arrows,livingEntities); + } + public Arrow spawnArrowRandomly(Location loc,Player p,int damage){ + //0.5的生成位置偏移 + Location loc2=loc.clone().add(rand.nextFloat(-LOCATION_DELTA,LOCATION_DELTA),rand.nextFloat(-LOCATION_DELTA/4,0),rand.nextFloat(-LOCATION_DELTA,LOCATION_DELTA)); + //10度的偏差 + loc2.setPitch(loc2.getPitch()+rand.nextFloat(-SIGHT_DELTA,SIGHT_DELTA)); + loc2.setYaw(loc2.getYaw()+rand.nextFloat(-SIGHT_DELTA,SIGHT_DELTA)); + Arrow a= loc.getWorld().spawnArrow(loc2,loc2.getDirection(),ARROW_SPEED,ARROW_EXIST_TIME); + a.setPickupStatus(AbstractArrow.PickupStatus.CREATIVE_ONLY); + a.setDamage(damage); + a.setCritical(false); + a.setShooter(p); + a.setGravity(false); + a.setPierceLevel(4); + return a; + } + public void launchAutoTrace(HashSet arrows,HashSet targetEntities){ + HashSet runningArrows=new HashSet<>(arrows); + BukkitRunnable task = new BukkitRunnable() { + protected int runTime; + protected boolean isRunning=false; + + public void run(){ + if(isRunning){ + return; + } + isRunning=true; + if(runTime>=MAX_TRACETIME){ + this.cancel(); + }else { + runTime++; + try{ + if(runTime>5){ + Iterator iterator=runningArrows.iterator(); + HashMap targetMap=new HashMap<>(); + while(iterator.hasNext()){ + Arrow arrow=iterator.next(); + if(arrow.isOnGround()||arrow.isDead()||!arrow.isValid()||arrow.isInBlock()){ + iterator.remove(); + arrows.remove(arrow); + }else if(arrow.getPierceLevel()<=0){ + iterator.remove(); + } + else { + Location loc=arrow.getLocation(); + float minDistance=RAYTRACE_RANGE; + LivingEntity choosedEntity=null; + Iterator iterator2=targetEntities.iterator(); + while(iterator2.hasNext()){ + LivingEntity targetEntity=iterator2.next(); + if(targetEntity.isDead()||!targetEntity.isValid()){ + iterator2.remove(); + }else { + float distance=(float) loc.distance(targetEntity.getLocation()); + if(distance{ + for(Map.Entry entry:targetMap.entrySet()){ + retrackArrow(entry.getKey(),entry.getValue()); + } + }); + } + for(Arrow arrow:arrows){ + arrow.getWorld().spawnParticle(Particle.CHERRY_LEAVES,arrow.getLocation(),3,0.0,0.0,0.0,1,null,true); + if(runTime%2==0&&runTime>5) + arrow.getWorld().spawnParticle(Particle.FLAME,arrow.getLocation(),0,0.0,0.0,0.0,1,null,true); + } + }finally { + isRunning=false; + } + } + } + }; + Schedules.launchSchedules(task,2*PERIOD_TRACETIME,false,PERIOD_TRACETIME); + } + public void retrackArrow(Arrow arrow,LivingEntity target){ + Location loc=arrow.getLocation(); + Location targetLoc=target.getEyeLocation(); + if(loc.distance(targetLoc)<2.0f){ + return; + }else { + arrow.setVelocity(targetLoc.subtract(loc).toVector().normalize().multiply(ARROW_SPEED*DEFLECTION_RATE).add(arrow.getVelocity().multiply(1.0f-DEFLECTION_RATE))); + } + } +} diff --git a/src/main/java/me/matl114/logitech/SlimefunItem/Machines/SpecialMachines/TntGenerator.java b/src/main/java/me/matl114/logitech/SlimefunItem/Machines/SpecialMachines/TntGenerator.java index 487f0dd..a036424 100644 --- a/src/main/java/me/matl114/logitech/SlimefunItem/Machines/SpecialMachines/TntGenerator.java +++ b/src/main/java/me/matl114/logitech/SlimefunItem/Machines/SpecialMachines/TntGenerator.java @@ -205,7 +205,7 @@ public void newMenuInstance(BlockMenu menu, Block block){ dh.setInt(2,delay); dh.setInt(3,0); if(menu.getItemInSlot(START_SLOT)==null){ - menu.replaceExistingItem(START_SLOT,START_ITEM_OFF); + menu.replaceExistingItem(START_SLOT,START_ITEM_ON); } menu.addMenuClickHandler(START_SLOT,((player, i, itemStack, clickAction) -> { if(itemStack!=null&&itemStack.getType()!=Material.GREEN_STAINED_GLASS_PANE){ @@ -213,7 +213,7 @@ public void newMenuInstance(BlockMenu menu, Block block){ }else { menu.replaceExistingItem(START_SLOT,START_ITEM_OFF); } - menu.getLocation().getBlock().getState().update(true,true); + menu.getLocation().getBlock().setBlockData(menu.getLocation().getBlock().getBlockData(),true); // .getState().update(true,true); return false; })); menu.replaceExistingItem(ADJUSTMENT_SLOT,getAdjustmentDisplay(dh)); diff --git a/src/main/java/me/matl114/logitech/Unittest.java b/src/main/java/me/matl114/logitech/Unittest.java index 8047f82..aa35ce0 100644 --- a/src/main/java/me/matl114/logitech/Unittest.java +++ b/src/main/java/me/matl114/logitech/Unittest.java @@ -1,12 +1,17 @@ -package me.matl114.logitech; - -public class Unittest { - //为什么要单开一个文件夹? - //好问题 - - //测试1 测试dataload和menu的 顺序 - //测试2 测试dataload时候区块的加载状态 - //测试3 测试chunkloadEvent调用顺序 - //修改DataCache为不加载的反射方法 - public static boolean SFDATA_TEST =false; -} +package me.matl114.logitech; + +public class Unittest { + //为什么要单开一个文件夹? + //好问题 + + //测试1 测试dataload和menu的 顺序 + //测试2 测试dataload时候区块的加载状态 + //测试3 测试chunkloadEvent调用顺序 + //修改DataCache为不加载的反射方法 + public static boolean SFDATA_TEST =false; + //TOdo 增加玩家编辑器 + //TODO 空间塔 + //TODO 时间加速器 + //TODO 随机传送装置 + //TODO 物品命名机 +} diff --git a/src/main/java/me/matl114/logitech/Utils/AddUtils.java b/src/main/java/me/matl114/logitech/Utils/AddUtils.java index 29e89c4..a9d7843 100644 --- a/src/main/java/me/matl114/logitech/Utils/AddUtils.java +++ b/src/main/java/me/matl114/logitech/Utils/AddUtils.java @@ -1,882 +1,882 @@ -package me.matl114.logitech.Utils; - -import com.google.common.base.Preconditions; -import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon; -import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItem; -import io.github.thebusybiscuit.slimefun4.api.items.SlimefunItemStack; -import io.github.thebusybiscuit.slimefun4.implementation.Slimefun; -import io.github.thebusybiscuit.slimefun4.libraries.dough.chat.ChatInput; -import io.github.thebusybiscuit.slimefun4.libraries.dough.collections.Pair; -import io.github.thebusybiscuit.slimefun4.libraries.dough.common.ChatColors; -import io.github.thebusybiscuit.slimefun4.libraries.dough.items.CustomItemStack; -import io.github.thebusybiscuit.slimefun4.utils.LoreBuilder; -import me.matl114.logitech.Language; -import me.matl114.logitech.MyAddon; -import me.matl114.logitech.SlimefunItem.AddItem; -import me.matl114.logitech.Utils.UtilClass.ItemClass.*; -import me.matl114.logitech.Utils.UtilClass.FunctionalClass.LoreDecorator; -import me.matl114.logitech.Utils.UtilClass.FunctionalClass.StringDecorator; -import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.MachineRecipe; -import net.md_5.bungee.api.ChatColor; -import net.md_5.bungee.api.chat.ClickEvent; -import net.md_5.bungee.api.chat.HoverEvent; -import net.md_5.bungee.api.chat.TextComponent; -import net.md_5.bungee.api.chat.hover.content.Text; -import org.bukkit.Material; -import org.bukkit.NamespacedKey; -import org.bukkit.enchantments.Enchantment; -import org.bukkit.entity.Damageable; -import org.bukkit.entity.Entity; -import org.bukkit.entity.Player; -import org.bukkit.inventory.ItemFlag; -import org.bukkit.inventory.ItemStack; -import org.bukkit.inventory.meta.ItemMeta; - -import javax.annotation.Nonnull; -import java.text.DecimalFormat; -import java.text.NumberFormat; -import java.util.*; -import java.util.concurrent.ThreadLocalRandom; -import java.util.function.Consumer; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -public class AddUtils { - public static final String ADDON_NAME="逻辑工艺"; - public static final String ADDON_ID="LOGITECH"; - public static final SlimefunAddon ADDON_INSTANCE=MyAddon.getInstance(); - public static boolean USE_IDDECORATOR=true; - private static final double SF_TPS = 20.0 / (double) Slimefun.getTickerTask().getTickRate(); - private static final DecimalFormat FORMAT = new DecimalFormat("###,###,###,###,###,###.#"); - private static Random random=new Random(); - public static String formatDouble(double s){ - return FORMAT.format(s); - } - public static String idDecorator(String b){ - if(USE_IDDECORATOR){ - return ADDON_ID+"_"+b; - } - else return b; - } - public static NamespacedKey getNameKey(String str) { - return new NamespacedKey(MyAddon.getInstance(),str); - } - public static String desc(String str) { - return "&7" + str; - } - public static String addonTag(String str) { - return "&3"+ADDON_NAME+" " + str; - } - public static final String[] COLOR_MAP=new String[]{"&0","&1","&2","&3","&4","&5","&6","&7","&8","&9","&a","&b","&c","&d","&e","&f"}; - public static String resolveRGB(int rgb){ - if(rgb>16777216){ - rgb=16777216; - } - else if (rgb<0){ - rgb=0; - } - String prefix=""; - for(int i=0;i<6;i++){ - int r=rgb%16; - rgb=rgb/16; - prefix=COLOR_MAP[r]+prefix; - } - prefix="&x"+prefix; - return prefix; - } - - public static String resolveRGB(String rgb) throws IllegalArgumentException { - if(rgb.length()!=6){ - throw new IllegalArgumentException("Invalid RGB String"); - } - String prefix="&x"; - for (int i=0;i<6;i++){ - prefix=prefix+"&"+rgb.substring(i,i+1); - } - return prefix; - } - public static int rgb2int(String rgb) throws IllegalArgumentException{ - if(rgb.length()!=6){ - throw new IllegalArgumentException("Invalid RGB String"); - } - int value=0; - for (int i=0;i<6;i++){ - char c=rgb.charAt(i); - if(Character.isDigit(c)){ - value=value*16+(c-'0'); - } - else if(c>='a'&&c<='f'){ - value=value*16+(c-'a'+10); - } - else if(c>='A'&&c<='F'){ - value=value*16+(c-'A'+10); - } - else throw new IllegalArgumentException("Invalid RGB String"); - } - return value; - } - public static final int START_CODE=rgb2int("eb33eb"); - //15409899; - public static final int END_CODE=rgb2int("970097"); - public static String color(String str){ - return resolveRGB(START_CODE)+str; - } - public static String colorful(String str) { - int len=str.length()-1; - if(len<=0){ - return resolveRGB(START_CODE)+str; - } - else{ - int start=START_CODE; - int end=END_CODE; - int[] rgbs=new int[9]; - for(int i=0;i<3;++i){ - rgbs[i]=start%256; - rgbs[i+3]=end%256; - rgbs[i+6]=rgbs[i+3]-rgbs[i]; - start=start/256; - end=end/256; - } - String str2=""; - for(int i=0;i<=len;i++){ - str2=str2+resolveRGB(START_CODE+65536*((rgbs[8]*i)/len)+256*((rgbs[7]*i)/len)+((rgbs[6]*i)/len))+str.substring(i,i+1); - } - return str2; - - } - } - public static final ItemStack[] NULL_RECIPE=new ItemStack[]{null,null,null,null,null,null,null,null,null} ; - public static final ItemMeta NULL_META=null; - public enum Theme{ - NONE( - ((a)->{return a;}), - ((a)->{return a;}) - ), - DEFAULT( - ((a)->{return a;}), - ((List a)->{{ - List finallist=new ArrayList<>() ; - for(String i:a){ - finallist.add(desc(i)); - } - return finallist; - } - }) - ), - ITEM1( - AddUtils::color, - ((List a)->{{ - List finallist=new ArrayList<>() ; - for(String i:a){ - finallist.add(desc(i)); - } - //减少开销 -// finallist.add(""); -// finallist.add(addonTag(Language.get("Theme.ITEM1.Name"))); - return finallist; - } - }) - ), - ITEM2( - AddUtils::colorful, - ((List a)->{{ - List finallist=new ArrayList<>() ; - for(String i:a){ - finallist.add(desc(i)); - } - //减少开销 - finallist.add(""); - finallist.add(addonTag(Language.get("Theme.ITEM1.Name"))); - return finallist; - } - }) - ), - MACHINE1( - AddUtils::colorful, - ((List a)->{{ - List finallist=new ArrayList<>() ; - for(String i:a){ - finallist.add(desc(i)); - } - finallist.add(""); - finallist.add(addonTag(Language.get("Theme.MACHINE1.Name"))); - return finallist; - } - }) - ), - MACHINE2( - AddUtils::colorful, - ((List a)->{{ - List finallist=new ArrayList<>() ; - for(String i:a){ - finallist.add(desc(i)); - } - finallist.add(""); - finallist.add(addonTag(Language.get("Theme.MACHINE2.Name"))); - return finallist; - } - }) - ), - MULTIBLOCK1( - AddUtils::colorful, - ((List a)->{{ - List finallist=new ArrayList<>() ; - for(String i:a){ - finallist.add(desc(i)); - } - finallist.add(""); - finallist.add(addonTag(Language.get("Theme.MULTIBLOCK1.Name"))); - return finallist; - } - }) - ), - MULTIBLOCK2( - AddUtils::colorful, - ((List a)->{{ - List finallist=new ArrayList<>() ; - for(String i:a){ - finallist.add(desc(i)); - } - finallist.add(""); - finallist.add(addonTag(Language.get("Theme.MULTIBLOCK2.Name"))); - return finallist; - } - }) - ), - MANUAL1( - AddUtils::colorful, - ((List a)->{{ - List finallist=new ArrayList<>() ; - for(String i:a){ - finallist.add(desc(i)); - } - finallist.add(""); - finallist.add(addonTag(Language.get("Theme.MANUAL1.Name"))); - return finallist; - } - }) - ), - ADVANCED1( - AddUtils::colorful, - ((List a)->{{ - List finallist=new ArrayList<>() ; - for(String i:a){ - finallist.add(desc(i)); - } - finallist.add(""); - finallist.add(addonTag(Language.get("Theme.ADVANCED1.Name"))); - return finallist; - } - }) - ), - CARGO1( - AddUtils::colorful, - ((List a)->{{ - List finallist=new ArrayList<>() ; - for(String i:a){ - finallist.add(desc(i)); - } - finallist.add(""); - finallist.add(addonTag(Language.get("Theme.CARGO1.Name"))); - return finallist; - } - }) - ), - BENCH1( - AddUtils::colorful, - ((List a)->{{ - List finallist=new ArrayList<>() ; - for(String i:a){ - finallist.add(desc(i)); - } - finallist.add(""); - finallist.add(addonTag(Language.get("Theme.BENCH1.Name"))); - return finallist; - } - }) - ), - CATEGORY( - ((a)->{return a;}), - ((List a)->{{ - List finallist=new ArrayList<>() ; - //finallist.add(""); - for(String i:a){ - finallist.add(desc(i)); - } - finallist.add(""); - finallist.add(Language.get("Theme.CATEGORY.Name")); - return finallist; - } - }) - ), - CATEGORY2( - ((a)->{return a;}), - ((List a)->{{ - List finallist=new ArrayList<>() ; - //finallist.add(""); - for(String i:a){ - finallist.add(desc(i)); - } - finallist.add(""); - finallist.add(Language.get("Theme.CATEGORY2.Name")); - return finallist; - } - })), - INFO1( - ((a)->{return a;}), - ((List a)->{{ - List finallist=new ArrayList<>() ; - for(String i:a){ - finallist.add(desc(i)); - } - finallist.add(""); - finallist.add(Language.get("Theme.INFO1.Name")); - return finallist; - } - }) - ), - MENU1( - ((a)->{return a;}), - ((List a)->{{ - List finallist=new ArrayList<>() ; - for(String i:a){ - finallist.add(desc(i)); - } - finallist.add(""); - finallist.add(Language.get("Theme.MENU1.Name")); - return finallist; - } - }) - ) - ; - private final StringDecorator NAME_DEC; - private final LoreDecorator LORE_DEC; - Theme(StringDecorator nameDec, LoreDecorator loreDec){ - NAME_DEC=nameDec; - LORE_DEC=loreDec; - } - - } - public static SlimefunItemStack themed(String id, Material itemStack, String name, String... lore){ - return themed(id,new ItemStack(itemStack),name,lore); - } - public static SlimefunItemStack themed(String id, ItemStack itemStack, String name, String... lore){ - return themed(id, itemStack, name, Arrays.asList(lore)); - } - public static SlimefunItemStack themed(String id ,Material itemStack ,String name,List lore){ - return themed(id,new ItemStack(itemStack),name,lore); - } - public static SlimefunItemStack themed(String id ,ItemStack itemstack ,String name,List lore){ - return themed(id,itemstack,Theme.DEFAULT,name,lore); - } - public static SlimefunItemStack themed(String id, Material itemStack, Theme themeType, String name, String... lore){ - return themed(id,new ItemStack(itemStack),themeType,name,lore); - } - public static SlimefunItemStack themed(String id, ItemStack itemStack, Theme themeType, String name, String... lore){ - return themed(id,itemStack,themeType,name,Arrays.asList(lore)); - } - public static SlimefunItemStack themed(String id, Material itemStack, Theme themeType, String name, List lore){ - return themed(id,new ItemStack(itemStack),themeType,name,lore); - } - public static SlimefunItemStack themed(String id, ItemStack itemStack, Theme themeType, String name, List lore){ - List finallist=themeType.LORE_DEC.decorator(lore); - return new SlimefunItemStack( - idDecorator(id), - itemStack, - themeType.NAME_DEC.decorate(name), - finallist.toArray(String[]::new) - ); - } - public static ItemStack themed(Material material, Theme themeType, String name, String... lore){ - return themed(material,themeType,name,Arrays.asList(lore)); - } - public static ItemStack themed(Material material, Theme themeType, String name, List lore){ - return themed(new ItemStack(material),themeType,name,lore); - } - public static ItemStack themed(ItemStack itemStack, Theme themeType, String name, String... lore){ - return themed(itemStack,themeType,name,Arrays.asList(lore)); - } - public static ItemStack themed(ItemStack itemStack, Theme themeType, String name, List lore){ - List finallist=themeType.LORE_DEC.decorator(lore); - return new CustomItemStack( - itemStack, - themeType.NAME_DEC.decorate(name), - finallist.toArray(String[]::new) - ); - } - public static ItemStack themed(Material material, String name, String... lore){ - return themed(material,Theme.DEFAULT,name,lore); - } - public static ItemStack themed(ItemStack itemStack, String name, String... lore){ - return themed(itemStack,Theme.DEFAULT,name,lore); - } - public static String getItemId(ItemStack its){ - if(its==null)return null; - SlimefunItem sfitem=SlimefunItem.getByItem(its); - if(sfitem==null){ - return (its.getAmount()==1?"":String.valueOf(its.getAmount()))+its.getType().toString().toUpperCase(Locale.ROOT); - }else { - return (its.getAmount()==1?"":String.valueOf(its.getAmount()))+sfitem.getId(); - } - } - public static ItemStack resolveItem(Object a){ - if(a==null)return null; - if(a instanceof ItemStack){ - return (ItemStack) a; - }else if(a instanceof SlimefunItem){ - return ((SlimefunItem) a).getItem().clone(); - }else if(a instanceof Material){ - return new ItemStack((Material) a); - }else if(a instanceof String){ - Pattern re=Pattern.compile("^([0-9]*)(.*)$"); - Matcher info= re.matcher((String)a); - int cnt=-1; - String id; - if(info.find()){ - String amount=info.group(1); - id=info.group(2); - try{ - cnt=Integer.parseInt(amount); - }catch(NumberFormatException e){ - cnt=-1; - } - } - else{ - id=(String) a; - } - try{ - ItemStack b=SlimefunItem.getById(id).getItem(); - if(cnt>0&&cnt!=b.getAmount()){ - b=b.clone(); - b.setAmount(cnt); - } - return b; - }catch (Exception e){ - try{ - ItemStack b=new ItemStack( Material.getMaterial(id)); - if(cnt>0&&cnt!=b.getAmount()){ - b=b.clone(); - b.setAmount(cnt); - } - return b; - }catch (Exception e2){ - Debug.logger("WARNING: Object %s can not be solved ! Required Addon not installed ! Disabling relavent recipes...".formatted(a)); - return AddItem.RESOLVE_FAILED; - } - } - } else { - Debug.logger("WARNING: failed to solve Object "+a.toString()); - return AddItem.RESOLVE_FAILED; - } - - } - public static Pair buildRecipes(Pair itemStacks){ - return buildRecipes(itemStacks.getFirstValue(),itemStacks.getSecondValue()); - } - public static Pair buildRecipes (Object[] input,Object[] output){ - ItemStack[] a; - ArrayList a_=new ArrayList<>(){{ - - Arrays.stream(input).forEach( - (obj)->{ - ItemStack a__=resolveItem(obj); - this.add(a__); - } - ); - }}; - a=a_.toArray(new ItemStack[a_.size()]); - ItemStack[] b; - ArrayList b_=new ArrayList<>(){{ - - Arrays.stream(output).forEach( - (obj)->{ - - - ItemStack b__=resolveItem(obj); - this.add(b__); - } - ); - - }}; - b=b_.toArray(new ItemStack[b_.size()]); - return new Pair<>(a,b); - } - public static MachineRecipe buildMachineRecipes(int time,Pair itemStacks){ - Pair b=buildRecipes(itemStacks); - return new MachineRecipe(time,b.getFirstValue(),b.getSecondValue()); - } - public static LinkedHashMap,Integer> buildRecipeMap(LinkedHashMap rawDataMap){ - if(rawDataMap==null)return new LinkedHashMap<>(); - LinkedHashMap,Integer> map = new LinkedHashMap<>(); - rawDataMap.forEach((k,v)->{ - if(k instanceof Object[]){ - - map.put(AddUtils.buildRecipes( - Arrays.copyOfRange((Object[])k,0,2),Arrays.copyOfRange((Object[])k,2,4)),v); - } - else if (k instanceof Pair){ - try{ - - Object[] input=(Object[])((Pair)k).getFirstValue(); - if(input==null){ - input=new Object[]{}; - } - Object[] output=(Object[])((Pair)k).getSecondValue(); - if(output==null){ - output=new Object[]{}; - } - map.put(AddUtils.buildRecipes(input,output),v); - }catch (Exception a){ - throw new IllegalArgumentException("illegalArguments in recipe Pair, Pair val must be T[]"); - } - } - }); - return map; - } - public static ItemStack addLore(ItemStack item,String... lores){ - - ItemStack item2=item.clone(); - - ItemMeta meta=item2.getItemMeta(); - List finallist=meta.hasLore() ? meta.getLore() : new ArrayList<>(); - for (String l:lores){ - finallist.add(resolveColor(l)); - } - meta.setLore(finallist); - item2.setItemMeta(meta); - return item2; - } - public static ItemStack renameItem(ItemStack item,String name){ - ItemStack item2=item.clone(); - - ItemMeta meta=item2.getItemMeta(); - meta.setDisplayName(resolveColor(name)); - item2.setItemMeta(meta); - return item2; - } - public static String resolveColor(String s){ - return translateAlternateColorCodes('&', s); - } - public static String translateAlternateColorCodes(char altColorChar, String textToTranslate) { - Preconditions.checkArgument(textToTranslate != null, "Cannot translate null text"); - char[] b = textToTranslate.toCharArray(); - - for(int i = 0; i < b.length - 1; ++i) { - if (b[i] == altColorChar && "0123456789AaBbCcDdEeFfKkLlMmNnOoRrXx".indexOf(b[i + 1]) > -1) { - b[i] = 167; - } - } - - return new String(b); - } - public static String formatEnergy(int energy) { - return FORMAT.format((double)energy * SF_TPS); - } - public static String energyPerSecond(int energy) { - return "&8⇨ &e⚡ &7" + formatEnergy(energy) + " J/s"; - } - public static String speedDisplay(int multiply){ - return "&8⇨ &e⚡ &7速度: &b"+ multiply + "x"; - } - public static String energyPerTick(int energy){ - return "&8⇨ &e⚡ &7" + FORMAT.format((double)energy) + " J/t"; - } - public static String energyPerCraft(int energy){ - return "&8⇨ &e⚡ &7" + FORMAT.format((double)energy ) + " J 每次合成"; - } - public static ItemStack workBenchInfoAdd(ItemStack item,int energyBuffer,int energyConsumption){ - return AddUtils.addLore(item, LoreBuilder.powerBuffer(energyBuffer), AddUtils.energyPerCraft(energyConsumption)); - } - public static String tickPerGen(int time){ - return "&8⇨ &7速度: &b每 " + Integer.toString(time) + " 粘液刻生成一次"; - } - - public static ItemStack capacitorInfoAdd(ItemStack item,int energyBuffer){ - return AddUtils.addLore(item, LoreBuilder.powerBuffer(energyBuffer)); - } - public static ItemStack machineInfoAdd(ItemStack item,int energyBuffer,int energyConsumption){ - return machineInfoAdd(item,energyBuffer,energyConsumption,Settings.USE_SEC_EXP); - } - public static ItemStack machineInfoAdd(ItemStack item,int energyBuffer,int energyConsumption,Settings type){ - if(type==Settings.USE_SEC_EXP) { - return AddUtils.addLore(item, LoreBuilder.powerBuffer(energyBuffer), AddUtils.energyPerSecond(energyConsumption)); - } - else if(type==Settings.USE_TICK_EXP) { - return AddUtils.addLore( item, LoreBuilder.powerBuffer(energyBuffer), AddUtils.energyPerTick(energyConsumption)); - } - else return null; - } - public static SlimefunItemStack smgInfoAdd(ItemStack item,int time){ - return (SlimefunItemStack) AddUtils.addLore( item, tickPerGen(time)); - } - public static ItemStack advancedMachineShow(ItemStack stack,int limit){ - return AddUtils.addLore(stack,"&7机器合成进程数: %s".formatted(limit)); - } - public static String getPercentFormat(double b){ - DecimalFormat df = new DecimalFormat("#.##"); - NumberFormat nf = NumberFormat.getPercentInstance(); - return nf.format(Double.parseDouble(df.format(b))); - } - - /** - * return int values in [0,length) - * @param length - * @return - */ - public static int random(int length){ - return random.nextInt(length); - } - //generate rand in (0,1) - public static double standardRandom(){ - return random.nextDouble(); - } - //we supposed that u have checked these shits - - public static RandomItemStack eqRandItemStackFactory(List list){ - LinkedHashMap map=new LinkedHashMap<>(); - int i=list.size(); - for(int j=0;j st,List it){ - LinkedHashMap map=new LinkedHashMap<>(); - int len=st.size(); - for(int i=0;i list){ - LinkedHashMap c=new LinkedHashMap<>(); - boolean isEqPro=true; - int last_value=-1; - for(Map.Entry s:list.entrySet()){ - Object o=s.getKey(); - if(o!=null){ - ItemStack o_=AddUtils.resolveItem(o); - if(o_!=null){ - c.put(o_,s.getValue()); - } - else return null; - }else return null; - if(last_value>0){ - - isEqPro=(last_value==s.getValue()); - } - assert s.getValue()>0; - last_value=s.getValue(); - } - if(isEqPro){ - return new EqProRandomStack(c); - } - return new RandomItemStack(c); - } - public static ItemStack probItemStackFactory(ItemStack it,int prob){ - if(prob>=100)return it; - prob=prob<0?0:prob; - return new ProbItemStack(it,((double)prob)/100 ); - } - public static ItemStack equalItemStackFactory(List list){ - return equalItemStackFactory(list,1); - } - public static ItemStack equalItemStackFactory(List list,int t){ - if(list.isEmpty())return null; - if(list.size()==1){ - ItemStack it= AddUtils.resolveItem(list.get(0)); - it.setAmount(t); - return it; - } - LinkedHashMap c=new LinkedHashMap<>(); - for(Object o:list){ - if(o!=null){ - ItemStack o_=AddUtils.resolveItem(o); - if(o_!=null){ - c.put(o_,1); - } - else return null; - }else return null; - } - - EquivalItemStack it= new EquivalItemStack(c); - it.setEqualAmount(t); - return it; - } - - /** - * like /give command - * @param p - * @param toGive - */ - public static void forceGive(Player p, ItemStack toGive,int amount) { - ItemStack incoming; - int maxSize=toGive.getMaxStackSize(); - while(amount>0) { - incoming = toGive.clone(); - int amount2=Math.min(maxSize, amount); - incoming.setAmount(amount2); - amount-=amount2; - Collection leftover = p.getInventory().addItem(incoming).values(); - for (ItemStack itemStack : leftover) { - p.getWorld().dropItemNaturally(p.getLocation(), itemStack); - } - } - } - - /** - * add glowing effect to itemstack - * no clone in this method - * @param stack - */ - public static ItemStack addGlow(ItemStack stack){ - //stack.addEnchantment(Enchantment.ARROW_INFINITE, 1); - ItemMeta meta=stack.getItemMeta(); - meta.addEnchant(Enchantment.ARROW_INFINITE, 1, true); - meta.addItemFlags(ItemFlag.HIDE_ENCHANTS); - stack.setItemMeta(meta); - return stack; - } - public static ItemStack hideAllFlags(ItemStack stack){ - ItemMeta meta=stack.getItemMeta(); - meta.addItemFlags(ItemFlag.HIDE_ENCHANTS); - meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES); - meta.addItemFlags(ItemFlag.HIDE_ARMOR_TRIM); - meta.addItemFlags(ItemFlag.HIDE_DESTROYS); - meta.addItemFlags(ItemFlag.HIDE_DYE); - meta.addItemFlags(ItemFlag.HIDE_PLACED_ON); - meta.addItemFlags(ItemFlag.HIDE_POTION_EFFECTS); - stack.setItemMeta(meta); - return stack; - } - /** - * get a info display item to present in SF machineRecipe display - * @param title - * @param name - * @return - */ - public static ItemStack getInfoShow(String title,String... name){ - return new DisplayItemStack(new CustomItemStack(Material.BOOK,title,name)); - } - - /** - * set the specific lore line in stack ,will not clone - * @param stack - * @param index - * @param str - * @return - */ - public static ItemStack setLore(ItemStack stack,int index,String str){ - ItemMeta meta=stack.getItemMeta(); - List lore=meta.getLore(); - while(index>=lore.size()){ - lore.add(""); - } - lore.set(index,resolveColor(str)); - meta.setLore(lore); - stack.setItemMeta(meta); - return stack; - } - /** - * set the total lore line in stack ,will not clone - * @param stack - * @param str - * @return - */ - public static ItemStack setLore(ItemStack stack,String... str){ - ItemMeta meta=stack.getItemMeta(); - List lore=new ArrayList<>(); - int len=str.length; - for (int i=0;i getPlanks(@Nonnull Material log) { - String materialName = log.name().replace("STRIPPED_", ""); - int endIndex = materialName.lastIndexOf('_'); - - if (endIndex > 0) { - materialName = materialName.substring(0, endIndex) + "_PLANKS"; - return Optional.ofNullable(Material.getMaterial(materialName)); - } else { - // Fixed #3651 - Do not panic because of one weird wood type. - return Optional.empty(); - } - } - public static void displayCopyString(Player player,String display,String hover,String copy){ - final TextComponent link = new TextComponent(display); - link.setColor(ChatColor.YELLOW); - link.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text(hover))); - link.setClickEvent(new ClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD,copy)); - player.spigot().sendMessage(link); - } - public static void asyncWaitPlayerInput(Player player, Consumer consumer){ - ChatInput.waitForPlayer( - Slimefun.instance(), - player, - msg ->{ - consumer.accept(msg); - } ); - } - public static ItemStack getGeneratorDisplay(boolean working,String type,int charge,int buffer){ - if(working){ - return new CustomItemStack(Material.GREEN_STAINED_GLASS_PANE,"&a发电中", - "&7类型:&6 %s".formatted(type),"&7&7电量: &6%s/%sJ".formatted(FORMAT.format((double)charge),FORMAT.format((double)buffer))); - }else { - return new CustomItemStack(Material.RED_STAINED_GLASS_PANE,"&a未发电", - "&7类型:&6 %s".formatted(type),"&7&7电量: &6%s/%sJ".formatted(FORMAT.format((double)charge),FORMAT.format((double)buffer))); - } - } - public static String getUUID(){ - return UUID.randomUUID().toString(); - } - public static void broadCast(String string){ - ADDON_INSTANCE.getJavaPlugin().getServer().broadcastMessage(resolveColor(string)); - } - public static ItemStack randAmountItemFactory(ItemStack it,int min,int max){ - if(min16777216){ + rgb=16777216; + } + else if (rgb<0){ + rgb=0; + } + String prefix=""; + for(int i=0;i<6;i++){ + int r=rgb%16; + rgb=rgb/16; + prefix=COLOR_MAP[r]+prefix; + } + prefix="&x"+prefix; + return prefix; + } + + public static String resolveRGB(String rgb) throws IllegalArgumentException { + if(rgb.length()!=6){ + throw new IllegalArgumentException("Invalid RGB String"); + } + String prefix="&x"; + for (int i=0;i<6;i++){ + prefix=prefix+"&"+rgb.substring(i,i+1); + } + return prefix; + } + public static int rgb2int(String rgb) throws IllegalArgumentException{ + if(rgb.length()!=6){ + throw new IllegalArgumentException("Invalid RGB String"); + } + int value=0; + for (int i=0;i<6;i++){ + char c=rgb.charAt(i); + if(Character.isDigit(c)){ + value=value*16+(c-'0'); + } + else if(c>='a'&&c<='f'){ + value=value*16+(c-'a'+10); + } + else if(c>='A'&&c<='F'){ + value=value*16+(c-'A'+10); + } + else throw new IllegalArgumentException("Invalid RGB String"); + } + return value; + } + public static final int START_CODE=rgb2int("eb33eb"); + //15409899; + public static final int END_CODE=rgb2int("970097"); + public static String color(String str){ + return resolveRGB(START_CODE)+str; + } + public static String colorful(String str) { + int len=str.length()-1; + if(len<=0){ + return resolveRGB(START_CODE)+str; + } + else{ + int start=START_CODE; + int end=END_CODE; + int[] rgbs=new int[9]; + for(int i=0;i<3;++i){ + rgbs[i]=start%256; + rgbs[i+3]=end%256; + rgbs[i+6]=rgbs[i+3]-rgbs[i]; + start=start/256; + end=end/256; + } + String str2=""; + for(int i=0;i<=len;i++){ + str2=str2+resolveRGB(START_CODE+65536*((rgbs[8]*i)/len)+256*((rgbs[7]*i)/len)+((rgbs[6]*i)/len))+str.substring(i,i+1); + } + return str2; + + } + } + public static final ItemStack[] NULL_RECIPE=new ItemStack[]{null,null,null,null,null,null,null,null,null} ; + public static final ItemMeta NULL_META=null; + public enum Theme{ + NONE( + ((a)->{return a;}), + ((a)->{return a;}) + ), + DEFAULT( + ((a)->{return a;}), + ((List a)->{{ + List finallist=new ArrayList<>() ; + for(String i:a){ + finallist.add(desc(i)); + } + return finallist; + } + }) + ), + ITEM1( + AddUtils::color, + ((List a)->{{ + List finallist=new ArrayList<>() ; + for(String i:a){ + finallist.add(desc(i)); + } + //减少开销 +// finallist.add(""); +// finallist.add(addonTag(Language.get("Theme.ITEM1.Name"))); + return finallist; + } + }) + ), + ITEM2( + AddUtils::colorful, + ((List a)->{{ + List finallist=new ArrayList<>() ; + for(String i:a){ + finallist.add(desc(i)); + } + //减少开销 + finallist.add(""); + finallist.add(addonTag(Language.get("Theme.ITEM1.Name"))); + return finallist; + } + }) + ), + MACHINE1( + AddUtils::colorful, + ((List a)->{{ + List finallist=new ArrayList<>() ; + for(String i:a){ + finallist.add(desc(i)); + } + finallist.add(""); + finallist.add(addonTag(Language.get("Theme.MACHINE1.Name"))); + return finallist; + } + }) + ), + MACHINE2( + AddUtils::colorful, + ((List a)->{{ + List finallist=new ArrayList<>() ; + for(String i:a){ + finallist.add(desc(i)); + } + finallist.add(""); + finallist.add(addonTag(Language.get("Theme.MACHINE2.Name"))); + return finallist; + } + }) + ), + MULTIBLOCK1( + AddUtils::colorful, + ((List a)->{{ + List finallist=new ArrayList<>() ; + for(String i:a){ + finallist.add(desc(i)); + } + finallist.add(""); + finallist.add(addonTag(Language.get("Theme.MULTIBLOCK1.Name"))); + return finallist; + } + }) + ), + MULTIBLOCK2( + AddUtils::colorful, + ((List a)->{{ + List finallist=new ArrayList<>() ; + for(String i:a){ + finallist.add(desc(i)); + } + finallist.add(""); + finallist.add(addonTag(Language.get("Theme.MULTIBLOCK2.Name"))); + return finallist; + } + }) + ), + MANUAL1( + AddUtils::colorful, + ((List a)->{{ + List finallist=new ArrayList<>() ; + for(String i:a){ + finallist.add(desc(i)); + } + finallist.add(""); + finallist.add(addonTag(Language.get("Theme.MANUAL1.Name"))); + return finallist; + } + }) + ), + ADVANCED1( + AddUtils::colorful, + ((List a)->{{ + List finallist=new ArrayList<>() ; + for(String i:a){ + finallist.add(desc(i)); + } + finallist.add(""); + finallist.add(addonTag(Language.get("Theme.ADVANCED1.Name"))); + return finallist; + } + }) + ), + CARGO1( + AddUtils::colorful, + ((List a)->{{ + List finallist=new ArrayList<>() ; + for(String i:a){ + finallist.add(desc(i)); + } + finallist.add(""); + finallist.add(addonTag(Language.get("Theme.CARGO1.Name"))); + return finallist; + } + }) + ), + BENCH1( + AddUtils::colorful, + ((List a)->{{ + List finallist=new ArrayList<>() ; + for(String i:a){ + finallist.add(desc(i)); + } + finallist.add(""); + finallist.add(addonTag(Language.get("Theme.BENCH1.Name"))); + return finallist; + } + }) + ), + CATEGORY( + ((a)->{return a;}), + ((List a)->{{ + List finallist=new ArrayList<>() ; + //finallist.add(""); + for(String i:a){ + finallist.add(desc(i)); + } + finallist.add(""); + finallist.add(Language.get("Theme.CATEGORY.Name")); + return finallist; + } + }) + ), + CATEGORY2( + ((a)->{return a;}), + ((List a)->{{ + List finallist=new ArrayList<>() ; + //finallist.add(""); + for(String i:a){ + finallist.add(desc(i)); + } + finallist.add(""); + finallist.add(Language.get("Theme.CATEGORY2.Name")); + return finallist; + } + })), + INFO1( + ((a)->{return a;}), + ((List a)->{{ + List finallist=new ArrayList<>() ; + for(String i:a){ + finallist.add(desc(i)); + } + finallist.add(""); + finallist.add(Language.get("Theme.INFO1.Name")); + return finallist; + } + }) + ), + MENU1( + ((a)->{return a;}), + ((List a)->{{ + List finallist=new ArrayList<>() ; + for(String i:a){ + finallist.add(desc(i)); + } + finallist.add(""); + finallist.add(Language.get("Theme.MENU1.Name")); + return finallist; + } + }) + ) + ; + private final StringDecorator NAME_DEC; + private final LoreDecorator LORE_DEC; + Theme(StringDecorator nameDec, LoreDecorator loreDec){ + NAME_DEC=nameDec; + LORE_DEC=loreDec; + } + + } + public static SlimefunItemStack themed(String id, Material itemStack, String name, String... lore){ + return themed(id,new ItemStack(itemStack),name,lore); + } + public static SlimefunItemStack themed(String id, ItemStack itemStack, String name, String... lore){ + return themed(id, itemStack, name, Arrays.asList(lore)); + } + public static SlimefunItemStack themed(String id ,Material itemStack ,String name,List lore){ + return themed(id,new ItemStack(itemStack),name,lore); + } + public static SlimefunItemStack themed(String id ,ItemStack itemstack ,String name,List lore){ + return themed(id,itemstack,Theme.DEFAULT,name,lore); + } + public static SlimefunItemStack themed(String id, Material itemStack, Theme themeType, String name, String... lore){ + return themed(id,new ItemStack(itemStack),themeType,name,lore); + } + public static SlimefunItemStack themed(String id, ItemStack itemStack, Theme themeType, String name, String... lore){ + return themed(id,itemStack,themeType,name,Arrays.asList(lore)); + } + public static SlimefunItemStack themed(String id, Material itemStack, Theme themeType, String name, List lore){ + return themed(id,new ItemStack(itemStack),themeType,name,lore); + } + public static SlimefunItemStack themed(String id, ItemStack itemStack, Theme themeType, String name, List lore){ + List finallist=themeType.LORE_DEC.decorator(lore); + return new SlimefunItemStack( + idDecorator(id), + itemStack, + themeType.NAME_DEC.decorate(name), + finallist.toArray(String[]::new) + ); + } + public static ItemStack themed(Material material, Theme themeType, String name, String... lore){ + return themed(material,themeType,name,Arrays.asList(lore)); + } + public static ItemStack themed(Material material, Theme themeType, String name, List lore){ + return themed(new ItemStack(material),themeType,name,lore); + } + public static ItemStack themed(ItemStack itemStack, Theme themeType, String name, String... lore){ + return themed(itemStack,themeType,name,Arrays.asList(lore)); + } + public static ItemStack themed(ItemStack itemStack, Theme themeType, String name, List lore){ + List finallist=themeType.LORE_DEC.decorator(lore); + return new CustomItemStack( + itemStack, + themeType.NAME_DEC.decorate(name), + finallist.toArray(String[]::new) + ); + } + public static ItemStack themed(Material material, String name, String... lore){ + return themed(material,Theme.DEFAULT,name,lore); + } + public static ItemStack themed(ItemStack itemStack, String name, String... lore){ + return themed(itemStack,Theme.DEFAULT,name,lore); + } + public static String getItemId(ItemStack its){ + if(its==null)return null; + SlimefunItem sfitem=SlimefunItem.getByItem(its); + if(sfitem==null){ + return (its.getAmount()==1?"":String.valueOf(its.getAmount()))+its.getType().toString().toUpperCase(Locale.ROOT); + }else { + return (its.getAmount()==1?"":String.valueOf(its.getAmount()))+sfitem.getId(); + } + } + public static ItemStack resolveItem(Object a){ + if(a==null)return null; + if(a instanceof ItemStack){ + return (ItemStack) a; + }else if(a instanceof SlimefunItem){ + return ((SlimefunItem) a).getItem().clone(); + }else if(a instanceof Material){ + return new ItemStack((Material) a); + }else if(a instanceof String){ + Pattern re=Pattern.compile("^([0-9]*)(.*)$"); + Matcher info= re.matcher((String)a); + int cnt=-1; + String id; + if(info.find()){ + String amount=info.group(1); + id=info.group(2); + try{ + cnt=Integer.parseInt(amount); + }catch(NumberFormatException e){ + cnt=-1; + } + } + else{ + id=(String) a; + } + try{ + ItemStack b=SlimefunItem.getById(id).getItem(); + if(cnt>0&&cnt!=b.getAmount()){ + b=b.clone(); + b.setAmount(cnt); + } + return b; + }catch (Exception e){ + try{ + ItemStack b=new ItemStack( Material.getMaterial(id)); + if(cnt>0&&cnt!=b.getAmount()){ + b=b.clone(); + b.setAmount(cnt); + } + return b; + }catch (Exception e2){ + Debug.logger("WARNING: Object %s can not be solved ! Required Addon not installed ! Disabling relavent recipes...".formatted(a)); + return AddItem.RESOLVE_FAILED; + } + } + } else { + Debug.logger("WARNING: failed to solve Object "+a.toString()); + return AddItem.RESOLVE_FAILED; + } + + } + public static Pair buildRecipes(Pair itemStacks){ + return buildRecipes(itemStacks.getFirstValue(),itemStacks.getSecondValue()); + } + public static Pair buildRecipes (Object[] input,Object[] output){ + ItemStack[] a; + ArrayList a_=new ArrayList<>(){{ + + Arrays.stream(input).forEach( + (obj)->{ + ItemStack a__=resolveItem(obj); + this.add(a__); + } + ); + }}; + a=a_.toArray(new ItemStack[a_.size()]); + ItemStack[] b; + ArrayList b_=new ArrayList<>(){{ + + Arrays.stream(output).forEach( + (obj)->{ + + + ItemStack b__=resolveItem(obj); + this.add(b__); + } + ); + + }}; + b=b_.toArray(new ItemStack[b_.size()]); + return new Pair<>(a,b); + } + public static MachineRecipe buildMachineRecipes(int time,Pair itemStacks){ + Pair b=buildRecipes(itemStacks); + return new MachineRecipe(time,b.getFirstValue(),b.getSecondValue()); + } + public static LinkedHashMap,Integer> buildRecipeMap(LinkedHashMap rawDataMap){ + if(rawDataMap==null)return new LinkedHashMap<>(); + LinkedHashMap,Integer> map = new LinkedHashMap<>(); + rawDataMap.forEach((k,v)->{ + if(k instanceof Object[]){ + + map.put(AddUtils.buildRecipes( + Arrays.copyOfRange((Object[])k,0,2),Arrays.copyOfRange((Object[])k,2,4)),v); + } + else if (k instanceof Pair){ + try{ + + Object[] input=(Object[])((Pair)k).getFirstValue(); + if(input==null){ + input=new Object[]{}; + } + Object[] output=(Object[])((Pair)k).getSecondValue(); + if(output==null){ + output=new Object[]{}; + } + map.put(AddUtils.buildRecipes(input,output),v); + }catch (Exception a){ + throw new IllegalArgumentException("illegalArguments in recipe Pair, Pair val must be T[]"); + } + } + }); + return map; + } + public static ItemStack addLore(ItemStack item,String... lores){ + + ItemStack item2=item.clone(); + + ItemMeta meta=item2.getItemMeta(); + List finallist=meta.hasLore() ? meta.getLore() : new ArrayList<>(); + for (String l:lores){ + finallist.add(resolveColor(l)); + } + meta.setLore(finallist); + item2.setItemMeta(meta); + return item2; + } + public static ItemStack renameItem(ItemStack item,String name){ + ItemStack item2=item.clone(); + + ItemMeta meta=item2.getItemMeta(); + meta.setDisplayName(resolveColor(name)); + item2.setItemMeta(meta); + return item2; + } + public static String resolveColor(String s){ + return translateAlternateColorCodes('&', s); + } + public static String translateAlternateColorCodes(char altColorChar, String textToTranslate) { + Preconditions.checkArgument(textToTranslate != null, "Cannot translate null text"); + char[] b = textToTranslate.toCharArray(); + + for(int i = 0; i < b.length - 1; ++i) { + if (b[i] == altColorChar && "0123456789AaBbCcDdEeFfKkLlMmNnOoRrXx".indexOf(b[i + 1]) > -1) { + b[i] = 167; + } + } + + return new String(b); + } + public static String formatEnergy(int energy) { + return FORMAT.format((double)energy * SF_TPS); + } + public static String energyPerSecond(int energy) { + return "&8⇨ &e⚡ &7" + formatEnergy(energy) + " J/s"; + } + public static String speedDisplay(int multiply){ + return "&8⇨ &e⚡ &7速度: &b"+ multiply + "x"; + } + public static String energyPerTick(int energy){ + return "&8⇨ &e⚡ &7" + FORMAT.format((double)energy) + " J/t"; + } + public static String energyPerCraft(int energy){ + return "&8⇨ &e⚡ &7" + FORMAT.format((double)energy ) + " J 每次合成"; + } + public static ItemStack workBenchInfoAdd(ItemStack item,int energyBuffer,int energyConsumption){ + return AddUtils.addLore(item, LoreBuilder.powerBuffer(energyBuffer), AddUtils.energyPerCraft(energyConsumption)); + } + public static String tickPerGen(int time){ + return "&8⇨ &7速度: &b每 " + Integer.toString(time) + " 粘液刻生成一次"; + } + + public static ItemStack capacitorInfoAdd(ItemStack item,int energyBuffer){ + return AddUtils.addLore(item, LoreBuilder.powerBuffer(energyBuffer)); + } + public static ItemStack machineInfoAdd(ItemStack item,int energyBuffer,int energyConsumption){ + return machineInfoAdd(item,energyBuffer,energyConsumption,Settings.USE_SEC_EXP); + } + public static ItemStack machineInfoAdd(ItemStack item,int energyBuffer,int energyConsumption,Settings type){ + if(type==Settings.USE_SEC_EXP) { + return AddUtils.addLore(item, LoreBuilder.powerBuffer(energyBuffer), AddUtils.energyPerSecond(energyConsumption)); + } + else if(type==Settings.USE_TICK_EXP) { + return AddUtils.addLore( item, LoreBuilder.powerBuffer(energyBuffer), AddUtils.energyPerTick(energyConsumption)); + } + else return null; + } + public static SlimefunItemStack smgInfoAdd(ItemStack item,int time){ + return (SlimefunItemStack) AddUtils.addLore( item, tickPerGen(time)); + } + public static ItemStack advancedMachineShow(ItemStack stack,int limit){ + return AddUtils.addLore(stack,"&7机器合成进程数: %s".formatted(limit)); + } + public static String getPercentFormat(double b){ + DecimalFormat df = new DecimalFormat("#.##"); + NumberFormat nf = NumberFormat.getPercentInstance(); + return nf.format(Double.parseDouble(df.format(b))); + } + + /** + * return int values in [0,length) + * @param length + * @return + */ + public static int random(int length){ + return random.nextInt(length); + } + //generate rand in (0,1) + public static double standardRandom(){ + return random.nextDouble(); + } + //we supposed that u have checked these shits + + public static RandomItemStack eqRandItemStackFactory(List list){ + LinkedHashMap map=new LinkedHashMap<>(); + int i=list.size(); + for(int j=0;j st,List it){ + LinkedHashMap map=new LinkedHashMap<>(); + int len=st.size(); + for(int i=0;i list){ + LinkedHashMap c=new LinkedHashMap<>(); + boolean isEqPro=true; + int last_value=-1; + for(Map.Entry s:list.entrySet()){ + Object o=s.getKey(); + if(o!=null){ + ItemStack o_=AddUtils.resolveItem(o); + if(o_!=null){ + c.put(o_,s.getValue()); + } + else return null; + }else return null; + if(last_value>0){ + + isEqPro=(last_value==s.getValue()); + } + assert s.getValue()>0; + last_value=s.getValue(); + } + if(isEqPro){ + return new EqProRandomStack(c); + } + return new RandomItemStack(c); + } + public static ItemStack probItemStackFactory(ItemStack it,int prob){ + if(prob>=100)return it; + prob=prob<0?0:prob; + return new ProbItemStack(it,((double)prob)/100 ); + } + public static ItemStack equalItemStackFactory(List list){ + return equalItemStackFactory(list,1); + } + public static ItemStack equalItemStackFactory(List list,int t){ + if(list.isEmpty())return null; + if(list.size()==1){ + ItemStack it= AddUtils.resolveItem(list.get(0)); + it.setAmount(t); + return it; + } + LinkedHashMap c=new LinkedHashMap<>(); + for(Object o:list){ + if(o!=null){ + ItemStack o_=AddUtils.resolveItem(o); + if(o_!=null){ + c.put(o_,1); + } + else return null; + }else return null; + } + + EquivalItemStack it= new EquivalItemStack(c); + it.setEqualAmount(t); + return it; + } + + /** + * like /give command + * @param p + * @param toGive + */ + public static void forceGive(Player p, ItemStack toGive,int amount) { + ItemStack incoming; + int maxSize=toGive.getMaxStackSize(); + while(amount>0) { + incoming = new ItemStack(toGive); + int amount2=Math.min(maxSize, amount); + incoming.setAmount(amount2); + amount-=amount2; + Collection leftover = p.getInventory().addItem(incoming).values(); + for (ItemStack itemStack : leftover) { + p.getWorld().dropItemNaturally(p.getLocation(), itemStack); + } + } + } + + /** + * add glowing effect to itemstack + * no clone in this method + * @param stack + */ + public static ItemStack addGlow(ItemStack stack){ + //stack.addEnchantment(Enchantment.ARROW_INFINITE, 1); + ItemMeta meta=stack.getItemMeta(); + meta.addEnchant(Enchantment.ARROW_INFINITE, 1, true); + meta.addItemFlags(ItemFlag.HIDE_ENCHANTS); + stack.setItemMeta(meta); + return stack; + } + public static ItemStack hideAllFlags(ItemStack stack){ + ItemMeta meta=stack.getItemMeta(); + meta.addItemFlags(ItemFlag.HIDE_ENCHANTS); + meta.addItemFlags(ItemFlag.HIDE_ATTRIBUTES); + meta.addItemFlags(ItemFlag.HIDE_ARMOR_TRIM); + meta.addItemFlags(ItemFlag.HIDE_DESTROYS); + meta.addItemFlags(ItemFlag.HIDE_DYE); + meta.addItemFlags(ItemFlag.HIDE_PLACED_ON); + meta.addItemFlags(ItemFlag.HIDE_POTION_EFFECTS); + stack.setItemMeta(meta); + return stack; + } + /** + * get a info display item to present in SF machineRecipe display + * @param title + * @param name + * @return + */ + public static ItemStack getInfoShow(String title,String... name){ + return new DisplayItemStack(new CustomItemStack(Material.BOOK,title,name)); + } + + /** + * set the specific lore line in stack ,will not clone + * @param stack + * @param index + * @param str + * @return + */ + public static ItemStack setLore(ItemStack stack,int index,String str){ + ItemMeta meta=stack.getItemMeta(); + List lore=meta.getLore(); + while(index>=lore.size()){ + lore.add(""); + } + lore.set(index,resolveColor(str)); + meta.setLore(lore); + stack.setItemMeta(meta); + return stack; + } + /** + * set the total lore line in stack ,will not clone + * @param stack + * @param str + * @return + */ + public static ItemStack setLore(ItemStack stack,String... str){ + ItemMeta meta=stack.getItemMeta(); + List lore=new ArrayList<>(); + int len=str.length; + for (int i=0;i getPlanks(@Nonnull Material log) { + String materialName = log.name().replace("STRIPPED_", ""); + int endIndex = materialName.lastIndexOf('_'); + + if (endIndex > 0) { + materialName = materialName.substring(0, endIndex) + "_PLANKS"; + return Optional.ofNullable(Material.getMaterial(materialName)); + } else { + // Fixed #3651 - Do not panic because of one weird wood type. + return Optional.empty(); + } + } + public static void displayCopyString(Player player,String display,String hover,String copy){ + final TextComponent link = new TextComponent(display); + link.setColor(ChatColor.YELLOW); + link.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new Text(hover))); + link.setClickEvent(new ClickEvent(ClickEvent.Action.COPY_TO_CLIPBOARD,copy)); + player.spigot().sendMessage(link); + } + public static void asyncWaitPlayerInput(Player player, Consumer consumer){ + ChatInput.waitForPlayer( + Slimefun.instance(), + player, + msg ->{ + consumer.accept(msg); + } ); + } + public static ItemStack getGeneratorDisplay(boolean working,String type,int charge,int buffer){ + if(working){ + return new CustomItemStack(Material.GREEN_STAINED_GLASS_PANE,"&a发电中", + "&7类型:&6 %s".formatted(type),"&7&7电量: &6%s/%sJ".formatted(FORMAT.format((double)charge),FORMAT.format((double)buffer))); + }else { + return new CustomItemStack(Material.RED_STAINED_GLASS_PANE,"&a未发电", + "&7类型:&6 %s".formatted(type),"&7&7电量: &6%s/%sJ".formatted(FORMAT.format((double)charge),FORMAT.format((double)buffer))); + } + } + public static String getUUID(){ + return UUID.randomUUID().toString(); + } + public static void broadCast(String string){ + ADDON_INSTANCE.getJavaPlugin().getServer().broadcastMessage(resolveColor(string)); + } + public static ItemStack randAmountItemFactory(ItemStack it,int min,int max){ + if(min COMPLEX_MATERIALS = new HashSet<>(){{ - add(Material.AXOLOTL_BUCKET); - add(Material.WRITABLE_BOOK); - add(Material.WRITTEN_BOOK); - add(Material.ENCHANTED_BOOK); - add(Material.BUNDLE); - add(Material.FIREWORK_STAR); - add(Material.FIREWORK_ROCKET); - add(Material.COMPASS); - add(Material.LEATHER_BOOTS); - add(Material.LEATHER_HELMET); - add(Material.LEATHER_LEGGINGS); - add(Material.LEATHER_CHESTPLATE); - add(Material.MAP); - add(Material.POTION); - add(Material.SPLASH_POTION); - add(Material.LINGERING_POTION); - add(Material.SUSPICIOUS_STEW); - add(Material.COD_BUCKET); - add(Material.SALMON_BUCKET); - add(Material.TADPOLE_BUCKET); - add(Material.PUFFERFISH_BUCKET); - add(Material.TROPICAL_FISH_BUCKET); - add(Material.PLAYER_HEAD); - add(Material.PLAYER_WALL_HEAD); - }}; - private static final HashSet INDISTINGUISHABLE_MATERIALS = new HashSet() {{ - add(Material.SHULKER_BOX); - add(Material.BUNDLE); - }}; - public static final ItemStack DEFAULT_ITEMSTACK=new ItemStack(Material.STONE); - public static final ItemMeta NULL_META=(DEFAULT_ITEMSTACK.getItemMeta()); - public static final Class CRAFTMETAITEMCLASS=NULL_META.getClass(); - public static final Class ITEMSTACKCLASS=ItemStack.class; - public static Class CRAFTITEMSTACKCLASS; - public static ItemStack CRAFTITEMSTACK; - public static Field CRAFTLORE; - public static Field CRAFTDISPLAYNAME; - public static Field CRAFTHANDLER; - public static Class NMSITEMCLASS; - public static Field ITEMSTACKMETA; - public static boolean INVOKE_SUCCESS; - public static boolean INVOKE_STACK_SUCCESS; - static{ - try{ - CRAFTLORE=CRAFTMETAITEMCLASS.getDeclaredField("lore"); - CRAFTDISPLAYNAME=CRAFTMETAITEMCLASS.getDeclaredField("displayName"); - CRAFTLORE.setAccessible(true); - CRAFTDISPLAYNAME.setAccessible(true); - INVOKE_SUCCESS=true; - }catch (Throwable e){ - Debug.logger("INVOKE META FAILED,PLEASE CHECK LOGGER!!!!!!"); - INVOKE_SUCCESS=false; - e.printStackTrace(); - Debug.logger("DISABLING RELEVENT FEATURE"); - - } - try{ - ChestMenu a=new ChestMenu("byd"); - a.addItem(0,DEFAULT_ITEMSTACK); - CRAFTITEMSTACK=a.getItemInSlot(0); - CRAFTITEMSTACKCLASS=CRAFTITEMSTACK.getClass(); - Debug.debug(CRAFTITEMSTACKCLASS.getName()); - CRAFTHANDLER=CRAFTITEMSTACKCLASS.getDeclaredField("handle"); - CRAFTHANDLER.setAccessible(true); - Object handle=CRAFTHANDLER.get(CRAFTITEMSTACK); - Debug.debug(handle.getClass()); - NMSITEMCLASS=handle.getClass(); - //CRAFTMETA=NMSITEMCLASS.getDeclaredField("meta"); -// Field[] fields= NMSITEMCLASS.getDeclaredFields(); -// for(int i=0;i itemID = Slimefun.getItemDataService().getItemData(item); - return itemID.isPresent() ? (String)itemID.get() : null; - } - public static String parseSfId(ItemMeta meta){ - Optional itemID = Slimefun.getItemDataService().getItemData(meta); - return itemID.isPresent() ? (String)itemID.get() : null; - } - /** - * get Consumer for recipe Item - * @param a - * @return - */ - public static ItemConsumer getConsumer(ItemStack a){ - if(a==null)return null; - if (a instanceof RandOutItem ro) { - // return new ItemConsumer(a.clone()); - //当物品是随机输出物品时候,取其中的随机实例 - return ItemConsumer.get(ro.getInstance()); - } - return ItemConsumer.get(a); - } - public static ItemCounter getCounter(ItemStack a){ - if(a==null)return null; - //用于比较和 - return ItemCounter.get(a); - } - - /** - * get greedy consumer for recipe Item - * @param a - * @return - */ - public static ItemGreedyConsumer getGreedyConsumer(ItemStack a){ - if(a==null)return null; - if (a instanceof RandOutItem ro) { - //当物品是随机输出物品时候,取其中的随机实例 - // return new ItemConsumer(a.clone()); - return ItemGreedyConsumer.get(ro.getInstance()); - } - return ItemGreedyConsumer.get(a); - } - - /** - * a huge project to adapt sth... - * use .get(mod,inv,slot) to get ItemPusher - * mod should be in {Settings.INPUT,Settings.OUTPUT} - */ - public static final ItemPusherProvider getpusher=(Settings mod,ItemStack it,int slot)->{ - if(mod==Settings.INPUT||it!=null){ - return ItemPusher.get(it); - }else{ - return ItemSlotPusher.get(it,slot); - } - }; -// public static ItemPusher getSlotPusher(BlockMenu inv,int slot){ -// return getpusher.get(Settings.OUTPUT,inv,slot); -// } - public static ItemPusher getPusher(ItemStack it){ - return ItemPusher.get(it); - } -// public static ItemPusher getPusher(BlockMenu inv,int slot){ -// return getpusher.get(Settings.INPUT,inv,slot); -// } - public static void clearAmount(BlockMenu inv,ItemPusher ... counters){ - ItemPusher ip; - for (int i =0;i slotCounters, MachineRecipe recipe){ - int len2=slotCounters.size(); - ItemStack[] recipeInput = recipe.getInput(); - int cnt = recipeInput.length; - if(cnt>len2)return null; - ItemConsumer[] result=new ItemConsumer[cnt]; - ItemConsumer results; - ItemPusher itemCounter2; - final boolean[] visited=new boolean[len2]; - for(int i=0;i slotCounters, MachineRecipe recipe,int maxMatchCount){ - int len2=slotCounters.size(); - ItemStack[] recipeInput = recipe.getInput(); - int cnt = recipeInput.length; - if(cnt>len2)return null; - ItemGreedyConsumer[] result = new ItemGreedyConsumer[cnt]; - //模拟时间加速 减少~ - maxMatchCount=calMaxCraftAfterAccelerate(maxMatchCount,recipe.getTicks()); - if(maxMatchCount==0){ - return null; - } - //int maxAmount; - final boolean[] visited =new boolean[len2]; - for(int i=0;i=maxMatchCount)break; - } - } - //不够一份的量 - if(itemCounter.getStackNum()<1){ - return null; - } - result[i]=itemCounter; - } - return result; - - } - - /** - * try input every OutputItem in slotCounters, just a plan ,will return plans - * @param - * @param recipe - * @return - */ - - public static ItemConsumer[] countOneOutput(BlockMenu inv , int[] output, MachineRecipe recipe){ - return countOneOutput(inv,output,recipe,getpusher); - } - public static ItemConsumer[] countOneOutput(BlockMenu inv , int[] output, MachineRecipe recipe,ItemPusherProvider pusher){ - int len2=output.length; - ItemStack[] recipeInput = recipe.getOutput(); - int cnt = recipeInput.length; - ItemConsumer[] result = new ItemConsumer[cnt]; - DynamicArray slotCounters=new DynamicArray<>(ItemPusher[]::new,len2,pusher.getMenuInstance(Settings.OUTPUT,inv,output)); - for(int i=0;i0)return null; - } - return result; - } - - /** - * match if one time of this recipe can be crafted - * @param inv - * @param input - * @param output - * @param recipe - * @return - */ - - public static Pair countOneRecipe(BlockMenu inv,int[] input,int[] output,MachineRecipe recipe){ - return countOneRecipe(inv,input,output,recipe,getpusher); - } - public static Pair countOneRecipe(BlockMenu inv,int[] input,int[] output,MachineRecipe recipe,ItemPusherProvider pusher){ - int len=input.length; - ItemStack[] recipeIn=recipe.getInput(); - int cnt=recipeIn.length; - DynamicArray inputs=new DynamicArray<>(ItemPusher[]::new,len,pusher.getMenuInstance(Settings.INPUT,inv,input)); - - ItemConsumer[] inputInfo=matchRecipe(inputs,recipe); - if(inputInfo!=null){ - ItemConsumer[] outputInfo=countOneOutput(inv,output,recipe,pusher); - if(outputInfo!=null){ - return new Pair<>(inputInfo,outputInfo); - } - } - return null; - } - /** - * match max craft time of recipe ,return null if cannot craft return the recorded information of inputConsumer and outputConsumner - * @param inv - * @param input - * @param output - * @param recipe - * @param limit - * @return - */ - - public static Pair countMultiRecipe( BlockMenu inv,int[] input,int[] output, MachineRecipe recipe, int limit) { - return countMultiRecipe(inv,input,output,recipe,limit,getpusher); - } - public static Pair countMultiRecipe( BlockMenu inv,int[] input,int[] output, MachineRecipe recipe, int limit,ItemPusherProvider pusher){ - int len=input.length; - ItemStack[] recipeInput = recipe.getInput(); - DynamicArray inputCounters=new DynamicArray<>(ItemPusher[]::new,len,pusher.getMenuInstance(Settings.INPUT,inv,input)); - int cnt=recipeInput.length; - - ItemGreedyConsumer[] recipeCounter=new ItemGreedyConsumer[cnt]; - int maxAmount=limit; - final boolean[] visited=new boolean[len]; - for(int i=0;i=maxAmount)break; - } - } - int stackAmount=recipeCounter[i].getStackNum(); - if(stackAmount>=maxAmount)continue; - maxAmount=Math.min(maxAmount,stackAmount); - if(maxAmount<=0)return null; - } - // Debug.logger("see match input amount "+maxAmount); - ItemGreedyConsumer[] recipeCounter2= countMultiOutput(recipeCounter,inv,output,recipe,maxAmount,pusher); - - return recipeCounter2!=null?new Pair<>(recipeCounter,recipeCounter2):null; - - } - - /** - * return null if no match ,return ItemGreedyConsumer with modification of inputInfo and outputConsumer with written matchAMount - * @param inputInfo - * @param inv - * @param output - * @param recipe - * @param limit - * @return - */ - - public static ItemGreedyConsumer[] countMultiOutput(ItemGreedyConsumer[] inputInfo, BlockMenu inv, int[] output, MachineRecipe recipe, int limit){ - return countMultiOutput(inputInfo,inv,output,recipe,limit,getpusher); - } - - /** - * this method has a step reading optimize - * @param inputInfo - * @param inv - * @param output - * @param recipe - * @param limit - * @param pusher - * @return - */ - public static ItemGreedyConsumer[] countMultiOutput(ItemGreedyConsumer[] inputInfo, BlockMenu inv, int[] output, MachineRecipe recipe, int limit,ItemPusherProvider pusher){ - - int len2=output.length; - DynamicArray outputCounters=new DynamicArray<>(ItemPusher[]::new,len2,pusher.getMenuInstance(Settings.OUTPUT,inv,output)); - ItemStack[] recipeOutput = recipe.getOutput(); - int cnt2=recipeOutput.length; - ItemGreedyConsumer[] recipeCounter2=new ItemGreedyConsumer[cnt2]; - int maxAmount2=limit; - if(cnt2<=0||maxAmount2<=0){ - return null; - }//优化 当一个输出的时候 直接输出 匹配最大的匹配数 - //99%的情况都是这样的 - //应该不会有很多2b作者给这么高效的机器设置两个输出 - else if (cnt2==1){ - recipeCounter2[0]=getGreedyConsumer(recipeOutput[0]); - for(int i=0;i=maxAmount2){ - break; - } - } - - - - - maxAmount2=Math.min(recipeCounter2[0].getStackNum(),maxAmount2); - if(maxAmount2<=0){return null;} - } - //如果真的有,你喜欢就好 - //有可能是桶或者什么 - else{ - //维护一下当前matchAmount最小值 - PriorityQueue priorityRecipeOutput=new PriorityQueue<>(cnt2+1) ; - for(int i=0;i=maxAmount2){ - break; - } - } - maxAmount2=Math.min(recipeCounter2[0].getStackNum(),maxAmount2); - - if(maxAmount2<=0){return null;} - } - //如果真的有,你喜欢就好 - //有可能是桶或者什么 - else{ - //维护一下当前matchAmount最小值 - PriorityQueue priorityRecipeOutput=new PriorityQueue<>(cnt2+1) ; - for(int i=0;i countMultiRecipe(List inputCounters, ItemSlotPusher[] outputCounters, MachineRecipe recipe, int limit){ - int len=inputCounters.size(); - ItemStack[] recipeInput = recipe.getInput(); - int cnt = recipeInput.length; - ItemGreedyConsumer[] recipeCounter=new ItemGreedyConsumer[cnt]; - int maxAmount=limit; - for(int i=0;i=limit)break; - } - } - maxAmount=Math.min(maxAmount,recipeCounter[i].getStackNum()); - } - if (maxAmount==0)return null; - int len2=outputCounters.length; - ItemStack[] recipeOutput = recipe.getOutput(); - int cnt2=recipeOutput.length; - ItemGreedyConsumer[] recipeCounter2= countMultiOutput(recipeCounter,outputCounters,recipe,maxAmount); - return recipeCounter2!=null?new Pair<>(recipeCounter,recipeCounter2):null; - } - **/ - - /** - * force push recipe outputs to outputslot - * @param - * @param - */ - public static boolean forcePush( ItemConsumer[] slotCounters, BlockMenu inv,int[] slots){ - return forcePush(slotCounters,inv,slots,getpusher); - } - public static boolean forcePush( ItemConsumer[] slotCounters, BlockMenu inv,int[] slots,ItemPusherProvider pusher){ - // ItemPusher[] slotCounters2=new ItemPusher[slots.length]; - DynamicArray slotCounters2=new DynamicArray<>(ItemPusher[]::new,slots.length,pusher.getMenuInstance(Settings.OUTPUT,inv,slots)); - ItemConsumer outputItem; - ItemPusher itemCounter; - boolean hasChanged=false; - int len=slotCounters.length; - ItemStack previewItem; - for(int i=0;i1判断 - }else if(previewItem.getAmount()>=previewItem.getMaxStackSize()){ - continue; - }else{ - itemCounter=slotCounters2.get(j); - if(!itemCounter.isDirty()){ - //可能是存储里的 或者是被覆写的maxCNT - //FIXME 检测存储中是否可能存在空物品 - if(itemCounter.getItem()==null){ - //我们决定将这个分类留在这,为了安全性 毕竟谁也不知到之后会开发啥,不过显然 这玩意大概率是不会被调用的. - itemCounter.setFrom(outputItem); - itemCounter.grab(outputItem); - itemCounter.updateMenu(inv); - itemCounter.setDirty(true); - hasChanged=true; - } else if (itemCounter.getAmount()>=itemCounter.getMaxStackCnt()){ - continue; - } - else if(matchItemCounter(outputItem,itemCounter,false)){ - itemCounter.grab(outputItem); - itemCounter.updateMenu(inv); - itemCounter.setDirty(true); - hasChanged=true; - } - } - } - if(outputItem.getAmount()<=0)break; - } - } - return hasChanged; - } - - - /** - * remake version of pushItems - * @return - */ - public static boolean pushItems(ItemStack[] items,BlockMenu inv,int[] slots){ - return pushItems(items,inv,slots,getpusher); - } - public static boolean pushItems(ItemStack[] items,BlockMenu inv,int[] slots,ItemPusherProvider pusher){ - ItemConsumer[] consumers=new ItemConsumer[items.length]; - for(int i=0;i slotCounters2=new DynamicArray<>(ItemPusher[]::new,slots.length,pusher.getMenuInstance(Settings.OUTPUT,inv,slots)); - int len= slotCounters.length; - ItemPusher itp=null; - ItemGreedyConsumer outputItem; - boolean hasChanged=false; - ItemStack previewItem; - for(int i=0;i=previewItem.getMaxStackSize()){ - continue; - }else{ - itp=slotCounters2.get(j); - if(!itp.isDirty()){ - //FIXME 检查cachemap中的空存储是不是可能被读取进入? - if(itp.getItem()==null){ - itp.setFrom(outputItem); - //needs this push ,because the source of outputItem - outputItem.push(itp); - itp.updateMenu(inv); - itp.setDirty(true); - hasChanged=true; - - }else if (itp.getAmount()>=itp.getMaxStackCnt()){ - continue; - } - else if(matchItemCounter(outputItem,itp,false)){ - outputItem.push(itp); - itp.updateMenu(inv); - itp.setDirty(true); - hasChanged=true; - } - } - } - if(outputItem.getMatchAmount()<=0)break; - } - } - return hasChanged; - } - /** - * simply update consumes - * @param itemCounters - */ - public static void updateInputMenu(ItemConsumer[] itemCounters,BlockMenu inv){ - for(int i = 0; i< itemCounters.length; ++i){ - itemCounters[i].updateItems(inv,Settings.GRAB); - } - } - - public static void updateOutputMenu(ItemConsumer[] itemCounters,BlockMenu inv){ - for(int i = 0; i< itemCounters.length; ++i){ - itemCounters[i].updateItems(inv,Settings.PUSH); - } - } - - public static void multiUpdateInputMenu(ItemGreedyConsumer[] recipeGreedyCounters,BlockMenu inv){ - for(int i = 0; i< recipeGreedyCounters.length; ++i){ - recipeGreedyCounters[i].updateItemsPlus(inv,Settings.GRAB); - } - } - - public static void multiUpdateOutputMenu(ItemGreedyConsumer[] recipeGreedyCounters,BlockMenu inv){ - for(int i = 0; i< recipeGreedyCounters.length; ++i){ - recipeGreedyCounters[i].updateItemsPlus(inv,Settings.PUSH); - } - } - - - /** - * make pushItem - * make sure itemCounters.size>=out - * @param itemCounters - * @param out - * @param inv - */ - public static void updateOutputMenu(ItemPusher[] itemCounters,int[] out,BlockMenu inv){ - int len=out.length; - for (int i=0;i findNextRecipe(BlockMenu inv, int[] slots,int[] outs, List recipes,boolean useHistory) { - return findNextRecipe(inv,slots,outs,recipes,useHistory,Settings.SEQUNTIAL); - } - public static Pair findNextRecipe(BlockMenu inv ,int[] slots,int[] outs,List recipes,boolean useHistory,Settings order){ - return findNextRecipe(inv,slots,outs,recipes,useHistory,Settings.SEQUNTIAL,getpusher); - } - /** - * general findNextRecipe but modified by meeeeeee to adapt ItemCounter - * @param inv - * @param slots - * @param outs - * @param recipes - * @param useHistory - * @param order - * @return - */ - public static Pair findNextRecipe(BlockMenu inv ,int[] slots,int[] outs,List recipes,boolean useHistory,Settings order,ItemPusherProvider pusher){ - int delta; - switch(order){ - case REVERSE:delta=-1;break; - case SEQUNTIAL: - default: delta=1;break; - } - int len = slots.length; - final DynamicArray slotCounter=new DynamicArray<>(ItemPusher[]::new,len,pusher.getMenuInstance(Settings.INPUT,inv,slots)); - int recipeAmount=recipes.size(); - if(recipeAmount<=0){ - return null; - } - int __index=0; - //if usehistory ,will suggest a better place to start - if(useHistory) { - __index= DataCache.getLastRecipe(inv.getLocation()); - __index=(__index<0)?0:__index; - __index=(__index>=recipeAmount)?(recipeAmount-1):__index; - } - int __iter=__index; - MachineRecipe checkRecipe=recipes.get(__iter); - ItemConsumer[] inputInfo=matchRecipe(slotCounter,checkRecipe); - if(inputInfo!=null) { - if(useHistory) { - DataCache.setLastRecipe(inv.getLocation(),__iter); - } - ItemConsumer[] outputInfo= countOneOutput(inv,outs,checkRecipe,getpusher); - if(outputInfo!=null){ - updateInputMenu(inputInfo,inv); - return new Pair<>(checkRecipe,outputInfo); - }else return null;//for better performance in processors - } - __iter+=delta; - for(;__iter=0;__iter+=delta){ - checkRecipe=recipes.get(__iter); - inputInfo=matchRecipe(slotCounter,checkRecipe); - if(inputInfo!=null) { - if(useHistory) { - DataCache.setLastRecipe(inv.getLocation(),__iter); - } - ItemConsumer[] outputInfo= countOneOutput(inv,outs,checkRecipe,getpusher); - if(outputInfo!=null){ - updateInputMenu(inputInfo,inv); - return new Pair<>(checkRecipe,outputInfo); - }else return null;//for better performance in processors - } - } - if(__iter<0){ - __iter=recipeAmount-1; - }else{ - __iter=0; - } - for(;__iter!=__index;__iter+=delta) { - checkRecipe=recipes.get(__iter); - inputInfo=matchRecipe(slotCounter,checkRecipe); - if(inputInfo!=null) { - if(useHistory) { - DataCache.setLastRecipe(inv.getLocation(),__iter); - } - ItemConsumer[] outputInfo= countOneOutput(inv,outs,checkRecipe,getpusher); - if(outputInfo!=null){ - updateInputMenu(inputInfo,inv); - return new Pair<>(checkRecipe,outputInfo); - }else return null;//for better performance in processors - } - } - return null; - } - - /** - * general only find next recipe for input slots ,No check for output slots, no consume for inputslots ,only fetch NEXT matching recipe. - * used in manuals and MaterialGenerators - * @param inv - * @param slots - * @param recipes - * @param useHistory - * @param order - * @return - * - */ - public static MachineRecipe matchNextRecipe(BlockMenu inv ,int[] slots,List recipes,boolean useHistory,Settings order){ - return matchNextRecipe(inv,slots,recipes,useHistory,order,getpusher); - } - public static MachineRecipe matchNextRecipe(BlockMenu inv ,int[] slots,List recipes,boolean useHistory,Settings order,ItemPusherProvider pusher){ - int delta; - switch(order){ - case REVERSE:delta=-1;break; - case SEQUNTIAL: - default: delta=1;break; - } - int len = slots.length; - //final ArrayList slotCounter=new ArrayList<>(len); - final DynamicArray slotCounter=new DynamicArray<>(ItemPusher[]::new,len,pusher.getMenuInstance(Settings.INPUT,inv,slots)); - int recipeAmount=recipes.size(); - if(recipeAmount<=0){ - return null; - } - int __index=0; - //if usehistory ,will suggest a better place to start - if(useHistory) { - __index= DataCache.getLastRecipe(inv.getLocation()); - __index=(__index<0)?0:__index; - __index=(__index>=recipeAmount)?(recipeAmount-1):__index; - } - int __iter=__index; - MachineRecipe checkRecipe=recipes.get(__iter); - if(matchRecipe(slotCounter,checkRecipe)!=null) { - if(useHistory) { - DataCache.setLastRecipe(inv.getLocation(),__iter); - } - return checkRecipe; - - } - __iter+=delta; - for(;__iter=0;__iter+=delta){ - checkRecipe=recipes.get(__iter); - if(matchRecipe(slotCounter,checkRecipe)!=null) { - - if(useHistory) { - DataCache.setLastRecipe(inv.getLocation(),__iter); - } - return checkRecipe; - } - } - if(__iter<0){ - __iter=recipeAmount-1; - }else{ - __iter=0; - } - for(;__iter!=__index;__iter+=delta) { - checkRecipe=recipes.get(__iter); - if(matchRecipe(slotCounter,checkRecipe)!=null) { - if(useHistory) { - DataCache.setLastRecipe(inv.getLocation(),__iter); - } - return checkRecipe; - } - } - return null; - } - - -// public static Pair matchNextMultiRecipe(BlockMenu inv ,int[] slots,List recipes,boolean useHistory,int limit,Settings order){ -// return matchNextMultiRecipe(inv,slots,recipes,useHistory,limit,order,getpusher); -// } - /** - * a better version of matchNextRecipe for multiCraft,will remember the related slots of inputItems - * will not calculate maxCraftTime !,you have to calculate by yourself!!!! - * @param inv - * @param slots - * @param recipes - * @param useHistory - * @param order - * @return - */ - public static Pair matchNextMultiRecipe(BlockMenu inv ,int[] slots,List recipes,boolean useHistory,int limit,Settings order,ItemPusherProvider pusher){ - - int delta; - switch(order){ - case REVERSE:delta=-1;break; - case SEQUNTIAL: - default: delta=1;break; - } - int len = slots.length; - ArrayList slotNotNull=new ArrayList<>(len); - ItemStack it; - for(int i=0;i slotCounter=new DynamicArray<>(ItemPusher[]::new,slotNotNull.size(),pusher.getMenuInstance(Settings.INPUT,inv,slotNotNull)); - int recipeAmount=recipes.size(); - if(recipeAmount<=0){ - return null; - } - int __index=0; - //if usehistory ,will suggest a better place to start - if(useHistory) { - __index= DataCache.getLastRecipe(inv.getLocation()); - __index=(__index<0)?0:__index; - __index=(__index>=recipeAmount)?(recipeAmount-1):__index; - } - int __iter=__index; - MachineRecipe checkRecipe=recipes.get(__iter); - ItemGreedyConsumer[] result=matchMultiRecipe(slotCounter,checkRecipe,limit); - if(result!=null) { - if(useHistory) { - DataCache.setLastRecipe(inv.getLocation(),__iter); - } - return new Pair<>(checkRecipe,result); - - } - __iter+=delta; - for(;__iter=0;__iter+=delta){ - checkRecipe=recipes.get(__iter); - result=matchMultiRecipe(slotCounter,checkRecipe,limit); - if(result!=null) { - if(useHistory) { - DataCache.setLastRecipe(inv.getLocation(),__iter); - } - return new Pair<>(checkRecipe,result); - - } - } - if(__iter<0){ - __iter=recipeAmount-1; - }else{ - __iter=0; - } - for(;__iter!=__index;__iter+=delta) { - checkRecipe=recipes.get(__iter); - result=matchMultiRecipe(slotCounter,checkRecipe,limit); - if(result!=null) { - if(useHistory) { - DataCache.setLastRecipe(inv.getLocation(),__iter); - } - return new Pair<>(checkRecipe,result); - - } - } - return null; - } - public static int calMaxCraftTime(ItemGreedyConsumer[] recipes,int limit){ - int len=recipes.length; - if(len!=0) { - for(int i=0;i findNextMultiRecipe(BlockMenu inv,int[] inputs,int[] outputs, - List recipes,int limit,boolean useHistory){ - return findNextMultiRecipe(inv,inputs,outputs,recipes,limit,useHistory,Settings.SEQUNTIAL); - } - public static Pair findNextMultiRecipe(BlockMenu inv,int[] inputs,int[] outputs, - List recipes,int limit,boolean useHistory,Settings order){ - return findNextMultiRecipe(inv,inputs,outputs,recipes,limit,useHistory,Settings.SEQUNTIAL,getpusher); - } - public static Pair findNextMultiRecipe(BlockMenu inv,int[] inputs,int[] outputs, - List recipes,int limit,boolean useHistory,Settings order,ItemPusherProvider pusher){ - int delta; - switch(order){ - case REVERSE:delta=-1;break; - case SEQUNTIAL: - default: delta=1;break; - } - int len = inputs.length; - final ArrayList slotCounter=new ArrayList<>(len); - for(int i = 0; i < len; ++i) { - ItemPusher input=pusher.get(Settings.INPUT,inv,inputs[i]); - if(input!=null){ - slotCounter.add(input); - } - } - //end before anything - int outlen=outputs.length; - int recipeAmount=recipes.size(); - int __index=0; - //if usehistory ,will suggest a better place to start - if(useHistory) { - __index= AbstractMachines.getLastRecipe(inv.getLocation()); - __index=(__index<0)?0:__index; - __index=(__index>=recipeAmount)?(recipeAmount-1):__index; - } - int __iter=__index; - MachineRecipe checkRecipe=recipes.get(__iter); - final ItemSlotPusher[] outPushers=new ItemSlotPusher[outlen]; - for (int i=0;i tmp=countMultiRecipe(slotCounter,outPushers,checkRecipe,limit); - if(tmp!=null) { - multiUpdateInputMenu(tmp.getFirstValue(),inv); - if(useHistory) { - AbstractMachines.setLastRecipe(inv.getLocation(),__iter); - } - return new Pair<>(checkRecipe,tmp.getSecondValue()); - } - __iter+=delta; - for(;__iter=0;__iter+=delta){ - checkRecipe=recipes.get(__iter); - tmp=countMultiRecipe(slotCounter,outPushers,checkRecipe,limit); - if(tmp!=null) { - multiUpdateInputMenu(tmp.getFirstValue(),inv); - if(useHistory) { - AbstractMachines.setLastRecipe(inv.getLocation(),__iter); - } - return new Pair<>(checkRecipe,tmp.getSecondValue()); - } - } - if(__iter<0){ - __iter=recipeAmount-1; - }else{ - __iter=0; - } - for(;__iter!=__index;__iter+=delta) { - checkRecipe=recipes.get(__iter); - tmp=countMultiRecipe(slotCounter,outPushers,checkRecipe,limit); - if(tmp!=null) { - multiUpdateInputMenu(tmp.getFirstValue(),inv); - if(useHistory) { - AbstractMachines.setLastRecipe(inv.getLocation(),__iter); - } - return new Pair<>(checkRecipe,tmp.getSecondValue()); - } - } - return null; - } - **/ - - public static int matchShapedRecipe(ItemPusher[] input,MachineRecipe recipe,int limit){ - ItemStack[] recipeInput=recipe.getInput(); - int len=input.length; - int len2=recipeInput.length; - if(len findNextShapedRecipe(BlockMenu inv,int[] inputs,int[] outputs, -// List recipes,int limit,boolean useHistory){ -// return findNextShapedRecipe(inv,inputs,outputs,recipes,limit,useHistory,Settings.SEQUNTIAL); -// } - - public static Pair findNextShapedRecipe(BlockMenu inv,int[] inputs,int[] outputs, - List recipes,int limit,boolean useHistory,Settings order,ItemPusherProvider pusher){ - int delta; - switch(order){ - case REVERSE:delta=-1;break; - case SEQUNTIAL: - default: delta=1;break; - } - int len = inputs.length; - ItemPusher[] inputItem=new ItemPusher[len]; - IntFunction inputSlotInstance=pusher.getMenuInstance(Settings.INPUT,inv,inputs); - for(int i=0;i=recipeAmount)?(recipeAmount-1):__index; - } - - int __iter=__index; - MachineRecipe checkRecipe=recipes.get(__iter); - int craftAmount=matchShapedRecipe(inputItem,checkRecipe,limit); - if(craftAmount>0) { - int finalAmount=craftAmount; - ItemGreedyConsumer[] outputCounters=null; - if(outputs.length!=0){ - outputCounters=countMultiOutput(new ItemGreedyConsumer[]{},inv,outputs,checkRecipe,craftAmount,pusher); - if(outputCounters!=null) - finalAmount=outputCounters[0].getStackNum(); - else return null; - } - ItemStack[] recipeInput=checkRecipe.getInput(); - int len2=recipeInput.length; - for(int i=0;i(checkRecipe,outputCounters); - } - __iter+=delta; - for(;__iter=0;__iter+=delta){ - checkRecipe=recipes.get(__iter); - craftAmount=matchShapedRecipe(inputItem,checkRecipe,limit); - if(craftAmount>0) { - int finalAmount=craftAmount; - ItemGreedyConsumer[] outputCounters=null; - if(outputs.length!=0){ - outputCounters=countMultiOutput(new ItemGreedyConsumer[]{},inv,outputs,checkRecipe,craftAmount,pusher); - if(outputCounters!=null) - finalAmount=outputCounters[0].getStackNum(); - else return null; - } - ItemStack[] recipeInput=checkRecipe.getInput(); - int len2=recipeInput.length; - for(int i=0;i(checkRecipe,outputCounters); - } - } - if(__iter<0){ - __iter=recipeAmount-1; - }else{ - __iter=0; - } - for(;__iter!=__index;__iter+=delta) { - checkRecipe=recipes.get(__iter); - craftAmount=matchShapedRecipe(inputItem,checkRecipe,limit); - if(craftAmount>0) { - int finalAmount=craftAmount; - ItemGreedyConsumer[] outputCounters=null; - if(outputs.length!=0){ - outputCounters=countMultiOutput(new ItemGreedyConsumer[]{},inv,outputs,checkRecipe,craftAmount,pusher); - if(outputCounters!=null) - finalAmount=outputCounters[0].getStackNum(); - else return null; - } - ItemStack[] recipeInput=checkRecipe.getInput(); - int len2=recipeInput.length; - for(int i=0;i(checkRecipe,outputCounters); - } - } - return null; - - } - - public static boolean matchSequenceRecipeTarget(ItemPusher[] inPushers,ItemConsumer target){ - boolean hasChange=false; - int len=inPushers.length; - if(target.getAmount()<=0)return false; - for(int i=0;i findNextSequenceRecipe(BlockMenu inv,int[] inputs,List recipes,boolean useHistory,Settings order,ItemPusherProvider pusher,boolean clearInput){ - int delta; - switch(order){ - case REVERSE:delta=-1;break; - case SEQUNTIAL: - default: delta=1;break; - } - int len=inputs.length; - ItemPusher[] inputCounters=new ItemPusher[len]; - IntFunction pusherFunc=pusher.getMenuInstance(Settings.INPUT,inv,inputs); - for(int i=0;i=recipeAmount)?(recipeAmount-1):__index; - } - int __iter=__index; - MachineRecipe checkRecipe=recipes.get(__iter); - ItemConsumer result=CraftUtils.getConsumer(checkRecipe.getInput()[0]); - if(matchSequenceRecipeTarget(inputCounters,result)) { - if(useHistory) { - DataCache.setLastRecipe(inv.getLocation(),__iter); - } - return new Pair<>(checkRecipe,result); - } - __iter+=delta; - for(;__iter=0;__iter+=delta){ - checkRecipe=recipes.get(__iter); - result=CraftUtils.getConsumer(checkRecipe.getInput()[0]); - if(matchSequenceRecipeTarget(inputCounters,result)) { - if(useHistory) { - DataCache.setLastRecipe(inv.getLocation(),__iter); - } - return new Pair<>(checkRecipe,result); - } - } - if(__iter<0){ - __iter=recipeAmount-1; - }else{ - __iter=0; - } - for(;__iter!=__index;__iter+=delta) { - checkRecipe=recipes.get(__iter); - result=CraftUtils.getConsumer(checkRecipe.getInput()[0]); - if(matchSequenceRecipeTarget(inputCounters,result)) { - if(useHistory) { - DataCache.setLastRecipe(inv.getLocation(),__iter); - } - return new Pair<>(checkRecipe,result); - } - } - if(clearInput){ - clearAmount(inv,inputCounters); - } - return null; - } - /** - * - * @param counter1 - * @param counter2 - * @param strictCheck - * @return - */ - public static boolean matchItemCounter_test(ItemCounter counter1, ItemCounter counter2, boolean strictCheck){ - return matchItemCounter_test(counter1, counter2, strictCheck); - } - public static boolean matchItemCounter(ItemCounter counter1, ItemCounter counter2, boolean strictCheck){ - return matchItemCore(counter1,counter2,strictCheck); - } - // - public static boolean matchItemCore(ItemCounter counter1, ItemCounter counter2, boolean strictCheck) { - - ItemStack stack1=counter1.getItem(); - ItemStack stack2=counter2.getItem(); - if (stack1 == null || stack2 == null) { - return stack1 == stack2; - } - if(stack1 instanceof MultiItemStack) { - return ((MultiItemStack) stack1).matchItem(stack2,strictCheck); - }else if (stack2 instanceof MultiItemStack) { - return ((MultiItemStack) stack2).matchItem(stack1,strictCheck); - } - //match material - if (stack1.getType() != stack2.getType()) { - return false; - } - ItemMeta meta1= counter1.getMeta(); - ItemMeta meta2= counter2.getMeta(); - if(meta1==null||meta2==null ) { - return meta2==meta1; - } - //if indistinguishable meta all return false - if(INDISTINGUISHABLE_MATERIALS.contains(stack1.getType())){ - return false; - } -// //match display name -// if(!(!meta1.hasDisplayName() || (meta1.getDisplayName().equals(meta2.getDisplayName())))) { -// return false; -// } - //match display name - - //check important metas - if(canQuickEscapeMetaVariant(meta1,meta2)){ - return false; - } - //check pdc - if (!meta1.getPersistentDataContainer().equals(meta2.getPersistentDataContainer())) { - return false; - } - - //如果非严格并且是sfid物品比较 - final Optional optionalStackId1 = Slimefun.getItemDataService().getItemData(meta1); - final Optional optionalStackId2 = Slimefun.getItemDataService().getItemData(meta2); - if (optionalStackId1.isPresent() != optionalStackId2.isPresent()) { - return false; - } - if (optionalStackId1.isPresent()) { - if(!strictCheck){ - return optionalStackId1.get().equals(optionalStackId2.get()); - } - if(optionalStackId1.get().equals(optionalStackId2.get())) { - SlimefunItem it=SlimefunItem.getById(optionalStackId1.get()); - if(it instanceof CustomSlimefunItem ){ - return true; - } - if(it instanceof DistinctiveItem dt){ - return dt.canStack(meta1,meta2); - } - } - } - - //粘液物品一般不可修改displayName和Lore - //不然则全非sf物品 - if(COMPLEX_MATERIALS.contains(stack1.getType())){ - if(canQuickEscapeMaterialVariant(meta1,meta2)){ - return false; - } - } - //如果非严格且名字相同旧返回,反之则继续 - if(!(!meta1.hasDisplayName() || matchDisplayNameOnInvoke(meta1,meta2))) { - return false; - } - - if(!meta1.hasLore()||!meta2.hasLore()){ - return meta1.hasLore()==meta2.hasLore(); - } - if ( !matchLoreOnInvoke(meta1, meta2)) { - return false; - //对于普通物品 检查完lore就结束是正常的 - }else if(!strictCheck){ - return true; - } - - - // Make sure enchantments match - if (!meta1.getEnchants().equals(meta2.getEnchants())) { - return false; - } - //custommodeldata - final boolean hasCustomOne = meta1.hasCustomModelData(); - final boolean hasCustomTwo = meta2.hasCustomModelData(); - if (hasCustomOne) { - if (!hasCustomTwo || meta1.getCustomModelData() != meta2.getCustomModelData()) { - return false; - } - } else if (hasCustomTwo) { - return false; - } - final boolean hasAttributeOne = meta1.hasAttributeModifiers(); - final boolean hasAttributeTwo = meta2.hasAttributeModifiers(); - if (hasAttributeOne) { - if (!hasAttributeTwo || !Objects.equals(meta1.getAttributeModifiers(),meta2.getAttributeModifiers())) { - return false; - } - } else if (hasAttributeTwo) { - return false; - } - - - return true; - - } - public static boolean matchLoreOnInvoke(ItemMeta meta1,ItemMeta meta2){ - try{ - Object lore1= (CRAFTLORE.get(meta1)); - Object lore2= (CRAFTLORE.get(meta2)); - - return Objects.equals(lore1,lore2); - }catch (Throwable e){ - return matchLore(meta1.getLore(),meta2.getLore(),false); - } - } - - /** - * still needs test - * @param it - * @return - */ - public static ItemMeta getItemMeta(ItemStack it){ -// if(!INVOKE_STACK_SUCCESS)return it.getItemMeta(); -// if(CRAFTITEMSTACKCLASS.isInstance(it)){ -// return it.getItemMeta(); -// } - if(it.getClass()!=CRAFTITEMSTACKCLASS) { - try{ - return (ItemMeta) ITEMSTACKMETA.get(it); - }catch (Throwable e){ - - } - } - return it.getItemMeta(); - - } - public static boolean matchDisplayNameOnInvoke(ItemMeta meta1,ItemMeta meta2){ - try{ - Object name1=(CRAFTDISPLAYNAME.get(meta1)); - Object name2=(CRAFTDISPLAYNAME.get(meta2)); - return name1.equals(name2); - }catch (Throwable e){ - return meta1.getDisplayName().equals(meta2.getDisplayName()); - } - } - public static boolean matchItemStack(ItemStack stack1, ItemStack stack2,boolean strictCheck){ - if(stack1==null || stack2==null){ - return stack1 == stack2; - }else { - return matchItemCore(getCounter(stack1),getCounter(stack2),strictCheck); - } - } - public static boolean matchItemStack(ItemStack counter1,ItemCounter counter2,boolean strictCheck){ - if(counter1==null ){ - return counter2.getItem()==null; - }else { - return matchItemCore(getCounter(counter1),counter2,strictCheck); - } - } - public static boolean matchLore(List lore1,List lore2,boolean strictMod){ - if(strictMod){ - if(lore1==null || lore2==null){ - return lore1 == lore2; - } - if(lore1.size()!=lore2.size()){ - return false; - } - int len=lore1.size(); - String l1; - String l2; - for(int i=0;i COMPLEX_MATERIALS = new HashSet<>(){{ + add(Material.AXOLOTL_BUCKET); + add(Material.WRITABLE_BOOK); + add(Material.WRITTEN_BOOK); + add(Material.ENCHANTED_BOOK); + add(Material.BUNDLE); + add(Material.FIREWORK_STAR); + add(Material.FIREWORK_ROCKET); + add(Material.COMPASS); + add(Material.LEATHER_BOOTS); + add(Material.LEATHER_HELMET); + add(Material.LEATHER_LEGGINGS); + add(Material.LEATHER_CHESTPLATE); + add(Material.MAP); + add(Material.POTION); + add(Material.SPLASH_POTION); + add(Material.LINGERING_POTION); + add(Material.SUSPICIOUS_STEW); + add(Material.COD_BUCKET); + add(Material.SALMON_BUCKET); + add(Material.TADPOLE_BUCKET); + add(Material.PUFFERFISH_BUCKET); + add(Material.TROPICAL_FISH_BUCKET); + add(Material.PLAYER_HEAD); + add(Material.PLAYER_WALL_HEAD); + }}; + private static final HashSet INDISTINGUISHABLE_MATERIALS = new HashSet() {{ + add(Material.SHULKER_BOX); + add(Material.BUNDLE); + add(Material.CHEST); + add(Material.SHULKER_BOX); + add(Material.BARREL); + + }}; + public static final ItemStack DEFAULT_ITEMSTACK=new ItemStack(Material.STONE); + public static final ItemMeta NULL_META=(DEFAULT_ITEMSTACK.getItemMeta()); + public static final Class CRAFTMETAITEMCLASS=NULL_META.getClass(); + public static final Class ITEMSTACKCLASS=ItemStack.class; + public static Class CRAFTITEMSTACKCLASS; + public static ItemStack CRAFTITEMSTACK; + public static Field CRAFTLORE; + public static Field CRAFTDISPLAYNAME; + public static Field CRAFTHANDLER; + public static Class NMSITEMCLASS; + public static Field ITEMSTACKMETA; + public static boolean INVOKE_SUCCESS; + public static boolean INVOKE_STACK_SUCCESS; + static{ + try{ + CRAFTLORE=CRAFTMETAITEMCLASS.getDeclaredField("lore"); + CRAFTDISPLAYNAME=CRAFTMETAITEMCLASS.getDeclaredField("displayName"); + CRAFTLORE.setAccessible(true); + CRAFTDISPLAYNAME.setAccessible(true); + INVOKE_SUCCESS=true; + }catch (Throwable e){ + Debug.logger("INVOKE META FAILED,PLEASE CHECK LOGGER!!!!!!"); + INVOKE_SUCCESS=false; + e.printStackTrace(); + Debug.logger("DISABLING RELEVENT FEATURE"); + + } + try{ + ChestMenu a=new ChestMenu("byd"); + a.addItem(0,DEFAULT_ITEMSTACK); + CRAFTITEMSTACK=a.getItemInSlot(0); + CRAFTITEMSTACKCLASS=CRAFTITEMSTACK.getClass(); + Debug.debug(CRAFTITEMSTACKCLASS.getName()); + CRAFTHANDLER=CRAFTITEMSTACKCLASS.getDeclaredField("handle"); + CRAFTHANDLER.setAccessible(true); + Object handle=CRAFTHANDLER.get(CRAFTITEMSTACK); + Debug.debug(handle.getClass()); + NMSITEMCLASS=handle.getClass(); + //CRAFTMETA=NMSITEMCLASS.getDeclaredField("meta"); +// Field[] fields= NMSITEMCLASS.getDeclaredFields(); +// for(int i=0;i itemID = Slimefun.getItemDataService().getItemData(item); + return itemID.isPresent() ? (String)itemID.get() : null; + } + public static String parseSfId(ItemMeta meta){ + Optional itemID = Slimefun.getItemDataService().getItemData(meta); + return itemID.isPresent() ? (String)itemID.get() : null; + } + /** + * get Consumer for recipe Item + * @param a + * @return + */ + public static ItemConsumer getConsumer(ItemStack a){ + if(a==null)return null; + if (a instanceof RandOutItem ro) { + // return new ItemConsumer(a.clone()); + //当物品是随机输出物品时候,取其中的随机实例 + return ItemConsumer.get(ro.getInstance()); + } + return ItemConsumer.get(a); + } + public static ItemCounter getCounter(ItemStack a){ + if(a==null)return null; + //用于比较和 + return ItemCounter.get(a); + } + + /** + * get greedy consumer for recipe Item + * @param a + * @return + */ + public static ItemGreedyConsumer getGreedyConsumer(ItemStack a){ + if(a==null)return null; + if (a instanceof RandOutItem ro) { + //当物品是随机输出物品时候,取其中的随机实例 + // return new ItemConsumer(a.clone()); + return ItemGreedyConsumer.get(ro.getInstance()); + } + return ItemGreedyConsumer.get(a); + } + + /** + * a huge project to adapt sth... + * use .get(mod,inv,slot) to get ItemPusher + * mod should be in {Settings.INPUT,Settings.OUTPUT} + */ + public static final ItemPusherProvider getpusher=(Settings mod,ItemStack it,int slot)->{ + if(mod==Settings.INPUT||it!=null){ + return ItemPusher.get(it); + }else{ + return ItemSlotPusher.get(it,slot); + } + }; +// public static ItemPusher getSlotPusher(BlockMenu inv,int slot){ +// return getpusher.get(Settings.OUTPUT,inv,slot); +// } + public static ItemPusher getPusher(ItemStack it){ + return ItemPusher.get(it); + } +// public static ItemPusher getPusher(BlockMenu inv,int slot){ +// return getpusher.get(Settings.INPUT,inv,slot); +// } + public static void clearAmount(BlockMenu inv,ItemPusher ... counters){ + ItemPusher ip; + for (int i =0;i slotCounters, MachineRecipe recipe){ + int len2=slotCounters.size(); + ItemStack[] recipeInput = recipe.getInput(); + int cnt = recipeInput.length; + if(cnt>len2)return null; + ItemConsumer[] result=new ItemConsumer[cnt]; + ItemConsumer results; + ItemPusher itemCounter2; + final boolean[] visited=new boolean[len2]; + for(int i=0;i slotCounters, MachineRecipe recipe,int maxMatchCount){ + int len2=slotCounters.size(); + ItemStack[] recipeInput = recipe.getInput(); + int cnt = recipeInput.length; + if(cnt>len2)return null; + ItemGreedyConsumer[] result = new ItemGreedyConsumer[cnt]; + //模拟时间加速 减少~ + maxMatchCount=calMaxCraftAfterAccelerate(maxMatchCount,recipe.getTicks()); + if(maxMatchCount==0){ + return null; + } + //int maxAmount; + final boolean[] visited =new boolean[len2]; + for(int i=0;i=maxMatchCount)break; + } + } + //不够一份的量 + if(itemCounter.getStackNum()<1){ + return null; + } + result[i]=itemCounter; + } + return result; + + } + + /** + * try input every OutputItem in slotCounters, just a plan ,will return plans + * @param + * @param recipe + * @return + */ + + public static ItemConsumer[] countOneOutput(BlockMenu inv , int[] output, MachineRecipe recipe){ + return countOneOutput(inv,output,recipe,getpusher); + } + public static ItemConsumer[] countOneOutput(BlockMenu inv , int[] output, MachineRecipe recipe,ItemPusherProvider pusher){ + int len2=output.length; + ItemStack[] recipeInput = recipe.getOutput(); + int cnt = recipeInput.length; + ItemConsumer[] result = new ItemConsumer[cnt]; + DynamicArray slotCounters=new DynamicArray<>(ItemPusher[]::new,len2,pusher.getMenuInstance(Settings.OUTPUT,inv,output)); + for(int i=0;i0)return null; + } + return result; + } + + /** + * match if one time of this recipe can be crafted + * @param inv + * @param input + * @param output + * @param recipe + * @return + */ + + public static Pair countOneRecipe(BlockMenu inv,int[] input,int[] output,MachineRecipe recipe){ + return countOneRecipe(inv,input,output,recipe,getpusher); + } + public static Pair countOneRecipe(BlockMenu inv,int[] input,int[] output,MachineRecipe recipe,ItemPusherProvider pusher){ + int len=input.length; + ItemStack[] recipeIn=recipe.getInput(); + int cnt=recipeIn.length; + DynamicArray inputs=new DynamicArray<>(ItemPusher[]::new,len,pusher.getMenuInstance(Settings.INPUT,inv,input)); + + ItemConsumer[] inputInfo=matchRecipe(inputs,recipe); + if(inputInfo!=null){ + ItemConsumer[] outputInfo=countOneOutput(inv,output,recipe,pusher); + if(outputInfo!=null){ + return new Pair<>(inputInfo,outputInfo); + } + } + return null; + } + /** + * match max craft time of recipe ,return null if cannot craft return the recorded information of inputConsumer and outputConsumner + * @param inv + * @param input + * @param output + * @param recipe + * @param limit + * @return + */ + + public static Pair countMultiRecipe( BlockMenu inv,int[] input,int[] output, MachineRecipe recipe, int limit) { + return countMultiRecipe(inv,input,output,recipe,limit,getpusher); + } + public static Pair countMultiRecipe( BlockMenu inv,int[] input,int[] output, MachineRecipe recipe, int limit,ItemPusherProvider pusher){ + int len=input.length; + ItemStack[] recipeInput = recipe.getInput(); + DynamicArray inputCounters=new DynamicArray<>(ItemPusher[]::new,len,pusher.getMenuInstance(Settings.INPUT,inv,input)); + int cnt=recipeInput.length; + + ItemGreedyConsumer[] recipeCounter=new ItemGreedyConsumer[cnt]; + int maxAmount=limit; + final boolean[] visited=new boolean[len]; + for(int i=0;i=maxAmount)break; + } + } + int stackAmount=recipeCounter[i].getStackNum(); + if(stackAmount>=maxAmount)continue; + maxAmount=Math.min(maxAmount,stackAmount); + if(maxAmount<=0)return null; + } + // Debug.logger("see match input amount "+maxAmount); + ItemGreedyConsumer[] recipeCounter2= countMultiOutput(recipeCounter,inv,output,recipe,maxAmount,pusher); + + return recipeCounter2!=null?new Pair<>(recipeCounter,recipeCounter2):null; + + } + + /** + * return null if no match ,return ItemGreedyConsumer with modification of inputInfo and outputConsumer with written matchAMount + * @param inputInfo + * @param inv + * @param output + * @param recipe + * @param limit + * @return + */ + + public static ItemGreedyConsumer[] countMultiOutput(ItemGreedyConsumer[] inputInfo, BlockMenu inv, int[] output, MachineRecipe recipe, int limit){ + return countMultiOutput(inputInfo,inv,output,recipe,limit,getpusher); + } + + /** + * this method has a step reading optimize + * @param inputInfo + * @param inv + * @param output + * @param recipe + * @param limit + * @param pusher + * @return + */ + public static ItemGreedyConsumer[] countMultiOutput(ItemGreedyConsumer[] inputInfo, BlockMenu inv, int[] output, MachineRecipe recipe, int limit,ItemPusherProvider pusher){ + + int len2=output.length; + DynamicArray outputCounters=new DynamicArray<>(ItemPusher[]::new,len2,pusher.getMenuInstance(Settings.OUTPUT,inv,output)); + ItemStack[] recipeOutput = recipe.getOutput(); + int cnt2=recipeOutput.length; + ItemGreedyConsumer[] recipeCounter2=new ItemGreedyConsumer[cnt2]; + int maxAmount2=limit; + if(cnt2<=0||maxAmount2<=0){ + return null; + }//优化 当一个输出的时候 直接输出 匹配最大的匹配数 + //99%的情况都是这样的 + //应该不会有很多2b作者给这么高效的机器设置两个输出 + else if (cnt2==1){ + recipeCounter2[0]=getGreedyConsumer(recipeOutput[0]); + for(int i=0;i=maxAmount2){ + break; + } + } + + + + + maxAmount2=Math.min(recipeCounter2[0].getStackNum(),maxAmount2); + if(maxAmount2<=0){return null;} + } + //如果真的有,你喜欢就好 + //有可能是桶或者什么 + else{ + //维护一下当前matchAmount最小值 + PriorityQueue priorityRecipeOutput=new PriorityQueue<>(cnt2+1) ; + for(int i=0;i=maxAmount2){ + break; + } + } + maxAmount2=Math.min(recipeCounter2[0].getStackNum(),maxAmount2); + + if(maxAmount2<=0){return null;} + } + //如果真的有,你喜欢就好 + //有可能是桶或者什么 + else{ + //维护一下当前matchAmount最小值 + PriorityQueue priorityRecipeOutput=new PriorityQueue<>(cnt2+1) ; + for(int i=0;i countMultiRecipe(List inputCounters, ItemSlotPusher[] outputCounters, MachineRecipe recipe, int limit){ + int len=inputCounters.size(); + ItemStack[] recipeInput = recipe.getInput(); + int cnt = recipeInput.length; + ItemGreedyConsumer[] recipeCounter=new ItemGreedyConsumer[cnt]; + int maxAmount=limit; + for(int i=0;i=limit)break; + } + } + maxAmount=Math.min(maxAmount,recipeCounter[i].getStackNum()); + } + if (maxAmount==0)return null; + int len2=outputCounters.length; + ItemStack[] recipeOutput = recipe.getOutput(); + int cnt2=recipeOutput.length; + ItemGreedyConsumer[] recipeCounter2= countMultiOutput(recipeCounter,outputCounters,recipe,maxAmount); + return recipeCounter2!=null?new Pair<>(recipeCounter,recipeCounter2):null; + } + **/ + + /** + * force push recipe outputs to outputslot + * @param + * @param + */ + public static boolean forcePush( ItemConsumer[] slotCounters, BlockMenu inv,int[] slots){ + return forcePush(slotCounters,inv,slots,getpusher); + } + public static boolean forcePush( ItemConsumer[] slotCounters, BlockMenu inv,int[] slots,ItemPusherProvider pusher){ + // ItemPusher[] slotCounters2=new ItemPusher[slots.length]; + DynamicArray slotCounters2=new DynamicArray<>(ItemPusher[]::new,slots.length,pusher.getMenuInstance(Settings.OUTPUT,inv,slots)); + ItemConsumer outputItem; + ItemPusher itemCounter; + boolean hasChanged=false; + int len=slotCounters.length; + ItemStack previewItem; + for(int i=0;i1判断 + }else if(previewItem.getAmount()>=previewItem.getMaxStackSize()){ + continue; + }else{ + itemCounter=slotCounters2.get(j); + if(!itemCounter.isDirty()){ + //可能是存储里的 或者是被覆写的maxCNT + //FIXME 检测存储中是否可能存在空物品 + if(itemCounter.getItem()==null){ + //我们决定将这个分类留在这,为了安全性 毕竟谁也不知到之后会开发啥,不过显然 这玩意大概率是不会被调用的. + itemCounter.setFrom(outputItem); + itemCounter.grab(outputItem); + itemCounter.updateMenu(inv); + itemCounter.setDirty(true); + hasChanged=true; + } else if (itemCounter.getAmount()>=itemCounter.getMaxStackCnt()){ + continue; + } + else if(matchItemCounter(outputItem,itemCounter,false)){ + itemCounter.grab(outputItem); + itemCounter.updateMenu(inv); + itemCounter.setDirty(true); + hasChanged=true; + } + } + } + if(outputItem.getAmount()<=0)break; + } + } + return hasChanged; + } + + + /** + * remake version of pushItems + * @return + */ + public static boolean pushItems(ItemStack[] items,BlockMenu inv,int[] slots){ + return pushItems(items,inv,slots,getpusher); + } + public static boolean pushItems(ItemStack[] items,BlockMenu inv,int[] slots,ItemPusherProvider pusher){ + ItemConsumer[] consumers=new ItemConsumer[items.length]; + for(int i=0;i slotCounters2=new DynamicArray<>(ItemPusher[]::new,slots.length,pusher.getMenuInstance(Settings.OUTPUT,inv,slots)); + int len= slotCounters.length; + ItemPusher itp=null; + ItemGreedyConsumer outputItem; + boolean hasChanged=false; + ItemStack previewItem; + for(int i=0;i=previewItem.getMaxStackSize()){ + continue; + }else{ + itp=slotCounters2.get(j); + if(!itp.isDirty()){ + //FIXME 检查cachemap中的空存储是不是可能被读取进入? + if(itp.getItem()==null){ + itp.setFrom(outputItem); + //needs this push ,because the source of outputItem + outputItem.push(itp); + itp.updateMenu(inv); + itp.setDirty(true); + hasChanged=true; + + }else if (itp.getAmount()>=itp.getMaxStackCnt()){ + continue; + } + else if(matchItemCounter(outputItem,itp,false)){ + outputItem.push(itp); + itp.updateMenu(inv); + itp.setDirty(true); + hasChanged=true; + } + } + } + if(outputItem.getMatchAmount()<=0)break; + } + } + return hasChanged; + } + /** + * simply update consumes + * @param itemCounters + */ + public static void updateInputMenu(ItemConsumer[] itemCounters,BlockMenu inv){ + for(int i = 0; i< itemCounters.length; ++i){ + itemCounters[i].updateItems(inv,Settings.GRAB); + } + } + + public static void updateOutputMenu(ItemConsumer[] itemCounters,BlockMenu inv){ + for(int i = 0; i< itemCounters.length; ++i){ + itemCounters[i].updateItems(inv,Settings.PUSH); + } + } + + public static void multiUpdateInputMenu(ItemGreedyConsumer[] recipeGreedyCounters,BlockMenu inv){ + for(int i = 0; i< recipeGreedyCounters.length; ++i){ + recipeGreedyCounters[i].updateItemsPlus(inv,Settings.GRAB); + } + } + + public static void multiUpdateOutputMenu(ItemGreedyConsumer[] recipeGreedyCounters,BlockMenu inv){ + for(int i = 0; i< recipeGreedyCounters.length; ++i){ + recipeGreedyCounters[i].updateItemsPlus(inv,Settings.PUSH); + } + } + + + /** + * make pushItem + * make sure itemCounters.size>=out + * @param itemCounters + * @param out + * @param inv + */ + public static void updateOutputMenu(ItemPusher[] itemCounters,int[] out,BlockMenu inv){ + int len=out.length; + for (int i=0;i findNextRecipe(BlockMenu inv, int[] slots,int[] outs, List recipes,boolean useHistory) { + return findNextRecipe(inv,slots,outs,recipes,useHistory,Settings.SEQUNTIAL); + } + public static Pair findNextRecipe(BlockMenu inv ,int[] slots,int[] outs,List recipes,boolean useHistory,Settings order){ + return findNextRecipe(inv,slots,outs,recipes,useHistory,Settings.SEQUNTIAL,getpusher); + } + /** + * general findNextRecipe but modified by meeeeeee to adapt ItemCounter + * @param inv + * @param slots + * @param outs + * @param recipes + * @param useHistory + * @param order + * @return + */ + public static Pair findNextRecipe(BlockMenu inv ,int[] slots,int[] outs,List recipes,boolean useHistory,Settings order,ItemPusherProvider pusher){ + int delta; + switch(order){ + case REVERSE:delta=-1;break; + case SEQUNTIAL: + default: delta=1;break; + } + int len = slots.length; + final DynamicArray slotCounter=new DynamicArray<>(ItemPusher[]::new,len,pusher.getMenuInstance(Settings.INPUT,inv,slots)); + int recipeAmount=recipes.size(); + if(recipeAmount<=0){ + return null; + } + int __index=0; + //if usehistory ,will suggest a better place to start + if(useHistory) { + __index= DataCache.getLastRecipe(inv.getLocation()); + __index=(__index<0)?0:__index; + __index=(__index>=recipeAmount)?(recipeAmount-1):__index; + } + int __iter=__index; + MachineRecipe checkRecipe=recipes.get(__iter); + ItemConsumer[] inputInfo=matchRecipe(slotCounter,checkRecipe); + if(inputInfo!=null) { + if(useHistory) { + DataCache.setLastRecipe(inv.getLocation(),__iter); + } + ItemConsumer[] outputInfo= countOneOutput(inv,outs,checkRecipe,getpusher); + if(outputInfo!=null){ + updateInputMenu(inputInfo,inv); + return new Pair<>(checkRecipe,outputInfo); + }else return null;//for better performance in processors + } + __iter+=delta; + for(;__iter=0;__iter+=delta){ + checkRecipe=recipes.get(__iter); + inputInfo=matchRecipe(slotCounter,checkRecipe); + if(inputInfo!=null) { + if(useHistory) { + DataCache.setLastRecipe(inv.getLocation(),__iter); + } + ItemConsumer[] outputInfo= countOneOutput(inv,outs,checkRecipe,getpusher); + if(outputInfo!=null){ + updateInputMenu(inputInfo,inv); + return new Pair<>(checkRecipe,outputInfo); + }else return null;//for better performance in processors + } + } + if(__iter<0){ + __iter=recipeAmount-1; + }else{ + __iter=0; + } + for(;__iter!=__index;__iter+=delta) { + checkRecipe=recipes.get(__iter); + inputInfo=matchRecipe(slotCounter,checkRecipe); + if(inputInfo!=null) { + if(useHistory) { + DataCache.setLastRecipe(inv.getLocation(),__iter); + } + ItemConsumer[] outputInfo= countOneOutput(inv,outs,checkRecipe,getpusher); + if(outputInfo!=null){ + updateInputMenu(inputInfo,inv); + return new Pair<>(checkRecipe,outputInfo); + }else return null;//for better performance in processors + } + } + return null; + } + + /** + * general only find next recipe for input slots ,No check for output slots, no consume for inputslots ,only fetch NEXT matching recipe. + * used in manuals and MaterialGenerators + * @param inv + * @param slots + * @param recipes + * @param useHistory + * @param order + * @return + * + */ + public static MachineRecipe matchNextRecipe(BlockMenu inv ,int[] slots,List recipes,boolean useHistory,Settings order){ + return matchNextRecipe(inv,slots,recipes,useHistory,order,getpusher); + } + public static MachineRecipe matchNextRecipe(BlockMenu inv ,int[] slots,List recipes,boolean useHistory,Settings order,ItemPusherProvider pusher){ + int delta; + switch(order){ + case REVERSE:delta=-1;break; + case SEQUNTIAL: + default: delta=1;break; + } + int len = slots.length; + //final ArrayList slotCounter=new ArrayList<>(len); + final DynamicArray slotCounter=new DynamicArray<>(ItemPusher[]::new,len,pusher.getMenuInstance(Settings.INPUT,inv,slots)); + int recipeAmount=recipes.size(); + if(recipeAmount<=0){ + return null; + } + int __index=0; + //if usehistory ,will suggest a better place to start + if(useHistory) { + __index= DataCache.getLastRecipe(inv.getLocation()); + __index=(__index<0)?0:__index; + __index=(__index>=recipeAmount)?(recipeAmount-1):__index; + } + int __iter=__index; + MachineRecipe checkRecipe=recipes.get(__iter); + if(matchRecipe(slotCounter,checkRecipe)!=null) { + if(useHistory) { + DataCache.setLastRecipe(inv.getLocation(),__iter); + } + return checkRecipe; + + } + __iter+=delta; + for(;__iter=0;__iter+=delta){ + checkRecipe=recipes.get(__iter); + if(matchRecipe(slotCounter,checkRecipe)!=null) { + + if(useHistory) { + DataCache.setLastRecipe(inv.getLocation(),__iter); + } + return checkRecipe; + } + } + if(__iter<0){ + __iter=recipeAmount-1; + }else{ + __iter=0; + } + for(;__iter!=__index;__iter+=delta) { + checkRecipe=recipes.get(__iter); + if(matchRecipe(slotCounter,checkRecipe)!=null) { + if(useHistory) { + DataCache.setLastRecipe(inv.getLocation(),__iter); + } + return checkRecipe; + } + } + return null; + } + + +// public static Pair matchNextMultiRecipe(BlockMenu inv ,int[] slots,List recipes,boolean useHistory,int limit,Settings order){ +// return matchNextMultiRecipe(inv,slots,recipes,useHistory,limit,order,getpusher); +// } + /** + * a better version of matchNextRecipe for multiCraft,will remember the related slots of inputItems + * will not calculate maxCraftTime !,you have to calculate by yourself!!!! + * @param inv + * @param slots + * @param recipes + * @param useHistory + * @param order + * @return + */ + public static Pair matchNextMultiRecipe(BlockMenu inv ,int[] slots,List recipes,boolean useHistory,int limit,Settings order,ItemPusherProvider pusher){ + + int delta; + switch(order){ + case REVERSE:delta=-1;break; + case SEQUNTIAL: + default: delta=1;break; + } + int len = slots.length; + ArrayList slotNotNull=new ArrayList<>(len); + ItemStack it; + for(int i=0;i slotCounter=new DynamicArray<>(ItemPusher[]::new,slotNotNull.size(),pusher.getMenuInstance(Settings.INPUT,inv,slotNotNull)); + int recipeAmount=recipes.size(); + if(recipeAmount<=0){ + return null; + } + int __index=0; + //if usehistory ,will suggest a better place to start + if(useHistory) { + __index= DataCache.getLastRecipe(inv.getLocation()); + __index=(__index<0)?0:__index; + __index=(__index>=recipeAmount)?(recipeAmount-1):__index; + } + int __iter=__index; + MachineRecipe checkRecipe=recipes.get(__iter); + ItemGreedyConsumer[] result=matchMultiRecipe(slotCounter,checkRecipe,limit); + if(result!=null) { + if(useHistory) { + DataCache.setLastRecipe(inv.getLocation(),__iter); + } + return new Pair<>(checkRecipe,result); + + } + __iter+=delta; + for(;__iter=0;__iter+=delta){ + checkRecipe=recipes.get(__iter); + result=matchMultiRecipe(slotCounter,checkRecipe,limit); + if(result!=null) { + if(useHistory) { + DataCache.setLastRecipe(inv.getLocation(),__iter); + } + return new Pair<>(checkRecipe,result); + + } + } + if(__iter<0){ + __iter=recipeAmount-1; + }else{ + __iter=0; + } + for(;__iter!=__index;__iter+=delta) { + checkRecipe=recipes.get(__iter); + result=matchMultiRecipe(slotCounter,checkRecipe,limit); + if(result!=null) { + if(useHistory) { + DataCache.setLastRecipe(inv.getLocation(),__iter); + } + return new Pair<>(checkRecipe,result); + + } + } + return null; + } + public static int calMaxCraftTime(ItemGreedyConsumer[] recipes,int limit){ + int len=recipes.length; + if(len!=0) { + for(int i=0;i findNextMultiRecipe(BlockMenu inv,int[] inputs,int[] outputs, + List recipes,int limit,boolean useHistory){ + return findNextMultiRecipe(inv,inputs,outputs,recipes,limit,useHistory,Settings.SEQUNTIAL); + } + public static Pair findNextMultiRecipe(BlockMenu inv,int[] inputs,int[] outputs, + List recipes,int limit,boolean useHistory,Settings order){ + return findNextMultiRecipe(inv,inputs,outputs,recipes,limit,useHistory,Settings.SEQUNTIAL,getpusher); + } + public static Pair findNextMultiRecipe(BlockMenu inv,int[] inputs,int[] outputs, + List recipes,int limit,boolean useHistory,Settings order,ItemPusherProvider pusher){ + int delta; + switch(order){ + case REVERSE:delta=-1;break; + case SEQUNTIAL: + default: delta=1;break; + } + int len = inputs.length; + final ArrayList slotCounter=new ArrayList<>(len); + for(int i = 0; i < len; ++i) { + ItemPusher input=pusher.get(Settings.INPUT,inv,inputs[i]); + if(input!=null){ + slotCounter.add(input); + } + } + //end before anything + int outlen=outputs.length; + int recipeAmount=recipes.size(); + int __index=0; + //if usehistory ,will suggest a better place to start + if(useHistory) { + __index= AbstractMachines.getLastRecipe(inv.getLocation()); + __index=(__index<0)?0:__index; + __index=(__index>=recipeAmount)?(recipeAmount-1):__index; + } + int __iter=__index; + MachineRecipe checkRecipe=recipes.get(__iter); + final ItemSlotPusher[] outPushers=new ItemSlotPusher[outlen]; + for (int i=0;i tmp=countMultiRecipe(slotCounter,outPushers,checkRecipe,limit); + if(tmp!=null) { + multiUpdateInputMenu(tmp.getFirstValue(),inv); + if(useHistory) { + AbstractMachines.setLastRecipe(inv.getLocation(),__iter); + } + return new Pair<>(checkRecipe,tmp.getSecondValue()); + } + __iter+=delta; + for(;__iter=0;__iter+=delta){ + checkRecipe=recipes.get(__iter); + tmp=countMultiRecipe(slotCounter,outPushers,checkRecipe,limit); + if(tmp!=null) { + multiUpdateInputMenu(tmp.getFirstValue(),inv); + if(useHistory) { + AbstractMachines.setLastRecipe(inv.getLocation(),__iter); + } + return new Pair<>(checkRecipe,tmp.getSecondValue()); + } + } + if(__iter<0){ + __iter=recipeAmount-1; + }else{ + __iter=0; + } + for(;__iter!=__index;__iter+=delta) { + checkRecipe=recipes.get(__iter); + tmp=countMultiRecipe(slotCounter,outPushers,checkRecipe,limit); + if(tmp!=null) { + multiUpdateInputMenu(tmp.getFirstValue(),inv); + if(useHistory) { + AbstractMachines.setLastRecipe(inv.getLocation(),__iter); + } + return new Pair<>(checkRecipe,tmp.getSecondValue()); + } + } + return null; + } + **/ + + public static int matchShapedRecipe(ItemPusher[] input,MachineRecipe recipe,int limit){ + ItemStack[] recipeInput=recipe.getInput(); + int len=input.length; + int len2=recipeInput.length; + if(len findNextShapedRecipe(BlockMenu inv,int[] inputs,int[] outputs, +// List recipes,int limit,boolean useHistory){ +// return findNextShapedRecipe(inv,inputs,outputs,recipes,limit,useHistory,Settings.SEQUNTIAL); +// } + + public static Pair findNextShapedRecipe(BlockMenu inv,int[] inputs,int[] outputs, + List recipes,int limit,boolean useHistory,Settings order,ItemPusherProvider pusher){ + int delta; + switch(order){ + case REVERSE:delta=-1;break; + case SEQUNTIAL: + default: delta=1;break; + } + int len = inputs.length; + ItemPusher[] inputItem=new ItemPusher[len]; + IntFunction inputSlotInstance=pusher.getMenuInstance(Settings.INPUT,inv,inputs); + for(int i=0;i=recipeAmount)?(recipeAmount-1):__index; + } + + int __iter=__index; + MachineRecipe checkRecipe=recipes.get(__iter); + int craftAmount=matchShapedRecipe(inputItem,checkRecipe,limit); + if(craftAmount>0) { + int finalAmount=craftAmount; + ItemGreedyConsumer[] outputCounters=null; + if(outputs.length!=0){ + outputCounters=countMultiOutput(new ItemGreedyConsumer[]{},inv,outputs,checkRecipe,craftAmount,pusher); + if(outputCounters!=null) + finalAmount=outputCounters[0].getStackNum(); + else return null; + } + ItemStack[] recipeInput=checkRecipe.getInput(); + int len2=recipeInput.length; + for(int i=0;i(checkRecipe,outputCounters); + } + __iter+=delta; + for(;__iter=0;__iter+=delta){ + checkRecipe=recipes.get(__iter); + craftAmount=matchShapedRecipe(inputItem,checkRecipe,limit); + if(craftAmount>0) { + int finalAmount=craftAmount; + ItemGreedyConsumer[] outputCounters=null; + if(outputs.length!=0){ + outputCounters=countMultiOutput(new ItemGreedyConsumer[]{},inv,outputs,checkRecipe,craftAmount,pusher); + if(outputCounters!=null) + finalAmount=outputCounters[0].getStackNum(); + else return null; + } + ItemStack[] recipeInput=checkRecipe.getInput(); + int len2=recipeInput.length; + for(int i=0;i(checkRecipe,outputCounters); + } + } + if(__iter<0){ + __iter=recipeAmount-1; + }else{ + __iter=0; + } + for(;__iter!=__index;__iter+=delta) { + checkRecipe=recipes.get(__iter); + craftAmount=matchShapedRecipe(inputItem,checkRecipe,limit); + if(craftAmount>0) { + int finalAmount=craftAmount; + ItemGreedyConsumer[] outputCounters=null; + if(outputs.length!=0){ + outputCounters=countMultiOutput(new ItemGreedyConsumer[]{},inv,outputs,checkRecipe,craftAmount,pusher); + if(outputCounters!=null) + finalAmount=outputCounters[0].getStackNum(); + else return null; + } + ItemStack[] recipeInput=checkRecipe.getInput(); + int len2=recipeInput.length; + for(int i=0;i(checkRecipe,outputCounters); + } + } + return null; + + } + + public static boolean matchSequenceRecipeTarget(ItemPusher[] inPushers,ItemConsumer target){ + boolean hasChange=false; + int len=inPushers.length; + if(target.getAmount()<=0)return false; + for(int i=0;i findNextSequenceRecipe(BlockMenu inv,int[] inputs,List recipes,boolean useHistory,Settings order,ItemPusherProvider pusher,boolean clearInput){ + int delta; + switch(order){ + case REVERSE:delta=-1;break; + case SEQUNTIAL: + default: delta=1;break; + } + int len=inputs.length; + ItemPusher[] inputCounters=new ItemPusher[len]; + IntFunction pusherFunc=pusher.getMenuInstance(Settings.INPUT,inv,inputs); + for(int i=0;i=recipeAmount)?(recipeAmount-1):__index; + } + int __iter=__index; + MachineRecipe checkRecipe=recipes.get(__iter); + ItemConsumer result=CraftUtils.getConsumer(checkRecipe.getInput()[0]); + if(matchSequenceRecipeTarget(inputCounters,result)) { + if(useHistory) { + DataCache.setLastRecipe(inv.getLocation(),__iter); + } + return new Pair<>(checkRecipe,result); + } + __iter+=delta; + for(;__iter=0;__iter+=delta){ + checkRecipe=recipes.get(__iter); + result=CraftUtils.getConsumer(checkRecipe.getInput()[0]); + if(matchSequenceRecipeTarget(inputCounters,result)) { + if(useHistory) { + DataCache.setLastRecipe(inv.getLocation(),__iter); + } + return new Pair<>(checkRecipe,result); + } + } + if(__iter<0){ + __iter=recipeAmount-1; + }else{ + __iter=0; + } + for(;__iter!=__index;__iter+=delta) { + checkRecipe=recipes.get(__iter); + result=CraftUtils.getConsumer(checkRecipe.getInput()[0]); + if(matchSequenceRecipeTarget(inputCounters,result)) { + if(useHistory) { + DataCache.setLastRecipe(inv.getLocation(),__iter); + } + return new Pair<>(checkRecipe,result); + } + } + if(clearInput){ + clearAmount(inv,inputCounters); + } + return null; + } + /** + * + * @param counter1 + * @param counter2 + * @param strictCheck + * @return + */ + public static boolean matchItemCounter_test(ItemCounter counter1, ItemCounter counter2, boolean strictCheck){ + return matchItemCounter_test(counter1, counter2, strictCheck); + } + public static boolean matchItemCounter(ItemCounter counter1, ItemCounter counter2, boolean strictCheck){ + return matchItemCore(counter1,counter2,strictCheck); + } + // + public static boolean matchItemCore(ItemCounter counter1, ItemCounter counter2, boolean strictCheck) { + + ItemStack stack1=counter1.getItem(); + ItemStack stack2=counter2.getItem(); + if (stack1 == null || stack2 == null) { + return stack1 == stack2; + } + if(stack1 instanceof MultiItemStack) { + return ((MultiItemStack) stack1).matchItem(stack2,strictCheck); + }else if (stack2 instanceof MultiItemStack) { + return ((MultiItemStack) stack2).matchItem(stack1,strictCheck); + } + //match material + if (stack1.getType() != stack2.getType()) { + return false; + } + ItemMeta meta1= counter1.getMeta(); + ItemMeta meta2= counter2.getMeta(); + if(meta1==null||meta2==null ) { + return meta2==meta1; + } + //if indistinguishable meta all return false + if(INDISTINGUISHABLE_MATERIALS.contains(stack1.getType())){ + return false; + } +// //match display name +// if(!(!meta1.hasDisplayName() || (meta1.getDisplayName().equals(meta2.getDisplayName())))) { +// return false; +// } + //match display name + + //check important metas + if(canQuickEscapeMetaVariant(meta1,meta2)){ + return false; + } + //check pdc + if (!meta1.getPersistentDataContainer().equals(meta2.getPersistentDataContainer())) { + return false; + } + + //如果非严格并且是sfid物品比较 + final Optional optionalStackId1 = Slimefun.getItemDataService().getItemData(meta1); + final Optional optionalStackId2 = Slimefun.getItemDataService().getItemData(meta2); + if (optionalStackId1.isPresent() != optionalStackId2.isPresent()) { + return false; + } + if (optionalStackId1.isPresent()) { + if(!strictCheck){ + return optionalStackId1.get().equals(optionalStackId2.get()); + } + if(optionalStackId1.get().equals(optionalStackId2.get())) { + SlimefunItem it=SlimefunItem.getById(optionalStackId1.get()); + if( it instanceof CustomSlimefunItem ){ + return true; + } + if(it instanceof DistinctiveItem dt){ + return dt.canStack(meta1,meta2); + } + } + } + + //粘液物品一般不可修改displayName和Lore + //不然则全非sf物品 + if(COMPLEX_MATERIALS.contains(stack1.getType())){ + if(canQuickEscapeMaterialVariant(meta1,meta2)){ + return false; + } + } + //如果非严格且名字相同旧返回,反之则继续 + if(!(!meta1.hasDisplayName() || matchDisplayNameOnInvoke(meta1,meta2))) { + return false; + } + + if(!meta1.hasLore()||!meta2.hasLore()){ + return meta1.hasLore()==meta2.hasLore(); + } + if ( !matchLoreOnInvoke(meta1, meta2)) { + return false; + //对于普通物品 检查完lore就结束是正常的 + }else if(!strictCheck){ + return true; + } + + + // Make sure enchantments match + if (!meta1.getEnchants().equals(meta2.getEnchants())) { + return false; + } + //custommodeldata + final boolean hasCustomOne = meta1.hasCustomModelData(); + final boolean hasCustomTwo = meta2.hasCustomModelData(); + if (hasCustomOne) { + if (!hasCustomTwo || meta1.getCustomModelData() != meta2.getCustomModelData()) { + return false; + } + } else if (hasCustomTwo) { + return false; + } + final boolean hasAttributeOne = meta1.hasAttributeModifiers(); + final boolean hasAttributeTwo = meta2.hasAttributeModifiers(); + if (hasAttributeOne) { + if (!hasAttributeTwo || !Objects.equals(meta1.getAttributeModifiers(),meta2.getAttributeModifiers())) { + return false; + } + } else if (hasAttributeTwo) { + return false; + } + + + return true; + + } + public static boolean matchLoreOnInvoke(ItemMeta meta1,ItemMeta meta2){ + try{ + Object lore1= (CRAFTLORE.get(meta1)); + Object lore2= (CRAFTLORE.get(meta2)); + + return Objects.equals(lore1,lore2); + }catch (Throwable e){ + return matchLore(meta1.getLore(),meta2.getLore(),false); + } + } + + /** + * still needs test + * @param it + * @return + */ + public static ItemMeta getItemMeta(ItemStack it){ +// if(!INVOKE_STACK_SUCCESS)return it.getItemMeta(); +// if(CRAFTITEMSTACKCLASS.isInstance(it)){ +// return it.getItemMeta(); +// } + if(it.getClass()!=CRAFTITEMSTACKCLASS) { + try{ + return (ItemMeta) ITEMSTACKMETA.get(it); + }catch (Throwable e){ + + } + } + return it.getItemMeta(); + + } + public static boolean matchDisplayNameOnInvoke(ItemMeta meta1,ItemMeta meta2){ + try{ + Object name1=(CRAFTDISPLAYNAME.get(meta1)); + Object name2=(CRAFTDISPLAYNAME.get(meta2)); + return name1.equals(name2); + }catch (Throwable e){ + return meta1.getDisplayName().equals(meta2.getDisplayName()); + } + } + public static boolean matchItemStack(ItemStack stack1, ItemStack stack2,boolean strictCheck){ + if(stack1==null || stack2==null){ + return stack1 == stack2; + }else { + return matchItemCore(getCounter(stack1),getCounter(stack2),strictCheck); + } + } + public static boolean matchItemStack(ItemStack counter1,ItemCounter counter2,boolean strictCheck){ + if(counter1==null ){ + return counter2.getItem()==null; + }else { + return matchItemCore(getCounter(counter1),counter2,strictCheck); + } + } + public static boolean matchLore(List lore1,List lore2,boolean strictMod){ + if(strictMod){ + if(lore1==null || lore2==null){ + return lore1 == lore2; + } + if(lore1.size()!=lore2.size()){ + return false; + } + int len=lore1.size(); + String l1; + String l2; + for(int i=0;i WATER_LOGGABLE_TYPES=new HashSet<>(){{ + for (Material m : Material.values()) { + if(m.isBlock()){ + try{ + BlockData defaultData= m.createBlockData(); + if(defaultData instanceof Waterlogged){ + + add(m); + } + }catch (Throwable e){ + Debug.logger(e); + } + } + } + }}; public static void setBlock(Block block, Material material) { } @@ -281,6 +304,9 @@ public static int executeOnSameEntity(Entity entity, Consumer execution) // public static Vector getOrientations(Location loc){ // loc.getDirection(); // } + public static HashSet getEntityInDistance(Location location, double distance, Predicate predicate){ + return new HashSet( location.getWorld().getNearbyEntities(location,2*distance,2*distance,2*distance,(e)->{return e.getLocation().distance(location)<=distance&&predicate.test(e);})); + } public static Pair rayTraceLocation(LivingEntity entity, double period,double maxLimitedDistance, Predicate execution){ if(entity==null)return null; return rayTraceLocation(entity.getLocation().getDirection(),entity.getEyeLocation(),period,maxLimitedDistance,execution); @@ -304,6 +330,27 @@ public static boolean isLightPassableBlock(Block block){ return true; }else return false; } + public static boolean isLiquid(Block block){ + Material material=block.getType(); + if(material==Material.WATER||material==Material.LAVA){ + return true; + }else return false; + } + public static boolean isMaterialWaterLoggable(Material material){ + return WATER_LOGGABLE_TYPES.contains(material); + } + public static boolean isWaterLogged(Block block){ + Material type=block.getType(); + if(isMaterialWaterLoggable(type)){ + BlockData blockData=block.getBlockData(); + if(blockData instanceof Waterlogged wl){ + return wl.isWaterlogged(); + }else return false; + }else{ + return false; + } + + } //IF SF DATA EXISTS,SF BLOCK WILL ALSO BE BREAKED, MAY CAUSE PROBLEMS public static boolean breakVanillaBlockByPlayer(Block block,Player player,boolean withDrop){ if(WorldUtils.hasPermission(player,block.getLocation(),Interaction.BREAK_BLOCK)){ @@ -331,6 +378,15 @@ public static void forceLoadChunk(Location loc,int tick){ chunk.setForceLoaded(isForceload); },tick,true,0); } - - + public static boolean isLivingEntity(Entity e){ + if(e.isValid()&&!e.isDead()&&e instanceof LivingEntity le&&!le.isInvulnerable()){ + return true; + }return false; + } + public static Location getHandLocation(LivingEntity p){ + Location loc=p.getEyeLocation(); + Location playerLocation=p.getLocation(); + loc.add(playerLocation.subtract(loc).multiply(0.3).toVector()); + return loc; + } } diff --git a/src/main/resources/language.yml b/src/main/resources/language.yml index f8bfa03..fa7f6b9 100644 --- a/src/main/resources/language.yml +++ b/src/main/resources/language.yml @@ -1,1148 +1,1171 @@ -zh_CN: - Groups: - ROOT: - Name: '&7&ka&x&5&5&f&f&7&7逻&x&5&5&f&f&9&9辑&x&5&5&f&f&b&b工&x&5&5&f&f&d&d艺&6(正式版 v1.0.2)&7&ka&r' - Lore: - - '&7芜湖起飞' - - '&7⇨ &a单击启动LogiTech' - INFO: - Name: '&d逻辑工艺 &6版本与说明' - MATERIAL: - Name: '&d逻辑工艺 &6基础材料' - ALLMACHINE: - Name: '&d逻辑工艺 &6堆叠机器支持列表' - ALLRECIPE: - Name: '&d逻辑工艺 &6合成配方类型大全' - URL: - Name: "&e点击获取附属Github链接" - Lore: - - "" - - "&7⇨ &a点击获取链接" - INFO1: - Name: "&c&l版本号" - Lore: - - "&7当前逻辑工艺版本:" - - "&b&mv1.0.0 &6&r测试版" - - "&7更多版本,敬请期待!" - INFO2: - Name: "&e&l联系我们" - Lore: - - "&7如果您想要汇报bug" - - "&7或者提出一些有趣的点子" - - "&7请找作者 qq:2169419217" - - "&7作者目前活跃于各个粘液群," - - "&7也可以直接通过群聊找到我们" - INFO3: - Name: "&a&l附属介绍" - Lore: - - "&7我们的附属立志于开发新功能" - - "&7以及有趣的机制," - - "&7虽然传统的堆机器或许不可避免" - - "&7但是我们希望能为玩家带来别样的体验" - INFO4: - Name: "&c&l一些声明" - Lore: - - "&7本附属可能在创作上会借鉴一些附属" - - "&7您也可能找到相似的特性" - - "&7但是本附属特性实现均为作者手写" - - "&7实现这些有趣的特性也是作者兴趣所致,也是作者的目标" - - "&7若出现问题/BUG请找作者matl114" - INFO5: - Name: "&c&l更多的声明" - Lore: - - "&7本附属(LogiTech)与作者创建的同名" - - "&7SC附属逻辑工艺(LogicTech)无联系" - - "&7两者共用同样的主体和名字," - - "&7但是内容和玩法毫无关联" - - "&7并且作者已不再维护SC版附属" - INFO6: - Name: "&6&l附属特性" - Lore: - - "&7本附属拥有一些和其他附属不同的特性" - - "&7在此会在下方指出" - - "&7当您在游玩的时候遇见无法理解的设定" - - "&7请仔细阅读以下的说明" -# FEAT1: -# Name: "&6&l特性 - &c&l输入槽满载清空" -# Lore: -# - "&7有一些机器会强制清空指定输入槽的物品,作为特殊设计" -# - "&7部分机器因为机制原因可以选择性开启输入槽清空模式" -# - "&7即当输入槽存在物品,即使不匹配配方也会消耗" -# - "&7这些设置默认关闭,请留意机器界面" - FEAT1: - Name: "&6&l特性 - &c&l重写的进程机器" - Lore: - - "&7本附属的进程机器(即拥有进度条)的机器与普通进度机器不同" - - "&7采用了附属自研的配方算法和推送算法" - - "&7并且机器保证0tick配方可以无间隔合成" - - "&7若机器出现问题,请找作者" - FEAT2: - Name: "&6&l特性 - &c&l配方机器,生成器与定向生成器" - Lore: - - "&7配方机器指的是使用机器配方进行合成的机器" - - "&7生成器指的是材料生成器,不会消耗物品而持续产出的机器" - - "&7本附属拥有多种生成器" - - "&7其中定向生成器需要输入槽插入指定配方才能进行对应产出" - - "&7若机器出现问题,请找作者" - FEAT3: - Name: "&6&l特性 - &c&l高级机器与并行处理数" - Lore: - - "&7本附属新增了高级机器,拥有更多输入输出槽和更多特性" - - "&7并行处理数指机器在配方搜索时会尝试利用并行数减少合成时间/增大合成数量" - - "&7机器会尝试减少<进程时间>为<进程时间>/<并行处理数>" - - "&7若<进程时间>无法继续减少,则会按<并行处理数>/<进程时间>为最大次数尽可能多的匹配机器配方" - - "&7若机器出现问题,请找作者" - FEAT4: - Name: "&6&l特性 - &c&l工作站与一键放入" - Lore: - - "&7工作站可以用来进行有序的配方合成" - - "&7工作站支持查看当前机器配方" - - "&7大型6x6工作站配方在\"大型配方展示\"菜单" - - "&7或对应工作站的配方按钮查看" - - "&7一键放入支持你快速将物品以配方格式放入工作站" - - "&7若机器出现问题,请找作者" - FEAT5: - Name: "&6&l特性 - &c&l大型多方块机器" - Lore: - - "&7大型多方块机器由多方块核心,多方块部件,多方块IO接口组成" - - "&7多方块核心拥有界面,并且通常提供全息投影,这会指导你搭建多方块机器" - - "&7多方块机器构建需求:多方块机器需要保证结构合规,不与其他多方块冲突,可能有额外的需求(如电力需求或者位置为空需求)" - - "&7多方块机器运行需求:只要多方块机器结构完整即可进行运行" - - "&7运行中多方块机器出现特殊要求不满足时会自发关闭多方块机器" - - "&7注意:有些多方块机器拥有关闭检查,若关闭时进度仍进行可能触发严重后果!" - - "&7自动构建模式为否时多方块机器搭建完成后需要手动点击界面中的构建按钮进行激活" - - "&7启用自动构建将禁用构建按钮的功能并且会自发的异步检测结构与激活机器" - - "&7点击多方块部件将会尝试打开该多方块部件所属的多方块机器界面,shift点击则正常交互" - - "&7多方块IO接口可以替换指定的多方块部件作为多方块机器的一部分,对多方块机器界面进行推送/抓取" - - "&7若机器出现问题,请找作者" - - FEAT6: - Name: "&6&l特性 - &c&l序列输入配方与货运系统" - Lore: - - "&7序列输入配方应用于序列进度机器,其由若干输入需求顺序组成" - - "&7输入与第一个需求相匹配的物品来发起进程" - - "&7进程分若干阶段,每个阶段要求某一种物品输入若干数量和<最小处理时间>" - - "&7一个阶段会在<最小处理时间>到达且输入数量满足的时候结束" - - "&7一个阶段结束会发起下一阶段,顺序执行,直到全部满足,输出结果" - - "&7机器一般提供自动清除按钮,启动则会在当前阶段物品不匹配输入槽全部物品时清除输入槽全部物品" - - "&7虽然这很难自动化,但是相应的,我们会提供货运机器作为一个自动化手段" - - "&7若机器出现问题,请找作者" - FEAT7: - Name: "&6&l特性 - &c&l货运机器与芯片调控" - Lore: - - "&7本附属提供普通货运机器与智能货运机器两种分类" - - "&7其区别在于是否读取槽位限制与是否可调控" - - "&7普通货运机器支持无上限数量传输,但是会一直运行并不读取槽位限制" - - "&7槽位限制: 机器可能根据不同的输入物品指定不同的可推送槽位" - - "&7智能货运普遍使用槽位限制,但是其传输数量通常最大为576" - - "&7智能货运的一个特点是可调控,我们会提供不同的条件调控货运机器" - - "&7其中,芯片调控是可配置性较高的一种" - - "&7一般芯片调控的机器为32一周期,周期地读取芯片32位数据上的01位" - - "&7并按照读取结果为0/1执行不同的行为!" - - "&7支持芯片调控的机器共用同步ticker,任意运行时间他们获得的tick计数器严格相同" - - "&7他们读取的芯片位数会严格相同,并不会因为放置先后而造成差异!" - - "&7本附属的货运机器可以统一使用货运配置卡配置" - - "&7若机器出现问题,请找作者" - FEAT8: - Name: "&6&l特性 - &c&l堆叠机器类与工作效率" - Lore: - - "&7堆叠机器,顾名思义,指可以将其他机器堆叠入指定槽位" - - "&7堆叠机器将载入其配方,并代替其进行合成" - - "&7\"堆叠效率\"决定单个机器的产速放大倍率" - - "&7机器并行处理数为<槽位中堆叠的数量>*<堆叠效率>" - - "&7槽位和输入输出槽一样会支持\"终极合成\"特性" - - "&7堆叠机器分为堆叠配方机器与堆叠生成器" - - "&7其分别支持合法的配方机器和生成器" - - "&7其中,配方机器的并行处理将试图加速进程" - - "&7而堆叠生成器的并行处理只会倍率增大产出数量" - - "&c注意,本附属提供配置文件修改堆叠机器的列表与配方" - - "&c并同时支持修改部分机器的配方" - - "&c请服务器管理员谨慎处理配置文件" - - "&e注意:本附属不支持rsc等任意粘液插件的热重载" - - "&e因热重载而导致堆叠机器失效,作者不负任何责任" - - "&a附属即将开启\"全民创作者\"计划,鼓励大家参与完善配置文件" - - "&a用于兼容那些奇怪但高效的附属,让堆叠列表更加完善" - FEAT9: - Name: "&6&l特性 - &c&l终极合成" - Lore: - - "&7终极合成支持从合法的非空存储类物品中进行取出/存入" - - "&7并且支持该特性的合成/进程可以直接访问其中的物品存储" - - "&e用人话讲,就是" - - "&e可以直接消耗存储类物品或者链接绑定的实体存储内的物品参与合成" - - "&e产出的物品也可以直接地存入存储类物品或者链接绑定的实体存储" - - "&e但是参与合成的这类物品必须是非空的存储.机器并不会帮你设置存储种类!" - - "&7当前支持的物品:" - - "&7逻辑工艺 概念奇点存储(存储类物品)" - - "&7逻辑工艺 量子纠缠奇点(存储链接物品)" - - "&7网络(拓展) 量子存储系列(存储类物品)" - - "&a建议:多使用量子纠缠奇点,可以大幅度减少卡顿!" - - "&c备注:由于网络拓展版本更迭过快,不保证支持全部版本" - - "&7拥有这类特性的机器通常拥有极致的合成速度来支持此特性" - - "&7若机器出现问题,请找作者" - UPDATELOG: - Name: '&d逻辑工艺 &6更新日志' - Lore: - - '&7我可没有痴呆症' - MORE2: - Name: '&6致歉说明' - BASIC: - Name: '&d逻辑工艺 &6基础机器' - ALLBIGRECIPES: - Name: '&d逻辑工艺 &6大型配方表展示' - Lore: - - '&7用于查看粘液书中展示不完整的配方' - CARGO: - Name: '&d逻辑工艺 &6货运机器' - SINGULARITY: - Name: '&d逻辑工艺 &6概念奇点工艺' - ADVANCED: - Name: '&d逻辑工艺 &6进阶机器' - BEYOND: - Name: '&d终章 &6超越领域' - Lore: - - '&7Beyond Tech' - VANILLA: - Name: '&d逻辑工艺 &6赤石科技' - Lore: - - '&e哦不...应该是红石科技辣' - MANUAL: - Name: '&d逻辑工艺 &6快捷机器' - Lore: - - '&7懒人福音,好耶' - SPECIAL: - Name: '&d逻辑工艺 &6谜之领域' - Lore: - - '&7这些机器怎么看起来功能怪怪的...' - TOBECONTINUE: - Name: '&6未完待续...' - Lore: - - "&7仍在开发,敬请期待" - SPACE: - Name: '&d逻辑工艺 &6空间技艺' - GENERATORS: - Name: '&d逻辑工艺 &6材料生成与转化' - ENERGY: - Name: '&d逻辑工艺 &6电力与能源拓展' - FUNCTIONAL: - Name: '&d逻辑工艺 &6功能性物品' - - Items: - BUG: - Name: 'BUG' - Lore: - - '经常出现在意想不到的地方...' - MATL114: - Name: 'MATL114' - Lore: - - '没错,我是逻辑工艺的作者...' - CHIP_INGOT: - Name: '薯片合金' - Lore: - - '真是亿个冷笑话..' - LOGIC: - Name: '逻辑' - Lore: - - '剪不断,理还乱..' - TRUE_: - Name: 'True ' - FALSE_: - Name: 'False ' - LOGIGATE: - Name: '逻辑门' - Lore: - - '虽然它看起来很可怕与难懂...' - - '但这只是个材料,并不能帮你炸服' - EXISTE: - Name: '存在性' - UNIQUE: - Name: '唯一性' - PARADOX: - Name: '悖论' - NOLOGIC: - Name: '反逻辑' - Lore: - - '什么,这不科学' - LENGINE: - Name: '逻辑引擎' - LFIELD: - Name: '逻辑引擎力场' - LSCHEDULER: - Name: '逻辑调度器' - Lore: - - '机器枢纽' - LCRAFT: - Name: '逻辑合成单元' - Lore: - - '负责复杂的合成任务' - LDIGITIZER: - Name: '数字化核心' - LBOOLIZER: - Name: '布尔化核心' - Lore: - - '0与1的世界...' - LIOPORT: - Name: 'IO组件' - Lore: - - '负责执行高速物流任务' - PALLADIUM_INGOT: - Name: '钯 (pd)' - PLATINUM_INGOT: - Name: '铂 (pt)' - MOLYBDENUM: - Name: '钼 (mo)' - Lore: - - '用于芯片制造' - CERIUM: - Name: '铈 (ce)' - CADMIUM_INGOT: - Name: '镉 (cd)' - MENDELEVIUM: - Name: '钔 (md)' - DYSPROSIUM: - Name: '镝 (dy)' - BISMUTH_INGOT: - Name: '铋 (bi)' - ANTIMONY_INGOT: - Name: '锑 (sb)' - BORON: - Name: '硼 (B)' - Lore: - - '用于芯片制造' - DIMENSIONAL_SHARD: - Name: '维度碎片' - Lore: - - '蕴含着跨越维度的力量' - STAR_GOLD: - Name: '星辰金砂' - Lore: - - '随星系爆发而生...' - - '其结构坚固到足以承载空间力量' - VIRTUAL_SPACE: - Name: '虚拟空间' - Lore: - - '存在于虚无中的空间' - WORLD_FEAT: - Name: '世界特征 - 主世界' - Lore: - - '代表着主世界特征的世界碎片' - NETHER_FEAT: - Name: '世界特征 - 下界' - Lore: - - '代表着下界特征的世界碎片' - END_FEAT: - Name: '世界特征 - 末地' - Lore: - - '代表着末地特征的世界碎片' - ABSTRACT_INGOT: - Name: '抽象锭' - Lore: - - '仅仅是个开始...' - PDCECDMD: - Name: '钚铈镉钔合金' - Lore: - - '布什,戈门' - HGTLPBBI: - Name: '汞铊铅铋合金' - Lore: - - '“不知道为什么熔点超高的合金”' - REINFORCED_CHIP_INGOT: - Name: '强化薯片合金' - Lore: - - '更符合逻辑的芯片制造原料' - ATOM_INGOT: - Name: '充能原子合金' - - LMOTOR: - Name: '逻辑动力马达' - Lore: - - '源源不断的动力' - LPLATE: - Name: '薯片合金板' - Lore: - - '符合逻辑的配方' - - '让他广泛用于各种逻辑机器中' - METAL_CORE: - Name: '重金核心' - Lore: - - '凝聚概念' - SMELERY_CORE: - Name: '精炼核心' - Lore: - - '凝聚概念' - MASS_CORE: - Name: '物质核心' - Lore: - - '凝聚概念' - TECH_CORE: - Name: '科技核心' - Lore: - - '凝聚概念' - SPACE_PLATE: - Name: '空间强化板' - LOGIC_CORE: - Name: '逻辑核心' - Lore: - - '终极' - FINAL_FRAME: - Name: '终极逻辑框架' - Lore: - - '终极之基' - REDSTONE_ENGINE: - Name: '赤石源力引擎' - STAR_GOLD_INGOT: - Name: '星辰金' - Lore: - - '制造空间机器必不可少的材料' - HYPER_LINK: - Name: '超链接' - Lore: - - '和目标方块建立逻辑链接' - - '右键打开目标方块' - - 'shift+右键绑定目标方块' - SAMPLE_HEAD: - Name: '头颅展示示例' - Lore: - - '来自头颅解析仪' - RESOLVE_FAILED: - Name: '&c物品解析失败!' - Lore: - - '&7并未找到符合id的物品! 该配方已被禁用!' - CARGO_PART: - Name: '逻辑货运零件' - Lore: - - '用于配置货运运输数量' - CARGO_CONFIG: - Name: '通用货运机器配置卡' - Lore: - - '插入机器以载入货运配置' - CARGO_CONFIGURATOR: - Name: '通用货运配置台' - Lore: - - '用于编辑通用货运配置卡' - - CHIP: - Name: 'CHIP' - Lore: - - '可存储32位数据的芯片' - CHIP_CORE: - Name: '智能控制核心' - Lore: - - '内部编码了复杂的代码..' - - '用于控制复杂机器运行' - LSINGULARITY: - Name: '逻辑奇点' - Lore: - - '伴生于超新星' - - '终极之始' - THALLIUM: - Name: '铊 (Tl)' - HYDRAGYRUM: - Name: '汞 (Hg)' - RADIATION_CLEAR: - Name: '辐射区域清除器' - Lore: - - '嘿嘿,管理专用' - ANTIMASS_CLEAR: - Name: '反概念物质清除器' - Lore: - - '当反概念物质太多的时候,记得掏出来点一下' - - '嘿嘿,管理专用' - BISILVER: - Name: '铋银' - Lore: - - '介于真实和虚幻的材料' - PAGOLD: - Name: '钯金' - Lore: - - '有股椰子的味道..' - STACKFRAME: - Name: '堆叠空间' - Lore: - - '在虚拟空间中压缩大量机器..' - - '用于合成传说中的堆叠机器' - LASER: - Name: '纳米级激光发生器' - Lore: - - '用于芯片制造' - ANTIMASS: - Name: '反概念物质' - Lore: - - '反逻辑而存在的物质' - - '会同化其余物质,&c小心放置!' - SHELL: - Name: 'SHELL' - VIRTUALWORLD: - Name: '虚拟世界' - Lore: - - '诞生自ERROR的世界' - ENTITY_FEAT: - Name: '生物特征' - Lore: - - '随机掉落于刷怪笼' - - '' - - '类型: &x&e&b&3&3&e&b<类型>' - SAMPLE_SPAWNER: - Name: '刷怪笼' - HOLOGRAM_REMOVER: - Name: '全息投影清除器' - Lore: - - '用来清除因错误而未正确移除的展示实体' - - '你或许会在崩服之后使用他' - - '右键清除附近10格的错误展示实体' - WITHERPROOF_REDSTONE: - Name: '防凋零红石块' - Lore: - - '非常好红石块,防爆防凋零' - WITHERPROOF_REDS: - Name: '防凋零红石' - Lore: - - '非常好红石线,防爆防凋零' - - '可惜还是不防水' - BEDROCK_BREAKER: - Name: '便捷式破基岩装置' - Lore: - - '赤石科技的基础道具' - - '右键破坏任何原版方块' - - '每方块仅消耗 1 活塞' - LASER_GUN: - Name: '便捷式宏激光发射器' - Lore: - - '发射宏激光' - - '手持右键发射' - - '或置于头部 并&e按F&7使用' - - '射程: 100m' - - '伤害: 100(对怪物) 或 4级激光伤害(对玩家)' - - '&e小心激光!' - Machines: - LOGIC_REACTOR: - Name: '逻辑反应堆' - Lore: - - '一切复杂逻辑的起源...' - - '始于True和False' - BOOL_GENERATOR: - Name: '布尔生成器' - BUG_CRAFTER: - Name: 'BUG工作台' - Lore: - - '虽然他是由bug制成' - - '但他不仅仅能制造bug...' - HEAD_ANALYZER: - Name: '头颅解析仪' - Lore: - - '支持解码头颅hash' - - '支持通过hash获取头颅纹理' - - '支持修改头颅物品的纹理' - RECIPE_LOGGER: - Name: '注册代码生成器' - Lore: - - '支持将槽位中的配方转为本附属支持的代码格式' - - '支持生成本附属的物品注册格式代码' - - '支持生成本附属的粘液物品注册格式代码' - - '仅对开发者有用' - ENDFRAME_MACHINE: - Name: '空间框架构建机' - LVOID_GENERATOR: - Name: '虚空量子发电机' - Lore: - - '尝试在虚拟虚空中捕捉量子能量' - - '似乎还捕捉到了奇怪的东西..' - INFINITY_AUTOCRAFT: - Name: '无尽自动合成台' - Lore: - - '消耗大量电力自动化合成无尽配方' - SPECIAL_CRAFTER: - Name: '逻辑模拟合成站' - Lore: - - '通过逻辑空间模拟任意特殊工作台/工作站' - - '进行无序合成.每次耗时6秒' - STAR_SMELTERY: - Name: '星辰金锻铸炉' - Lore: - - '铸造稀有的合金' - CHIP_MAKER: - Name: '简易光刻机' - Lore: - - '迈向高科技的第一步...' - - '制造可以存储信息的芯片' - CHIP_CONSUMER: - Name: '单目位运算执行单元' - Lore: - - '对芯片上的数据进行位运算' - CHIP_BICONSUMER: - Name: '双目位运算执行单元' - Lore: - - '对芯片上的数据进行位运算' - SEQ_CONSTRUCTOR: - Name: '概念化序列构造器' - Lore: - - '反复凝聚概念...' - - '序列进度机器' - - STACKMACHINE: - Name: '堆叠配方机器' - Lore: - - '传说中的堆叠机器' - - '将支持的配方机器插入指定槽位以载入配方' - - '堆叠效率: 2.00' - - '支持范围: 全部配方机器' - - '生成器请在堆叠生成器中使用' - - ENERGY_TRASH: - Name: '能源垃圾桶' - Lore: - - '将电网中多余的电销毁' - - '会优先保证用电器的供需' - OPPO_GEN: - Name: '正反发电机' - Lore: - - '拥有正反两面的发电机' - - '这难道不令人感到奇怪末' - ARC_REACTOR: - Name: '方舟反应堆' - Lore: - - 'IronMan 同款~' - CHIP_REACTOR: - Name: '芯片反应堆' - Lore: - - '终极发电机' - - '燃烧芯片存储的数据发电' - ADVANCED_CHIP_MAKER: - Name: '高效芯片光刻机' - Lore: - - '拥有复刻二进制位的能力' - - '周期性的选择01数据的位' - - '从样本芯片复制此位数据到目标芯片' - ENERGY_AMPLIFIER: - Name: '量子发电机超频装置' - Lore: - - '传说中的堆叠发电机' - - '将该机器置于运行中的发电机下方' - - '并在槽位中放入相同的发电机' - - '该机器可以按上方电机倍率发电' - - '堆叠效率: 2.0' - FINAL_SEQUENTIAL: - Name: '终极概念凝聚者' - Lore: - - '凝聚终极概念' - - '序列进度机器' - - '终极机器' - FINAL_STACKMACHINE: - Name: '终极堆叠 - 配方机器' - Lore: - - '传说中的终极堆叠机器' - - '将支持的配方机器插入指定槽位以载入配方' - - '终极机器' - - '所有槽位&e支持"终极合成"的特性' - - '堆叠效率: 64.00' - - '支持范围: 全部配方机器' - DUST_EXTRACTOR: - Name: '磨粉工厂' - Lore: - - '一次处理全部输入的圆石' - - '处理器数量 9x' - FURNACE_FACTORY: - Name: '熔炼工厂' - Lore: - - '一次性可以冶炼9种配方' - - '处理器数量 9x' - INGOT_FACTORY: - Name: '铸锭工厂' - Lore: - - '一次性处理全部输入的矿粉' - - '处理器数量 9x' - SMELTRY: - Name: '高级精炼工厂' - Lore: - - '冶炼合金' - CRAFTER: - Name: '逻辑合成工厂' - Lore: - - '在逻辑空间中执行合成任务' - - '插入对应快捷机器,数量越多,进程数越多' - - '无序输入,立刻合成' - PRESSOR_FACTORY: - Name: '压缩工厂' - Lore: - - '一次性压缩9种配方' - - '处理器数量 9x' - EASYSTACKMACHINE: - Name: '堆叠工厂' - Lore: - - '丐版堆叠机器,看起来很不靠谱的样子' - - '将支持的配方机器插入指定槽位以载入配方' - - '堆叠效率: 0.50' - - '支持范围: 全部配方机器' - - '生成器请在堆叠生成器中使用' - - '&e...要不还是看看正版堆叠机?' - CONVERTOR: - Name: '逻辑转换工厂' - Lore: - - '仅能转换一小部分物质' - FINAL_LASER: - Name: '宏激光发射器' - Lore: - - '使用红石激发,或置于终极祭坛上激活' - - '用于激活终极机器' - - '⇨ 二级终极祭坛的构成部分' - - '&e小心激光!' - FINAL_CONVERTOR: - Name: '物质量化重塑器' - Lore: - - '"或许,物质在它看来不过是一串数字"' - - '随机波动输入物的材质ID以重塑材质' - RAND_EDITOR: - Name: '属性量化增幅器' - Lore: - - '随机增幅物品的附魔等属性' - VIRTUAL_KILLER: - Name: '屠宰工厂' - Lore: - - '插入刷怪笼以获取该类型生物的特殊掉落物' - - '或许你们需要一个"灵魂罐"附属' - - '工作效率: 1.0' - INF_MOBSIMULATION: - Name: '无尽生物模拟室' - Lore: - - '使用生物芯片激活' - INF_GEOQUARRY: - Name: '无尽地理资源矿机' - Lore: - - '利用电力缓慢获取地理资源' - - '不受剩余地理资源数量影响' - ATTR_OP: - Name: '附魔属性操作台' - Lore: - - '在物品之间转移附魔/属性增幅符' - - '支持自动运行' - GRIND_FACTORY: - Name: '碎矿工厂' - Lore: - - '一次性碎矿9种配方' - - '处理器数量 9x' - TNT_GEN: - Name: '便携式TNT复制机' - Lore: - - '赤石科技的基础元件' - - '启动后使用红石激活' - - '支持调整生成频率,爆炸延时,生成位置' - ADVANCE_BREWER: - Name: '酿造工厂' - Lore: - - '更快的自动酿造机' - SIMU_LVOID: - Name: '虚拟量子发电机' - Lore: - - '进阶的虚空量子发电机' - - '在逻辑空间中模拟能源网络运行' - - '无需接入能源网络即可运行' - Manuals: - MANUAL_CORE: - Name: '乱序核心' - Lore: - - '经典永流传...' - CRAFT_MANUAL: - Name: '快捷工作台' - FURNACE_MANUAL: - Name: '快捷熔炉' - ENHANCED_CRAFT_MANUAL: - Name: '快捷强化工作台' - GRIND_MANUAL: - Name: '快捷磨石' - ARMOR_FORGE_MANUAL: - Name: '快捷盔甲锻造台' - ORE_CRUSHER_MANUAL: - Name: '快捷矿石粉碎机' - COMPRESSOR_MANUAL: - Name: '快捷压缩机' - PRESSURE_MANUAL: - Name: '快捷压力机' - MAGIC_WORKBENCH_MANUAL: - Name: '快捷魔法工作台' - ORE_WASHER_MANUAL: - Name: '快捷洗矿机' - GOLD_PAN_MANUAL: - Name: '快捷淘金机' - ANCIENT_ALTAR_MANUAL: - Name: '快捷远古祭坛' - SMELTERY_MANUAL: - Name: '快捷冶炼炉' - CRUCIBLE_MANUAL: - Name: '快捷坩锅' - PULVERIZER_MANUAL: - Name: '快捷打粉机' - MULTICRAFTTABLE_MANUAL: - Name: '快捷综合工作台' - Lore: - - '合并工作台,魔法工作台和远古祭坛' - TABLESAW_MANUAL: - Name: '快捷台锯' - COMPOSTER: - Name: '快捷搅拌机' - MULTIMACHINE_MANUAL: - Name: '快捷综合机器' - Lore: - - '合并加热压力仓和其他没用的机器' - MOBDATA_MANUAL: - Name: '快捷生物芯片注入器' - Lore: - - '而你,我的朋友,你才是真正的懒狗' - INFINITY_MANUAL: - Name: '快捷无尽工作台' - Lore: - - '一键合成! ...但是注意电力' - NTWWORKBENCH_MANUAL: - Name: '快捷网络工作台' - Lore: - - '又是懒狗东西' - - '似乎还增加了拓展的配方?' - MULTIBLOCK_MANUAL: - Name: '快捷多方块结构模拟器' - Lore: - - '在虚拟空间中模拟多方块结构' - - '支持全体多方块结构的快捷合成' - FINAL_MANUAL: - Name: '终极快捷机器' - Lore: - - '一键合成的尽头' - - '终极机器' - - '所有槽位&e支持"终极合成"的特性' - CARD_MAKER: - Name: '快捷卡片制造机' - Lore: - - '制造不可堆叠物品的替代卡片' - - '善哉' - REPLACE_CARD: - Name: '替代卡片' - Lore: - - '替代不可堆叠物品' - Generators: - - MAGIC_STONE: - Name: '魔法刷石机' - Lore: - - '空岛般的体验!' - - '这里面是装了个黑奴吗' - BOOL_MG: - Name: '布尔组件复刻机' - Lore: - - '这产量一辈子都花不光了!' - - '...真的吗' - OVERWORLD_MINER: - Name: '进阶魔法刷石机' - Lore: - - '刷起来力' - NETHER_MINER: - Name: '下界魔法刷石机' - Lore: - - '可以生产蓝冰魔法刷石机的产出' - END_MINER: - Name: '末地魔法刷石机' - Lore: - - '似乎还有额外产出?' - DIMENSION_MINER: - Name: '维度矿机' - Lore: - - '在维度的裂隙中开采' - - '或许能开采到什么稀有玩意' - REDSTONE_MG: - Name: '红石组件生成器' - DUPE_MG: - Name: '特性复制机' - ENDDUPE_MG: - Name: '末地门特性复制机' - STACKMGENERATOR: - Name: '堆叠生成器' - Lore: - - '传说中的堆叠机器' - - '将支持的生成器插入指定槽位以载入配方' - - '将机器指定样板插在输入槽(如果有)以生成' - - '堆叠效率: 2.00' - - '支持范围: 全部材料生成器' - - '配方机器请在堆叠配方机器中使用' - REVERSE_GENERATOR: - Name: '逆生成器' - Lore: - - '成功掌控了基础逻辑的力量' - - '以此制造基础的抽象逻辑材料' - FINAL_STONE_MG: - Name: '真·无尽圆石工厂' - Lore: - - '终极机器' - - '输出槽位&e支持"终极合成"的特性' - - '或许你会在哪里用到这么多石头呢' - FINAL_STACKMGENERATOR: - Name: '终极堆叠 - 生成器' - Lore: - - '传说中的终极堆叠机器' - - '将支持的生成器插入指定槽位以载入生成配方' - - '终极机器' - - '输出槽位&e支持"终极合成"的特性' - - '堆叠效率: 32.00' - - '支持范围: 全部生成器' - VIRTUAL_MINER: - Name: 'Minecraft矿机' - Lore: - - '在虚拟的世界中挖矿' - - '爆率高啊很高啊' - VIRTUAL_PLANT: - Name: 'Minecraft种植机' - Lore: - - '在虚拟的世界中种植' - - '或许还有虚拟黑奴' - MAGIC_PLANT: - Name: '魔法种植机' - Lore: - - '空岛般的体验' - - '这里面是装了个黑奴吗' - OVERWORLD_PLANT: - Name: '进阶种植机' - Lore: - - '种植主世界作物' - - '打倒mk2😋' - NETHER_PLANT: - Name: '下界种植机' - Lore: - - '种植下界作物' - END_PLANT: - Name: '虚空种植机' - Lore: - - '种植作物' - STONE_FACTORY: - Name: '圆石工厂' - Lore: - - '我们不生产圆石' - - '我们只是圆石的搬运工' - TNT_MG: - Name: 'TNT生成器' - Lore: - - '好孩子,这可不是给你拿去炸服用的' - - MultiBlock: - PORTAL_CORE: - Name: '维度传送门核心' - Lore: - - '蕴含着高维度的力量' - - '维持稳定的超链接并允许&c任何实体&7传送' - - '"你走上传送台,定坐中央,静待传送"' - PORTAL_FRAME: - Name: '维度传送门框架' - SOLAR_REACTOR: - Name: '超新星模拟器' - Lore: - - '在虚拟空间中模拟超新星爆发' - - '不要靠近模拟超新星哦~ 除非你想吃席' - - '⇨ 内部舱室必须被空气填充' - - '⇨ 必须提供电力以维持多方块结构' - - '⇨ 开始运行后会导致附近2.5格生物死亡' - - '⇨ 意外的合成进程终止会导致爆炸' - - '⇨ 爆炸会破坏地形与粘液的头颅机器' - SOLAR_REACTOR_FRAME: - Name: '超新星模拟器框架' - Lore: - - '可以被模拟器货运接口代替' - SOLAR_REACTOR_GLASS: - Name: '超新星模拟器防护罩' - Lore: - - '"身临其境"' - - '不可以被其他组件替代' - SOLAR_INPUT: - Name: '超新星模拟器货运接口-输入' - Lore: - - '将槽位内的物品传入模拟器输入槽' - - '置于结构中任意模拟器框架的位置即可工作' - - '运输配置:' - - '强对称: 启用' - - SOLAR_OUTPUT: - Name: '超新星模拟器货运接口-输出' - Lore: - - '将模拟器输出槽的物品传入槽位' - - '置于结构中任意模拟器框架的位置即可工作' - - '运输配置:' - - '强对称: 禁用' - TRANSMUTATOR_FRAME: - Name: '元素嬗变机框架' - TRANSMUTATOR_GLASS: - Name: '元素嬗变机防护罩' - Lore: - - "可以有效隔绝核辐射" - - '"这次应该不会炸了"' - TRANSMUTATOR_ROD: - Name: '原子合金核燃料棒' - Lore: - - '其原子结构中蕴充盈的核能' - - '是诱导嬗变反应的最佳选择' - TRANSMUTATOR: - Name: '元素嬗变机' - Lore: - - '创造元素,转换元素,掌控元素' - - '重组原子以制造稀有元素材料' - - '⇨ 本多方块机器是可变高度的多方块机器' - - '⇨ 本机器的投影示意图仅是最低高度的机器示例' - - '⇨ 可以在顶层之下重复放置投影中第四层的多方块结构以增加高度' - - '⇨ 提升高度可以大幅度增加机器并行处理数' - - '⇨ 机器进程中必须满足冷却剂的供应!' - - '⇨ 意外的合成进程终止会导致熔毁' - - '⇨ 机器熔毁会释放约1小时的辐射区' - FINAL_BASE: - Name: '终极祭坛基石' - Lore: - - '仿佛蕴含了整个世界' - FINAL_ALTAR: - Name: '终极祭坛' - Lore: - - '激活某些终极机器的钥匙' - - '需要组件终极祭坛多方块结构以运行' - - '⇨ 本多方块机器包含两等级' - - '⇨ 第一等级仅能激活宏激光发射器等简单机器' - - '⇨ 第二等级可以激活所有可激活的机器' - - '⇨ 在界面中切换全息投影以知晓具体构造' - - '⇨ 切换等级需要重新构建多方块机器' - Cargo: - SIMPLE_CARGO: - Name: '邻接传输器' - Lore: - - '将物品从一组槽位转向另一组...' - - '可选择邻接的方块作为源方与目标' - REMOTE_CARGO: - Name: '远程传输器' - Lore: - - '将物品从一组槽位转向另一组...' - - '放入超链接以选择方块作为源方与目标' - LINE_CARGO: - Name: '链式传输器' - Lore: - - '经典永流传...' - - '按指定方向顺序执行传输任务' - - '每个方块向下一个方块进行传输' - - '最大传输长度64格' - BISORTER: - Name: '可调控式物流合并机-2合机' - Lore: - - '使用芯片编码以调控物流合并任务' - QUARSORTER: - Name: '可调控式物流合并机-4合机' - Lore: - - '使用芯片编码以调控物流合并任务' - OCTASORTER: - Name: '可调控式物流合并机-8合机' - Lore: - - '使用芯片编码以调控物流合并任务' - BIFILTER: - Name: '物品分拣机-2分机' - Lore: - - '将物品输入分类至指定槽位' - QUARFILTER: - Name: '物品分拣机-4分机' - Lore: - - '将物品输入分类至指定槽位' - OCTAFILTER: - Name: '物品分拣机-8分机' - Lore: - - '将物品输入分类至指定槽位' - ADV_TRASH: - Name: '高级垃圾焚化炉' - Lore: - - '一次性焚烧54组物品' - STORAGE_OPERATOR: - Name: '存储物品操作台' - Lore: - - '用于在存储类物品中转移数据' - - '支持的存储类道具:' - - "逻辑工艺 概念奇点存储" - - "逻辑工艺 量子纠缠奇点" - - "网络(拓展) 量子存储系列" - ADV_ADJACENT_CARGO: - Name: '智能邻接传输器' - Lore: - - '与普通货运机器机制相同' - - '会接受目标机器的输入槽位限制,因此开销也会增大' - - '不过传输数量将被限制至min(576,配置卡数据)' - ADV_REMOTE_CARGO: - Name: '智能远程传输器' - Lore: - - '与普通货运机器机制相同' - - '会接受目标机器的输入槽位限制,因此开销也会增大' - - '所以传输数量将被限制至min(576,配置卡数据)' - ADV_LINE_CARGO: - Name: '智能链式传输器' - Lore: - - '与普通货运机器机制相同' - - '会接受目标机器的输入槽位限制,因此开销也会增大' - - '不过传输数量将被限制至min(576,配置卡数据)' - - '最大传输长度16格' - REDSTONE_ADJACENT_CARGO: - Name: '可调控式邻接传输器 - 红石' - Lore: - - '使用红石信号调控货运任务' - CHIP_ADJ_CARGO: - Name: '可调控式邻接传输器 - 芯片' - Lore: - - '使用芯片信息调控货运任务' - RESETTER: - Name: '数据重置仪' - Lore: - - '用于删除物品贮存的特殊信息' - - '用于重置存储奇点种类' - - '也可用于重置粘液物品' - STORAGE_SINGULARITY: - Name: '概念奇点' - Lore: - - '概念性地存储物品..' - QUANTUM_LINK: - Name: '量子纠缠奇点' - Lore: - - '与存储性方块建立纠缠链接' - INPORT: - Name: '奇点交互接口-输入' - Lore: - - '承载存储性物品的存储类方块' - - '较快的从存储中取出物品...' - OUTPORT: - Name: '奇点交互接口-输出' - Lore: - - '承载存储性物品的存储类方块' - - '较快的向存储中存入物品...' - IOPORT: - Name: '奇点交互接口-均衡' - Lore: - - '承载存储性物品的存储类方块' - STORAGE: - Name: '普通的存储单元' - Lore: - - '这是一个大箱子~' - STORAGE_INPUT: - Name: '存储单元 - 纯输入' - Lore: - - '这种存储单元没有输出槽,只有输入槽' - STORAGE_OUTPUT: - Name: '存储单元 - 纯输出' - Lore: - - '这种存储单元没有输入槽,只有输出槽' - Theme: - ITEM1: - Name: "&3物品" - MACHINE1: - Name: '&3机器' - MACHINE2: - Name: "&3生成器" - MULTIBLOCK1: - Name: "&3多方块核心" - MULTIBLOCK2: - Name: "&3多方块部件" - MANUAL1: - Name: "&3快捷机器" - ADVANCED1: - Name: "&3进阶领域" - CARGO1: - Name: "&3货运机器" - BENCH1: - Name: "&3工作站" - CATEGORY: - Name: "&3分类" - CATEGORY2: - Name: '&7⇨ &a单击打开' - INFO1: - Name: '&7⇨ &a单击打开' - MENU1: +zh_CN: + Groups: + ROOT: + Name: '&7&ka&x&5&5&f&f&7&7逻&x&5&5&f&f&9&9辑&x&5&5&f&f&b&b工&x&5&5&f&f&d&d艺&6(正式版 v1.0.2)&7&ka&r' + Lore: + - '&7芜湖起飞' + - '&7⇨ &a单击启动LogiTech' + INFO: + Name: '&d逻辑工艺 &6版本与说明' + MATERIAL: + Name: '&d逻辑工艺 &6基础材料' + ALLMACHINE: + Name: '&d逻辑工艺 &6堆叠机器支持列表' + ALLRECIPE: + Name: '&d逻辑工艺 &6合成配方类型大全' + URL: + Name: "&e点击获取附属Github链接" + Lore: + - "" + - "&7⇨ &a点击获取链接" + INFO1: + Name: "&c&l版本号" + Lore: + - "&7当前逻辑工艺版本:" + - "&b&mv1.0.0 &6&r测试版" + - "&7更多版本,敬请期待!" + INFO2: + Name: "&e&l联系我们" + Lore: + - "&7如果您想要汇报bug" + - "&7或者提出一些有趣的点子" + - "&7请找作者 qq:2169419217" + - "&7作者目前活跃于各个粘液群," + - "&7也可以直接通过群聊找到我们" + INFO3: + Name: "&a&l附属介绍" + Lore: + - "&7我们的附属立志于开发新功能" + - "&7以及有趣的机制," + - "&7虽然传统的堆机器或许不可避免" + - "&7但是我们希望能为玩家带来别样的体验" + INFO4: + Name: "&c&l一些声明" + Lore: + - "&7本附属可能在创作上会借鉴一些附属" + - "&7您也可能找到相似的特性" + - "&7但是本附属特性实现均为作者手写" + - "&7实现这些有趣的特性也是作者兴趣所致,也是作者的目标" + - "&7若出现问题/BUG请找作者matl114" + INFO5: + Name: "&c&l更多的声明" + Lore: + - "&7本附属(LogiTech)与作者创建的同名" + - "&7SC附属逻辑工艺(LogicTech)无联系" + - "&7两者共用同样的主体和名字," + - "&7但是内容和玩法毫无关联" + - "&7并且作者已不再维护SC版附属" + INFO6: + Name: "&6&l附属特性" + Lore: + - "&7本附属拥有一些和其他附属不同的特性" + - "&7在此会在下方指出" + - "&7当您在游玩的时候遇见无法理解的设定" + - "&7请仔细阅读以下的说明" +# FEAT1: +# Name: "&6&l特性 - &c&l输入槽满载清空" +# Lore: +# - "&7有一些机器会强制清空指定输入槽的物品,作为特殊设计" +# - "&7部分机器因为机制原因可以选择性开启输入槽清空模式" +# - "&7即当输入槽存在物品,即使不匹配配方也会消耗" +# - "&7这些设置默认关闭,请留意机器界面" + FEAT1: + Name: "&6&l特性 - &c&l重写的进程机器" + Lore: + - "&7本附属的进程机器(即拥有进度条)的机器与普通进度机器不同" + - "&7采用了附属自研的配方算法和推送算法" + - "&7并且机器保证0tick配方可以无间隔合成" + - "&7若机器出现问题,请找作者" + FEAT2: + Name: "&6&l特性 - &c&l配方机器,生成器与定向生成器" + Lore: + - "&7配方机器指的是使用机器配方进行合成的机器" + - "&7生成器指的是材料生成器,不会消耗物品而持续产出的机器" + - "&7本附属拥有多种生成器" + - "&7其中定向生成器需要输入槽插入指定配方才能进行对应产出" + - "&7若机器出现问题,请找作者" + FEAT3: + Name: "&6&l特性 - &c&l高级机器与并行处理数" + Lore: + - "&7本附属新增了高级机器,拥有更多输入输出槽和更多特性" + - "&7并行处理数指机器在配方搜索时会尝试利用并行数减少合成时间/增大合成数量" + - "&7机器会尝试减少<进程时间>为<进程时间>/<并行处理数>" + - "&7若<进程时间>无法继续减少,则会按<并行处理数>/<进程时间>为最大次数尽可能多的匹配机器配方" + - "&7若机器出现问题,请找作者" + FEAT4: + Name: "&6&l特性 - &c&l工作站与一键放入" + Lore: + - "&7工作站可以用来进行有序的配方合成" + - "&7工作站支持查看当前机器配方" + - "&7大型6x6工作站配方在\"大型配方展示\"菜单" + - "&7或对应工作站的配方按钮查看" + - "&7一键放入支持你快速将物品以配方格式放入工作站" + - "&7若机器出现问题,请找作者" + FEAT5: + Name: "&6&l特性 - &c&l大型多方块机器" + Lore: + - "&7大型多方块机器由多方块核心,多方块部件,多方块IO接口组成" + - "&7多方块核心拥有界面,并且通常提供全息投影,这会指导你搭建多方块机器" + - "&e注意:请将客户端版本置于java 1.19.4及更高,低版本和基岩版不保证正常显示投影" + - "&7多方块机器构建需求:多方块机器需要保证结构合规,不与其他多方块冲突,可能有额外的需求(如电力需求或者位置为空需求)" + - "&7多方块机器运行需求:只要多方块机器结构完整即可进行运行" + - "&7运行中多方块机器出现特殊要求不满足时会自发关闭多方块机器" + - "&e注意:有些多方块机器拥有关闭检查,若关闭时进度仍进行可能触发严重后果!" + - "&7自动构建模式为否时多方块机器搭建完成后需要手动点击界面中的构建按钮进行激活" + - "&7启用自动构建将禁用构建按钮的功能并且会自发的异步检测结构与激活机器" + - "&7点击多方块部件将会尝试打开该多方块部件所属的多方块机器界面,shift点击则正常交互" + - "&7多方块IO接口可以替换指定的多方块部件作为多方块机器的一部分,对多方块机器界面进行推送/抓取" + - "&7若机器出现问题,请找作者" + + FEAT6: + Name: "&6&l特性 - &c&l序列输入配方与货运系统" + Lore: + - "&7序列输入配方应用于序列进度机器,其由若干输入需求顺序组成" + - "&7输入与第一个需求相匹配的物品来发起进程" + - "&7进程分若干阶段,每个阶段要求某一种物品输入若干数量和<最小处理时间>" + - "&7一个阶段会在<最小处理时间>到达且输入数量满足的时候结束" + - "&7一个阶段结束会发起下一阶段,顺序执行,直到全部满足,输出结果" + - "&7机器一般提供自动清除按钮,启动则会在当前阶段物品不匹配输入槽全部物品时清除输入槽全部物品" + - "&7虽然这很难自动化,但是相应的,我们会提供货运机器作为一个自动化手段" + - "&7若机器出现问题,请找作者" + FEAT7: + Name: "&6&l特性 - &c&l货运机器与芯片调控" + Lore: + - "&7本附属提供普通货运机器与智能货运机器两种分类" + - "&7其区别在于是否读取槽位限制与是否可调控" + - "&7普通货运机器支持无上限数量传输,但是会一直运行并不读取槽位限制" + - "&7槽位限制: 机器可能根据不同的输入物品指定不同的可推送槽位" + - "&7智能货运普遍使用槽位限制,但是其传输数量通常最大为576" + - "&7智能货运的一个特点是可调控,我们会提供不同的条件调控货运机器" + - "&7其中,芯片调控是可配置性较高的一种" + - "&7一般芯片调控的机器为32一周期,周期地读取芯片32位数据上的01位" + - "&7并按照读取结果为0/1执行不同的行为!" + - "&7支持芯片调控的机器共用同步ticker,任意运行时间他们获得的tick计数器严格相同" + - "&7他们读取的芯片位数会严格相同,并不会因为放置先后而造成差异!" + - "&7本附属的货运机器可以统一使用货运配置卡配置" + - "&7若机器出现问题,请找作者" + FEAT8: + Name: "&6&l特性 - &c&l堆叠机器类与工作效率" + Lore: + - "&7堆叠机器,顾名思义,指可以将其他机器堆叠入指定槽位" + - "&7堆叠机器将载入其配方,并代替其进行合成" + - "&7\"堆叠效率\"决定单个机器的产速放大倍率" + - "&7机器并行处理数为<槽位中堆叠的数量>*<堆叠效率>" + - "&7槽位和输入输出槽一样会支持\"终极合成\"特性" + - "&7堆叠机器分为堆叠配方机器与堆叠生成器" + - "&7其分别支持合法的配方机器和生成器" + - "&7其中,配方机器的并行处理将试图加速进程" + - "&7而堆叠生成器的并行处理只会倍率增大产出数量" + - "&c注意,本附属提供配置文件修改堆叠机器的列表与配方" + - "&c并同时支持修改部分机器的配方" + - "&c请服务器管理员谨慎处理配置文件" + - "&e注意:本附属不支持rsc等任意粘液插件的热重载" + - "&e因热重载而导致堆叠机器失效,作者不负任何责任" + - "&a附属即将开启\"全民创作者\"计划,鼓励大家参与完善配置文件" + - "&a用于兼容那些奇怪但高效的附属,让堆叠列表更加完善" + FEAT9: + Name: "&6&l特性 - &c&l终极合成" + Lore: + - "&7终极合成支持从合法的非空存储类物品中进行取出/存入" + - "&7并且支持该特性的合成/进程可以直接访问其中的物品存储" + - "&e用人话讲,就是" + - "&e可以直接消耗存储类物品或者链接绑定的实体存储内的物品参与合成" + - "&e产出的物品也可以直接地存入存储类物品或者链接绑定的实体存储" + - "&e但是参与合成的这类物品必须是非空的存储.机器并不会帮你设置存储种类!" + - "&7当前支持的物品:" + - "&7逻辑工艺 概念奇点存储(存储类物品)" + - "&7逻辑工艺 量子纠缠奇点(存储链接物品)" + - "&7网络(拓展) 量子存储系列(存储类物品)" + - "&a建议:多使用量子纠缠奇点,可以大幅度减少卡顿!" + - "&c备注:由于网络拓展版本更迭过快,不保证支持全部版本" + - "&7拥有这类特性的机器通常拥有极致的合成速度来支持此特性" + - "&7若机器出现问题,请找作者" + UPDATELOG: + Name: '&d逻辑工艺 &6更新日志' + Lore: + - '&7我可没有痴呆症' + MORE2: + Name: '&6致歉说明' + BASIC: + Name: '&d逻辑工艺 &6基础机器' + ALLBIGRECIPES: + Name: '&d逻辑工艺 &6大型配方表展示' + Lore: + - '&7用于查看粘液书中展示不完整的配方' + CARGO: + Name: '&d逻辑工艺 &6货运机器' + SINGULARITY: + Name: '&d逻辑工艺 &6概念奇点工艺' + ADVANCED: + Name: '&d逻辑工艺 &6进阶机器' + BEYOND: + Name: '&d终章 &6超越领域' + Lore: + - '&7Beyond Tech' + VANILLA: + Name: '&d逻辑工艺 &6赤石科技' + Lore: + - '&e哦不...应该是红石科技辣' + MANUAL: + Name: '&d逻辑工艺 &6快捷机器' + Lore: + - '&7懒人福音,好耶' + SPECIAL: + Name: '&d逻辑工艺 &6谜之领域' + Lore: + - '&7这些机器怎么看起来功能怪怪的...' + TOBECONTINUE: + Name: '&6未完待续...' + Lore: + - "&7仍在开发,敬请期待" + SPACE: + Name: '&d逻辑工艺 &6空间技艺' + GENERATORS: + Name: '&d逻辑工艺 &6材料生成与转化' + ENERGY: + Name: '&d逻辑工艺 &6电力与能源拓展' + FUNCTIONAL: + Name: '&d逻辑工艺 &6功能性物品' + + Items: + BUG: + Name: 'BUG' + Lore: + - '经常出现在意想不到的地方...' + MATL114: + Name: 'MATL114' + Lore: + - '没错,我是逻辑工艺的作者...' + CHIP_INGOT: + Name: '薯片合金' + Lore: + - '真是亿个冷笑话..' + LOGIC: + Name: '逻辑' + Lore: + - '剪不断,理还乱..' + TRUE_: + Name: 'True ' + FALSE_: + Name: 'False ' + LOGIGATE: + Name: '逻辑门' + Lore: + - '虽然它看起来很可怕与难懂...' + - '但这只是个材料,并不能帮你炸服' + EXISTE: + Name: '存在性' + UNIQUE: + Name: '唯一性' + PARADOX: + Name: '悖论' + NOLOGIC: + Name: '反逻辑' + Lore: + - '什么,这不科学' + LENGINE: + Name: '逻辑引擎' + LFIELD: + Name: '逻辑引擎力场' + LSCHEDULER: + Name: '逻辑调度器' + Lore: + - '机器枢纽' + LCRAFT: + Name: '逻辑合成单元' + Lore: + - '负责复杂的合成任务' + LDIGITIZER: + Name: '数字化核心' + LBOOLIZER: + Name: '布尔化核心' + Lore: + - '0与1的世界...' + LIOPORT: + Name: 'IO组件' + Lore: + - '负责执行高速物流任务' + PALLADIUM_INGOT: + Name: '钯 (pd)' + PLATINUM_INGOT: + Name: '铂 (pt)' + MOLYBDENUM: + Name: '钼 (mo)' + Lore: + - '用于芯片制造' + CERIUM: + Name: '铈 (ce)' + CADMIUM_INGOT: + Name: '镉 (cd)' + MENDELEVIUM: + Name: '钔 (md)' + DYSPROSIUM: + Name: '镝 (dy)' + BISMUTH_INGOT: + Name: '铋 (bi)' + ANTIMONY_INGOT: + Name: '锑 (sb)' + BORON: + Name: '硼 (B)' + Lore: + - '用于芯片制造' + DIMENSIONAL_SHARD: + Name: '维度碎片' + Lore: + - '蕴含着跨越维度的力量' + STAR_GOLD: + Name: '星辰金砂' + Lore: + - '随星系爆发而生...' + - '其结构坚固到足以承载空间力量' + VIRTUAL_SPACE: + Name: '虚拟空间' + Lore: + - '存在于虚无中的空间' + WORLD_FEAT: + Name: '世界特征 - 主世界' + Lore: + - '代表着主世界特征的世界碎片' + NETHER_FEAT: + Name: '世界特征 - 下界' + Lore: + - '代表着下界特征的世界碎片' + END_FEAT: + Name: '世界特征 - 末地' + Lore: + - '代表着末地特征的世界碎片' + ABSTRACT_INGOT: + Name: '抽象锭' + Lore: + - '仅仅是个开始...' + PDCECDMD: + Name: '钚铈镉钔合金' + Lore: + - '布什,戈门' + HGTLPBBI: + Name: '汞铊铅铋合金' + Lore: + - '“不知道为什么熔点超高的合金”' + REINFORCED_CHIP_INGOT: + Name: '强化薯片合金' + Lore: + - '更符合逻辑的芯片制造原料' + ATOM_INGOT: + Name: '充能原子合金' + + LMOTOR: + Name: '逻辑动力马达' + Lore: + - '源源不断的动力' + LPLATE: + Name: '薯片合金板' + Lore: + - '符合逻辑的配方' + - '让他广泛用于各种逻辑机器中' + METAL_CORE: + Name: '重金核心' + Lore: + - '凝聚概念' + SMELERY_CORE: + Name: '精炼核心' + Lore: + - '凝聚概念' + MASS_CORE: + Name: '物质核心' + Lore: + - '凝聚概念' + TECH_CORE: + Name: '科技核心' + Lore: + - '凝聚概念' + SPACE_PLATE: + Name: '空间强化板' + LOGIC_CORE: + Name: '逻辑核心' + Lore: + - '终极' + FINAL_FRAME: + Name: '终极逻辑框架' + Lore: + - '终极之基' + REDSTONE_ENGINE: + Name: '赤石源力引擎' + STAR_GOLD_INGOT: + Name: '星辰金' + Lore: + - '制造空间机器必不可少的材料' + HYPER_LINK: + Name: '超链接' + Lore: + - '和目标方块建立逻辑链接' + - '右键打开目标方块' + - 'shift+右键绑定目标方块' + SAMPLE_HEAD: + Name: '头颅展示示例' + Lore: + - '来自头颅解析仪' + RESOLVE_FAILED: + Name: '&c物品解析失败!' + Lore: + - '&7并未找到符合id的物品! 该配方已被禁用!' + CARGO_PART: + Name: '逻辑货运零件' + Lore: + - '用于配置货运运输数量' + CARGO_CONFIG: + Name: '通用货运机器配置卡' + Lore: + - '插入机器以载入货运配置' + CARGO_CONFIGURATOR: + Name: '通用货运配置台' + Lore: + - '用于编辑通用货运配置卡' + + CHIP: + Name: 'CHIP' + Lore: + - '可存储32位数据的芯片' + CHIP_CORE: + Name: '智能控制核心' + Lore: + - '内部编码了复杂的代码..' + - '用于控制复杂机器运行' + LSINGULARITY: + Name: '逻辑奇点' + Lore: + - '伴生于超新星' + - '终极之始' + THALLIUM: + Name: '铊 (Tl)' + HYDRAGYRUM: + Name: '汞 (Hg)' + RADIATION_CLEAR: + Name: '辐射区域清除器' + Lore: + - '嘿嘿,管理专用' + ANTIMASS_CLEAR: + Name: '反概念物质清除器' + Lore: + - '当反概念物质太多的时候,记得掏出来点一下' + - '嘿嘿,管理专用' + BISILVER: + Name: '铋银' + Lore: + - '介于真实和虚幻的材料' + PAGOLD: + Name: '钯金' + Lore: + - '有股椰子的味道..' + STACKFRAME: + Name: '堆叠空间' + Lore: + - '在虚拟空间中压缩大量机器..' + - '用于合成传说中的堆叠机器' + LASER: + Name: '纳米级激光发生器' + Lore: + - '用于芯片制造' + ANTIMASS: + Name: '反概念物质' + Lore: + - '反逻辑而存在的物质' + - '会同化其余物质,&c小心放置!' + SHELL: + Name: 'SHELL' + VIRTUALWORLD: + Name: '虚拟世界' + Lore: + - '诞生自ERROR的世界' + ENTITY_FEAT: + Name: '生物特征' + Lore: + - '随机掉落于刷怪笼' + - '' + - '类型: &x&e&b&3&3&e&b<类型>' + SAMPLE_SPAWNER: + Name: '刷怪笼' + HOLOGRAM_REMOVER: + Name: '全息投影清除器' + Lore: + - '用来清除因错误而未正确移除的展示实体' + - '你或许会在崩服之后使用他' + - '右键清除附近10格的错误展示实体' + WITHERPROOF_REDSTONE: + Name: '防凋零红石块' + Lore: + - '非常好红石块,防爆防凋零' + WITHERPROOF_REDS: + Name: '防凋零红石' + Lore: + - '非常好红石线,防爆防凋零' + - '可惜还是不防水' + BEDROCK_BREAKER: + Name: '便捷式破基岩装置' + Lore: + - '赤石科技的基础道具' + - '右键破坏任何原版方块' + - '每方块仅消耗 1 活塞' + LASER_GUN: + Name: '便捷式宏激光发射器' + Lore: + - '发射宏激光' + - '手持右键发射' + - '或置于头部 并&e按F&7使用' + - '手持shift+右键切换功率档位,共5档' + - '射程: 100m' + - '伤害: 100*<功率档>(对怪物) 或 4*<功率档>级激光伤害(对玩家)' + - '耗电: 64*10^<功率档>' + - '&e小心激光!' + - '&x&E&B&3&3&E&B发射器功率: &a第1档/共5档' + SUPERSPONGE: + Name: '海曼牌海绵' + Lore: + - '右键清除周身10格内的全部液体(包括含水方块和岩浆)' + - '使用过的海绵可在熔炉里恢复' + SUPERSPONGE_USED: + Name: '使用过的海曼牌海绵' + Lore: + - '要溢出来了,啊~' + - '使用过的海绵可在熔炉里恢复' + TRACE_ARROW: + Name: '暴雪桃花针' + Lore: + - '消耗电力发射追踪飞针' + - '对命中的敌人造成40伤害' + - '&x&E&B&3&3&E&B---赛博修仙 机械飞升---' + - '寻踪范围: 60' + - '穿透数: 4' + - '基础伤害: 40+2*<力量魔咒等级>+<锋利魔咒等级>' + Machines: + LOGIC_REACTOR: + Name: '逻辑反应堆' + Lore: + - '一切复杂逻辑的起源...' + - '始于True和False' + BOOL_GENERATOR: + Name: '布尔生成器' + BUG_CRAFTER: + Name: 'BUG工作台' + Lore: + - '虽然他是由bug制成' + - '但他不仅仅能制造bug...' + HEAD_ANALYZER: + Name: '头颅解析仪' + Lore: + - '支持解码头颅hash' + - '支持通过hash获取头颅纹理' + - '支持修改头颅物品的纹理' + RECIPE_LOGGER: + Name: '注册代码生成器' + Lore: + - '支持将槽位中的配方转为本附属支持的代码格式' + - '支持生成本附属的物品注册格式代码' + - '支持生成本附属的粘液物品注册格式代码' + - '仅对开发者有用' + ENDFRAME_MACHINE: + Name: '空间框架构建机' + LVOID_GENERATOR: + Name: '虚空量子发电机' + Lore: + - '尝试在虚拟虚空中捕捉量子能量' + - '似乎还捕捉到了奇怪的东西..' + INFINITY_AUTOCRAFT: + Name: '无尽自动合成台' + Lore: + - '消耗大量电力自动化合成无尽配方' + SPECIAL_CRAFTER: + Name: '逻辑模拟合成站' + Lore: + - '通过逻辑空间模拟任意特殊工作台/工作站' + - '进行无序合成.每次耗时6秒' + STAR_SMELTERY: + Name: '星辰金锻铸炉' + Lore: + - '铸造稀有的合金' + CHIP_MAKER: + Name: '简易光刻机' + Lore: + - '迈向高科技的第一步...' + - '制造可以存储信息的芯片' + CHIP_CONSUMER: + Name: '单目位运算执行单元' + Lore: + - '对芯片上的数据进行位运算' + CHIP_BICONSUMER: + Name: '双目位运算执行单元' + Lore: + - '对芯片上的数据进行位运算' + SEQ_CONSTRUCTOR: + Name: '概念化序列构造器' + Lore: + - '反复凝聚概念...' + - '序列进度机器' + + STACKMACHINE: + Name: '堆叠配方机器' + Lore: + - '传说中的堆叠机器' + - '将支持的配方机器插入指定槽位以载入配方' + - '堆叠效率: 2.00' + - '支持范围: 全部配方机器' + - '生成器请在堆叠生成器中使用' + + ENERGY_TRASH: + Name: '能源垃圾桶' + Lore: + - '将电网中多余的电销毁' + - '会优先保证用电器的供需' + OPPO_GEN: + Name: '正反发电机' + Lore: + - '拥有正反两面的发电机' + - '这难道不令人感到奇怪末' + ARC_REACTOR: + Name: '方舟反应堆' + Lore: + - 'IronMan 同款~' + CHIP_REACTOR: + Name: '芯片反应堆' + Lore: + - '终极发电机' + - '燃烧芯片存储的数据发电' + ADVANCED_CHIP_MAKER: + Name: '高效芯片光刻机' + Lore: + - '拥有复刻二进制位的能力' + - '周期性的选择01数据的位' + - '从样本芯片复制此位数据到目标芯片' + ENERGY_AMPLIFIER: + Name: '量子发电机超频装置' + Lore: + - '传说中的堆叠发电机' + - '将该机器置于运行中的发电机下方' + - '并在槽位中放入相同的发电机' + - '该机器可以按上方电机倍率发电' + - '堆叠效率: 2.0' + FINAL_SEQUENTIAL: + Name: '终极概念凝聚者' + Lore: + - '凝聚终极概念' + - '序列进度机器' + - '终极机器' + FINAL_STACKMACHINE: + Name: '终极堆叠 - 配方机器' + Lore: + - '传说中的终极堆叠机器' + - '将支持的配方机器插入指定槽位以载入配方' + - '终极机器' + - '所有槽位&e支持"终极合成"的特性' + - '堆叠效率: 64.00' + - '支持范围: 全部配方机器' + DUST_EXTRACTOR: + Name: '磨粉工厂' + Lore: + - '一次处理全部输入的圆石' + - '处理器数量 9x' + FURNACE_FACTORY: + Name: '熔炼工厂' + Lore: + - '一次性可以冶炼9种配方' + - '处理器数量 9x' + INGOT_FACTORY: + Name: '铸锭工厂' + Lore: + - '一次性处理全部输入的矿粉' + - '处理器数量 9x' + SMELTRY: + Name: '高级精炼工厂' + Lore: + - '冶炼合金' + CRAFTER: + Name: '逻辑合成工厂' + Lore: + - '在逻辑空间中执行合成任务' + - '插入对应快捷机器,数量越多,进程数越多' + - '无序输入,立刻合成' + PRESSOR_FACTORY: + Name: '压缩工厂' + Lore: + - '一次性压缩9种配方' + - '处理器数量 9x' + EASYSTACKMACHINE: + Name: '堆叠工厂' + Lore: + - '丐版堆叠机器,看起来很不靠谱的样子' + - '将支持的配方机器插入指定槽位以载入配方' + - '堆叠效率: 0.50' + - '支持范围: 全部配方机器' + - '生成器请在堆叠生成器中使用' + - '&e...要不还是看看正版堆叠机?' + CONVERTOR: + Name: '逻辑转换工厂' + Lore: + - '仅能转换一小部分物质' + FINAL_LASER: + Name: '宏激光发射器' + Lore: + - '使用红石激发,或置于终极祭坛上激活' + - '用于激活终极机器' + - '⇨ 二级终极祭坛的构成部分' + - '&e小心激光!' + FINAL_CONVERTOR: + Name: '物质量化重塑器' + Lore: + - '"或许,物质在它看来不过是一串数字"' + - '随机波动输入物的材质ID以重塑材质' + RAND_EDITOR: + Name: '属性量化增幅器' + Lore: + - '随机增幅物品的附魔等属性' + VIRTUAL_KILLER: + Name: '屠宰工厂' + Lore: + - '插入刷怪笼以获取该类型生物的特殊掉落物' + - '或许你们需要一个"灵魂罐"附属' + - '工作效率: 1.0' + INF_MOBSIMULATION: + Name: '无尽生物模拟室' + Lore: + - '使用生物芯片激活' + INF_GEOQUARRY: + Name: '无尽地理资源矿机' + Lore: + - '利用电力缓慢获取地理资源' + - '不受剩余地理资源数量影响' + ATTR_OP: + Name: '附魔属性操作台' + Lore: + - '在物品之间转移附魔/属性增幅符' + - '支持自动运行' + GRIND_FACTORY: + Name: '碎矿工厂' + Lore: + - '一次性碎矿9种配方' + - '处理器数量 9x' + TNT_GEN: + Name: '便携式TNT复制机' + Lore: + - '赤石科技的基础元件' + - '启动后使用红石激活' + - '支持调整生成频率,爆炸延时,生成位置' + ADVANCE_BREWER: + Name: '酿造工厂' + Lore: + - '更快的自动酿造机' + SIMU_LVOID: + Name: '虚拟量子发电机' + Lore: + - '进阶的虚空量子发电机' + - '在逻辑空间中模拟能源网络运行' + - '无需接入能源网络即可运行' + Manuals: + MANUAL_CORE: + Name: '乱序核心' + Lore: + - '经典永流传...' + CRAFT_MANUAL: + Name: '快捷工作台' + FURNACE_MANUAL: + Name: '快捷熔炉' + ENHANCED_CRAFT_MANUAL: + Name: '快捷强化工作台' + GRIND_MANUAL: + Name: '快捷磨石' + ARMOR_FORGE_MANUAL: + Name: '快捷盔甲锻造台' + ORE_CRUSHER_MANUAL: + Name: '快捷矿石粉碎机' + COMPRESSOR_MANUAL: + Name: '快捷压缩机' + PRESSURE_MANUAL: + Name: '快捷压力机' + MAGIC_WORKBENCH_MANUAL: + Name: '快捷魔法工作台' + ORE_WASHER_MANUAL: + Name: '快捷洗矿机' + GOLD_PAN_MANUAL: + Name: '快捷淘金机' + ANCIENT_ALTAR_MANUAL: + Name: '快捷远古祭坛' + SMELTERY_MANUAL: + Name: '快捷冶炼炉' + CRUCIBLE_MANUAL: + Name: '快捷坩锅' + PULVERIZER_MANUAL: + Name: '快捷打粉机' + MULTICRAFTTABLE_MANUAL: + Name: '快捷综合工作台' + Lore: + - '合并工作台,魔法工作台和远古祭坛' + TABLESAW_MANUAL: + Name: '快捷台锯' + COMPOSTER: + Name: '快捷搅拌机' + MULTIMACHINE_MANUAL: + Name: '快捷综合机器' + Lore: + - '合并加热压力仓和其他没用的机器' + MOBDATA_MANUAL: + Name: '快捷生物芯片注入器' + Lore: + - '而你,我的朋友,你才是真正的懒狗' + INFINITY_MANUAL: + Name: '快捷无尽工作台' + Lore: + - '一键合成! ...但是注意电力' + NTWWORKBENCH_MANUAL: + Name: '快捷网络工作台' + Lore: + - '又是懒狗东西' + - '似乎还增加了拓展的配方?' + MULTIBLOCK_MANUAL: + Name: '快捷多方块结构模拟器' + Lore: + - '在虚拟空间中模拟多方块结构' + - '支持全体多方块结构的快捷合成' + FINAL_MANUAL: + Name: '终极快捷机器' + Lore: + - '一键合成的尽头' + - '终极机器' + - '所有槽位&e支持"终极合成"的特性' + CARD_MAKER: + Name: '快捷卡片制造机' + Lore: + - '制造不可堆叠物品的替代卡片' + - '善哉' + REPLACE_CARD: + Name: '替代卡片' + Lore: + - '替代不可堆叠物品' + Generators: + + MAGIC_STONE: + Name: '魔法刷石机' + Lore: + - '空岛般的体验!' + - '这里面是装了个黑奴吗' + BOOL_MG: + Name: '布尔组件复刻机' + Lore: + - '这产量一辈子都花不光了!' + - '...真的吗' + OVERWORLD_MINER: + Name: '进阶魔法刷石机' + Lore: + - '刷起来力' + NETHER_MINER: + Name: '下界魔法刷石机' + Lore: + - '可以生产蓝冰魔法刷石机的产出' + END_MINER: + Name: '末地魔法刷石机' + Lore: + - '似乎还有额外产出?' + DIMENSION_MINER: + Name: '维度矿机' + Lore: + - '在维度的裂隙中开采' + - '或许能开采到什么稀有玩意' + REDSTONE_MG: + Name: '红石组件生成器' + DUPE_MG: + Name: '特性复制机' + ENDDUPE_MG: + Name: '末地门特性复制机' + STACKMGENERATOR: + Name: '堆叠生成器' + Lore: + - '传说中的堆叠机器' + - '将支持的生成器插入指定槽位以载入配方' + - '将机器指定样板插在输入槽(如果有)以生成' + - '堆叠效率: 2.00' + - '支持范围: 全部材料生成器' + - '配方机器请在堆叠配方机器中使用' + REVERSE_GENERATOR: + Name: '逆生成器' + Lore: + - '成功掌控了基础逻辑的力量' + - '以此制造基础的抽象逻辑材料' + FINAL_STONE_MG: + Name: '真·无尽圆石工厂' + Lore: + - '终极机器' + - '输出槽位&e支持"终极合成"的特性' + - '或许你会在哪里用到这么多石头呢' + FINAL_STACKMGENERATOR: + Name: '终极堆叠 - 生成器' + Lore: + - '传说中的终极堆叠机器' + - '将支持的生成器插入指定槽位以载入生成配方' + - '终极机器' + - '输出槽位&e支持"终极合成"的特性' + - '堆叠效率: 32.00' + - '支持范围: 全部生成器' + VIRTUAL_MINER: + Name: 'Minecraft矿机' + Lore: + - '在虚拟的世界中挖矿' + - '爆率高啊很高啊' + VIRTUAL_PLANT: + Name: 'Minecraft种植机' + Lore: + - '在虚拟的世界中种植' + - '或许还有虚拟黑奴' + MAGIC_PLANT: + Name: '魔法种植机' + Lore: + - '空岛般的体验' + - '这里面是装了个黑奴吗' + OVERWORLD_PLANT: + Name: '进阶种植机' + Lore: + - '种植主世界作物' + - '打倒mk2😋' + NETHER_PLANT: + Name: '下界种植机' + Lore: + - '种植下界作物' + END_PLANT: + Name: '虚空种植机' + Lore: + - '种植作物' + STONE_FACTORY: + Name: '圆石工厂' + Lore: + - '我们不生产圆石' + - '我们只是圆石的搬运工' + TNT_MG: + Name: 'TNT生成器' + Lore: + - '好孩子,这可不是给你拿去炸服用的' + + MultiBlock: + PORTAL_CORE: + Name: '维度传送门核心' + Lore: + - '蕴含着高维度的力量' + - '维持稳定的超链接并允许&c任何实体&7传送' + - '"你走上传送台,定坐中央,静待传送"' + PORTAL_FRAME: + Name: '维度传送门框架' + SOLAR_REACTOR: + Name: '超新星模拟器' + Lore: + - '在虚拟空间中模拟超新星爆发' + - '不要靠近模拟超新星哦~ 除非你想吃席' + - '⇨ 内部舱室必须被空气填充' + - '⇨ 必须提供电力以维持多方块结构' + - '⇨ 开始运行后会导致附近2.5格生物死亡' + - '⇨ 意外的合成进程终止会导致爆炸' + - '⇨ 爆炸会破坏地形与粘液的头颅机器' + SOLAR_REACTOR_FRAME: + Name: '超新星模拟器框架' + Lore: + - '可以被模拟器货运接口代替' + SOLAR_REACTOR_GLASS: + Name: '超新星模拟器防护罩' + Lore: + - '"身临其境"' + - '不可以被其他组件替代' + SOLAR_INPUT: + Name: '超新星模拟器货运接口-输入' + Lore: + - '将槽位内的物品传入模拟器输入槽' + - '置于结构中任意模拟器框架的位置即可工作' + - '运输配置:' + - '强对称: 启用' + + SOLAR_OUTPUT: + Name: '超新星模拟器货运接口-输出' + Lore: + - '将模拟器输出槽的物品传入槽位' + - '置于结构中任意模拟器框架的位置即可工作' + - '运输配置:' + - '强对称: 禁用' + TRANSMUTATOR_FRAME: + Name: '元素嬗变机框架' + TRANSMUTATOR_GLASS: + Name: '元素嬗变机防护罩' + Lore: + - "可以有效隔绝核辐射" + - '"这次应该不会炸了"' + TRANSMUTATOR_ROD: + Name: '原子合金核燃料棒' + Lore: + - '其原子结构中蕴充盈的核能' + - '是诱导嬗变反应的最佳选择' + TRANSMUTATOR: + Name: '元素嬗变机' + Lore: + - '创造元素,转换元素,掌控元素' + - '重组原子以制造稀有元素材料' + - '⇨ 本多方块机器是可变高度的多方块机器' + - '⇨ 本机器的投影示意图仅是最低高度的机器示例' + - '⇨ 可以在顶层之下重复放置投影中第四层的多方块结构以增加高度' + - '⇨ 提升高度可以大幅度增加机器并行处理数' + - '⇨ 机器进程中必须满足冷却剂的供应!' + - '⇨ 意外的合成进程终止会导致熔毁' + - '⇨ 机器熔毁会释放约1小时的辐射区' + FINAL_BASE: + Name: '终极祭坛基石' + Lore: + - '仿佛蕴含了整个世界' + FINAL_ALTAR: + Name: '终极祭坛' + Lore: + - '激活某些终极机器的钥匙' + - '需要组件终极祭坛多方块结构以运行' + - '⇨ 本多方块机器包含两等级' + - '⇨ 第一等级仅能激活宏激光发射器等简单机器' + - '⇨ 第二等级可以激活所有可激活的机器' + - '⇨ 在界面中切换全息投影以知晓具体构造' + - '⇨ 切换等级需要重新构建多方块机器' + Cargo: + SIMPLE_CARGO: + Name: '邻接传输器' + Lore: + - '将物品从一组槽位转向另一组...' + - '可选择邻接的方块作为源方与目标' + REMOTE_CARGO: + Name: '远程传输器' + Lore: + - '将物品从一组槽位转向另一组...' + - '放入超链接以选择方块作为源方与目标' + LINE_CARGO: + Name: '链式传输器' + Lore: + - '经典永流传...' + - '按指定方向顺序执行传输任务' + - '每个方块向下一个方块进行传输' + - '最大传输长度64格' + BISORTER: + Name: '可调控式物流合并机-2合机' + Lore: + - '使用芯片编码以调控物流合并任务' + QUARSORTER: + Name: '可调控式物流合并机-4合机' + Lore: + - '使用芯片编码以调控物流合并任务' + OCTASORTER: + Name: '可调控式物流合并机-8合机' + Lore: + - '使用芯片编码以调控物流合并任务' + BIFILTER: + Name: '物品分拣机-2分机' + Lore: + - '将物品输入分类至指定槽位' + QUARFILTER: + Name: '物品分拣机-4分机' + Lore: + - '将物品输入分类至指定槽位' + OCTAFILTER: + Name: '物品分拣机-8分机' + Lore: + - '将物品输入分类至指定槽位' + ADV_TRASH: + Name: '高级垃圾焚化炉' + Lore: + - '一次性焚烧54组物品' + STORAGE_OPERATOR: + Name: '存储物品操作台' + Lore: + - '用于在存储类物品中转移数据' + - '支持的存储类道具:' + - "逻辑工艺 概念奇点存储" + - "逻辑工艺 量子纠缠奇点" + - "网络(拓展) 量子存储系列" + ADV_ADJACENT_CARGO: + Name: '智能邻接传输器' + Lore: + - '与普通货运机器机制相同' + - '会接受目标机器的输入槽位限制,因此开销也会增大' + - '不过传输数量将被限制至min(576,配置卡数据)' + ADV_REMOTE_CARGO: + Name: '智能远程传输器' + Lore: + - '与普通货运机器机制相同' + - '会接受目标机器的输入槽位限制,因此开销也会增大' + - '所以传输数量将被限制至min(576,配置卡数据)' + ADV_LINE_CARGO: + Name: '智能链式传输器' + Lore: + - '与普通货运机器机制相同' + - '会接受目标机器的输入槽位限制,因此开销也会增大' + - '不过传输数量将被限制至min(576,配置卡数据)' + - '最大传输长度16格' + REDSTONE_ADJACENT_CARGO: + Name: '可调控式邻接传输器 - 红石' + Lore: + - '使用红石信号调控货运任务' + CHIP_ADJ_CARGO: + Name: '可调控式邻接传输器 - 芯片' + Lore: + - '使用芯片信息调控货运任务' + RESETTER: + Name: '数据重置仪' + Lore: + - '用于删除物品贮存的特殊信息' + - '用于重置存储奇点种类' + - '也可用于重置粘液物品' + STORAGE_SINGULARITY: + Name: '概念奇点' + Lore: + - '概念性地存储物品..' + QUANTUM_LINK: + Name: '量子纠缠奇点' + Lore: + - '与存储性方块建立纠缠链接' + INPORT: + Name: '奇点交互接口-输入' + Lore: + - '承载存储性物品的存储类方块' + - '较快的从存储中取出物品...' + OUTPORT: + Name: '奇点交互接口-输出' + Lore: + - '承载存储性物品的存储类方块' + - '较快的向存储中存入物品...' + IOPORT: + Name: '奇点交互接口-均衡' + Lore: + - '承载存储性物品的存储类方块' + STORAGE: + Name: '普通的存储单元' + Lore: + - '这是一个大箱子~' + STORAGE_INPUT: + Name: '存储单元 - 纯输入' + Lore: + - '这种存储单元没有输出槽,只有输入槽' + STORAGE_OUTPUT: + Name: '存储单元 - 纯输出' + Lore: + - '这种存储单元没有输入槽,只有输出槽' + Theme: + ITEM1: + Name: "&3物品" + MACHINE1: + Name: '&3机器' + MACHINE2: + Name: "&3生成器" + MULTIBLOCK1: + Name: "&3多方块核心" + MULTIBLOCK2: + Name: "&3多方块部件" + MANUAL1: + Name: "&3快捷机器" + ADVANCED1: + Name: "&3进阶领域" + CARGO1: + Name: "&3货运机器" + BENCH1: + Name: "&3工作站" + CATEGORY: + Name: "&3分类" + CATEGORY2: + Name: '&7⇨ &a单击打开' + INFO1: + Name: '&7⇨ &a单击打开' + MENU1: Name: '&7⇨ &a单击打开' \ No newline at end of file