Skip to content

Commit

Permalink
nightly-20200309
Browse files Browse the repository at this point in the history
  • Loading branch information
ClayCoffee committed Mar 9, 2020
1 parent 2c7d051 commit 3115068
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 23 deletions.
32 changes: 25 additions & 7 deletions src/main/java/club/claycoffee/ClayTech/ClayTech.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@
import club.claycoffee.ClayTech.utils.DataYML;
import club.claycoffee.ClayTech.utils.Lang;
import club.claycoffee.ClayTech.utils.Utils;
import io.github.thebusybiscuit.slimefun4.api.SlimefunAddon;
import club.claycoffee.ClayTech.items.*;
import me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config;
import me.mrCookieSlime.Slimefun.Lists.RecipeType;
import me.mrCookieSlime.Slimefun.Lists.SlimefunItems;
import me.mrCookieSlime.Slimefun.api.SlimefunItemStack;

@SuppressWarnings("deprecation")
public class ClayTech extends JavaPlugin {
public class ClayTech extends JavaPlugin implements SlimefunAddon{
public static ClayTech plugin;
public static String locale;
public static DataYML currentLangYML;
Expand Down Expand Up @@ -90,6 +91,12 @@ public void onEnable() {
currentLangYML.reloadCustomConfig();
Utils.info(Lang.readGeneralText("startTip"));
Config cfg = new Config(this);
if(this.getServer().getVersion().equals("1.15")) {

}
else {

}
Utils.info(Lang.readGeneralText("registeringItems"));
try {
registerSlimefun();
Expand All @@ -104,7 +111,7 @@ public void onEnable() {
public void onDisable() {
}

public static void registerSlimefun() {
public void registerSlimefun() {
ItemStack[] ClayCrafingTable = { SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.ELECTRO_MAGNET,
SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.BATTERY, new ItemStack(Material.CRAFTING_TABLE),
SlimefunItems.BATTERY, Defines.MAGIC_CLAY, SlimefunItems.SMALL_CAPACITOR, Defines.MAGIC_CLAY };
Expand Down Expand Up @@ -133,15 +140,15 @@ SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.BATTERY, new ItemStack(Material.CRAF
Defines.CLAY_ELECTRIC_STONE_CRUSHER);

new CraftingTable(Defines.C_MACHINES, craftingtable, "CLAY_CRAFTING_TABLE", RecipeType.ENHANCED_CRAFTING_TABLE,
ClayCrafingTable).registerChargeableBlock(128);
ClayCrafingTable).register(this);
new ElectricStoneCrusher(Defines.C_MACHINES, electricstonecrusher, "CLAY_ELECTRIC_STONE_CRUSHER", RecipeType.ENHANCED_CRAFTING_TABLE,
ClayStoneCrusher).registerChargeableBlock(128);
ClayStoneCrusher).register(this);
new FoodCauldron(Defines.C_MACHINES, foodcauldron, "CLAY_FOOD_CAULDRON", RecipeType.ENHANCED_CRAFTING_TABLE,
ClayFoodCauldron).registerChargeableBlock(512);
ClayFoodCauldron).register(this);
new FoodChalkingMachine(Defines.C_MACHINES, chalkingmachine, "CLAY_FOOD_CHALKING_MACHINE",
RecipeType.ENHANCED_CRAFTING_TABLE, ClayChalkingMachine).registerChargeableBlock(512);
RecipeType.ENHANCED_CRAFTING_TABLE, ClayChalkingMachine).register(this);
new ElementExtracter(Defines.C_MACHINES, elementextracter, "CLAY_ELEMENT_EXTRACTER",
RecipeType.ENHANCED_CRAFTING_TABLE, ClayElementExtracter).registerChargeableBlock(1024);
RecipeType.ENHANCED_CRAFTING_TABLE, ClayElementExtracter).register(this);

// 物品
new Clay_basic();
Expand All @@ -158,4 +165,15 @@ SlimefunItems.ELECTRIC_MOTOR, SlimefunItems.BATTERY, new ItemStack(Material.CRAF
new Railways();

}

@Override
public JavaPlugin getJavaPlugin() {
return this;
}

@Override
public String getBugTrackerURL() {
// TODO 自动生成的方法存根
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import me.mrCookieSlime.Slimefun.api.BlockStorage;
import me.mrCookieSlime.Slimefun.api.SlimefunItemStack;
import me.mrCookieSlime.Slimefun.api.energy.ChargableBlock;
import me.mrCookieSlime.Slimefun.api.energy.EnergyNetComponentType;
import io.github.thebusybiscuit.slimefun4.core.networks.energy.EnergyNetComponentType;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset;
import me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config;
Expand Down Expand Up @@ -127,7 +127,7 @@ public void registerDefaultRecipes() {

}
@Override
public EnergyNetComponentType getEnergyComponentType() {
public io.github.thebusybiscuit.slimefun4.core.networks.energy.EnergyNetComponentType getEnergyComponentType() {
return EnergyNetComponentType.CONSUMER;
}
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import me.mrCookieSlime.Slimefun.api.BlockStorage;
import me.mrCookieSlime.Slimefun.api.SlimefunItemStack;
import me.mrCookieSlime.Slimefun.api.energy.ChargableBlock;
import me.mrCookieSlime.Slimefun.api.energy.EnergyNetComponentType;
import io.github.thebusybiscuit.slimefun4.core.networks.energy.EnergyNetComponentType;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset;
import me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import me.mrCookieSlime.Slimefun.api.BlockStorage;
import me.mrCookieSlime.Slimefun.api.SlimefunItemStack;
import me.mrCookieSlime.Slimefun.api.energy.ChargableBlock;
import me.mrCookieSlime.Slimefun.api.energy.EnergyNetComponentType;
import io.github.thebusybiscuit.slimefun4.core.networks.energy.EnergyNetComponentType;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenu;
import me.mrCookieSlime.Slimefun.api.inventory.BlockMenuPreset;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ public void registerDefaultRecipes() {
this.registerRecipe(5,new ItemStack[] {new ItemStack(Material.COBBLESTONE)},new ItemStack[] {new ItemStack(Material.GRAVEL)});
}

@Override
public int getCapacity() {
return 128;
}

@Override
public String getMachineIdentifier() {
return "CLAY_ELECTRIC_STONE_CRUSHER";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ public int getEnergyConsumption() {
public int getSpeed() {
return 1;
}


@Override
public int getCapacity() {
return 1024;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,15 @@ public void VehicleMoveEvent(VehicleMoveEvent e) {
if (rail.getBlockData().getMaterial() == Material.POWERED_RAIL) {
if (BlockStorage.checkID(rail) != null) {
if (BlockStorage.checkID(rail).equalsIgnoreCase("CLAY_HIGHSPEED_RAILWAY")) {
ve.setMaxSpeed(0.4d * 3);
ve.setMaxSpeed(1.2d);
} else {
ve.setMaxSpeed(0.4);
ve.setMaxSpeed(0.4d);
}
} else {
ve.setMaxSpeed(0.4);
ve.setMaxSpeed(0.4d);
}
} else {
ve.setMaxSpeed(0.4);
ve.setMaxSpeed(0.4d);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@
public class Slimefunutils {
private static int researchId = 9901;

@SuppressWarnings("deprecation")
public static void registerItem(Category category, String name, ItemStack ItemStack, String ResearchName, int cost,
RecipeType Recipetype, ItemStack[] RecipeStack, boolean registerResearch) {
SlimefunItemStack items = new SlimefunItemStack(name, ItemStack);
SlimefunItem item = new SlimefunItem(category, items, Recipetype, RecipeStack);
item.register();
item.register(ClayTech.plugin);
if (registerResearch) {
researchId++;
Slimefun.registerResearch(
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: ClayTech
main: club.claycoffee.ClayTech.ClayTech
version: nightly-20200306
version: nightly-20200309
api-version: 1.15
depend: [CS-CoreLib, Slimefun]
4 changes: 2 additions & 2 deletions src/main/resources/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Items:
- "&b粘土科技的基础物品,许多粘土科技的合成都需要这个"
CLAY_STICK: "§6克莱の木棍"
CLAY_STICK_LORE:
- "&b服主克莱咖啡收藏的木棍,可以做某些工具"
- "&b作者克莱咖啡收藏的木棍,可以做某些工具"
ARTIFICIAL_GOLD_NUGGET: "&6人造金粒"
ARTIFICIAL_GOLD_INGOT_O: "&6人造金锭原矿"
ARTIFICIAL_GOLD_INGOT: "&6人造金锭"
Expand Down Expand Up @@ -192,7 +192,7 @@ Items:
BABA_BURGER: "&e老八秘制小憨包"
BABA_BURGER_LORE:
- "&6老八秘制小憨包"
- "&7吃个试试?(造成的任何后果作者不负责)"
- "&7吃个试试?"
- "&e不可放置"
LETTUSE: "&e生菜"
LETTUSE_LORE:
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Items:
- "&b粘土科技的基礎物品,許多粘土科技的合成都需要這個"
CLAY_STICK: "§6克萊の木棍"
CLAY_STICK_LORE:
- "&b服主克萊咖啡收藏的木棍,可以做某些工具"
- "&b作者克萊咖啡收藏的木棍,可以做某些工具"
ARTIFICIAL_GOLD_NUGGET: "&6人造金粒"
ARTIFICIAL_GOLD_INGOT_O: "&6人造金錠原礦"
ARTIFICIAL_GOLD_INGOT: "&6人造金錠"
Expand Down Expand Up @@ -192,7 +192,7 @@ Items:
BABA_BURGER: "&e老八秘制小憨包"
BABA_BURGER_LORE:
- "&6老八秘制小憨包"
- "&7吃個試試?(造成的任何後果作者不負責)"
- "&7吃個試試?"
- "&e不可放置"
LETTUSE: "&e生菜"
LETTUSE_LORE:
Expand Down

0 comments on commit 3115068

Please sign in to comment.