diff options
| author | Jason Mitchell <mitchej@gmail.com> | 2023-01-28 19:03:53 -0800 |
|---|---|---|
| committer | Jason Mitchell <mitchej@gmail.com> | 2023-01-28 19:03:53 -0800 |
| commit | f51616bda220887fdd45c4bc951ff59e3398213a (patch) | |
| tree | 35fdbb15b4c7ea0282773a388eff517a1d09d941 /src/main/java/kubatech | |
| parent | 11216d666cbc30fc1e1dfc84e1e0c2f4252b1fc2 (diff) | |
| download | GT5-Unofficial-f51616bda220887fdd45c4bc951ff59e3398213a.tar.gz GT5-Unofficial-f51616bda220887fdd45c4bc951ff59e3398213a.tar.bz2 GT5-Unofficial-f51616bda220887fdd45c4bc951ff59e3398213a.zip | |
[ci skip] spotlessApply with the new settings
Diffstat (limited to 'src/main/java/kubatech')
64 files changed, 1987 insertions, 2507 deletions
diff --git a/src/main/java/kubatech/ClientProxy.java b/src/main/java/kubatech/ClientProxy.java index b9cfcf5e66..618518a016 100644 --- a/src/main/java/kubatech/ClientProxy.java +++ b/src/main/java/kubatech/ClientProxy.java @@ -1,30 +1,23 @@ /* - * KubaTech - Gregtech Addon - * Copyright (C) 2022 - 2023 kuba6000 - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * + * KubaTech - Gregtech Addon Copyright (C) 2022 - 2023 kuba6000 This library is free software; you can redistribute it + * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later version. This library is distributed in + * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have + * received a copy of the GNU Lesser General Public License along with this library. If not, see + * <https://www.gnu.org/licenses/>. */ package kubatech; -import cpw.mods.fml.common.event.*; import kubatech.api.utils.ModUtils; import kubatech.loaders.MobRecipeLoader; import kubatech.nei.IMCForNEI; + import net.minecraftforge.common.MinecraftForge; +import cpw.mods.fml.common.event.*; + @SuppressWarnings("unused") public class ClientProxy extends CommonProxy { diff --git a/src/main/java/kubatech/CommonProxy.java b/src/main/java/kubatech/CommonProxy.java index e8453d13eb..b8e063e5d8 100644 --- a/src/main/java/kubatech/CommonProxy.java +++ b/src/main/java/kubatech/CommonProxy.java @@ -1,20 +1,11 @@ /* - * KubaTech - Gregtech Addon - * Copyright (C) 2022 - 2023 kuba6000 - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * + * KubaTech - Gregtech Addon Copyright (C) 2022 - 2023 kuba6000 This library is free software; you can redistribute it + * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later version. This library is distributed in + * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have + * received a copy of the GNU Lesser General Public License along with this library. If not, see + * <https://www.gnu.org/licenses/>. */ package kubatech; @@ -22,8 +13,6 @@ package kubatech; import static kubatech.loaders.BlockLoader.registerBlocks; import static kubatech.loaders.ItemLoader.registerItems; -import cpw.mods.fml.common.FMLCommonHandler; -import cpw.mods.fml.common.event.*; import kubatech.api.LoaderReference; import kubatech.commands.CommandConfig; import kubatech.commands.CommandHandler; @@ -34,8 +23,12 @@ import kubatech.loaders.MTLoader; import kubatech.loaders.RecipeLoader; import kubatech.loaders.TCLoader; import kubatech.savedata.PlayerDataManager; + import net.minecraftforge.common.MinecraftForge; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.event.*; + public class CommonProxy { public void preInit(FMLPreInitializationEvent event) { diff --git a/src/main/java/kubatech/FMLEventHandler.java b/src/main/java/kubatech/FMLEventHandler.java index 26fe14e906..b096c7bb11 100644 --- a/src/main/java/kubatech/FMLEventHandler.java +++ b/src/main/java/kubatech/FMLEventHandler.java @@ -1,30 +1,24 @@ /* - * KubaTech - Gregtech Addon - * Copyright (C) 2022 - 2023 kuba6000 - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * + * KubaTech - Gregtech Addon Copyright (C) 2022 - 2023 kuba6000 This library is free software; you can redistribute it + * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later version. This library is distributed in + * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have + * received a copy of the GNU Lesser General Public License along with this library. If not, see + * <https://www.gnu.org/licenses/>. */ package kubatech; -import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import cpw.mods.fml.common.gameevent.PlayerEvent; import kubatech.api.network.LoadConfigPacket; + import net.minecraft.entity.player.EntityPlayerMP; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.PlayerEvent; + public class FMLEventHandler { + // Gets fired only server-sided @SubscribeEvent public void onPlayerLoggedIn(PlayerEvent.PlayerLoggedInEvent event) { diff --git a/src/main/java/kubatech/Tags.java b/src/main/java/kubatech/Tags.java index 9e027782a3..f25192bfa8 100644 --- a/src/main/java/kubatech/Tags.java +++ b/src/main/java/kubatech/Tags.java @@ -1,20 +1,11 @@ /* - * KubaTech - Gregtech Addon - * Copyright (C) 2022 - 2023 kuba6000 - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * + * KubaTech - Gregtech Addon Copyright (C) 2022 - 2023 kuba6000 This library is free software; you can redistribute it + * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later version. This library is distributed in + * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have + * received a copy of the GNU Lesser General Public License along with this library. If not, see + * <https://www.gnu.org/licenses/>. */ package kubatech; diff --git a/src/main/java/kubatech/api/ConstructableItemStack.java b/src/main/java/kubatech/api/ConstructableItemStack.java index 0d03fc5fd2..0d80076760 100644 --- a/src/main/java/kubatech/api/ConstructableItemStack.java +++ b/src/main/java/kubatech/api/ConstructableItemStack.java @@ -1,42 +1,36 @@ /* - * KubaTech - Gregtech Addon - * Copyright (C) 2022 - 2023 kuba6000 - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * + * KubaTech - Gregtech Addon Copyright (C) 2022 - 2023 kuba6000 This library is free software; you can redistribute it + * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later version. This library is distributed in + * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have + * received a copy of the GNU Lesser General Public License along with this library. If not, see + * <https://www.gnu.org/licenses/>. */ package kubatech.api; -import cpw.mods.fml.common.registry.GameRegistry; -import io.netty.buffer.ByteBuf; -import io.netty.buffer.Unpooled; import java.nio.charset.StandardCharsets; + import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompressedStreamTools; import net.minecraft.nbt.NBTSizeTracker; import net.minecraft.nbt.NBTTagCompound; +import cpw.mods.fml.common.registry.GameRegistry; +import io.netty.buffer.ByteBuf; +import io.netty.buffer.Unpooled; + public class ConstructableItemStack { + public final GameRegistry.UniqueIdentifier itemIdentifier; public final int meta; public final int size; public final NBTTagCompound tagCompound; - private ConstructableItemStack( - GameRegistry.UniqueIdentifier itemIdentifier, int meta, int size, NBTTagCompound tagCompound) { + private ConstructableItemStack(GameRegistry.UniqueIdentifier itemIdentifier, int meta, int size, + NBTTagCompound tagCompound) { this.itemIdentifier = itemIdentifier; this.meta = meta; this.size = size; @@ -107,10 +101,12 @@ public class ConstructableItemStack { byteBuf.readBytes(bytes); try { nbtTagCompound = CompressedStreamTools.func_152457_a(bytes, new NBTSizeTracker(2097152L)); - } catch (Exception ignored) { - } + } catch (Exception ignored) {} } return new ConstructableItemStack( - new GameRegistry.UniqueIdentifier(modid + ":" + name), meta, stacksize, nbtTagCompound); + new GameRegistry.UniqueIdentifier(modid + ":" + name), + meta, + stacksize, + nbtTagCompound); } } diff --git a/src/main/java/kubatech/api/LoaderReference.java b/src/main/java/kubatech/api/LoaderReference.java index 3215fa1b21..5ae387ed63 100644 --- a/src/main/java/kubatech/api/LoaderReference.java +++ b/src/main/java/kubatech/api/LoaderReference.java @@ -3,6 +3,7 @@ package kubatech.api; import cpw.mods.fml.common.Loader; public class LoaderReference { + public static final boolean BloodMagic = Loader.isModLoaded("AWWayofTime"); public static final boolean EnderIO = Loader.isModLoaded("EnderIO"); public static final boolean ExtraUtilities = Loader.isModLoaded("ExtraUtilities"); diff --git a/src/main/java/kubatech/api/Variables.java b/src/main/java/kubatech/api/Variables.java index 0f07c48324..bc67003a68 100644 --- a/src/main/java/kubatech/api/Variables.java +++ b/src/main/java/kubatech/api/Variables.java @@ -1,30 +1,23 @@ /* - * KubaTech - Gregtech Addon - * Copyright (C) 2022 - 2023 kuba6000 - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this library. If not, see <https://www.gnu.org/licenses/>. - * + * KubaTech - Gregtech Addon Copyright (C) 2022 - 2023 kuba6000 This library is free software; you can redistribute it + * and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software + * Foundation; either version 3 of the License, or (at your option) any later version. This library is distributed in + * the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have + * received a copy of the GNU Lesser General Public License along with this library. If not, see + * <https://www.gnu.org/licenses/>. */ package kubatech.api; import kubatech.api.utils.StringUtils; + import net.minecraft.util.EnumChatFormatting; public class Variables { - public static final String Author = - "Author: " + StringUtils.applyRainbow("kuba6000", 0, EnumChatFormatting.BOLD.toString()); + + public static final String Author = "Author: " + + StringUtils.applyRainbow("kuba6000", 0, EnumChatFormatting.BOLD.toString()); public static String buildAuthorList(String... authors) { if (authors.length == 0) return "Author: Unknown"; @@ -32,17 +25,19 @@ public class Variables { .append(StringUtils.applyRainbow(authors[0], 0, EnumChatFormatting.BOLD.toString())); for (int i = 1; i < authors.length; i++) { String author = authors[i]; - b.append(EnumChatFormatting.RESET) - .append(" & ") - .append(EnumChatFormatting.GOLD) - .append(author); + b.append(EnumChatFormatting.RESET).append(" & ").append(EnumChatFormatting.GOLD).append(author); } return b.toString(); } - public static final String StructureHologram = - "To see the structure, use a " + EnumChatFormatting.BLUE + "Tec" + EnumChatFormatting.DARK_BLUE + "Tech" - + EnumChatFormatting.RESET + "" + EnumChatFormatting.GRAY + " Blueprint on the Controller!"; + public static final String StructureHologram = "To see the structure, use a " + EnumChatFormatting.BLUE + + "Tec" + + EnumChatFormatting.DARK_BLUE + + "Tech" + + EnumChatFormatting.RESET + + "" + + EnumChatFormatting.GRAY + + " Blueprint on the Controller!"; public static final double ln4 = Math.log(4d); public static final double ln2 = Math.log(2d); diff --git a/src/main/java/kubatech/api/enums/ItemList.java b/src/main/java/kubatech/api/enums/ItemList.java index b92dead10e..426cac0df5 100644 --- a/src/main/java/kubatech/api/enums/ItemList.java +++ b/src/main/java/kubatech/api/enums/ItemList.java @@ -3,17 +3,20 @@ package kubatech.api.enums; import static gregtech.api.enums.GT_Values.NI; import static gregtech.api.enums.GT_Values.W; +import java.util.Locale; + +import net.minecraft.block.Block; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + import gregtech.api.interfaces.IItemContainer; import gregtech.api.util.GT_LanguageManager; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Utility; -import java.util.Locale; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; public enum ItemList implements IItemContainer { + ExtremeExterminationChamber, ExtremeIndustrialApiary, LegendaryBlackTea, @@ -147,10 +150,8 @@ public enum ItemList implements IItemContainer { StringBuilder tCamelCasedDisplayNameBuilder = new StringBuilder(); final String[] tDisplayNameWords = aDisplayName.split("\\W"); for (String |
