Skip to content

Commit

Permalink
[LU] Polski @Wirusiu & [U] Updated to RC-16
Browse files Browse the repository at this point in the history
  • Loading branch information
ClayCoffee committed Sep 8, 2020
1 parent 7eae7d8 commit 0317c8f
Show file tree
Hide file tree
Showing 20 changed files with 763 additions and 103 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions ClayTech.iml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_9">
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
Expand All @@ -20,7 +20,7 @@
<orderEntry type="library" scope="PROVIDED" name="Maven: org.yaml:snakeyaml:1.26" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.TheBusyBiscuit:CS-CoreLib:master-v1.6.1-g9dd4a1c-118" level="project" />
<orderEntry type="library" name="Maven: com.github.Multiverse:Multiverse-Core:3afca50930" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.TheBusyBiscuit:Slimefun4:master-RC-7-gbe5f1ed-1925" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.github.TheBusyBiscuit:Slimefun4:master-RC-7-g3a5c1ee-1943" level="project" />
<orderEntry type="module-library">
<library name="Maven: org.eclipse.jdt:Anotation:2.2.400">
<CLASSES>
Expand Down
13 changes: 5 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
# ClayTech
一个我的世界粘液科技插件.
A slimefun addon for minecraft.
A slimefun addon for minecraft.
Build Status: ![avatar](https://thebusybiscuit.github.io/builds/ClayCoffee/ClayTech/master/badge.svg)

# 温馨提醒 / Tips
This plugin made by me.Please do not claim this plugin as yours, because i put a lot of work on it.
这个插件是由我制作的.请不要对外声明这个插件是你的,因为我花了很多时间和功夫来制作这个插件.
Please notify: the Public License has been changed.
请注意: 开源协议已被更改.
GPLv3 → AGPLv3
Join our discord server: [Here](https://discord.gg/sbNKCCs)
You can join our discord server here: [Click this](https://discord.gg/sbNKCCs)

# 支持语言 / Supported Languages
* 简体中文 zh-CN
* 繁體中文 zh-TW
* 日本語 ja
* Polski pl-PL
* English(UK) en-GB
* English(US) en-US (default)

Expand All @@ -28,7 +25,7 @@ Javadocs: https://claycoffee.github.io/ClayTechWebsite/javadocs/

# 翻译 / Translate
You can translate ClayTech here: [Click me](https://gitlocalize.com/repo/4241)
The default language file(en-US、en-GB) might have some grammar mistakes, I hope you can help me translate it.
Please improve our English translations if you understand Chinese.

# 下载 / Download
* The Repo Server: [Click me](https://thebusybiscuit.github.io/builds/ClayCoffee/ClayTech/)
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/cn/claycoffee/ClayTech/ClayTech.java
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ private String languageCodeToLanguage(String code) {
return "English(UK)";
case "JA":
return "Japanese";
case "PL-PL":
return "Poland";
default:
return code;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import cn.claycoffee.ClayTech.utils.Lang;
import cn.claycoffee.ClayTech.utils.Utils;
import io.github.thebusybiscuit.slimefun4.core.attributes.EnergyNetComponent;
import io.github.thebusybiscuit.slimefun4.core.attributes.EnergyNetProvider;
import io.github.thebusybiscuit.slimefun4.core.networks.energy.EnergyNetComponentType;
import io.github.thebusybiscuit.slimefun4.utils.ChestMenuUtils;
import io.github.thebusybiscuit.slimefun4.utils.SlimefunUtils;
Expand All @@ -17,7 +18,6 @@
import me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker;
import me.mrCookieSlime.Slimefun.api.BlockStorage;
import me.mrCookieSlime.Slimefun.api.SlimefunItemStack;
import me.mrCookieSlime.Slimefun.api.energy.ChargableBlock;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset;
import org.bukkit.Bukkit;
Expand Down Expand Up @@ -213,11 +213,10 @@ protected void tick(Block b) {
if (timeleft > 0) {
// 还在处理
ChestMenuUtils.updateProgressbar(inv, 4, timeleft, processing.get(b).getTicks(), getProgressBar());

if (ChargableBlock.isChargable(b)) {
if (ChargableBlock.getCharge(b) < getEnergyConsumption())
if (isChargeable()) {
if (getCharge(b.getLocation()) < getEnergyConsumption())
return;
ChargableBlock.addCharge(b, -getEnergyConsumption());
addCharge(b.getLocation(), -getEnergyConsumption());
progress.put(b, timeleft - 1);
} else
progress.put(b, timeleft - 1);
Expand Down Expand Up @@ -263,10 +262,10 @@ protected void tick(Block b) {
}

if (r != null) {
if (ChargableBlock.isChargable(b)) {
if (ChargableBlock.getCharge(b) < getEnergyConsumption())
if (isChargeable()) {
if (getCharge(b.getLocation()) < getEnergyConsumption())
return;
ChargableBlock.addCharge(b, -getEnergyConsumption());
addCharge(b.getLocation(), -getEnergyConsumption());
}
if (inv.getItemInSlot(outputslots[0]) != null) {
ItemStack is = inv.getItemInSlot(outputslots[0]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker;
import me.mrCookieSlime.Slimefun.api.BlockStorage;
import me.mrCookieSlime.Slimefun.api.SlimefunItemStack;
import me.mrCookieSlime.Slimefun.api.energy.ChargableBlock;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset;
import org.bukkit.Material;
Expand Down Expand Up @@ -200,10 +199,10 @@ protected void tick(Block b) {
// 还在处理
ChestMenuUtils.updateProgressbar(inv, 4, timeleft, processing.get(b).getTicks(), getProgressBar());

if (ChargableBlock.isChargable(b)) {
if (ChargableBlock.getCharge(b) < getEnergyConsumption())
if (isChargeable()) {
if (getCharge(b.getLocation()) < getEnergyConsumption())
return;
ChargableBlock.addCharge(b, -getEnergyConsumption());
addCharge(b.getLocation(), -getEnergyConsumption());
progress.put(b, timeleft - 1);
} else
progress.put(b, timeleft - 1);
Expand Down Expand Up @@ -249,10 +248,10 @@ protected void tick(Block b) {
}

if (r != null) {
if (ChargableBlock.isChargable(b)) {
if (ChargableBlock.getCharge(b) < getEnergyConsumption())
if (isChargeable()) {
if (getCharge(b.getLocation()) < getEnergyConsumption())
return;
ChargableBlock.addCharge(b, -getEnergyConsumption());
addCharge(b.getLocation(), -getEnergyConsumption());
}
if (inv.getItemInSlot(outputslots[0]) != null) {
ItemStack is = inv.getItemInSlot(outputslots[0]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker;
import me.mrCookieSlime.Slimefun.api.BlockStorage;
import me.mrCookieSlime.Slimefun.api.SlimefunItemStack;
import me.mrCookieSlime.Slimefun.api.energy.ChargableBlock;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset;
import org.bukkit.Material;
Expand Down Expand Up @@ -214,10 +213,10 @@ protected void tick(Block b) {
// 还在处理
ChestMenuUtils.updateProgressbar(inv, 22, timeleft, processing.get(b).getTicks(), getProgressBar());

if (ChargableBlock.isChargable(b)) {
if (ChargableBlock.getCharge(b) < getEnergyConsumption())
if (isChargeable()) {
if (getCharge(b.getLocation()) < getEnergyConsumption())
return;
ChargableBlock.addCharge(b, -getEnergyConsumption());
addCharge(b.getLocation(), -getEnergyConsumption());
progress.put(b, timeleft - 1);
} else
progress.put(b, timeleft - 1);
Expand Down Expand Up @@ -252,10 +251,10 @@ protected void tick(Block b) {
}

if (r != null) {
if (ChargableBlock.isChargable(b)) {
if (ChargableBlock.getCharge(b) < getEnergyConsumption())
if (isChargeable()) {
if (getCharge(b.getLocation()) < getEnergyConsumption())
return;
ChargableBlock.addCharge(b, -getEnergyConsumption());
addCharge(b.getLocation(), -getEnergyConsumption());
}
if (!SlimefunUtils.isItemSimilar(inv.getItemInSlot(40), ClayTechItems.ELEMENT_UNIT, true))
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.interfaces.InventoryBlock;
import me.mrCookieSlime.Slimefun.api.BlockStorage;
import me.mrCookieSlime.Slimefun.api.SlimefunItemStack;
import me.mrCookieSlime.Slimefun.api.energy.ChargableBlock;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu;
import me.mrCookieSlime.Slimefun.cscorelib2.item.CustomItem;
import org.bukkit.Material;
Expand Down Expand Up @@ -39,11 +38,11 @@ protected void tick(Block b) {
ChestMenuUtils.updateProgressbar(inv, 22, timeleft, pr.get(b).getTicks(), getProgressBar());

if (getCapacity() > 0) {
if (ChargableBlock.getCharge(b) < getEnergyConsumption()) {
if (getCharge(b.getLocation()) < getEnergyConsumption()) {
return;
}

ChargableBlock.addCharge(b, -getEnergyConsumption());
addCharge(b.getLocation(), -getEnergyConsumption());
pt.put(b, timeleft - 1);
} else {
pt.put(b, timeleft - 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker;
import me.mrCookieSlime.Slimefun.api.BlockStorage;
import me.mrCookieSlime.Slimefun.api.SlimefunItemStack;
import me.mrCookieSlime.Slimefun.api.energy.ChargableBlock;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset;
import org.bukkit.Bukkit;
Expand Down Expand Up @@ -209,10 +208,10 @@ protected void tick(Block b) {
// 还在处理
ChestMenuUtils.updateProgressbar(inv, 4, timeleft, processing.get(b).getTicks(), getProgressBar());

if (ChargableBlock.isChargable(b)) {
if (ChargableBlock.getCharge(b) < getEnergyConsumption())
if (isChargeable()) {
if (getCharge(b.getLocation()) < getEnergyConsumption())
return;
ChargableBlock.addCharge(b, -getEnergyConsumption());
addCharge(b.getLocation(), -getEnergyConsumption());
progress.put(b, timeleft - 1);
} else
progress.put(b, timeleft - 1);
Expand Down Expand Up @@ -266,10 +265,10 @@ public void run() {
}

if (r != null) {
if (ChargableBlock.isChargable(b)) {
if (ChargableBlock.getCharge(b) < getEnergyConsumption())
if (isChargeable()) {
if (getCharge(b.getLocation()) < getEnergyConsumption())
return;
ChargableBlock.addCharge(b, -getEnergyConsumption());
addCharge(b.getLocation(), -getEnergyConsumption());
}
if (inv.getItemInSlot(outputslots[0]) != null) {
ItemStack is = inv.getItemInSlot(outputslots[0]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.MachineRecipe;
import me.mrCookieSlime.Slimefun.api.BlockStorage;
import me.mrCookieSlime.Slimefun.api.SlimefunItemStack;
import me.mrCookieSlime.Slimefun.api.energy.ChargableBlock;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu;
import me.mrCookieSlime.Slimefun.cscorelib2.item.CustomItem;
import org.bukkit.Material;
Expand Down Expand Up @@ -72,10 +71,10 @@ protected void tick(Block b) {
if (timeleft > 0) {
ChestMenuUtils.updateProgressbar(inv, 22, timeleft, pr.get(b).getTicks(), getProgressBar());

if (ChargableBlock.isChargable(b)) {
if (ChargableBlock.getCharge(b) < getEnergyConsumption())
if (isChargeable()) {
if (getCharge(b.getLocation()) < getEnergyConsumption())
return;
ChargableBlock.addCharge(b, -getEnergyConsumption());
addCharge(b.getLocation(), -getEnergyConsumption());
pt.put(b, timeleft - 1);
} else
pt.put(b, timeleft - 1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker;
import me.mrCookieSlime.Slimefun.api.BlockStorage;
import me.mrCookieSlime.Slimefun.api.SlimefunItemStack;
import me.mrCookieSlime.Slimefun.api.energy.ChargableBlock;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset;
import org.bukkit.Material;
Expand Down Expand Up @@ -152,10 +151,10 @@ protected void tick(Block b) {
// 还在处理
ChestMenuUtils.updateProgressbar(inv, 13, timeleft, processing.get(b).getTicks(), getProgressBar());

if (ChargableBlock.isChargable(b)) {
if (ChargableBlock.getCharge(b) < getEnergyConsumption())
if (isChargeable()) {
if (getCharge(b.getLocation()) < getEnergyConsumption())
return;
ChargableBlock.addCharge(b, -getEnergyConsumption());
addCharge(b.getLocation(), -getEnergyConsumption());
progress.put(b, timeleft - 1);
} else
progress.put(b, timeleft - 1);
Expand All @@ -175,10 +174,10 @@ protected void tick(Block b) {
// 没有在处理
MachineRecipe r = new MachineRecipe(1, new ItemStack[]{},
new ItemStack[]{new ItemStack(Material.COBBLESTONE)});
if (ChargableBlock.isChargable(b)) {
if (ChargableBlock.getCharge(b) < getEnergyConsumption())
if (isChargeable()) {
if (getCharge(b.getLocation()) < getEnergyConsumption())
return;
ChargableBlock.addCharge(b, -getEnergyConsumption());
addCharge(b.getLocation(), -getEnergyConsumption());
}
if (inv.getItemInSlot(outputslots[0]) != null) {
ItemStack is = inv.getItemInSlot(outputslots[0]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import me.mrCookieSlime.Slimefun.Objects.SlimefunItem.abstractItems.MachineRecipe;
import me.mrCookieSlime.Slimefun.api.BlockStorage;
import me.mrCookieSlime.Slimefun.api.SlimefunItemStack;
import me.mrCookieSlime.Slimefun.api.energy.ChargableBlock;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu;
import org.bukkit.Bukkit;
import org.bukkit.Material;
Expand Down Expand Up @@ -176,10 +175,10 @@ protected void tick(Block b) {
// 还在处理
ChestMenuUtils.updateProgressbar(inv, 4, timeleft, processing.get(b).getTicks(), getProgressBar());

if (ChargableBlock.isChargable(b)) {
if (ChargableBlock.getCharge(b) < getEnergyConsumption())
if (isChargeable()) {
if (getCharge(b.getLocation()) < getEnergyConsumption())
return;
ChargableBlock.addCharge(b, -getEnergyConsumption());
addCharge(b.getLocation(), -getEnergyConsumption());
progress.put(b, timeleft - 1);
} else
progress.put(b, timeleft - 1);
Expand Down Expand Up @@ -235,10 +234,10 @@ public void run() {
}

if (r != null) {
if (ChargableBlock.isChargable(b)) {
if (ChargableBlock.getCharge(b) < getEnergyConsumption())
if (isChargeable()) {
if (getCharge(b.getLocation()) < getEnergyConsumption())
return;
ChargableBlock.addCharge(b, -getEnergyConsumption());
addCharge(b.getLocation(), -getEnergyConsumption());
}
if (inv.getItemInSlot(outputslots[0]) != null) {
ItemStack is = inv.getItemInSlot(outputslots[0]);
Expand Down
Loading

0 comments on commit 0317c8f

Please sign in to comment.