From 4ea1fb313a65896d83b8756d4458a879a75de8da Mon Sep 17 00:00:00 2001 From: Michael Hillcox Date: Wed, 4 Nov 2020 16:20:33 +0000 Subject: [PATCH] Updated to 1.16.4, added base block and base block interface --- build.gradle | 7 +- gradle.properties | 6 +- .../common/ActuallyAdditions.java | 4 + .../common/blocks/ActuallyBlock.java | 22 +++ .../common/blocks/ActuallyBlocks.java | 23 +++ .../blocks/AtomicReconstructorBlock.java | 3 +- .../common/blocks/BatteryBoxBlock.java | 3 +- .../common/blocks/BioReactorBlock.java | 3 +- .../common/blocks/BlackLotusBlock.java | 3 +- .../common/blocks/BreakerBlock.java | 3 +- .../common/blocks/CanolaPressBlock.java | 3 +- .../common/blocks/CoalGeneratorBlock.java | 3 +- .../common/blocks/CoffeeMachineBlock.java | 3 +- .../common/blocks/ColoredLampBlock.java | 8 +- .../common/blocks/CrystalBlock.java | 3 +- .../common/blocks/CrystalClusterBlock.java | 3 +- .../blocks/DirectionalBreakerBlock.java | 3 +- .../common/blocks/DisplayStandBlock.java | 3 +- .../common/blocks/EmpowererBlock.java | 3 +- .../common/blocks/EnergizerBlock.java | 3 +- .../common/blocks/FarmerBlock.java | 3 +- .../common/blocks/FeederBlock.java | 3 +- .../common/blocks/FermentingBarrelBlock.java | 3 +- .../common/blocks/FireworkBoxBlock.java | 3 +- .../common/blocks/FishingNetBlock.java | 3 +- .../common/blocks/FluidCollectorBlock.java | 3 +- .../common/blocks/FurnaceDoubleBlock.java | 3 +- .../common/blocks/FurnaceSolarBlock.java | 3 +- .../common/blocks/GenericBlock.java | 3 +- .../common/blocks/GreenhouseGlassBlock.java | 3 +- .../common/blocks/GrinderBlock.java | 3 +- .../common/blocks/HeatCollectorBlock.java | 3 +- .../common/blocks/IActuallyBlock.java | 21 +++ .../common/blocks/InputterBlock.java | 3 +- .../common/blocks/ItemRepairerBlock.java | 3 +- .../common/blocks/ItemViewerBlock.java | 3 +- .../common/blocks/ItemViewerHoppingBlock.java | 3 +- .../common/blocks/LampPowererBlock.java | 3 +- .../common/blocks/LaserRelayBlock.java | 3 +- .../blocks/LavaFactoryControllerBlock.java | 3 +- .../common/blocks/LeafGeneratorBlock.java | 3 +- .../common/blocks/MinerBlock.java | 3 +- .../common/blocks/OilGeneratorBlock.java | 3 +- .../common/blocks/PhantomBlock.java | 3 +- .../common/blocks/PhantomBoosterBlock.java | 3 +- .../common/blocks/PlantBlock.java | 15 +- .../common/blocks/PlayerInterfaceBlock.java | 3 +- .../common/blocks/RangedCollectorBlock.java | 3 +- .../common/blocks/ShockSuppressorBlock.java | 3 +- .../common/blocks/SmileyCloudBlock.java | 3 +- .../common/blocks/TinyTorchBlock.java | 3 +- .../common/blocks/TreasureChestBlock.java | 3 +- .../common/blocks/WildPlantBlock.java | 3 +- .../common/blocks/XPSolidifierBlock.java | 3 +- .../common/items/ActuallyItems.java | 134 +----------------- src/main/resources/META-INF/mods.toml | 4 +- 56 files changed, 147 insertions(+), 235 deletions(-) create mode 100644 src/main/java/de/ellpeck/actuallyadditions/common/blocks/ActuallyBlock.java create mode 100644 src/main/java/de/ellpeck/actuallyadditions/common/blocks/IActuallyBlock.java diff --git a/build.gradle b/build.gradle index a719ce565..7514ffc9f 100644 --- a/build.gradle +++ b/build.gradle @@ -21,6 +21,7 @@ archivesBaseName = "actuallyadditions-${mc_version}" if (System.getenv('BUILD_NUMBER') != null) { version += "." + System.getenv('BUILD_NUMBER') } + sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' sourceSets { @@ -82,9 +83,9 @@ dependencies { minecraft "net.minecraftforge:forge:${mc_version}-${forge_version}" // compile against the JEI API but do not include it at runtime - compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") - // at runtime, use the full JEI jar - runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}") +// compileOnly fg.deobf("mezz.jei:jei-${jei_version}:api") +// // at runtime, use the full JEI jar +// runtimeOnly fg.deobf("mezz.jei:jei-${jei_version}") // compile "curse.maven:fastworkbench:3003114" } diff --git a/gradle.properties b/gradle.properties index 5ef755cd5..3de9f817b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ org.gradle.daemon=false mod_version=2.0 -mc_version=1.16.3 +mc_version=1.16.4 mcp_version=20201028-1.16.3 -forge_version=34.1.35 -jei_version=7.6.0.49 \ No newline at end of file +forge_version=35.0.0 +jei_version=1.16.3:7.6.0.49 \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/ActuallyAdditions.java b/src/main/java/de/ellpeck/actuallyadditions/common/ActuallyAdditions.java index 1cc79210e..76ce8e44e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/ActuallyAdditions.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/ActuallyAdditions.java @@ -10,9 +10,13 @@ import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; @Mod(ActuallyAdditions.MOD_ID) public class ActuallyAdditions { + public static final Logger LOGGER = LogManager.getLogger(); + public static final String MOD_ID = "actuallyadditions"; public static final ItemGroup ACTUALLY_GROUP = new ItemGroup(MOD_ID) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ActuallyBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ActuallyBlock.java new file mode 100644 index 000000000..1a44c50ef --- /dev/null +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ActuallyBlock.java @@ -0,0 +1,22 @@ +package de.ellpeck.actuallyadditions.common.blocks; + +import de.ellpeck.actuallyadditions.common.ActuallyAdditions; +import net.minecraft.block.Block; +import net.minecraft.item.BlockItem; +import net.minecraft.item.Item; + +public class ActuallyBlock extends Block implements IActuallyBlock { + public ActuallyBlock(Properties properties) { + super(properties); + } + + @Override + public BlockItem createBlockItem() { + return new BlockItem(this, this.getItemProperties()); + } + + @Override + public Item.Properties getItemProperties() { + return new Item.Properties().group(ActuallyAdditions.ACTUALLY_GROUP); + } +} diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ActuallyBlocks.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ActuallyBlocks.java index 37624b108..82c81960c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ActuallyBlocks.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ActuallyBlocks.java @@ -6,10 +6,18 @@ import de.ellpeck.actuallyadditions.common.blocks.types.LaserRelays; import de.ellpeck.actuallyadditions.common.blocks.types.PhantomType; import net.minecraft.block.*; import net.minecraft.block.material.Material; +import net.minecraft.item.Item; +import net.minecraftforge.event.RegistryEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.RegistryObject; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.common.Mod.EventBusSubscriber; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; +import java.util.Objects; + +@EventBusSubscriber(bus=Mod.EventBusSubscriber.Bus.MOD) public class ActuallyBlocks { public static final DeferredRegister BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, ActuallyAdditions.MOD_ID); @@ -390,4 +398,19 @@ public class ActuallyBlocks { public static final RegistryObject blockPillarQuartzSlab = BLOCKS.register("pillar_quartz_slab_block", () -> new SlabBlock(Block.Properties.create(Material.ROCK))); + + @SubscribeEvent + public static void registerBlockItems(RegistryEvent.Register event) { + for(RegistryObject entry : BLOCKS.getEntries()) { + if (!(entry.get() instanceof IActuallyBlock)) { + continue; + } + + event.getRegistry().register( + ((IActuallyBlock) entry.get()) + .createBlockItem() + .setRegistryName(Objects.requireNonNull(entry.get().getRegistryName()).getPath()) + ); + } + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/AtomicReconstructorBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/AtomicReconstructorBlock.java index cfadc080f..ad1be5fab 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/AtomicReconstructorBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/AtomicReconstructorBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class AtomicReconstructorBlock extends Block { +public class AtomicReconstructorBlock extends ActuallyBlock { public AtomicReconstructorBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/BatteryBoxBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/BatteryBoxBlock.java index 39cb2fe33..eaba489e8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/BatteryBoxBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/BatteryBoxBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class BatteryBoxBlock extends Block { +public class BatteryBoxBlock extends ActuallyBlock { public BatteryBoxBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/BioReactorBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/BioReactorBlock.java index 45a2c96ba..d125273bf 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/BioReactorBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/BioReactorBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class BioReactorBlock extends Block { +public class BioReactorBlock extends ActuallyBlock { public BioReactorBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/BlackLotusBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/BlackLotusBlock.java index a2bd167eb..af3ce31a5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/BlackLotusBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/BlackLotusBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class BlackLotusBlock extends Block { +public class BlackLotusBlock extends ActuallyBlock { public BlackLotusBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/BreakerBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/BreakerBlock.java index 70c4bff10..70438e40c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/BreakerBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/BreakerBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class BreakerBlock extends Block { +public class BreakerBlock extends ActuallyBlock { public BreakerBlock(boolean isPlacer) { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/CanolaPressBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/CanolaPressBlock.java index 5d34e683e..7d7751d60 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/CanolaPressBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/CanolaPressBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class CanolaPressBlock extends Block { +public class CanolaPressBlock extends ActuallyBlock { public CanolaPressBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/CoalGeneratorBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/CoalGeneratorBlock.java index c14611fb4..0c28afcfd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/CoalGeneratorBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/CoalGeneratorBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class CoalGeneratorBlock extends Block { +public class CoalGeneratorBlock extends ActuallyBlock { public CoalGeneratorBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/CoffeeMachineBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/CoffeeMachineBlock.java index 6056b0b27..767cd4f0e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/CoffeeMachineBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/CoffeeMachineBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class CoffeeMachineBlock extends Block { +public class CoffeeMachineBlock extends ActuallyBlock { public CoffeeMachineBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ColoredLampBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ColoredLampBlock.java index bde3009c7..1ad1d1b4f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ColoredLampBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ColoredLampBlock.java @@ -11,9 +11,10 @@ import net.minecraft.util.ActionResultType; import net.minecraft.util.Hand; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.world.IBlockReader; import net.minecraft.world.World; -public class ColoredLampBlock extends Block { +public class ColoredLampBlock extends ActuallyBlock { private static final BooleanProperty LIT = BlockStateProperties.LIT; public ColoredLampBlock() { @@ -33,4 +34,9 @@ public class ColoredLampBlock extends Block { } return super.onBlockActivated(state, worldIn, pos, player, handIn, hit); } + + @Override + public int getLightValue(BlockState state, IBlockReader world, BlockPos pos) { + return state.get(LIT) ? 15 : 0; + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/CrystalBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/CrystalBlock.java index 54d3b83bd..7034163c6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/CrystalBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/CrystalBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class CrystalBlock extends Block { +public class CrystalBlock extends ActuallyBlock { public CrystalBlock(boolean isEmpowered) { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/CrystalClusterBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/CrystalClusterBlock.java index cdf3a051e..2955ce6f7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/CrystalClusterBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/CrystalClusterBlock.java @@ -1,10 +1,9 @@ package de.ellpeck.actuallyadditions.common.blocks; import de.ellpeck.actuallyadditions.common.blocks.types.Crystals; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class CrystalClusterBlock extends Block { +public class CrystalClusterBlock extends ActuallyBlock { public CrystalClusterBlock(Crystals crystal) { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/DirectionalBreakerBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/DirectionalBreakerBlock.java index 82f32782c..a45e9fc89 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/DirectionalBreakerBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/DirectionalBreakerBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class DirectionalBreakerBlock extends Block { +public class DirectionalBreakerBlock extends ActuallyBlock { public DirectionalBreakerBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/DisplayStandBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/DisplayStandBlock.java index bc69b28d8..589c5fbd8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/DisplayStandBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/DisplayStandBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class DisplayStandBlock extends Block { +public class DisplayStandBlock extends ActuallyBlock { public DisplayStandBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/EmpowererBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/EmpowererBlock.java index 08c499a52..8a9de83a6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/EmpowererBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/EmpowererBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class EmpowererBlock extends Block { +public class EmpowererBlock extends ActuallyBlock { public EmpowererBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/EnergizerBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/EnergizerBlock.java index d521c21a3..e8a8c2e52 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/EnergizerBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/EnergizerBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class EnergizerBlock extends Block { +public class EnergizerBlock extends ActuallyBlock { public EnergizerBlock(boolean isEnergizer) { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FarmerBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FarmerBlock.java index ad18056d8..958b8e974 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FarmerBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FarmerBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class FarmerBlock extends Block { +public class FarmerBlock extends ActuallyBlock { public FarmerBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FeederBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FeederBlock.java index 87519f46d..c4928c98e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FeederBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FeederBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class FeederBlock extends Block { +public class FeederBlock extends ActuallyBlock { public FeederBlock() { super(Properties.create(Material.ROCK)); diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FermentingBarrelBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FermentingBarrelBlock.java index 9a0aeda61..e8add52a1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FermentingBarrelBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FermentingBarrelBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class FermentingBarrelBlock extends Block { +public class FermentingBarrelBlock extends ActuallyBlock { public FermentingBarrelBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FireworkBoxBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FireworkBoxBlock.java index d27dafe6e..d236570bf 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FireworkBoxBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FireworkBoxBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class FireworkBoxBlock extends Block { +public class FireworkBoxBlock extends ActuallyBlock { public FireworkBoxBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FishingNetBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FishingNetBlock.java index 0b7e84888..9ebe39840 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FishingNetBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FishingNetBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class FishingNetBlock extends Block { +public class FishingNetBlock extends ActuallyBlock { public FishingNetBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FluidCollectorBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FluidCollectorBlock.java index 826f14935..a8c250199 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FluidCollectorBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FluidCollectorBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class FluidCollectorBlock extends Block { +public class FluidCollectorBlock extends ActuallyBlock { public FluidCollectorBlock(boolean isPlacer) { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FurnaceDoubleBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FurnaceDoubleBlock.java index 16939aafd..d0eb50bd4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FurnaceDoubleBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FurnaceDoubleBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class FurnaceDoubleBlock extends Block { +public class FurnaceDoubleBlock extends ActuallyBlock { public FurnaceDoubleBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FurnaceSolarBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FurnaceSolarBlock.java index e62b6d3a6..e4eace35a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FurnaceSolarBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/FurnaceSolarBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class FurnaceSolarBlock extends Block { +public class FurnaceSolarBlock extends ActuallyBlock { public FurnaceSolarBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/GenericBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/GenericBlock.java index a43b6819c..b4ab092ef 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/GenericBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/GenericBlock.java @@ -1,11 +1,10 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.SoundType; import net.minecraft.block.material.Material; import net.minecraftforge.common.ToolType; -public class GenericBlock extends Block { +public class GenericBlock extends ActuallyBlock { public GenericBlock() { super(Properties.create(Material.ROCK) .hardnessAndResistance(1.5F, 10.0F) diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/GreenhouseGlassBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/GreenhouseGlassBlock.java index ebe4e74b0..7bc7d5d9f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/GreenhouseGlassBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/GreenhouseGlassBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class GreenhouseGlassBlock extends Block { +public class GreenhouseGlassBlock extends ActuallyBlock { public GreenhouseGlassBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/GrinderBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/GrinderBlock.java index b70882f79..b25fe5521 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/GrinderBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/GrinderBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class GrinderBlock extends Block { +public class GrinderBlock extends ActuallyBlock { public GrinderBlock(boolean isDouble) { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/HeatCollectorBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/HeatCollectorBlock.java index f82779633..2020844ac 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/HeatCollectorBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/HeatCollectorBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class HeatCollectorBlock extends Block { +public class HeatCollectorBlock extends ActuallyBlock { public HeatCollectorBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/IActuallyBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/IActuallyBlock.java new file mode 100644 index 000000000..6147b7c27 --- /dev/null +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/IActuallyBlock.java @@ -0,0 +1,21 @@ +package de.ellpeck.actuallyadditions.common.blocks; + +import net.minecraft.item.BlockItem; +import net.minecraft.item.Item; + +public interface IActuallyBlock { + /** + * Defaults to the default class for mc. Don't run this other than on setup + * + * @return this blocks item pair + */ + BlockItem createBlockItem(); + + /** + * Defines the Block Item properties for all non-custom block items. + * + * @return block item properties for default block item. + * @see for implementation {@link #createBlockItem()} + */ + Item.Properties getItemProperties(); +} diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/InputterBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/InputterBlock.java index e0ec12884..72b9b6310 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/InputterBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/InputterBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class InputterBlock extends Block { +public class InputterBlock extends ActuallyBlock { public InputterBlock(boolean isAdvanced) { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ItemRepairerBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ItemRepairerBlock.java index 21ba27919..bacd05a9c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ItemRepairerBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ItemRepairerBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class ItemRepairerBlock extends Block { +public class ItemRepairerBlock extends ActuallyBlock { public ItemRepairerBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ItemViewerBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ItemViewerBlock.java index 9357156b6..b9b67e9ea 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ItemViewerBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ItemViewerBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class ItemViewerBlock extends Block { +public class ItemViewerBlock extends ActuallyBlock { public ItemViewerBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ItemViewerHoppingBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ItemViewerHoppingBlock.java index 7f000448b..56b6f644f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ItemViewerHoppingBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ItemViewerHoppingBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class ItemViewerHoppingBlock extends Block { +public class ItemViewerHoppingBlock extends ActuallyBlock { public ItemViewerHoppingBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/LampPowererBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/LampPowererBlock.java index 7eafd66fb..ff130a02a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/LampPowererBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/LampPowererBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class LampPowererBlock extends Block { +public class LampPowererBlock extends ActuallyBlock { public LampPowererBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/LaserRelayBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/LaserRelayBlock.java index 17ea51a6a..2cb89f4ab 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/LaserRelayBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/LaserRelayBlock.java @@ -1,10 +1,9 @@ package de.ellpeck.actuallyadditions.common.blocks; import de.ellpeck.actuallyadditions.common.blocks.types.LaserRelays; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class LaserRelayBlock extends Block { +public class LaserRelayBlock extends ActuallyBlock { public LaserRelayBlock(LaserRelays relayType) { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/LavaFactoryControllerBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/LavaFactoryControllerBlock.java index cbec68a6f..51d76016a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/LavaFactoryControllerBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/LavaFactoryControllerBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class LavaFactoryControllerBlock extends Block { +public class LavaFactoryControllerBlock extends ActuallyBlock { public LavaFactoryControllerBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/LeafGeneratorBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/LeafGeneratorBlock.java index 3f6b8a7da..219a28fbb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/LeafGeneratorBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/LeafGeneratorBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class LeafGeneratorBlock extends Block { +public class LeafGeneratorBlock extends ActuallyBlock { public LeafGeneratorBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/MinerBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/MinerBlock.java index 2f0440978..1aa2acfcf 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/MinerBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/MinerBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class MinerBlock extends Block { +public class MinerBlock extends ActuallyBlock { public MinerBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/OilGeneratorBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/OilGeneratorBlock.java index 54a95cb31..8a358702e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/OilGeneratorBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/OilGeneratorBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class OilGeneratorBlock extends Block { +public class OilGeneratorBlock extends ActuallyBlock { public OilGeneratorBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/PhantomBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/PhantomBlock.java index 0918f550b..96d5064ae 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/PhantomBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/PhantomBlock.java @@ -1,10 +1,9 @@ package de.ellpeck.actuallyadditions.common.blocks; import de.ellpeck.actuallyadditions.common.blocks.types.PhantomType; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class PhantomBlock extends Block { +public class PhantomBlock extends ActuallyBlock { public PhantomBlock(PhantomType type) { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/PhantomBoosterBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/PhantomBoosterBlock.java index 39735e3ac..9c4a9de81 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/PhantomBoosterBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/PhantomBoosterBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class PhantomBoosterBlock extends Block { +public class PhantomBoosterBlock extends ActuallyBlock { public PhantomBoosterBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/PlantBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/PlantBlock.java index 1d676b912..acabce648 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/PlantBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/PlantBlock.java @@ -1,10 +1,23 @@ package de.ellpeck.actuallyadditions.common.blocks; +import de.ellpeck.actuallyadditions.common.ActuallyAdditions; import net.minecraft.block.CropsBlock; import net.minecraft.block.material.Material; +import net.minecraft.item.BlockItem; +import net.minecraft.item.Item; -public class PlantBlock extends CropsBlock { +public class PlantBlock extends CropsBlock implements IActuallyBlock { public PlantBlock(int minDropAmount, int maxDropAmount) { super(Properties.create(Material.ROCK)); } + + @Override + public BlockItem createBlockItem() { + return new BlockItem(this, this.getItemProperties()); + } + + @Override + public Item.Properties getItemProperties() { + return new Item.Properties().group(ActuallyAdditions.ACTUALLY_GROUP); + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/PlayerInterfaceBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/PlayerInterfaceBlock.java index e677a350f..82a7381ac 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/PlayerInterfaceBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/PlayerInterfaceBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class PlayerInterfaceBlock extends Block { +public class PlayerInterfaceBlock extends ActuallyBlock { public PlayerInterfaceBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/RangedCollectorBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/RangedCollectorBlock.java index e5f014f5d..8313ba0e4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/RangedCollectorBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/RangedCollectorBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class RangedCollectorBlock extends Block { +public class RangedCollectorBlock extends ActuallyBlock { public RangedCollectorBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ShockSuppressorBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ShockSuppressorBlock.java index 640beecde..98f212846 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ShockSuppressorBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/ShockSuppressorBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class ShockSuppressorBlock extends Block { +public class ShockSuppressorBlock extends ActuallyBlock { public ShockSuppressorBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/SmileyCloudBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/SmileyCloudBlock.java index fd9a3d6b3..4cde479a5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/SmileyCloudBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/SmileyCloudBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class SmileyCloudBlock extends Block { +public class SmileyCloudBlock extends ActuallyBlock { public SmileyCloudBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/TinyTorchBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/TinyTorchBlock.java index ffe5fc3e5..a82789b54 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/TinyTorchBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/TinyTorchBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class TinyTorchBlock extends Block { +public class TinyTorchBlock extends ActuallyBlock { public TinyTorchBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/TreasureChestBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/TreasureChestBlock.java index 9e42a5fd1..93f8ffa78 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/TreasureChestBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/TreasureChestBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class TreasureChestBlock extends Block { +public class TreasureChestBlock extends ActuallyBlock { public TreasureChestBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/WildPlantBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/WildPlantBlock.java index 49eab0c0c..883ce3697 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/WildPlantBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/WildPlantBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class WildPlantBlock extends Block { +public class WildPlantBlock extends ActuallyBlock { public WildPlantBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/XPSolidifierBlock.java b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/XPSolidifierBlock.java index bc3f35d82..173187bf5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/blocks/XPSolidifierBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/blocks/XPSolidifierBlock.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.common.blocks; -import net.minecraft.block.Block; import net.minecraft.block.material.Material; -public class XPSolidifierBlock extends Block { +public class XPSolidifierBlock extends ActuallyBlock { public XPSolidifierBlock() { super(Properties.create(Material.ROCK)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/items/ActuallyItems.java b/src/main/java/de/ellpeck/actuallyadditions/common/items/ActuallyItems.java index 238b6a75f..a5fd50144 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/items/ActuallyItems.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/items/ActuallyItems.java @@ -1,145 +1,13 @@ package de.ellpeck.actuallyadditions.common.items; import de.ellpeck.actuallyadditions.common.ActuallyAdditions; -import de.ellpeck.actuallyadditions.common.blocks.ActuallyBlocks; -import net.minecraft.block.Block; -import net.minecraft.item.BlockItem; import net.minecraft.item.Item; -import net.minecraftforge.fml.RegistryObject; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; -import java.util.function.Supplier; - public class ActuallyItems { public static final DeferredRegister ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, ActuallyAdditions.MOD_ID); - public static final RegistryObject itemCrystalClusterRedstone = ITEMS.register("crystal_cluster_redstone_block", () -> makeItem(ActuallyBlocks.blockCrystalClusterRedstone)); - public static final RegistryObject itemCrystalClusterLapis = ITEMS.register("crystal_cluster_lapis_block", () -> makeItem(ActuallyBlocks.blockCrystalClusterLapis)); - public static final RegistryObject itemCrystalClusterDiamond = ITEMS.register("crystal_cluster_diamond_block", () -> makeItem(ActuallyBlocks.blockCrystalClusterDiamond)); - public static final RegistryObject itemCrystalClusterCoal = ITEMS.register("crystal_cluster_coal_block", () -> makeItem(ActuallyBlocks.blockCrystalClusterCoal)); - public static final RegistryObject itemCrystalClusterEmerald = ITEMS.register("crystal_cluster_emerald_block", () -> makeItem(ActuallyBlocks.blockCrystalClusterEmerald)); - public static final RegistryObject itemCrystalClusterIron = ITEMS.register("crystal_cluster_iron_block", () -> makeItem(ActuallyBlocks.blockCrystalClusterIron)); - public static final RegistryObject itemBatteryBox = ITEMS.register("battery_box_block", () -> makeItem(ActuallyBlocks.blockBatteryBox)); - public static final RegistryObject itemItemViewerHopping = ITEMS.register("item_viewer_hopping_block", () -> makeItem(ActuallyBlocks.blockItemViewerHopping)); - public static final RegistryObject itemFarmer = ITEMS.register("farmer_block", () -> makeItem(ActuallyBlocks.blockFarmer)); - public static final RegistryObject itemBioReactor = ITEMS.register("bio_reactor_block", () -> makeItem(ActuallyBlocks.blockBioReactor)); - public static final RegistryObject itemEmpowerer = ITEMS.register("empowerer_block", () -> makeItem(ActuallyBlocks.blockEmpowerer)); - public static final RegistryObject itemTinyTorch = ITEMS.register("tiny_torch_block", () -> makeItem(ActuallyBlocks.blockTinyTorch)); - public static final RegistryObject itemShockSuppressor = ITEMS.register("shock_suppressor_block", () -> makeItem(ActuallyBlocks.blockShockSuppressor)); - public static final RegistryObject itemDisplayStand = ITEMS.register("display_stand_block", () -> makeItem(ActuallyBlocks.blockDisplayStand)); - public static final RegistryObject itemPlayerInterface = ITEMS.register("player_interface_block", () -> makeItem(ActuallyBlocks.blockPlayerInterface)); - public static final RegistryObject itemItemViewer = ITEMS.register("item_viewer_block", () -> makeItem(ActuallyBlocks.blockItemViewer)); - public static final RegistryObject itemFireworkBox = ITEMS.register("firework_box_block", () -> makeItem(ActuallyBlocks.blockFireworkBox)); - public static final RegistryObject itemMiner = ITEMS.register("miner_block", () -> makeItem(ActuallyBlocks.blockMiner)); - public static final RegistryObject itemAtomicReconstructor = ITEMS.register("atomic_reconstructor_block", () -> makeItem(ActuallyBlocks.blockAtomicReconstructor)); - public static final RegistryObject itemCrystalQuarts = ITEMS.register("crystal_quarts_block", () -> makeItem(ActuallyBlocks.blockCrystalQuarts)); - public static final RegistryObject itemCrystalRedstone = ITEMS.register("crystal_redstone_block", () -> makeItem(ActuallyBlocks.blockCrystalRedstone)); - public static final RegistryObject itemCrystalLapis = ITEMS.register("crystal_lapis_block", () -> makeItem(ActuallyBlocks.blockCrystalLapis)); - public static final RegistryObject itemCrystalDiamond = ITEMS.register("crystal_diamond_block", () -> makeItem(ActuallyBlocks.blockCrystalDiamond)); - public static final RegistryObject itemCrystalVoid = ITEMS.register("crystal_void_block", () -> makeItem(ActuallyBlocks.blockCrystalVoid)); - public static final RegistryObject itemCrystalEmerald = ITEMS.register("crystal_emerald_block", () -> makeItem(ActuallyBlocks.blockCrystalEmerald)); - public static final RegistryObject itemCrystalEmpoweredQuarts = ITEMS.register("crystal_quarts_empowered_block", () -> makeItem(ActuallyBlocks.blockCrystalEmpoweredQuarts)); - public static final RegistryObject itemCrystalEmpoweredRedstone = ITEMS.register("crystal_redstone_empowered_block", () -> makeItem(ActuallyBlocks.blockCrystalEmpoweredRedstone)); - public static final RegistryObject itemCrystalEmpoweredLapis = ITEMS.register("crystal_lapis_empowered_block", () -> makeItem(ActuallyBlocks.blockCrystalEmpoweredLapis)); - public static final RegistryObject itemCrystalEmpoweredDiamond = ITEMS.register("crystal_diamond_empowered_block", () -> makeItem(ActuallyBlocks.blockCrystalEmpoweredDiamond)); - public static final RegistryObject itemCrystalEmpoweredVoid = ITEMS.register("crystal_void_empowered_block", () -> makeItem(ActuallyBlocks.blockCrystalEmpoweredVoid)); - public static final RegistryObject itemCrystalEmpoweredEmerald = ITEMS.register("crystal_emerald_empowered_block", () -> makeItem(ActuallyBlocks.blockCrystalEmpoweredEmerald)); - public static final RegistryObject itemBlackLotus = ITEMS.register("black_lotus_block", () -> makeItem(ActuallyBlocks.blockBlackLotus)); - public static final RegistryObject itemLaserRelay = ITEMS.register("laser_relay_block", () -> makeItem(ActuallyBlocks.blockLaserRelay)); - public static final RegistryObject itemLaserRelayAdvanced = ITEMS.register("laser_relay_advanced_block", () -> makeItem(ActuallyBlocks.blockLaserRelayAdvanced)); - public static final RegistryObject itemLaserRelayExtreme = ITEMS.register("laser_relay_extreme_block", () -> makeItem(ActuallyBlocks.blockLaserRelayExtreme)); - public static final RegistryObject itemLaserRelayFluids = ITEMS.register("laser_relay_fluids_block", () -> makeItem(ActuallyBlocks.blockLaserRelayFluids)); - public static final RegistryObject itemLaserRelayItem = ITEMS.register("laser_relay_item_block", () -> makeItem(ActuallyBlocks.blockLaserRelayItem)); - public static final RegistryObject itemLaserRelayItemWhitelist = ITEMS.register("laser_relay_item_whitelist_block", () -> makeItem(ActuallyBlocks.blockLaserRelayItemWhitelist)); - public static final RegistryObject itemRangedCollector = ITEMS.register("ranged_collector_block", () -> makeItem(ActuallyBlocks.blockRangedCollector)); - public static final RegistryObject itemDirectionalBreaker = ITEMS.register("directional_breaker_block", () -> makeItem(ActuallyBlocks.blockDirectionalBreaker)); - public static final RegistryObject itemLeafGenerator = ITEMS.register("leaf_generator_block", () -> makeItem(ActuallyBlocks.blockLeafGenerator)); - public static final RegistryObject itemSmileyCloud = ITEMS.register("smiley_cloud_block", () -> makeItem(ActuallyBlocks.blockSmileyCloud)); - public static final RegistryObject itemXPSolidifier = ITEMS.register("xp_solidifier_block", () -> makeItem(ActuallyBlocks.blockXPSolidifier)); - public static final RegistryObject itemTestifiBucksGreenWall = ITEMS.register("green_wall_block", () -> makeItem(ActuallyBlocks.blockTestifiBucksGreenWall)); - public static final RegistryObject itemTestifiBucksWhiteWall = ITEMS.register("white_wall_block", () -> makeItem(ActuallyBlocks.blockTestifiBucksWhiteWall)); - public static final RegistryObject itemTestifiBucksGreenStairs = ITEMS.register("green_stairs_block", () -> makeItem(ActuallyBlocks.blockTestifiBucksGreenStairs)); - public static final RegistryObject itemTestifiBucksWhiteStairs = ITEMS.register("white_stairs_block", () -> makeItem(ActuallyBlocks.blockTestifiBucksWhiteStairs)); - public static final RegistryObject itemTestifiBucksGreenSlab = ITEMS.register("green_slab_block", () -> makeItem(ActuallyBlocks.blockTestifiBucksGreenSlab)); - public static final RegistryObject itemTestifiBucksWhiteSlab = ITEMS.register("white_slab_block", () -> makeItem(ActuallyBlocks.blockTestifiBucksWhiteSlab)); - public static final RegistryObject itemTestifiBucksGreenFence = ITEMS.register("green_fence_block", () -> makeItem(ActuallyBlocks.blockTestifiBucksGreenFence)); - public static final RegistryObject itemTestifiBucksWhiteFence = ITEMS.register("white_fence_block", () -> makeItem(ActuallyBlocks.blockTestifiBucksWhiteFence)); - public static final RegistryObject ITEM_LAMP_WHITE = ITEMS.register("lamp_white_block", () -> makeItem(ActuallyBlocks.LAMP_WHITE)); - public static final RegistryObject ITEM_LAMP_ORANGE = ITEMS.register("lamp_orange_block", () -> makeItem(ActuallyBlocks.LAMP_ORANGE)); - public static final RegistryObject ITEM_LAMP_MAGENTA = ITEMS.register("lamp_magenta_block", () -> makeItem(ActuallyBlocks.LAMP_MAGENTA)); - public static final RegistryObject ITEM_LAMP_LIGHT_BLUE = ITEMS.register("lamp_light_blue_block", () -> makeItem(ActuallyBlocks.LAMP_LIGHT_BLUE)); - public static final RegistryObject ITEM_LAMP_YELLOW = ITEMS.register("lamp_yellow_block", () -> makeItem(ActuallyBlocks.LAMP_YELLOW)); - public static final RegistryObject ITEM_LAMP_LIME = ITEMS.register("lamp_lime_block", () -> makeItem(ActuallyBlocks.LAMP_LIME)); - public static final RegistryObject ITEM_LAMP_PINK = ITEMS.register("lamp_pink_block", () -> makeItem(ActuallyBlocks.LAMP_PINK)); - public static final RegistryObject ITEM_LAMP_GRAY = ITEMS.register("lamp_gray_block", () -> makeItem(ActuallyBlocks.LAMP_GRAY)); - public static final RegistryObject ITEM_LAMP_LIGHT_GRAY = ITEMS.register("lamp_light_gray_block", () -> makeItem(ActuallyBlocks.LAMP_LIGHT_GRAY)); - public static final RegistryObject ITEM_LAMP_CYAN = ITEMS.register("lamp_cyan_block", () -> makeItem(ActuallyBlocks.LAMP_CYAN)); - public static final RegistryObject ITEM_LAMP_PURPLE = ITEMS.register("lamp_purple_block", () -> makeItem(ActuallyBlocks.LAMP_PURPLE)); - public static final RegistryObject ITEM_LAMP_BLUE = ITEMS.register("lamp_blue_block", () -> makeItem(ActuallyBlocks.LAMP_BLUE)); - public static final RegistryObject ITEM_LAMP_BROWN = ITEMS.register("lamp_brown_block", () -> makeItem(ActuallyBlocks.LAMP_BROWN)); - public static final RegistryObject ITEM_LAMP_GREEN = ITEMS.register("lamp_green_block", () -> makeItem(ActuallyBlocks.LAMP_GREEN)); - public static final RegistryObject ITEM_LAMP_RED = ITEMS.register("lamp_red_block", () -> makeItem(ActuallyBlocks.LAMP_RED)); - public static final RegistryObject ITEM_LAMP_BLACK = ITEMS.register("lamp_black_block", () -> makeItem(ActuallyBlocks.LAMP_BLACK)); - public static final RegistryObject itemLampPowerer = ITEMS.register("lamp_powerer_block", () -> makeItem(ActuallyBlocks.blockLampPowerer)); - public static final RegistryObject itemTreasureChest = ITEMS.register("treasure_chest_block", () -> makeItem(ActuallyBlocks.blockTreasureChest)); - public static final RegistryObject itemEnergizer = ITEMS.register("energizer_block", () -> makeItem(ActuallyBlocks.blockEnergizer)); - public static final RegistryObject itemEnervator = ITEMS.register("enervator_block", () -> makeItem(ActuallyBlocks.blockEnervator)); - public static final RegistryObject itemLavaFactoryController = ITEMS.register("lava_factory_controller_block", () -> makeItem(ActuallyBlocks.blockLavaFactoryController)); - public static final RegistryObject itemCanolaPress = ITEMS.register("canola_press_block", () -> makeItem(ActuallyBlocks.blockCanolaPress)); - public static final RegistryObject itemPhantomface = ITEMS.register("phantomface_block", () -> makeItem(ActuallyBlocks.blockPhantomface)); - public static final RegistryObject itemPhantomPlacer = ITEMS.register("phantom_placer_block", () -> makeItem(ActuallyBlocks.blockPhantomPlacer)); - public static final RegistryObject itemPhantomLiquiface = ITEMS.register("phantom_liquiface_block", () -> makeItem(ActuallyBlocks.blockPhantomLiquiface)); - public static final RegistryObject itemPhantomEnergyface = ITEMS.register("phantom_energyface_block", () -> makeItem(ActuallyBlocks.blockPhantomEnergyface)); - public static final RegistryObject itemPhantomRedstoneface = ITEMS.register("phantom_redstoneface_block", () -> makeItem(ActuallyBlocks.blockPhantomRedstoneface)); - public static final RegistryObject itemPhantomBreaker = ITEMS.register("phantom_breaker_block", () -> makeItem(ActuallyBlocks.blockPhantomBreaker)); - public static final RegistryObject itemCoalGenerator = ITEMS.register("coal_generator_block", () -> makeItem(ActuallyBlocks.blockCoalGenerator)); - public static final RegistryObject itemOilGenerator = ITEMS.register("oil_generator_block", () -> makeItem(ActuallyBlocks.blockOilGenerator)); - public static final RegistryObject itemFermentingBarrel = ITEMS.register("fermenting_barrel_block", () -> makeItem(ActuallyBlocks.blockFermentingBarrel)); - public static final RegistryObject itemRice = ITEMS.register("rice_block", () -> makeItem(ActuallyBlocks.blockRice)); - public static final RegistryObject itemCanola = ITEMS.register("canola_block", () -> makeItem(ActuallyBlocks.blockCanola)); - public static final RegistryObject itemFlax = ITEMS.register("flax_block", () -> makeItem(ActuallyBlocks.blockFlax)); - public static final RegistryObject itemCoffee = ITEMS.register("coffee_block", () -> makeItem(ActuallyBlocks.blockCoffee)); - public static final RegistryObject ITEM_BLACK_QUARTS = ITEMS.register("black_quartz_block", () -> makeItem(ActuallyBlocks.BLACK_QUARTS)); - public static final RegistryObject ITEM_BLACK_QUARTS_CHISELED = ITEMS.register("black_quartz_chiseled_block", () -> makeItem(ActuallyBlocks.BLACK_QUARTS_CHISELED)); - public static final RegistryObject ITEM_BLACK_QUARTS_PILLAR = ITEMS.register("black_quartz_pillar_block", () -> makeItem(ActuallyBlocks.BLACK_QUARTS_PILLAR)); - public static final RegistryObject ITEM_CHARCOAL = ITEMS.register("charcoal_block", () -> makeItem(ActuallyBlocks.CHARCOAL)); - public static final RegistryObject ITEM_ENDER_CASING = ITEMS.register("ender_casing_block", () -> makeItem(ActuallyBlocks.ENDER_CASING)); - public static final RegistryObject ITEM_ENDERPEARL = ITEMS.register("enderpearl_block", () -> makeItem(ActuallyBlocks.ENDERPEARL)); - public static final RegistryObject ITEM_IRON_CASING = ITEMS.register("iron_casing_block", () -> makeItem(ActuallyBlocks.IRON_CASING)); - public static final RegistryObject ITEM_IRON_CASING_SNOW = ITEMS.register("iron_casing_snow_block", () -> makeItem(ActuallyBlocks.IRON_CASING_SNOW)); - public static final RegistryObject ITEM_LAVA_FACTORY_CASE = ITEMS.register("lava_factory_case_block", () -> makeItem(ActuallyBlocks.LAVA_FACTORY_CASE)); - public static final RegistryObject ITEM_ORE_BLACK_QUARTS = ITEMS.register("ore_black_quartz_block", () -> makeItem(ActuallyBlocks.ORE_BLACK_QUARTS)); - public static final RegistryObject ITEM_WOOD_CASING = ITEMS.register("wood_casing_block", () -> makeItem(ActuallyBlocks.WOOD_CASING)); - public static final RegistryObject itemFeeder = ITEMS.register("feeder_block", () -> makeItem(ActuallyBlocks.blockFeeder)); - public static final RegistryObject itemGrinder = ITEMS.register("grinder_block", () -> makeItem(ActuallyBlocks.blockGrinder)); - public static final RegistryObject itemGrinderDouble = ITEMS.register("grinder_double_block", () -> makeItem(ActuallyBlocks.blockGrinderDouble)); - public static final RegistryObject itemFurnaceDouble = ITEMS.register("furnace_double_block", () -> makeItem(ActuallyBlocks.blockFurnaceDouble)); - public static final RegistryObject itemInputter = ITEMS.register("inputter_block", () -> makeItem(ActuallyBlocks.blockInputter)); - public static final RegistryObject itemInputterAdvanced = ITEMS.register("inputter_advanced_block", () -> makeItem(ActuallyBlocks.blockInputterAdvanced)); - public static final RegistryObject itemFishingNet = ITEMS.register("fishing_net_block", () -> makeItem(ActuallyBlocks.blockFishingNet)); - public static final RegistryObject itemFurnaceSolar = ITEMS.register("furnace_solar_block", () -> makeItem(ActuallyBlocks.blockFurnaceSolar)); - public static final RegistryObject itemHeatCollector = ITEMS.register("heat_collector_block", () -> makeItem(ActuallyBlocks.blockHeatCollector)); - public static final RegistryObject itemItemRepairer = ITEMS.register("item_repairer_block", () -> makeItem(ActuallyBlocks.blockItemRepairer)); - public static final RegistryObject itemGreenhouseGlass = ITEMS.register("greenhouse_glass_block", () -> makeItem(ActuallyBlocks.blockGreenhouseGlass)); - public static final RegistryObject itemBreaker = ITEMS.register("breaker_block", () -> makeItem(ActuallyBlocks.blockBreaker)); - public static final RegistryObject itemPlacer = ITEMS.register("placer_block", () -> makeItem(ActuallyBlocks.blockPlacer)); - public static final RegistryObject itemDropper = ITEMS.register("dropper_block", () -> makeItem(ActuallyBlocks.blockDropper)); - public static final RegistryObject itemFluidPlacer = ITEMS.register("fluid_placer_block", () -> makeItem(ActuallyBlocks.blockFluidPlacer)); - public static final RegistryObject itemFluidCollector = ITEMS.register("fluid_collector_block", () -> makeItem(ActuallyBlocks.blockFluidCollector)); - public static final RegistryObject itemCoffeeMachine = ITEMS.register("coffee_machine_block", () -> makeItem(ActuallyBlocks.blockCoffeeMachine)); - public static final RegistryObject itemPhantomBooster = ITEMS.register("phantom_booster_block", () -> makeItem(ActuallyBlocks.blockPhantomBooster)); - public static final RegistryObject itemQuartzWall = ITEMS.register("quartz_wall_block", () -> makeItem(ActuallyBlocks.blockQuartzWall)); - public static final RegistryObject itemChiseledQuartzWall = ITEMS.register("chiseled_quartz_wall_block", () -> makeItem(ActuallyBlocks.blockChiseledQuartzWall)); - public static final RegistryObject itemPillarQuartzWall = ITEMS.register("pillar_quartz_wall_block", () -> makeItem(ActuallyBlocks.blockPillarQuartzWall)); - public static final RegistryObject itemQuartzStair = ITEMS.register("quartz_stair_block", () -> makeItem(ActuallyBlocks.blockQuartzStair)); - public static final RegistryObject itemChiseledQuartzStair = ITEMS.register("chiseled_quartz_stair_block", () -> makeItem(ActuallyBlocks.blockChiseledQuartzStair)); - public static final RegistryObject itemPillarQuartzStair = ITEMS.register("pillar_quartz_stair_block", () -> makeItem(ActuallyBlocks.blockPillarQuartzStair)); - public static final RegistryObject itemQuartzSlab = ITEMS.register("quartz_slab_block", () -> makeItem(ActuallyBlocks.blockQuartzSlab)); - public static final RegistryObject itemChiseledQuartzSlab = ITEMS.register("chiseled_quartz_slab_block", () -> makeItem(ActuallyBlocks.blockChiseledQuartzSlab)); - public static final RegistryObject itemPillarQuartzSlab = ITEMS.register("pillar_quartz_slab_block", () -> makeItem(ActuallyBlocks.blockPillarQuartzSlab)); - private static BlockItem makeItem(Supplier block) { - return new BlockItem(block.get(), new Item.Properties().group(ActuallyAdditions.ACTUALLY_GROUP)); - } + } diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 37ff221bd..60829bd2e 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -1,5 +1,5 @@ modLoader="javafml" -loaderVersion="[34,)" +loaderVersion="[35,)" issueTrackerURL="http://github.com/Ellpeck/ActuallyAdditions/issues" displayURL="http://github.com/Ellpeck/ActuallyAdditions" logoFile="logo.png" @@ -16,6 +16,6 @@ license="MIT" [[dependencies.actuallyadditions]] modId="forge" mandatory=true - versionRange="[34,)" + versionRange="[35,)" ordering="NONE" side="BOTH" \ No newline at end of file