From 4bfa6deb2d03330916c5688af47270a7eb61914a Mon Sep 17 00:00:00 2001 From: Flanks255 <32142731+Flanks255@users.noreply.github.com> Date: Sun, 1 Dec 2024 16:15:06 -0600 Subject: [PATCH] Removed a bunch of unused classes. --- port.MD | 5 +- .../mod/blocks/BlockWildPlant.java | 117 ----------------- .../actuallyadditions/mod/blocks/Crate.java | 50 ------- .../mod/blocks/base/BlockPlant.java | 122 ------------------ .../mod/items/ItemCoffeeBean.java | 21 --- .../mod/items/base/ItemFoodBase.java | 17 --- .../mod/items/base/ItemFoodSeed.java | 49 ------- .../mod/items/base/ItemSeed.java | 39 ------ 8 files changed, 1 insertion(+), 419 deletions(-) delete mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java delete mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/blocks/Crate.java delete mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java delete mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffeeBean.java delete mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodBase.java delete mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodSeed.java delete mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSeed.java diff --git a/port.MD b/port.MD index d8ecd493d..f144ee249 100644 --- a/port.MD +++ b/port.MD @@ -24,6 +24,7 @@ - [x] Fur balls - [x] The food (except for stuff used elsewhere like the coffee) - [x] The weird rainbow colored item names, except for the crystals which should keep their color-matching names +- [X] Storage crates # Change - [ ] Make crystal clusters spawn in amethyst nodes in 1.18, leave unused in 1.16 (same with crystal shards) @@ -36,10 +37,6 @@ - [x] Change the recipe of casings (the lava factory ones) to give only 4, and rename them to "Lava Factory Casing" - [x] Make coal generator create half as much CF, we don't want this to be a main power source for people( Flanks: already dropped to 20fe/t) - [x] Make black quartz drop the items directly, unless silk-touched -- [ ] Make storage crates work as follows, recipes unchanged: - - [ ] Lowest tier can hold 8192 of a single item - - [ ] Mid-tier can hold 16384 of two items - - [ ] Highest tier can hold 32768 of four items - [ ] Rename powered furnace to double powered furnace and add a second block which is a single powered furnace, make recipes work similarly to crusher and double crusher - [ ] Make greenhouse glass less OP and potentially more difficult to craft - [ ] Improve the coffee maker's ui by putting the water meter actually into the ui diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java deleted file mode 100644 index 42eb9d0e9..000000000 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * This file ("BlockWildPlant.java") is part of the Actually Additions mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2015-2017 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.blocks; - -import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBushBase; -import net.minecraft.world.level.block.SoundType; -import net.minecraft.world.level.material.MapColor; -import net.minecraft.world.level.material.PushReaction; - -public class BlockWildPlant extends BlockBushBase { - - // public static final TheWildPlants[] ALL_WILD_PLANTS = TheWildPlants.values(); - // public static final PropertyEnum TYPE = PropertyEnum.create("type", TheWildPlants.class); - - public BlockWildPlant() { - super(Properties.of().mapColor(MapColor.PLANT).pushReaction(PushReaction.DESTROY).sound(SoundType.GRASS).strength(0, 0)); - // this.setSoundType(SoundType.PLANT); - } - - // TODO: [port] ADD BACK - // @Override - // public boolean canBlockStay(World world, BlockPos pos, BlockState state) { - // BlockPos offset = pos.down(); - // BlockState offsetState = world.getBlockState(offset); - // Block offsetBlock = offsetState.getBlock(); - // return state.getValue(TYPE) == TheWildPlants.RICE - // ? offsetState.getMaterial() == Material.WATER - // : offsetBlock.canSustainPlant(offsetState, world, offset, Direction.UP, this); - // } - // - // @Override - // public ItemStack getPickBlock(BlockState state, RayTraceResult target, World world, BlockPos pos, PlayerEntity player) { - // BlockPlant normal = (BlockPlant) state.getValue(TYPE).getNormalVersion(); - // return new ItemStack(normal.seedItem); - // } - // - // @Override - // public void getSubBlocks(CreativeTabs tab, NonNullList list) { - // for (int j = 0; j < ALL_WILD_PLANTS.length; j++) { - // list.add(new ItemStack(this, 1, j)); - // } - // } - // - // @Override - // public void getDrops(NonNullList drops, IBlockAccess world, BlockPos pos, BlockState state, int fortune) { - // Block normal = state.getValue(TYPE).getNormalVersion(); - // normal.getDrops(drops, world, pos, normal.getDefaultState().withProperty(BlockCrops.AGE, 7), fortune); - // } - // - // @Override - // public boolean canSilkHarvest(World world, BlockPos pos, BlockState state, PlayerEntity player) { - // return false; - // } - // - // @Override - // protected ItemBlockBase getItemBlock() { - // return new TheItemBlock(this); - // } - // - // @Override - // public boolean shouldAddCreative() { - // return false; - // } - // - // @Override - // public void registerRendering() { - // for (int i = 0; i < ALL_WILD_PLANTS.length; i++) { - // ActuallyAdditions.PROXY.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), TYPE.getName() + "=" + ALL_WILD_PLANTS[i].getName()); - // } - // } - // - // @Override - // public BlockState getStateFromMeta(int meta) { - // return this.getDefaultState().withProperty(TYPE, TheWildPlants.values()[meta]); - // } - // - // @Override - // public int getMetaFromState(BlockState state) { - // return state.getValue(TYPE).ordinal(); - // } - // - // @Override - // protected BlockStateContainer createBlockState() { - // return new BlockStateContainer(this, TYPE); - // } - // - // @Override - // public EnumRarity getRarity(ItemStack stack) { - // return stack.getItemDamage() >= ALL_WILD_PLANTS.length - // ? EnumRarity.COMMON - // : ALL_WILD_PLANTS[stack.getItemDamage()].getRarity(); - // } - // - // public static class TheItemBlock extends ItemBlockBase { - // - // public TheItemBlock(Block block) { - // super(block); - // this.setHasSubtypes(true); - // this.setMaxDamage(0); - // } - // - // @Override - // public String getTranslationKey(ItemStack stack) { - // return stack.getItemDamage() >= ALL_WILD_PLANTS.length - // ? StringUtil.BUGGED_ITEM_NAME - // : this.getTranslationKey() + "_" + ALL_WILD_PLANTS[stack.getItemDamage()].getName(); - // } - // } -} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/Crate.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/Crate.java deleted file mode 100644 index c19ffc06d..000000000 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/Crate.java +++ /dev/null @@ -1,50 +0,0 @@ -/* -package de.ellpeck.actuallyadditions.mod.blocks; - -import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; -import de.ellpeck.actuallyadditions.mod.tile.CrateBE; -import net.minecraft.core.BlockPos; -import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.material.PushReaction; - -import javax.annotation.Nullable; - -public class Crate extends BlockContainerBase { - private final Size size; - public Crate(Size size) { - super(ActuallyBlocks.defaultPickProps().pushReaction(PushReaction.BLOCK)); - this.size = size; - } - - public Size getSize() { - return size; - } - - public enum Size { - SMALL(9, 4), - MEDIUM(18, 8), - LARGE(27, 16); //TODO Maybe? - - Size(int slotCount, int stackBoost) { - this.slots = slotCount; - this.stackBoost = stackBoost; - } - private final int slots; - private final int stackBoost; - - public int getSlots() { - return slots; - } - public int getStackBoost() { - return stackBoost; - } - } - - @Nullable - @Override - public BlockEntity newBlockEntity(BlockPos pPos, BlockState pState) { - return new CrateBE(pPos, pState, this.size); - } -} -*/ diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java deleted file mode 100644 index 876d63a32..000000000 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * This file ("BlockPlant.java") is part of the Actually Additions mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2015-2017 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.blocks.base; - -import net.minecraft.core.BlockPos; -import net.minecraft.server.level.ServerLevel; -import net.minecraft.world.InteractionHand; -import net.minecraft.world.ItemInteractionResult; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.Item; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.level.ItemLike; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.CropBlock; -import net.minecraft.world.level.block.SoundType; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.material.MapColor; -import net.minecraft.world.level.material.PushReaction; -import net.minecraft.world.phys.BlockHitResult; -import net.neoforged.neoforge.items.ItemHandlerHelper; - -import javax.annotation.Nonnull; -import java.util.List; -import java.util.function.Supplier; - -public class BlockPlant extends CropBlock { - public Supplier seedItem; - - // Stolen from potato for now - // PotatoBlock(AbstractBlock.Properties.create(Material.PLANTS).doesNotBlockMovement().tickRandomly().zeroHardnessAndResistance().sound(SoundType.CROP))); - public BlockPlant(Supplier seedItem) { - super(Properties.of().mapColor(MapColor.PLANT).pushReaction(PushReaction.DESTROY).noCollission().randomTicks().instabreak().sound(SoundType.CROP)); - this.seedItem = seedItem; - } - - // Remove - @Deprecated - public void doStuff(Supplier seedItem, Item returnItem, int returnMeta) { - this.seedItem = seedItem; - // this.returnItem = returnItem; - // this.returnMeta = returnMeta; - } - -/* @Override - public PlantType getPlantType(BlockGetter world, BlockPos pos) { - return PlantType.CROP; - }*/ - // - // @Override - // public int damageDropped(BlockState state) { - // return this.getMetaFromState(state) >= 7 - // ? this.returnMeta - // : 0; - // } - - - @Nonnull - @Override - protected ItemInteractionResult useItemOn(@Nonnull ItemStack pStack, @Nonnull BlockState state, @Nonnull Level world, @Nonnull BlockPos pos, @Nonnull Player player, @Nonnull InteractionHand hand, @Nonnull BlockHitResult pHitResult) { - if (this.getAge(state) < 7) { - return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION; - } - - if (!world.isClientSide) { - List drops = Block.getDrops(state, (ServerLevel) world, pos, null); - boolean deductedSeedSize = false; - for (ItemStack drop : drops) { - if (!drop.isEmpty()) { - if (drop.getItem() == this.seedItem.get() && !deductedSeedSize) { - drop.shrink(1); - deductedSeedSize = true; - } - if (!drop.isEmpty()) { - ItemHandlerHelper.giveItemToPlayer(player, drop); - } - } - } - - world.setBlockAndUpdate(pos, this.defaultBlockState().setValue(AGE, 0)); - } - - return super.useItemOn(pStack, state, world, pos, player, hand, pHitResult); - } - - @Nonnull - @Override - protected ItemLike getBaseSeedId() { - return this.seedItem.get(); - } - - // @Override - // public int quantityDropped(BlockState state, int fortune, Random random) { - // return this.getMetaFromState(state) >= 7 - // ? random.nextInt(this.addDropAmount) + this.minDropAmount - // : super.quantityDropped(state, fortune, random); - // } - - // TODO: [port] move to data table - - // @Override - // public Item getCrop() { - // return this.returnItem; - // } - - // TODO: [port] move to data table - - // @Override - // public Item getItemDropped(BlockState state, Random rand, int par3) { - // return this.getMetaFromState(state) >= 7 - // ? this.getCrop() - // : this.getSeed(); - // } -} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffeeBean.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffeeBean.java deleted file mode 100644 index 09bc4fc40..000000000 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffeeBean.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * This file ("ItemCoffeeBean.java") is part of the Actually Additions mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2015-2017 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.items; - -import de.ellpeck.actuallyadditions.mod.items.base.ItemFoodBase; - -public class ItemCoffeeBean extends ItemFoodBase { - - public ItemCoffeeBean() { - super(1, 1F, false); - //this.setMaxDamage(0); - } -} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodBase.java deleted file mode 100644 index a8297453a..000000000 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodBase.java +++ /dev/null @@ -1,17 +0,0 @@ -/* - * This file ("ItemFoodBase.java") is part of the Actually Additions mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2015-2017 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.items.base; - -public class ItemFoodBase extends ItemBase { - public ItemFoodBase(int heal, float saturation, boolean wolfFood) { - //super(heal, saturation, wolfFood); - } -} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodSeed.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodSeed.java deleted file mode 100644 index 5f8503b9c..000000000 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodSeed.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * This file ("ItemFoodSeed.java") is part of the Actually Additions mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2015-2017 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.items.base; - -import de.ellpeck.actuallyadditions.mod.blocks.base.BlockPlant; -import net.minecraft.core.BlockPos; -import net.minecraft.world.item.Item; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.level.BlockGetter; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.state.BlockState; - -public class ItemFoodSeed /*extends ItemSeedFood */{ //TODO what is this?! - - public final Block plant; - public final String name; - public final String oredictName; - private final int maxUseDuration; - - public ItemFoodSeed(String name, String oredictName, Block plant, Item returnItem, int returnMeta, int healAmount, float saturation, int maxUseDuration) { - //super(healAmount, saturation, plant, Blocks.FARMLAND); - this.name = name; - this.oredictName = oredictName; - this.plant = plant; - this.maxUseDuration = maxUseDuration; - - if (plant instanceof BlockPlant) { - //((BlockPlant) plant).doStuff(this, returnItem, returnMeta); - } - } - - //@Override - public int getMaxItemUseDuration(ItemStack stack) { - return this.maxUseDuration; - } - - //@Override - public BlockState getPlant(BlockGetter world, BlockPos pos) { - return this.plant.defaultBlockState(); - } -} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSeed.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSeed.java deleted file mode 100644 index 93d8fa5e6..000000000 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSeed.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This file ("ItemSeed.java") is part of the Actually Additions mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2015-2017 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.items.base; - -import de.ellpeck.actuallyadditions.mod.blocks.base.BlockPlant; -import net.minecraft.core.BlockPos; -import net.minecraft.world.item.Item; -import net.minecraft.world.level.BlockGetter; -import net.minecraft.world.level.block.Block; -import net.minecraft.world.level.block.state.BlockState; - -public class ItemSeed /* extends ItemSeeds*/ { - - public final Block plant; - public final String oredictName; - - public ItemSeed(String oredictName, Block plant, Item returnItem, int returnMeta) { - //super(plant, Blocks.FARMLAND); - this.oredictName = oredictName; - this.plant = plant; - - if (plant instanceof BlockPlant) { - //((BlockPlant) plant).doStuff(this, returnItem, returnMeta); //TODO - } - } - - //@Override - public BlockState getPlant(BlockGetter world, BlockPos pos) { - return this.plant.defaultBlockState(); - } -}