Fixing Registry contructors on blocks and slowly migrating block contructors

This commit is contained in:
Michael 2020-09-07 23:46:45 +01:00
parent 0b964b4c89
commit 6e0fb39544
No known key found for this signature in database
GPG key ID: 971C5B254742488F
26 changed files with 230 additions and 256 deletions

View file

@ -1,7 +1,5 @@
package de.ellpeck.actuallyadditions.mod.blocks; package de.ellpeck.actuallyadditions.mod.blocks;
import java.util.List;
import de.ellpeck.actuallyadditions.api.lens.ILensItem; import de.ellpeck.actuallyadditions.api.lens.ILensItem;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
@ -36,20 +34,22 @@ import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.List;
public class BlockAtomicReconstructor extends BlockContainerBase implements IHudDisplay { public class BlockAtomicReconstructor extends BlockContainerBase implements IHudDisplay {
public static final int NAME_FLAVOR_AMOUNTS_1 = 12; public static final int NAME_FLAVOR_AMOUNTS_1 = 12;
public static final int NAME_FLAVOR_AMOUNTS_2 = 14; public static final int NAME_FLAVOR_AMOUNTS_2 = 14;
public BlockAtomicReconstructor(String name) { public BlockAtomicReconstructor() {
super(Material.ROCK, name); super(Properties.create(Material.ROCK)
this.setHarvestLevel("pickaxe", 0); .hardnessAndResistance(10f, 80f)
this.setHardness(10F); .harvestTool(ToolType.PICKAXE)
this.setResistance(80F); .sound(SoundType.STONE));
this.setSoundType(SoundType.STONE);
} }
@Override @Override

View file

@ -16,16 +16,25 @@ import net.minecraft.util.EnumHand;
import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
import javax.annotation.Nullable;
public class BlockBatteryBox extends BlockContainerBase { public class BlockBatteryBox extends BlockContainerBase {
public BlockBatteryBox(String name) { public BlockBatteryBox() {
super(Material.ROCK, name); super(Properties.create(Material.ROCK)
this.setHarvestLevel("pickaxe", 0); .hardnessAndResistance(1.5f, 10.0f)
this.setHardness(1.5F); .harvestLevel(0)
this.setResistance(10.0F); .harvestTool(ToolType.PICKAXE)
this.setSoundType(SoundType.STONE); .sound(SoundType.STONE));
// this.setHarvestLevel("pickaxe", 0);
// this.setHardness(1.5F);
// this.setResistance(10.0F);
// this.setSoundType(SoundType.STONE);
} }
@Override @Override
@ -33,11 +42,6 @@ public class BlockBatteryBox extends BlockContainerBase {
return BlockSlabs.AABB_BOTTOM_HALF; return BlockSlabs.AABB_BOTTOM_HALF;
} }
@Override
public TileEntity createNewTileEntity(World world, int meta) {
return new TileEntityBatteryBox();
}
@Override @Override
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) { public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
TileEntity tile = world.getTileEntity(pos); TileEntity tile = world.getTileEntity(pos);
@ -72,4 +76,10 @@ public class BlockBatteryBox extends BlockContainerBase {
public EnumRarity getRarity(ItemStack stack) { public EnumRarity getRarity(ItemStack stack) {
return EnumRarity.RARE; return EnumRarity.RARE;
} }
@Nullable
@Override
public TileEntity createNewTileEntity(IBlockReader worldIn) {
return new TileEntityBatteryBox();
}
} }

View file

@ -15,16 +15,15 @@ import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand; import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
public class BlockBioReactor extends BlockContainerBase { public class BlockBioReactor extends BlockContainerBase {
public BlockBioReactor(String name) { public BlockBioReactor() {
super(Material.ROCK, name); super(Properties.create(Material.ROCK)
.hardnessAndResistance(2f, 10.0f)
this.setHarvestLevel("pickaxe", 0); .harvestTool(ToolType.PICKAXE)
this.setHardness(2.0F); .sound(SoundType.STONE));
this.setResistance(10.0F);
this.setSoundType(SoundType.STONE);
} }
@Override @Override

View file

@ -1,11 +1,17 @@
package de.ellpeck.actuallyadditions.mod.blocks; package de.ellpeck.actuallyadditions.mod.blocks;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBushBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBushBase;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraftforge.common.ToolType;
public class BlockBlackLotus extends BlockBushBase { public class BlockBlackLotus extends BlockBushBase {
public BlockBlackLotus(String name) { public BlockBlackLotus() {
super(name); super(Properties.create(Material.ROCK)
.hardnessAndResistance(1.5f, 10.0f)
.harvestTool(ToolType.PICKAXE)
.sound(SoundType.STONE));
} }
} }

View file

@ -6,6 +6,7 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals; import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyEnum; import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.BlockStateContainer;
@ -15,22 +16,24 @@ import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList; import net.minecraft.util.NonNullList;
import net.minecraftforge.common.IRarity; import net.minecraftforge.common.IRarity;
import net.minecraftforge.common.ToolType;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
public class BlockCrystal extends BlockBase { public class BlockCrystal extends Block {
public static final TheCrystals[] ALL_CRYSTALS = TheCrystals.values(); public static final TheCrystals[] ALL_CRYSTALS = TheCrystals.values();
private static final PropertyEnum<TheCrystals> TYPE = PropertyEnum.create("type", TheCrystals.class); private static final PropertyEnum<TheCrystals> TYPE = PropertyEnum.create("type", TheCrystals.class);
private final boolean isEmpowered; private final boolean isEmpowered;
public BlockCrystal(String name, boolean isEmpowered) { public BlockCrystal(boolean isEmpowered) {
super(Material.ROCK, name); super(Properties.create(Material.ROCK)
.hardnessAndResistance(1.5f, 10.0f)
.harvestTool(ToolType.PICKAXE)
.sound(SoundType.STONE));
this.isEmpowered = isEmpowered; this.isEmpowered = isEmpowered;
this.setHardness(1.5F);
this.setResistance(10.0F);
this.setHarvestLevel("pickaxe", 1);
} }
@Override @Override
@ -73,11 +76,6 @@ public class BlockCrystal extends BlockBase {
return new BlockStateContainer(this, TYPE); return new BlockStateContainer(this, TYPE);
} }
@Override
public IRarity getRarity(ItemStack stack) {
return stack.getItemDamage() >= ALL_CRYSTALS.length ? EnumRarity.COMMON : ALL_CRYSTALS[stack.getItemDamage()].rarity;
}
public static class TheItemBlock extends ItemBlockBase { public static class TheItemBlock extends ItemBlockBase {
public TheItemBlock(Block block) { public TheItemBlock(Block block) {

View file

@ -2,6 +2,10 @@ package de.ellpeck.actuallyadditions.mod.blocks;
import java.util.Random; import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.entity.LivingEntity;
import net.minecraft.util.Direction;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
@ -32,41 +36,40 @@ import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
public class BlockCrystalCluster extends BlockBase implements IColorProvidingBlock, IColorProvidingItem { public class BlockCrystalCluster extends Block implements IColorProvidingBlock, IColorProvidingItem {
private final TheCrystals crystal; private final TheCrystals crystal;
public BlockCrystalCluster(String name, TheCrystals crystal) { public BlockCrystalCluster(TheCrystals crystal) {
super(Material.GLASS, name); super(Properties.create(Material.GLASS)
.hardnessAndResistance(0.25f, 1.0f)
.sound(SoundType.GLASS)
.lightValue(7));
this.crystal = crystal; this.crystal = crystal;
this.setHardness(0.25F); // this.setHardness(0.25F);
this.setResistance(1.0F); // this.setResistance(1.0F);
this.setSoundType(SoundType.GLASS); // this.setSoundType(SoundType.GLASS);
this.setLightOpacity(1); // this.setLightOpacity(1);
this.setLightLevel(0.7F); // this.setLightLevel(0.7F);
} }
@Override // @Override
public boolean isFullCube(IBlockState state) { // public boolean isFullCube(BlockState state) {
return false; // return false;
} // }
//
// @Override
// public boolean isOpaqueCube(BlockState state) {
// return false;
// }
@Override @Override
public boolean isOpaqueCube(IBlockState state) { public BlockState getStateForPlacement(World world, BlockPos pos, Direction side, float hitX, float hitY, float hitZ, int meta, LivingEntity base) {
return false;
}
@Override
public IBlockState getStateForPlacement(World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ, int meta, EntityLivingBase base) {
return this.getStateFromMeta(side.ordinal()); return this.getStateFromMeta(side.ordinal());
} }
@Override
public EnumRarity getRarity(ItemStack stack) {
return EnumRarity.EPIC;
}
@Override @Override
public IBlockState getStateFromMeta(int meta) { public IBlockState getStateFromMeta(int meta) {
return this.getDefaultState().withProperty(BlockDirectional.FACING, EnumFacing.byIndex(meta)); return this.getDefaultState().withProperty(BlockDirectional.FACING, EnumFacing.byIndex(meta));

View file

@ -20,15 +20,15 @@ import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation; import net.minecraft.util.Rotation;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
public class BlockDirectionalBreaker extends BlockContainerBase { public class BlockDirectionalBreaker extends BlockContainerBase {
public BlockDirectionalBreaker(String name) { public BlockDirectionalBreaker() {
super(Material.ROCK, name); super(Properties.create(Material.ROCK)
this.setHarvestLevel("pickaxe", 0); .hardnessAndResistance(1.5f, 10.0f)
this.setHardness(1.5F); .harvestTool(ToolType.PICKAXE)
this.setResistance(10.0F); .sound(SoundType.STONE));
this.setSoundType(SoundType.STONE);
} }
@Override @Override

View file

@ -18,16 +18,15 @@ import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
public class BlockDisplayStand extends BlockContainerBase { public class BlockDisplayStand extends BlockContainerBase {
public BlockDisplayStand(String name) { public BlockDisplayStand() {
super(Material.ROCK, name); super(Properties.create(Material.ROCK)
.hardnessAndResistance(1.5f, 10.0f)
this.setHarvestLevel("pickaxe", 0); .harvestTool(ToolType.PICKAXE)
this.setHardness(1.5F); .sound(SoundType.STONE));
this.setResistance(10.0F);
this.setSoundType(SoundType.STONE);
} }
@Override @Override

View file

@ -17,16 +17,15 @@ import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
public class BlockEmpowerer extends BlockContainerBase { public class BlockEmpowerer extends BlockContainerBase {
public BlockEmpowerer(String name) { public BlockEmpowerer() {
super(Material.ROCK, name); super(Properties.create(Material.ROCK)
.hardnessAndResistance(1.5f, 10.0f)
this.setHarvestLevel("pickaxe", 0); .harvestTool(ToolType.PICKAXE)
this.setHardness(1.5F); .sound(SoundType.STONE));
this.setResistance(10.0F);
this.setSoundType(SoundType.STONE);
} }
@Override @Override

View file

@ -20,15 +20,15 @@ import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation; import net.minecraft.util.Rotation;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
public class BlockFarmer extends BlockContainerBase { public class BlockFarmer extends BlockContainerBase {
public BlockFarmer(String name) { public BlockFarmer() {
super(Material.ROCK, name); super(Properties.create(Material.ROCK)
this.setHarvestLevel("pickaxe", 0); .hardnessAndResistance(1.5f, 10.0f)
this.setHardness(1.5F); .harvestTool(ToolType.PICKAXE)
this.setResistance(10.0F); .sound(SoundType.STONE));
this.setSoundType(SoundType.STONE);
} }
@Override @Override

View file

@ -15,15 +15,15 @@ import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand; import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
public class BlockFireworkBox extends BlockContainerBase { public class BlockFireworkBox extends BlockContainerBase {
public BlockFireworkBox(String name) { public BlockFireworkBox() {
super(Material.ROCK, name); super(Properties.create(Material.ROCK)
this.setHarvestLevel("pickaxe", 0); .hardnessAndResistance(1.5f, 10.0f)
this.setHardness(1.5F); .harvestTool(ToolType.PICKAXE)
this.setResistance(10.0F); .sound(SoundType.STONE));
this.setSoundType(SoundType.STONE);
} }
@Override @Override
@ -43,9 +43,4 @@ public class BlockFireworkBox extends BlockContainerBase {
public TileEntity createNewTileEntity(World world, int par2) { public TileEntity createNewTileEntity(World world, int par2) {
return new TileEntityFireworkBox(); return new TileEntityFireworkBox();
} }
@Override
public EnumRarity getRarity(ItemStack stack) {
return EnumRarity.RARE;
}
} }

View file

@ -1,27 +1,21 @@
package de.ellpeck.actuallyadditions.mod.blocks; package de.ellpeck.actuallyadditions.mod.blocks;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import net.minecraft.block.Block;
import net.minecraft.block.SoundType; import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.item.EnumRarity; import net.minecraftforge.common.ToolType;
import net.minecraft.item.ItemStack;
public class BlockGeneric extends BlockBase { public class BlockGeneric extends Block {
public BlockGeneric(String name) { public BlockGeneric() {
this(name, Material.ROCK, SoundType.STONE, 1.5F, 10.0F, "pickaxe", 0); this(Material.ROCK, SoundType.STONE, 1.5F, 10.0F, ToolType.PICKAXE, 0);
} }
public BlockGeneric(String name, Material material, SoundType sound, float hardness, float resistance, String harvestTool, int harvestLevel) { public BlockGeneric(Material material, SoundType sound, float hardness, float resistance, ToolType harvestTool, int harvestLevel) {
super(material, name); super(Properties.create(material)
this.setHarvestLevel(harvestTool, harvestLevel); .hardnessAndResistance(hardness, resistance)
this.setHardness(hardness); .harvestTool(harvestTool)
this.setResistance(resistance); .harvestLevel(harvestLevel)
this.setSoundType(sound); .sound(sound));
}
@Override
public EnumRarity getRarity(ItemStack stack) {
return EnumRarity.COMMON;
} }
} }

View file

@ -2,30 +2,27 @@ package de.ellpeck.actuallyadditions.mod.blocks;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemViewer; import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemViewer;
import net.minecraft.block.BlockState;
import net.minecraft.block.SoundType; import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World; import net.minecraft.world.IBlockReader;
import net.minecraftforge.common.ToolType;
import javax.annotation.Nullable;
public class BlockItemViewer extends BlockContainerBase { public class BlockItemViewer extends BlockContainerBase {
public BlockItemViewer(String name) { public BlockItemViewer() {
super(Material.ROCK, name); super(Properties.create(Material.ROCK)
this.setHarvestLevel("pickaxe", 0); .harvestTool(ToolType.PICKAXE)
this.setHardness(1.5F); .hardnessAndResistance(1.5f, 10.0f)
this.setResistance(10.0F); .sound(SoundType.STONE));
this.setSoundType(SoundType.STONE);
} }
@Nullable
@Override @Override
public TileEntity createNewTileEntity(World worldIn, int meta) { public TileEntity createTileEntity(BlockState state, IBlockReader world) {
return new TileEntityItemViewer(); return new TileEntityItemViewer();
} }
@Override
public EnumRarity getRarity(ItemStack stack) {
return EnumRarity.RARE;
}
} }

View file

@ -31,7 +31,7 @@ public class BlockItemViewerHopping extends BlockItemViewer {
private static final AxisAlignedBB WEST_AABB = new AxisAlignedBB(0.875D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D); private static final AxisAlignedBB WEST_AABB = new AxisAlignedBB(0.875D, 0.0D, 0.0D, 1.0D, 1.0D, 1.0D);
private static final AxisAlignedBB EAST_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.125D, 1.0D, 1.0D); private static final AxisAlignedBB EAST_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.125D, 1.0D, 1.0D);
public BlockItemViewerHopping(String name) { public BlockItemViewerHopping() {
super(name); super(name);
} }

View file

@ -9,13 +9,7 @@ import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
import de.ellpeck.actuallyadditions.mod.items.ItemEngineerGoggles; import de.ellpeck.actuallyadditions.mod.items.ItemEngineerGoggles;
import de.ellpeck.actuallyadditions.mod.items.ItemLaserRelayUpgrade; import de.ellpeck.actuallyadditions.mod.items.ItemLaserRelayUpgrade;
import de.ellpeck.actuallyadditions.mod.items.ItemLaserWrench; import de.ellpeck.actuallyadditions.mod.items.ItemLaserWrench;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay; import de.ellpeck.actuallyadditions.mod.tile.*;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergy;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergyAdvanced;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergyExtreme;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayFluids;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayItem;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayItemWhitelist;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import de.ellpeck.actuallyadditions.mod.util.StringUtil; import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.block.BlockDirectional; import net.minecraft.block.BlockDirectional;
@ -42,6 +36,7 @@ import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.ToolType;
import net.minecraftforge.event.entity.player.PlayerInteractEvent; import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.fml.common.eventhandler.Event; import net.minecraftforge.fml.common.eventhandler.Event;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
@ -61,15 +56,15 @@ public class BlockLaserRelay extends BlockContainerBase implements IHudDisplay {
private final Type type; private final Type type;
public BlockLaserRelay(String name, Type type) { public BlockLaserRelay(Type type) {
super(Material.ROCK, name); super(Properties.create(Material.ROCK)
this.setHarvestLevel("pickaxe", 0); .hardnessAndResistance(1.5f, 10.0f)
this.setHardness(1.5F); .harvestTool(ToolType.PICKAXE)
this.setResistance(10.0F); .sound(SoundType.STONE));
this.setSoundType(SoundType.STONE);
this.type = type; this.type = type;
// todo: migrate to better way of handling this...
if (this.type.ordinal() == 0) { if (this.type.ordinal() == 0) {
MinecraftForge.EVENT_BUS.register(this); MinecraftForge.EVENT_BUS.register(this);
} }

View file

@ -8,24 +8,19 @@ import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
public class BlockLeafGenerator extends BlockContainerBase { public class BlockLeafGenerator extends BlockContainerBase {
public BlockLeafGenerator(String name) { public BlockLeafGenerator() {
super(Material.IRON, name); super(Properties.create(Material.IRON)
this.setHarvestLevel("pickaxe", 0); .hardnessAndResistance(1.5f, 10.0f)
this.setHardness(5.0F); .harvestTool(ToolType.PICKAXE)
this.setResistance(10.0F); .sound(SoundType.METAL));
this.setSoundType(SoundType.METAL);
} }
@Override @Override
public TileEntity createNewTileEntity(World world, int par2) { public TileEntity createNewTileEntity(World world, int par2) {
return new TileEntityLeafGenerator(); return new TileEntityLeafGenerator();
} }
@Override
public EnumRarity getRarity(ItemStack stack) {
return EnumRarity.EPIC;
}
} }

View file

@ -19,17 +19,17 @@ import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.RayTraceResult;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
public class BlockMiner extends BlockContainerBase implements IHudDisplay { public class BlockMiner extends BlockContainerBase implements IHudDisplay {
public BlockMiner(String name) { public BlockMiner() {
super(Material.ROCK, name); super(Properties.create(Material.ROCK)
this.setHarvestLevel("pickaxe", 0); .hardnessAndResistance(8f, 30f)
this.setHardness(8F); .harvestTool(ToolType.PICKAXE)
this.setResistance(30F); .sound(SoundType.STONE));
this.setSoundType(SoundType.STONE);
} }
@Override @Override
@ -48,11 +48,6 @@ public class BlockMiner extends BlockContainerBase implements IHudDisplay {
return true; return true;
} }
@Override
public EnumRarity getRarity(ItemStack stack) {
return EnumRarity.RARE;
}
@Override @Override
public TileEntity createNewTileEntity(World world, int i) { public TileEntity createNewTileEntity(World world, int i) {
return new TileEntityMiner(); return new TileEntityMiner();

View file

@ -17,17 +17,17 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.text.TextFormatting; import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
public class BlockPlayerInterface extends BlockContainerBase implements IHudDisplay { public class BlockPlayerInterface extends BlockContainerBase implements IHudDisplay {
public BlockPlayerInterface(String name) { public BlockPlayerInterface() {
super(Material.ROCK, name); super(Properties.create(Material.ROCK)
this.setHarvestLevel("pickaxe", 0); .hardnessAndResistance(4.5f, 10.0f)
this.setHardness(4.5F); .harvestTool(ToolType.PICKAXE)
this.setResistance(10.0F); .sound(SoundType.STONE));
this.setSoundType(SoundType.STONE);
} }
@Override @Override
@ -35,11 +35,6 @@ public class BlockPlayerInterface extends BlockContainerBase implements IHudDisp
return new TileEntityPlayerInterface(); return new TileEntityPlayerInterface();
} }
@Override
public EnumRarity getRarity(ItemStack stack) {
return EnumRarity.EPIC;
}
@Override @Override
public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack) { public void onBlockPlacedBy(World world, BlockPos pos, IBlockState state, EntityLivingBase player, ItemStack stack) {
TileEntity tile = world.getTileEntity(pos); TileEntity tile = world.getTileEntity(pos);

View file

@ -15,15 +15,15 @@ import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand; import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
public class BlockRangedCollector extends BlockContainerBase { public class BlockRangedCollector extends BlockContainerBase {
public BlockRangedCollector(String name) { public BlockRangedCollector() {
super(Material.ROCK, name); super(Properties.create(Material.ROCK)
this.setHarvestLevel("pickaxe", 0); .hardnessAndResistance(1.5f, 10.0f)
this.setHardness(1.5F); .harvestTool(ToolType.PICKAXE)
this.setResistance(10.0F); .sound(SoundType.STONE));
this.setSoundType(SoundType.STONE);
} }
@Override @Override

View file

@ -1,9 +1,6 @@
package de.ellpeck.actuallyadditions.mod.blocks; package de.ellpeck.actuallyadditions.mod.blocks;
import java.util.ArrayList; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import java.util.Collections;
import java.util.List;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityShockSuppressor; import de.ellpeck.actuallyadditions.mod.tile.TileEntityShockSuppressor;
import net.minecraft.block.SoundType; import net.minecraft.block.SoundType;
@ -15,19 +12,23 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.ToolType;
import net.minecraftforge.event.world.ExplosionEvent; import net.minecraftforge.event.world.ExplosionEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@Mod.EventBusSubscriber(modid = ActuallyAdditions.MODID)
public class BlockShockSuppressor extends BlockContainerBase { public class BlockShockSuppressor extends BlockContainerBase {
public BlockShockSuppressor(String name) { public BlockShockSuppressor() {
super(Material.ROCK, name); super(Properties.create(Material.ROCK)
this.setHarvestLevel("pickaxe", 0); .hardnessAndResistance(20.0f, 2000.0f)
this.setHardness(20.0F); .harvestTool(ToolType.PICKAXE)
this.setResistance(2000.0F); .sound(SoundType.STONE));
this.setSoundType(SoundType.STONE);
MinecraftForge.EVENT_BUS.register(this);
} }
@SubscribeEvent @SubscribeEvent
@ -82,11 +83,6 @@ public class BlockShockSuppressor extends BlockContainerBase {
} }
} }
@Override
public EnumRarity getRarity(ItemStack stack) {
return EnumRarity.EPIC;
}
@Override @Override
public TileEntity createNewTileEntity(World worldIn, int meta) { public TileEntity createNewTileEntity(World worldIn, int meta) {
return new TileEntityShockSuppressor(); return new TileEntityShockSuppressor();

View file

@ -5,6 +5,7 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.ItemBlockBase;
import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockSlab; import net.minecraft.block.BlockSlab;
import net.minecraft.block.BlockState;
import net.minecraft.block.SoundType; import net.minecraft.block.SoundType;
import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
@ -23,7 +24,7 @@ import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
public class BlockSlabs extends BlockBase { public class BlockSlabs extends Block {
public static final AxisAlignedBB AABB_BOTTOM_HALF = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.5D, 1.0D); public static final AxisAlignedBB AABB_BOTTOM_HALF = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.5D, 1.0D);
private static final AxisAlignedBB AABB_TOP_HALF = new AxisAlignedBB(0.0D, 0.5D, 0.0D, 1.0D, 1.0D, 1.0D); private static final AxisAlignedBB AABB_TOP_HALF = new AxisAlignedBB(0.0D, 0.5D, 0.0D, 1.0D, 1.0D, 1.0D);
@ -34,7 +35,7 @@ public class BlockSlabs extends BlockBase {
this(name, fullBlock.getDefaultState()); this(name, fullBlock.getDefaultState());
} }
public BlockSlabs(String name, IBlockState fullBlockState) { public BlockSlabs(String name, BlockState fullBlockState) {
super(fullBlockState.getMaterial(), name); super(fullBlockState.getMaterial(), name);
this.setHardness(1.5F); this.setHardness(1.5F);
this.setResistance(10.0F); this.setResistance(10.0F);

View file

@ -1,7 +1,5 @@
package de.ellpeck.actuallyadditions.mod.blocks; package de.ellpeck.actuallyadditions.mod.blocks;
import java.util.Random;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase;
import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler; import de.ellpeck.actuallyadditions.mod.inventory.GuiHandler;
@ -16,24 +14,23 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumRarity; import net.minecraft.item.EnumRarity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing; import net.minecraft.util.*;
import net.minecraft.util.EnumHand;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import java.util.Random;
public class BlockSmileyCloud extends BlockContainerBase { public class BlockSmileyCloud extends BlockContainerBase {
public BlockSmileyCloud(String name) { public BlockSmileyCloud(S) {
super(Material.CLOTH, name); super(Properties.create(Material.WOOL)
this.setHardness(0.5F); .hardnessAndResistance(0.5f, 5.0f)
this.setResistance(5.0F); .harvestTool(ToolType.PICKAXE)
this.setSoundType(SoundType.CLOTH); .sound(SoundType.CLOTH)
this.setTickRandomly(true); .tickRandomly());
} }
@Override @Override

View file

@ -1,33 +1,32 @@
package de.ellpeck.actuallyadditions.mod.blocks; package de.ellpeck.actuallyadditions.mod.blocks;
import java.util.Random;
import javax.annotation.Nullable;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockTorch; import net.minecraft.block.BlockTorch;
import net.minecraft.block.SoundType; import net.minecraft.block.SoundType;
import net.minecraft.block.TorchBlock;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.block.state.BlockFaceShape; import net.minecraft.block.state.BlockFaceShape;
import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.BlockRenderLayer; import net.minecraft.state.DirectionProperty;
import net.minecraft.util.EnumFacing; import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.*;
import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation;
import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly; import net.minecraftforge.fml.relauncher.SideOnly;
import javax.annotation.Nullable;
import java.util.Random;
//Copied from BlockTorch. //Copied from BlockTorch.
//I have no idea what all of this means. //I have no idea what all of this means.
public class BlockTinyTorch extends BlockBase { public class BlockTinyTorch extends Block {
//Thanks to xdjackiexd for these. //Thanks to xdjackiexd for these.
//Man, I hate numbers. //Man, I hate numbers.
@ -37,14 +36,15 @@ public class BlockTinyTorch extends BlockBase {
private static final AxisAlignedBB TORCH_WEST_AABB = new AxisAlignedBB(0.8125D, 0.25D, 0.4375D, 1.0D, 0.5625D, 0.5625D); private static final AxisAlignedBB TORCH_WEST_AABB = new AxisAlignedBB(0.8125D, 0.25D, 0.4375D, 1.0D, 0.5625D, 0.5625D);
private static final AxisAlignedBB TORCH_EAST_AABB = new AxisAlignedBB(0.0D, 0.25D, 0.4375D, 0.1875D, 0.5625D, 0.5625D); private static final AxisAlignedBB TORCH_EAST_AABB = new AxisAlignedBB(0.0D, 0.25D, 0.4375D, 0.1875D, 0.5625D, 0.5625D);
public BlockTinyTorch(String name) { public BlockTinyTorch() {
super(Material.CIRCUITS, name); super(Properties.create(Material.MISCELLANEOUS)
this.setDefaultState(this.blockState.getBaseState().withProperty(BlockTorch.FACING, EnumFacing.UP)); .hardnessAndResistance(0.0f)
this.setTickRandomly(true); .harvestTool(ToolType.PICKAXE)
.lightValue(8)
.sound(SoundType.WOOD)
.tickRandomly());
this.setHardness(0.0F); this.setDefaultState(this.getDefaultState().with(BlockStateProperties.FACING, Direction.UP));
this.setLightLevel(0.8F);
this.setSoundType(SoundType.WOOD);
} }
@Override @Override

View file

@ -20,15 +20,15 @@ import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation; import net.minecraft.util.Rotation;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
public class BlockXPSolidifier extends BlockContainerBase { public class BlockXPSolidifier extends BlockContainerBase {
public BlockXPSolidifier(String name) { public BlockXPSolidifier() {
super(Material.ROCK, name); super(Properties.create(Material.ROCK)
this.setHarvestLevel("pickaxe", 0); .hardnessAndResistance(2.5f, 10.0f)
this.setHardness(2.5F); .harvestTool(ToolType.PICKAXE)
this.setResistance(10.0F); .sound(SoundType.STONE));
this.setSoundType(SoundType.STONE);
} }
@Override @Override

View file

@ -16,22 +16,22 @@ public final class InitBlocks {
public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, ActuallyAdditions.MODID); public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, ActuallyAdditions.MODID);
public static final RegistryObject<Block> blockCrystalClusterRedstone public static final RegistryObject<Block> blockCrystalClusterRedstone
= BLOCKS.register("block_crystal_cluster_redstone", () -> new BlockCrystalCluster(TheCrystals.REDSTONE); = BLOCKS.register("block_crystal_cluster_redstone", () -> new BlockCrystalCluster(TheCrystals.REDSTONE));
public static final RegistryObject<Block> blockCrystalClusterLapis public static final RegistryObject<Block> blockCrystalClusterLapis
= BLOCKS.register("block_crystal_cluster_lapis", () -> new BlockCrystalCluster(TheCrystals.LAPIS); = BLOCKS.register("block_crystal_cluster_lapis", () -> new BlockCrystalCluster(TheCrystals.LAPIS));
public static final RegistryObject<Block> blockCrystalClusterDiamond public static final RegistryObject<Block> blockCrystalClusterDiamond
= BLOCKS.register("block_crystal_cluster_diamond", () -> new BlockCrystalCluster(TheCrystals.DIAMOND); = BLOCKS.register("block_crystal_cluster_diamond", () -> new BlockCrystalCluster(TheCrystals.DIAMOND));
public static final RegistryObject<Block> blockCrystalClusterCoal public static final RegistryObject<Block> blockCrystalClusterCoal
= BLOCKS.register("block_crystal_cluster_coal", () -> new BlockCrystalCluster(TheCrystals.COAL); = BLOCKS.register("block_crystal_cluster_coal", () -> new BlockCrystalCluster(TheCrystals.COAL));
public static final RegistryObject<Block> blockCrystalClusterEmerald public static final RegistryObject<Block> blockCrystalClusterEmerald
= BLOCKS.register("block_crystal_cluster_emerald", () -> new BlockCrystalCluster(TheCrystals.EMERALD); = BLOCKS.register("block_crystal_cluster_emerald", () -> new BlockCrystalCluster(TheCrystals.EMERALD));
public static final RegistryObject<Block> blockCrystalClusterIron public static final RegistryObject<Block> blockCrystalClusterIron
= BLOCKS.register("block_crystal_cluster_iron", () -> new BlockCrystalCluster(TheCrystals.IRON); = BLOCKS.register("block_crystal_cluster_iron", () -> new BlockCrystalCluster(TheCrystals.IRON));
public static final RegistryObject<Block> blockBatteryBox public static final RegistryObject<Block> blockBatteryBox
= BLOCKS.register("block_battery_box", BlockBatteryBox::new); = BLOCKS.register("block_battery_box", BlockBatteryBox::new);
@ -82,22 +82,22 @@ public final class InitBlocks {
= BLOCKS.register("block_black_lotus", BlockBlackLotus::new); = BLOCKS.register("block_black_lotus", BlockBlackLotus::new);
public static final RegistryObject<Block> blockLaserRelay public static final RegistryObject<Block> blockLaserRelay
= BLOCKS.register("block_laser_relay", () -> new BlockLaserRelay(Type.ENERGY_BASIC)); = BLOCKS.register("block_laser_relay", () -> new BlockLaserRelay(BlockLaserRelay.Type.ENERGY_BASIC));
public static final RegistryObject<Block> blockLaserRelayAdvanced public static final RegistryObject<Block> blockLaserRelayAdvanced
= BLOCKS.register("block_laser_relay_advanced", () -> new BlockLaserRelay(Type.ENERGY_ADVANCED)); = BLOCKS.register("block_laser_relay_advanced", () -> new BlockLaserRelay(BlockLaserRelay.Type.ENERGY_ADVANCED));
public static final RegistryObject<Block> blockLaserRelayExtreme public static final RegistryObject<Block> blockLaserRelayExtreme
= BLOCKS.register("block_laser_relay_extreme", () -> new BlockLaserRelay(Type.ENERGY_EXTREME)); = BLOCKS.register("block_laser_relay_extreme", () -> new BlockLaserRelay(BlockLaserRelay.Type.ENERGY_EXTREME));
public static final RegistryObject<Block> blockLaserRelayFluids public static final RegistryObject<Block> blockLaserRelayFluids
= BLOCKS.register("block_laser_relay_fluids", () -> new BlockLaserRelay(Type.FLUIDS)); = BLOCKS.register("block_laser_relay_fluids", () -> new BlockLaserRelay(BlockLaserRelay.Type.FLUIDS));
public static final RegistryObject<Block> blockLaserRelayItem public static final RegistryObject<Block> blockLaserRelayItem
= BLOCKS.register("block_laser_relay_item", () -> new BlockLaserRelay(Type.ITEM)); = BLOCKS.register("block_laser_relay_item", () -> new BlockLaserRelay(BlockLaserRelay.Type.ITEM));
public static final RegistryObject<Block> blockLaserRelayItemWhitelist public static final RegistryObject<Block> blockLaserRelayItemWhitelist
= BLOCKS.register("block_laser_relay_item_whitelist", () -> new BlockLaserRelay(Type.ITEM_WHITELIST)); = BLOCKS.register("block_laser_relay_item_whitelist", () -> new BlockLaserRelay(BlockLaserRelay.Type.ITEM_WHITELIST));
public static final RegistryObject<Block> blockRangedCollector public static final RegistryObject<Block> blockRangedCollector
= BLOCKS.register("block_ranged_collector", BlockRangedCollector::new); = BLOCKS.register("block_ranged_collector", BlockRangedCollector::new);
@ -127,16 +127,16 @@ public final class InitBlocks {
= BLOCKS.register("block_testifi_bucks_white_stairs", () -> new StairsBlock(() -> blockTestifiBucksWhiteWall.get().getDefaultState(), Block.Properties.create(Material.ROCK))); = BLOCKS.register("block_testifi_bucks_white_stairs", () -> new StairsBlock(() -> blockTestifiBucksWhiteWall.get().getDefaultState(), Block.Properties.create(Material.ROCK)));
public static final RegistryObject<Block> blockTestifiBucksGreenSlab public static final RegistryObject<Block> blockTestifiBucksGreenSlab
= BLOCKS.register("block_testifi_bucks_green_slab", () -> new BlockSlabs("block_testifi_bucks_green_slab", blockTestifiBucksGreenWall); = BLOCKS.register("block_testifi_bucks_green_slab", () -> new BlockSlabs(blockTestifiBucksGreenWall);
public static final RegistryObject<Block> blockTestifiBucksWhiteSlab public static final RegistryObject<Block> blockTestifiBucksWhiteSlab
= BLOCKS.register("block_testifi_bucks_white_slab", () -> new BlockSlabs("block_testifi_bucks_white_slab", blockTestifiBucksWhiteWall); = BLOCKS.register("block_testifi_bucks_white_slab", () -> new BlockSlabs(blockTestifiBucksWhiteWall);
public static final RegistryObject<Block> blockTestifiBucksGreenFence public static final RegistryObject<Block> blockTestifiBucksGreenFence
= BLOCKS.register("block_testifi_bucks_green_fence", () -> new BlockWallAA("block_testifi_bucks_green_fence", blockTestifiBucksGreenWall); = BLOCKS.register("block_testifi_bucks_green_fence", () -> new BlockWallAA(blockTestifiBucksGreenWall);
public static final RegistryObject<Block> blockTestifiBucksWhiteFence public static final RegistryObject<Block> blockTestifiBucksWhiteFence
= BLOCKS.register("block_testifi_bucks_white_fence", () -> new BlockWallAA("block_testifi_bucks_white_fence", blockTestifiBucksWhiteWall); = BLOCKS.register("block_testifi_bucks_white_fence", () -> new BlockWallAA(blockTestifiBucksWhiteWall);
public static final RegistryObject<Block> blockColoredLamp public static final RegistryObject<Block> blockColoredLamp
= BLOCKS.register("block_colored_lamp", () -> new BlockColoredLamp(false)); = BLOCKS.register("block_colored_lamp", () -> new BlockColoredLamp(false));

View file

@ -29,7 +29,7 @@ import net.minecraftforge.fluids.capability.templates.FluidTank;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.Random; import java.util.Random;
public abstract class BlockContainerBase extends ContainerBlock { public abstract class BlockContainerBase extends Block {
public BlockContainerBase(Properties properties) { public BlockContainerBase(Properties properties) {
super(properties); super(properties);