From 1b820de08a05070909a267e17f033fcf58ac8710 Mon Sep 17 00:00:00 2001 From: NotAPenguin Date: Mon, 2 Sep 2024 23:17:17 +0200 Subject: The Great Renaming (#3014) * move kekztech to a single root dir * move detrav to a single root dir * move gtnh-lanthanides to a single root dir * move tectech and delete some gross reflection in gt++ * remove more reflection inside gt5u * delete more reflection in gt++ * fix imports * move bartworks and bwcrossmod * fix proxies * move galactigreg and ggfab * move gtneioreplugin * try to fix gt++ bee loader * apply the rename rules to BW * apply rename rules to bwcrossmod * apply rename rules to detrav scanner mod * apply rename rules to galacticgreg * apply rename rules to ggfab * apply rename rules to goodgenerator * apply rename rules to gtnh-lanthanides * apply rename rules to gt++ * apply rename rules to kekztech * apply rename rules to kubatech * apply rename rules to tectech * apply rename rules to gt apply the rename rules to gt * fix tt import * fix mui hopefully * fix coremod except intergalactic * rename assline recipe class * fix a class name i stumbled on * rename StructureUtility to GTStructureUtility to prevent conflict with structurelib * temporary rename of GTTooltipDataCache to old name * fix gt client/server proxy names --- .../loaders/block/defc/BlockDEFCCasing.java | 63 +++++++++++++++++++++ .../loaders/block/defc/DEFCCasingBlock.java | 63 --------------------- .../loaders/block/defc/DEFCCasingItemBlock.java | 36 ------------ .../loaders/block/defc/ItemBlockDEFCCasing.java | 36 ++++++++++++ .../block/kubablock/blocks/BlockTeaAcceptor.java | 64 +++++++++++++++++++++ .../block/kubablock/blocks/BlockTeaStorage.java | 66 ++++++++++++++++++++++ .../block/kubablock/blocks/TeaAcceptor.java | 64 --------------------- .../loaders/block/kubablock/blocks/TeaStorage.java | 66 ---------------------- 8 files changed, 229 insertions(+), 229 deletions(-) create mode 100644 src/main/java/kubatech/loaders/block/defc/BlockDEFCCasing.java delete mode 100644 src/main/java/kubatech/loaders/block/defc/DEFCCasingBlock.java delete mode 100644 src/main/java/kubatech/loaders/block/defc/DEFCCasingItemBlock.java create mode 100644 src/main/java/kubatech/loaders/block/defc/ItemBlockDEFCCasing.java create mode 100644 src/main/java/kubatech/loaders/block/kubablock/blocks/BlockTeaAcceptor.java create mode 100644 src/main/java/kubatech/loaders/block/kubablock/blocks/BlockTeaStorage.java delete mode 100644 src/main/java/kubatech/loaders/block/kubablock/blocks/TeaAcceptor.java delete mode 100644 src/main/java/kubatech/loaders/block/kubablock/blocks/TeaStorage.java (limited to 'src/main/java/kubatech/loaders/block') diff --git a/src/main/java/kubatech/loaders/block/defc/BlockDEFCCasing.java b/src/main/java/kubatech/loaders/block/defc/BlockDEFCCasing.java new file mode 100644 index 0000000000..6c57cf8821 --- /dev/null +++ b/src/main/java/kubatech/loaders/block/defc/BlockDEFCCasing.java @@ -0,0 +1,63 @@ +package kubatech.loaders.block.defc; + +import static kubatech.kubatech.KT; + +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import gregtech.api.enums.Textures; +import gregtech.api.render.TextureFactory; +import gregtech.api.util.GTLanguageManager; +import gregtech.common.blocks.BlockCasingsAbstract; +import kubatech.Tags; +import kubatech.api.enums.ItemList; + +public class BlockDEFCCasing extends BlockCasingsAbstract { + + @SideOnly(Side.CLIENT) + private IIcon[] texture; + + public BlockDEFCCasing() { + super(ItemBlockDEFCCasing.class, "defc.casing", Material.anvil); + this.setHardness(15.0F); + this.setResistance(30.0F); + this.setCreativeTab(KT); + + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Naquadah Alloy Fusion Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Bloody Ichorium Fusion Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Draconium Fusion Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Wyvern Fusion Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Awakened Draconium Fusion Casing"); + GTLanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Chaotic Fusion Casing"); + + ItemList.DEFCCasingBase.set(new ItemStack(this, 1, 7)); + ItemList.DEFCCasingT1.set(new ItemStack(this, 1, 8)); + ItemList.DEFCCasingT2.set(new ItemStack(this, 1, 9)); + ItemList.DEFCCasingT3.set(new ItemStack(this, 1, 10)); + ItemList.DEFCCasingT4.set(new ItemStack(this, 1, 11)); + ItemList.DEFCCasingT5.set(new ItemStack(this, 1, 12)); + + // Taking one texture slot :P + Textures.BlockIcons.setCasingTexture((byte) 1, (byte) (15 + 48), TextureFactory.of(this, 0)); + } + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(int side, int meta) { + if (meta < 7 || meta > 12) return texture[0]; + return texture[meta - 7]; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerBlockIcons(IIconRegister aIconRegister) { + texture = new IIcon[6]; + for (int i = 0; i < texture.length; i++) { + texture[i] = aIconRegister.registerIcon(Tags.MODID + ":casing/defc_" + i); + } + } +} diff --git a/src/main/java/kubatech/loaders/block/defc/DEFCCasingBlock.java b/src/main/java/kubatech/loaders/block/defc/DEFCCasingBlock.java deleted file mode 100644 index 5a6b95acfe..0000000000 --- a/src/main/java/kubatech/loaders/block/defc/DEFCCasingBlock.java +++ /dev/null @@ -1,63 +0,0 @@ -package kubatech.loaders.block.defc; - -import static kubatech.kubatech.KT; - -import net.minecraft.block.material.Material; -import net.minecraft.client.renderer.texture.IIconRegister; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; - -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; -import gregtech.api.enums.Textures; -import gregtech.api.render.TextureFactory; -import gregtech.api.util.GT_LanguageManager; -import gregtech.common.blocks.GT_Block_Casings_Abstract; -import kubatech.Tags; -import kubatech.api.enums.ItemList; - -public class DEFCCasingBlock extends GT_Block_Casings_Abstract { - - @SideOnly(Side.CLIENT) - private IIcon[] texture; - - public DEFCCasingBlock() { - super(DEFCCasingItemBlock.class, "defc.casing", Material.anvil); - this.setHardness(15.0F); - this.setResistance(30.0F); - this.setCreativeTab(KT); - - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".7.name", "Naquadah Alloy Fusion Casing"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".8.name", "Bloody Ichorium Fusion Casing"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".9.name", "Draconium Fusion Casing"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".10.name", "Wyvern Fusion Casing"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".11.name", "Awakened Draconium Fusion Casing"); - GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".12.name", "Chaotic Fusion Casing"); - - ItemList.DEFCCasingBase.set(new ItemStack(this, 1, 7)); - ItemList.DEFCCasingT1.set(new ItemStack(this, 1, 8)); - ItemList.DEFCCasingT2.set(new ItemStack(this, 1, 9)); - ItemList.DEFCCasingT3.set(new ItemStack(this, 1, 10)); - ItemList.DEFCCasingT4.set(new ItemStack(this, 1, 11)); - ItemList.DEFCCasingT5.set(new ItemStack(this, 1, 12)); - - // Taking one texture slot :P - Textures.BlockIcons.setCasingTexture((byte) 1, (byte) (15 + 48), TextureFactory.of(this, 0)); - } - - @Override - @SideOnly(Side.CLIENT) - public IIcon getIcon(int side, int meta) { - if (meta < 7 || meta > 12) return texture[0]; - return texture[meta - 7]; - } - - @Override - @SideOnly(Side.CLIENT) - public void registerBlockIcons(IIconRegister aIconRegister) { - texture = new IIcon[6]; - for (int i = 0; i < texture.length; i++) { - texture[i] = aIconRegister.registerIcon(Tags.MODID + ":casing/defc_" + i); - } - } -} diff --git a/src/main/java/kubatech/loaders/block/defc/DEFCCasingItemBlock.java b/src/main/java/kubatech/loaders/block/defc/DEFCCasingItemBlock.java deleted file mode 100644 index 669e3a6dc8..0000000000 --- a/src/main/java/kubatech/loaders/block/defc/DEFCCasingItemBlock.java +++ /dev/null @@ -1,36 +0,0 @@ -package kubatech.loaders.block.defc; - -import static kubatech.kubatech.KT; - -import java.util.List; - -import net.minecraft.block.Block; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.IIcon; -import net.minecraft.util.StatCollector; - -import gregtech.common.blocks.GT_Item_Casings_Abstract; - -public class DEFCCasingItemBlock extends GT_Item_Casings_Abstract { - - public DEFCCasingItemBlock(Block block) { - super(block); - this.setMaxDamage(0); - this.setHasSubtypes(true); - this.setCreativeTab(KT); - } - - @Override - @SuppressWarnings("unchecked") - public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { - if (getDamage(aStack) > 7) - aList.add(StatCollector.translateToLocalFormatted("defc.casing.tip", getDamage(aStack) - 7)); - super.addInformation(aStack, aPlayer, aList, aF3_H); - } - - @Override - public IIcon getIconFromDamage(int p_77617_1_) { - return this.field_150939_a.getIcon(0, p_77617_1_); - } -} diff --git a/src/main/java/kubatech/loaders/block/defc/ItemBlockDEFCCasing.java b/src/main/java/kubatech/loaders/block/defc/ItemBlockDEFCCasing.java new file mode 100644 index 0000000000..125bb7091f --- /dev/null +++ b/src/main/java/kubatech/loaders/block/defc/ItemBlockDEFCCasing.java @@ -0,0 +1,36 @@ +package kubatech.loaders.block.defc; + +import static kubatech.kubatech.KT; + +import java.util.List; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; +import net.minecraft.util.StatCollector; + +import gregtech.common.blocks.ItemCasingsAbstract; + +public class ItemBlockDEFCCasing extends ItemCasingsAbstract { + + public ItemBlockDEFCCasing(Block block) { + super(block); + this.setMaxDamage(0); + this.setHasSubtypes(true); + this.setCreativeTab(KT); + } + + @Override + @SuppressWarnings("unchecked") + public void addInformation(ItemStack aStack, EntityPlayer aPlayer, List aList, boolean aF3_H) { + if (getDamage(aStack) > 7) + aList.add(StatCollector.translateToLocalFormatted("defc.casing.tip", getDamage(aStack) - 7)); + super.addInformation(aStack, aPlayer, aList, aF3_H); + } + + @Override + public IIcon getIconFromDamage(int p_77617_1_) { + return this.field_150939_a.getIcon(0, p_77617_1_); + } +} diff --git a/src/main/java/kubatech/loaders/block/kubablock/blocks/BlockTeaAcceptor.java b/src/main/java/kubatech/loaders/block/kubablock/blocks/BlockTeaAcceptor.java new file mode 100644 index 0000000000..2787a2bbb1 --- /dev/null +++ b/src/main/java/kubatech/loaders/block/kubablock/blocks/BlockTeaAcceptor.java @@ -0,0 +1,64 @@ +/* + * spotless:off + * KubaTech - Gregtech Addon + * Copyright (C) 2022 - 2024 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 . + * spotless:on + */ + +package kubatech.loaders.block.kubablock.blocks; + +import java.util.List; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.World; + +import kubatech.loaders.block.kubablock.BlockProxy; +import kubatech.loaders.block.kubablock.IProxyTileEntityProvider; +import kubatech.tileentity.TeaAcceptorTile; + +public class BlockTeaAcceptor extends BlockProxy implements IProxyTileEntityProvider { + + public BlockTeaAcceptor() { + super("tea_acceptor", "tea_acceptor", "blank"); + } + + @Override + public TileEntity createTileEntity(World world) { + return new TeaAcceptorTile(); + } + + @Override + public void onBlockPlaced(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) { + if (world.isRemote) return; + if (!(player instanceof EntityPlayerMP)) return; + ((TeaAcceptorTile) world.getTileEntity(x, y, z)).setTeaOwner(player.getPersistentID()); + } + + @Override + public void addInformation(ItemStack stack, EntityPlayer entity, List tooltipList, boolean showDebugInfo) { + tooltipList.add("Accepts Tea items and adds them to your network"); + tooltipList.add("Can accept up to 10 stacks per tick"); + } + + @Override + public float getResistance() { + return 999999999999.f; + } +} diff --git a/src/main/java/kubatech/loaders/block/kubablock/blocks/BlockTeaStorage.java b/src/main/java/kubatech/loaders/block/kubablock/blocks/BlockTeaStorage.java new file mode 100644 index 0000000000..421ceaa0d2 --- /dev/null +++ b/src/main/java/kubatech/loaders/block/kubablock/blocks/BlockTeaStorage.java @@ -0,0 +1,66 @@ +/* + * spotless:off + * KubaTech - Gregtech Addon + * Copyright (C) 2022 - 2024 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 . + * spotless:on + */ + +package kubatech.loaders.block.kubablock.blocks; + +import static kubatech.api.Variables.numberFormat; + +import java.util.List; + +import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.world.World; + +import kubatech.loaders.block.kubablock.BlockProxy; +import kubatech.loaders.block.kubablock.IProxyTileEntityProvider; +import kubatech.tileentity.TeaStorageTile; + +public class BlockTeaStorage extends BlockProxy implements IProxyTileEntityProvider { + + public BlockTeaStorage() { + super("tea_storage", "tea_storage"); + } + + @Override + public TileEntity createTileEntity(World world) { + return new TeaStorageTile(); + } + + @Override + public void onBlockPlaced(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) { + if (world.isRemote) return; + if (!(player instanceof EntityPlayerMP)) return; + ((TeaStorageTile) world.getTileEntity(x, y, z)).setTeaOwner(player.getPersistentID()); + } + + @Override + public void addInformation(ItemStack stack, EntityPlayer entity, List tooltipList, boolean showDebugInfo) { + tooltipList.add("Extends Tea Storage by " + EnumChatFormatting.RED + numberFormat.format(Long.MAX_VALUE)); + } + + @Override + public float getResistance() { + return 999999999999.f; + } +} diff --git a/src/main/java/kubatech/loaders/block/kubablock/blocks/TeaAcceptor.java b/src/main/java/kubatech/loaders/block/kubablock/blocks/TeaAcceptor.java deleted file mode 100644 index 06ee3490b1..0000000000 --- a/src/main/java/kubatech/loaders/block/kubablock/blocks/TeaAcceptor.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * spotless:off - * KubaTech - Gregtech Addon - * Copyright (C) 2022 - 2024 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 . - * spotless:on - */ - -package kubatech.loaders.block.kubablock.blocks; - -import java.util.List; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.world.World; - -import kubatech.loaders.block.kubablock.BlockProxy; -import kubatech.loaders.block.kubablock.IProxyTileEntityProvider; -import kubatech.tileentity.TeaAcceptorTile; - -public class TeaAcceptor extends BlockProxy implements IProxyTileEntityProvider { - - public TeaAcceptor() { - super("tea_acceptor", "tea_acceptor", "blank"); - } - - @Override - public TileEntity createTileEntity(World world) { - return new TeaAcceptorTile(); - } - - @Override - public void onBlockPlaced(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) { - if (world.isRemote) return; - if (!(player instanceof EntityPlayerMP)) return; - ((TeaAcceptorTile) world.getTileEntity(x, y, z)).setTeaOwner(player.getPersistentID()); - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer entity, List tooltipList, boolean showDebugInfo) { - tooltipList.add("Accepts Tea items and adds them to your network"); - tooltipList.add("Can accept up to 10 stacks per tick"); - } - - @Override - public float getResistance() { - return 999999999999.f; - } -} diff --git a/src/main/java/kubatech/loaders/block/kubablock/blocks/TeaStorage.java b/src/main/java/kubatech/loaders/block/kubablock/blocks/TeaStorage.java deleted file mode 100644 index 436af9a4e2..0000000000 --- a/src/main/java/kubatech/loaders/block/kubablock/blocks/TeaStorage.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * spotless:off - * KubaTech - Gregtech Addon - * Copyright (C) 2022 - 2024 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 . - * spotless:on - */ - -package kubatech.loaders.block.kubablock.blocks; - -import static kubatech.api.Variables.numberFormat; - -import java.util.List; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.world.World; - -import kubatech.loaders.block.kubablock.BlockProxy; -import kubatech.loaders.block.kubablock.IProxyTileEntityProvider; -import kubatech.tileentity.TeaStorageTile; - -public class TeaStorage extends BlockProxy implements IProxyTileEntityProvider { - - public TeaStorage() { - super("tea_storage", "tea_storage"); - } - - @Override - public TileEntity createTileEntity(World world) { - return new TeaStorageTile(); - } - - @Override - public void onBlockPlaced(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) { - if (world.isRemote) return; - if (!(player instanceof EntityPlayerMP)) return; - ((TeaStorageTile) world.getTileEntity(x, y, z)).setTeaOwner(player.getPersistentID()); - } - - @Override - public void addInformation(ItemStack stack, EntityPlayer entity, List tooltipList, boolean showDebugInfo) { - tooltipList.add("Extends Tea Storage by " + EnumChatFormatting.RED + numberFormat.format(Long.MAX_VALUE)); - } - - @Override - public float getResistance() { - return 999999999999.f; - } -} -- cgit