mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-26 13:18:34 +01:00
tiny bit of work, I need to reconfigure intellij, it somehow doesn't understand how imports work anymore lol
This commit is contained in:
parent
acff6c2658
commit
ab13ff9cee
5 changed files with 30 additions and 199 deletions
|
@ -87,7 +87,6 @@ public final class NaturesAura {
|
||||||
|
|
||||||
Compat.preInit();
|
Compat.preInit();
|
||||||
PacketHandler.init();
|
PacketHandler.init();
|
||||||
ModRegistry.preInit(event);
|
|
||||||
ModEntities.init();
|
ModEntities.init();
|
||||||
new Multiblocks();
|
new Multiblocks();
|
||||||
|
|
||||||
|
@ -107,7 +106,6 @@ public final class NaturesAura {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void postInit(FMLCommonSetupEvent event) {
|
public void postInit(FMLCommonSetupEvent event) {
|
||||||
ModRegistry.postInit(event);
|
|
||||||
Compat.postInit();
|
Compat.postInit();
|
||||||
proxy.postInit(event);
|
proxy.postInit(event);
|
||||||
|
|
||||||
|
|
|
@ -1,37 +1,33 @@
|
||||||
package de.ellpeck.naturesaura.blocks;
|
package de.ellpeck.naturesaura.blocks;
|
||||||
|
|
||||||
import de.ellpeck.naturesaura.blocks.tiles.TileEntityGratedChute;
|
import de.ellpeck.naturesaura.blocks.tiles.TileEntityGratedChute;
|
||||||
|
import net.minecraft.block.BlockRenderType;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.HopperBlock;
|
import net.minecraft.block.HopperBlock;
|
||||||
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.block.properties.PropertyDirection;
|
|
||||||
import net.minecraft.block.state.BlockFaceShape;
|
|
||||||
import net.minecraft.block.state.BlockStateContainer;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.entity.LivingEntity;
|
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.state.DirectionProperty;
|
import net.minecraft.state.DirectionProperty;
|
||||||
|
import net.minecraft.state.StateContainer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.*;
|
import net.minecraft.util.BlockRenderLayer;
|
||||||
|
import net.minecraft.util.Direction;
|
||||||
|
import net.minecraft.util.Hand;
|
||||||
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.util.math.BlockRayTraceResult;
|
import net.minecraft.util.math.BlockRayTraceResult;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.util.math.shapes.VoxelShape;
|
import net.minecraft.util.math.shapes.VoxelShape;
|
||||||
import net.minecraft.util.math.shapes.VoxelShapes;
|
import net.minecraft.world.IWorld;
|
||||||
import net.minecraft.world.IBlockAccess;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.api.distmarker.Dist;
|
import net.minecraftforge.api.distmarker.Dist;
|
||||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||||
import net.minecraftforge.items.IItemHandler;
|
import net.minecraftforge.items.IItemHandler;
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class BlockGratedChute extends BlockContainerImpl {
|
public class BlockGratedChute extends BlockContainerImpl {
|
||||||
|
|
||||||
|
// TODO voxel shape stuff
|
||||||
public static final DirectionProperty FACING = HopperBlock.FACING;
|
public static final DirectionProperty FACING = HopperBlock.FACING;
|
||||||
private static final AxisAlignedBB BASE_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.625D, 1.0D);
|
private static final AxisAlignedBB BASE_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.625D, 1.0D);
|
||||||
private static final AxisAlignedBB SOUTH_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 0.125D);
|
private static final AxisAlignedBB SOUTH_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 1.0D, 0.125D);
|
||||||
|
@ -46,12 +42,6 @@ public class BlockGratedChute extends BlockContainerImpl {
|
||||||
private static final VoxelShape BASE_EAST = makeCuboidShape(0, 9, 0, 1, 16, 16);
|
private static final VoxelShape BASE_EAST = makeCuboidShape(0, 9, 0, 1, 16, 16);
|
||||||
private static final VoxelShape BASE_BOTTOM = makeCuboidShape(4, 4, 4, 12, 9, 12);
|
private static final VoxelShape BASE_BOTTOM = makeCuboidShape(4, 4, 4, 12, 9, 12);
|
||||||
|
|
||||||
private static VoxelShape BASE = VoxelShapes.combine()
|
|
||||||
|
|
||||||
private static final VoxelShape SHAPES[] {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public BlockGratedChute() {
|
public BlockGratedChute() {
|
||||||
super("grated_chute", TileEntityGratedChute.class, "grated_chute", ModBlocks.prop(Material.IRON).hardnessAndResistance(3.0F, 8.0F).sound(SoundType.METAL));
|
super("grated_chute", TileEntityGratedChute.class, "grated_chute", ModBlocks.prop(Material.IRON).hardnessAndResistance(3.0F, 8.0F).sound(SoundType.METAL));
|
||||||
}
|
}
|
||||||
|
@ -72,51 +62,16 @@ public class BlockGratedChute extends BlockContainerImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AxisAlignedBB getBoundingBox(BlockState state, IBlockAccess source, BlockPos pos) {
|
public BlockState getStateForPlacement(BlockState state, Direction facing, BlockState state2, IWorld world, BlockPos pos1, BlockPos pos2, Hand hand) {
|
||||||
return FULL_BLOCK_AABB;
|
Direction newFacing = facing.getOpposite();
|
||||||
|
if (newFacing == Direction.UP)
|
||||||
|
newFacing = Direction.DOWN;
|
||||||
|
return this.getDefaultState().with(FACING, newFacing);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addCollisionBoxToList(BlockState state, World worldIn, BlockPos pos, AxisAlignedBB entityBox, List<AxisAlignedBB> collidingBoxes, @Nullable Entity entityIn, boolean isActualState) {
|
public BlockRenderType getRenderType(BlockState state) {
|
||||||
addCollisionBoxToList(pos, entityBox, collidingBoxes, BASE_AABB);
|
return BlockRenderType.MODEL;
|
||||||
addCollisionBoxToList(pos, entityBox, collidingBoxes, EAST_AABB);
|
|
||||||
addCollisionBoxToList(pos, entityBox, collidingBoxes, WEST_AABB);
|
|
||||||
addCollisionBoxToList(pos, entityBox, collidingBoxes, SOUTH_AABB);
|
|
||||||
addCollisionBoxToList(pos, entityBox, collidingBoxes, NORTH_AABB);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, LivingEntity placer) {
|
|
||||||
EnumFacing newFacing = facing.getOpposite();
|
|
||||||
if (newFacing == EnumFacing.UP)
|
|
||||||
newFacing = EnumFacing.DOWN;
|
|
||||||
return this.getDefaultState().withProperty(FACING, newFacing);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isTopSolid(BlockState state) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public EnumBlockRenderType getRenderType(BlockState state) {
|
|
||||||
return EnumBlockRenderType.MODEL;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isFullCube(BlockState state) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isOpaqueCube(BlockState state) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
|
||||||
public boolean shouldSideBeRendered(BlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) {
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -144,32 +99,7 @@ public class BlockGratedChute extends BlockContainerImpl {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BlockState getStateFromMeta(int meta) {
|
protected void fillStateContainer(StateContainer.Builder<net.minecraft.block.Block, BlockState> builder) {
|
||||||
return this.getDefaultState().withProperty(FACING, EnumFacing.byIndex(meta));
|
builder.add(FACING);
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getMetaFromState(BlockState state) {
|
|
||||||
return state.getValue(FACING).getIndex();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockState withRotation(BlockState state, Rotation rot) {
|
|
||||||
return state.withProperty(FACING, rot.rotate(state.getValue(FACING)));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockState withMirror(BlockState state, Mirror mirrorIn) {
|
|
||||||
return state.withRotation(mirrorIn.toRotation(state.getValue(FACING)));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected BlockStateContainer createBlockState() {
|
|
||||||
return new BlockStateContainer(this, FACING);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockFaceShape getBlockFaceShape(IBlockAccess worldIn, BlockState state, BlockPos pos, EnumFacing face) {
|
|
||||||
return face == EnumFacing.UP ? BlockFaceShape.BOWL : BlockFaceShape.UNDEFINED;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,107 +7,59 @@ import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.block.material.MaterialColor;
|
import net.minecraft.block.material.MaterialColor;
|
||||||
import net.minecraftforge.registries.ObjectHolder;
|
import net.minecraftforge.registries.ObjectHolder;
|
||||||
|
|
||||||
public class ModBlocks {
|
@SuppressWarnings("FieldNamingConvention")
|
||||||
|
@ObjectHolder(NaturesAura.MOD_ID)
|
||||||
|
public final class ModBlocks {
|
||||||
|
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":ancient_log")
|
|
||||||
public static Block ANCIENT_LOG;
|
public static Block ANCIENT_LOG;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":ancient_bark")
|
|
||||||
public static Block ANCIENT_BARK;
|
public static Block ANCIENT_BARK;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":ancient_planks")
|
|
||||||
public static Block ANCIENT_PLANKS;
|
public static Block ANCIENT_PLANKS;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":ancient_stairs")
|
|
||||||
public static Block ANCIENT_STAIRS;
|
public static Block ANCIENT_STAIRS;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":ancient_slab")
|
|
||||||
public static Block ANCIENT_SLAB;
|
public static Block ANCIENT_SLAB;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":ancient_leaves")
|
|
||||||
public static Block ANCIENT_LEAVES;
|
public static Block ANCIENT_LEAVES;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":ancient_sapling")
|
|
||||||
public static Block ANCIENT_SAPLING;
|
public static Block ANCIENT_SAPLING;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":nature_altar")
|
|
||||||
public static Block NATURE_ALTAR;
|
public static Block NATURE_ALTAR;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":decayed_leaves")
|
|
||||||
public static Block DECAYED_LEAVES;
|
public static Block DECAYED_LEAVES;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":golden_leaves")
|
|
||||||
public static Block GOLDEN_LEAVES;
|
public static Block GOLDEN_LEAVES;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":gold_powder")
|
|
||||||
public static Block GOLD_POWDER;
|
public static Block GOLD_POWDER;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":wood_stand")
|
|
||||||
public static Block WOOD_STAND;
|
public static Block WOOD_STAND;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":infused_stone")
|
|
||||||
public static Block INFUSED_STONE;
|
public static Block INFUSED_STONE;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":infused_stairs")
|
|
||||||
public static Block INFUSED_STAIRS;
|
public static Block INFUSED_STAIRS;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":infused_slab")
|
|
||||||
public static Block INFUSED_SLAB;
|
public static Block INFUSED_SLAB;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":infused_brick")
|
|
||||||
public static Block INFUSED_BRICK;
|
public static Block INFUSED_BRICK;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":infused_brick_stairs")
|
|
||||||
public static Block INFUSED_BRICK_STAIRS;
|
public static Block INFUSED_BRICK_STAIRS;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":infused_brick_slab")
|
|
||||||
public static Block INFUSED_BRICK_SLAB;
|
public static Block INFUSED_BRICK_SLAB;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":furnace_heater")
|
|
||||||
public static Block FURNACE_HEATER;
|
public static Block FURNACE_HEATER;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":potion_generator")
|
|
||||||
public static Block POTION_GENERATOR;
|
public static Block POTION_GENERATOR;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":aura_detector")
|
|
||||||
public static Block AURA_DETECTOR;
|
public static Block AURA_DETECTOR;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":conversion_catalyst")
|
|
||||||
public static Block CONVERSION_CATALYST;
|
public static Block CONVERSION_CATALYST;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":crushing_catalyst")
|
|
||||||
public static Block CRUSHING_CATALYST;
|
public static Block CRUSHING_CATALYST;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":flower_generator")
|
|
||||||
public static Block FLOWER_GENERATOR;
|
public static Block FLOWER_GENERATOR;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":placer")
|
|
||||||
public static Block PLACER;
|
public static Block PLACER;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":hopper_upgrade")
|
|
||||||
public static Block HOPPER_UPGRADE;
|
public static Block HOPPER_UPGRADE;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":field_creator")
|
|
||||||
public static Block FIELD_CREATOR;
|
public static Block FIELD_CREATOR;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":oak_generator")
|
|
||||||
public static Block OAK_GENERATOR;
|
public static Block OAK_GENERATOR;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":infused_iron_block")
|
|
||||||
public static Block INFUSED_IRON;
|
public static Block INFUSED_IRON;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":offering_table")
|
|
||||||
public static Block OFFERING_TABLE;
|
public static Block OFFERING_TABLE;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":pickup_stopper")
|
|
||||||
public static Block PICKUP_STOPPER;
|
public static Block PICKUP_STOPPER;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":spawn_lamp")
|
|
||||||
public static Block SPAWN_LAMP;
|
public static Block SPAWN_LAMP;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":animal_generator")
|
|
||||||
public static Block ANIMAL_GENERATOR;
|
public static Block ANIMAL_GENERATOR;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":end_flower")
|
|
||||||
public static Block END_FLOWER;
|
public static Block END_FLOWER;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":grated_chute")
|
|
||||||
public static Block GRATED_CHUTE;
|
public static Block GRATED_CHUTE;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":animal_spawner")
|
|
||||||
public static Block ANIMAL_SPAWNER;
|
public static Block ANIMAL_SPAWNER;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":auto_crafter")
|
|
||||||
public static Block AUTO_CRAFTER;
|
public static Block AUTO_CRAFTER;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":gold_brick")
|
|
||||||
public static Block GOLD_BRICK;
|
public static Block GOLD_BRICK;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":rf_converter")
|
|
||||||
public static Block RF_CONVERTER;
|
public static Block RF_CONVERTER;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":moss_generator")
|
|
||||||
public static Block MOSS_GENERATOR;
|
public static Block MOSS_GENERATOR;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":time_changer")
|
|
||||||
public static Block TIME_CHANGER;
|
public static Block TIME_CHANGER;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":generator_limit_remover")
|
|
||||||
public static Block GENERATOR_LIMIT_REMOVER;
|
public static Block GENERATOR_LIMIT_REMOVER;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":ender_crate")
|
|
||||||
public static Block ENDER_CRATE;
|
public static Block ENDER_CRATE;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":powder_placer")
|
|
||||||
public static Block POWDER_PLACER;
|
public static Block POWDER_PLACER;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":firework_generator")
|
|
||||||
public static Block FIREWORK_GENERATOR;
|
public static Block FIREWORK_GENERATOR;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":projectile_generator")
|
|
||||||
public static Block PROJECTILE_GENERATOR;
|
public static Block PROJECTILE_GENERATOR;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":chunk_loader")
|
|
||||||
public static Block CHUNK_LOADER;
|
public static Block CHUNK_LOADER;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":dimentional_rail_overworld")
|
|
||||||
public static Block DIMENSION_RAIL_OVERWORLD;
|
public static Block DIMENSION_RAIL_OVERWORLD;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":dimentional_rail_nether")
|
|
||||||
public static Block DIMENSION_RAIL_NETHER;
|
public static Block DIMENSION_RAIL_NETHER;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":dimentional_rail_end")
|
|
||||||
public static Block DIMENSION_RAIL_END;
|
public static Block DIMENSION_RAIL_END;
|
||||||
|
|
||||||
public static Block.Properties prop(Material material, MaterialColor color) {
|
public static Block.Properties prop(Material material, MaterialColor color) {
|
||||||
|
|
|
@ -4,85 +4,47 @@ import de.ellpeck.naturesaura.NaturesAura;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraftforge.registries.ObjectHolder;
|
import net.minecraftforge.registries.ObjectHolder;
|
||||||
|
|
||||||
public class ModItems {
|
@SuppressWarnings("FieldNamingConvention")
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":infused_iron_pickaxe")
|
@ObjectHolder(NaturesAura.MOD_ID)
|
||||||
|
public final class ModItems {
|
||||||
public static Item INFUSED_PICKAXE;
|
public static Item INFUSED_PICKAXE;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":infused_iron_axe")
|
|
||||||
public static Item INFUSED_AXE;
|
public static Item INFUSED_AXE;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":infused_iron_shovel")
|
|
||||||
public static Item INFUSED_SHOVEL;
|
public static Item INFUSED_SHOVEL;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":infused_iron_hoe")
|
|
||||||
public static Item INFUSED_HOE;
|
public static Item INFUSED_HOE;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":infused_iron_sword")
|
|
||||||
public static Item INFUSED_SWORD;
|
public static Item INFUSED_SWORD;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":infused_iron_helmet")
|
|
||||||
public static Item INFUSED_HELMET;
|
public static Item INFUSED_HELMET;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":infused_iron_chest")
|
|
||||||
public static Item INFUSED_CHEST;
|
public static Item INFUSED_CHEST;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":infused_iron_pants")
|
|
||||||
public static Item INFUSED_PANTS;
|
public static Item INFUSED_PANTS;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":infused_iron_shoes")
|
|
||||||
public static Item INFUSED_SHOES;
|
public static Item INFUSED_SHOES;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":eye")
|
|
||||||
public static Item EYE;
|
public static Item EYE;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":eye_improved")
|
|
||||||
public static Item EYE_IMPROVED;
|
public static Item EYE_IMPROVED;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":gold_fiber")
|
|
||||||
public static Item GOLD_FIBER;
|
public static Item GOLD_FIBER;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":gold_leaf")
|
|
||||||
public static Item GOLD_LEAF;
|
public static Item GOLD_LEAF;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":infused_iron")
|
|
||||||
public static Item INFUSED_IRON;
|
public static Item INFUSED_IRON;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":ancient_stick")
|
|
||||||
public static Item ANCIENT_STICK;
|
public static Item ANCIENT_STICK;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":color_changer")
|
|
||||||
public static Item COLOR_CHANGER;
|
public static Item COLOR_CHANGER;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":aura_cache")
|
|
||||||
public static Item AURA_CACHE;
|
public static Item AURA_CACHE;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":aura_trove")
|
|
||||||
public static Item AURA_TROVE;
|
public static Item AURA_TROVE;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":shockwave_creator")
|
|
||||||
public static Item SHOCKWAVE_CREATOR;
|
public static Item SHOCKWAVE_CREATOR;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":multiblock_maker")
|
|
||||||
public static Item MULTIBLOCK_MAKER;
|
public static Item MULTIBLOCK_MAKER;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":bottle_two_the_rebottling")
|
|
||||||
public static Item BOTTLE_TWO;
|
public static Item BOTTLE_TWO;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":aura_bottle")
|
|
||||||
public static Item AURA_BOTTLE;
|
public static Item AURA_BOTTLE;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":farming_stencil")
|
|
||||||
public static Item FARMING_STENCIL;
|
public static Item FARMING_STENCIL;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":sky_ingot")
|
|
||||||
public static Item SKY_INGOT;
|
public static Item SKY_INGOT;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":calling_spirit")
|
|
||||||
public static Item CALLING_SPIRIT;
|
public static Item CALLING_SPIRIT;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":effect_powder")
|
|
||||||
public static Item EFFECT_POWDER;
|
public static Item EFFECT_POWDER;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":birth_spirit")
|
|
||||||
public static Item BIRTH_SPIRIT;
|
public static Item BIRTH_SPIRIT;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":mover_cart")
|
|
||||||
public static Item MOVER_MINECART;
|
public static Item MOVER_MINECART;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":range_visualizer")
|
|
||||||
public static Item RANGE_VISUALIZER;
|
public static Item RANGE_VISUALIZER;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":clock_hand")
|
|
||||||
public static Item CLOCK_HAND;
|
public static Item CLOCK_HAND;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":token_joy")
|
|
||||||
public static Item TOKEN_JOY;
|
public static Item TOKEN_JOY;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":token_fear")
|
|
||||||
public static Item TOKEN_FEAR;
|
public static Item TOKEN_FEAR;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":token_anger")
|
|
||||||
public static Item TOKEN_ANGER;
|
public static Item TOKEN_ANGER;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":token_sorrow")
|
|
||||||
public static Item TOKEN_SORROW;
|
public static Item TOKEN_SORROW;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":token_euphoria")
|
|
||||||
public static Item TOKEN_EUPHORIA;
|
public static Item TOKEN_EUPHORIA;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":token_terror")
|
|
||||||
public static Item TOKEN_TERROR;
|
public static Item TOKEN_TERROR;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":token_rage")
|
|
||||||
public static Item TOKEN_RAGE;
|
public static Item TOKEN_RAGE;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":token_grief")
|
|
||||||
public static Item TOKEN_GRIEF;
|
public static Item TOKEN_GRIEF;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":ender_access")
|
|
||||||
public static Item ENDER_ACCESS;
|
public static Item ENDER_ACCESS;
|
||||||
@ObjectHolder(NaturesAura.MOD_ID + ":cave_finder")
|
|
||||||
public static Item CAVE_FINDER;
|
public static Item CAVE_FINDER;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,25 +8,19 @@ import de.ellpeck.naturesaura.items.tools.*;
|
||||||
import net.minecraft.block.Block;
|
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.client.renderer.model.ModelResourceLocation;
|
|
||||||
import net.minecraft.inventory.EquipmentSlotType;
|
import net.minecraft.inventory.EquipmentSlotType;
|
||||||
import net.minecraft.item.BlockItem;
|
import net.minecraft.item.BlockItem;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemGroup;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.potion.Effect;
|
import net.minecraft.potion.Effect;
|
||||||
import net.minecraft.tileentity.TileEntityType;
|
import net.minecraft.tileentity.TileEntityType;
|
||||||
import net.minecraft.world.dimension.DimensionType;
|
import net.minecraft.world.dimension.DimensionType;
|
||||||
import net.minecraftforge.event.RegistryEvent;
|
import net.minecraftforge.event.RegistryEvent;
|
||||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
|
||||||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||||
import net.minecraftforge.registries.ForgeRegistries;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
@Mod.EventBusSubscriber
|
@Mod.EventBusSubscriber
|
||||||
public final class ModRegistry {
|
public final class ModRegistry {
|
||||||
|
@ -90,18 +84,14 @@ public final class ModRegistry {
|
||||||
new BlockDimensionRail("end", DimensionType.THE_END, DimensionType.OVERWORLD)
|
new BlockDimensionRail("end", DimensionType.THE_END, DimensionType.OVERWORLD)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (ModConfig.enabledFeatures.rfConverter) {
|
if (ModConfig.enabledFeatures.rfConverter)
|
||||||
event.getRegistry().register(new BlockRFConverter());
|
event.getRegistry().register(new BlockRFConverter());
|
||||||
}
|
if (ModConfig.enabledFeatures.chunkLoader)
|
||||||
|
|
||||||
if (ModConfig.enabledFeatures.chunkLoader) {
|
|
||||||
event.getRegistry().register(new BlockChunkLoader());
|
event.getRegistry().register(new BlockChunkLoader());
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void registerItems(RegistryEvent.Register<Item> event) {
|
public static void registerItems(RegistryEvent.Register<Item> event) {
|
||||||
|
|
||||||
for (IModItem item : ALL_ITEMS) {
|
for (IModItem item : ALL_ITEMS) {
|
||||||
if (item instanceof Block) {
|
if (item instanceof Block) {
|
||||||
if (item instanceof ICustomItemBlockProvider) {
|
if (item instanceof ICustomItemBlockProvider) {
|
||||||
|
@ -117,7 +107,7 @@ public final class ModRegistry {
|
||||||
new Axe("infused_iron_axe", NAItemTier.INFUSED, 8.25F, 3.2F),
|
new Axe("infused_iron_axe", NAItemTier.INFUSED, 8.25F, 3.2F),
|
||||||
new Shovel("infused_iron_shovel", NAItemTier.INFUSED, 8.25F, 3.2F),
|
new Shovel("infused_iron_shovel", NAItemTier.INFUSED, 8.25F, 3.2F),
|
||||||
new Hoe("infused_iron_hoe", NAItemTier.INFUSED, 3.2F),
|
new Hoe("infused_iron_hoe", NAItemTier.INFUSED, 3.2F),
|
||||||
new Sword("infused_iron_sword", NAItemTier.INFUSED, 3, 3), // dmg and speed values need to be changed
|
new Sword("infused_iron_sword", NAItemTier.INFUSED, 3, 3), // TODO dmg and speed values need to be changed
|
||||||
new Armor("infused_iron_helmet", NAArmorMaterial.INFUSED, EquipmentSlotType.HEAD),
|
new Armor("infused_iron_helmet", NAArmorMaterial.INFUSED, EquipmentSlotType.HEAD),
|
||||||
new Armor("infused_iron_chest", NAArmorMaterial.INFUSED, EquipmentSlotType.CHEST),
|
new Armor("infused_iron_chest", NAArmorMaterial.INFUSED, EquipmentSlotType.CHEST),
|
||||||
new Armor("infused_iron_pants", NAArmorMaterial.INFUSED, EquipmentSlotType.LEGS),
|
new Armor("infused_iron_pants", NAArmorMaterial.INFUSED, EquipmentSlotType.LEGS),
|
||||||
|
@ -165,18 +155,16 @@ public final class ModRegistry {
|
||||||
public static void registerPotions(RegistryEvent.Register<Effect> event) {
|
public static void registerPotions(RegistryEvent.Register<Effect> event) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
private static void registerPotion(Effect potion, String name) {
|
private static void registerPotion(Effect potion, String name) {
|
||||||
potion.setPotionName("potion." + NaturesAura.MOD_ID + "." + name + ".name");
|
potion.setRegistryName("potion." + NaturesAura.MOD_ID + "." + name + ".name");
|
||||||
|
|
||||||
potion.setRegistryName(NaturesAura.MOD_ID, name);
|
potion.setRegistryName(NaturesAura.MOD_ID, name);
|
||||||
ForgeRegistries.POTIONS.register(potion);
|
ForgeRegistries.POTIONS.register(potion);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void registerItem(Item item, String name, ItemGroup tab) {
|
private static void registerItem(Item item, String name, ItemGroup tab) {
|
||||||
item.setTranslationKey(NaturesAura.MOD_ID + "." + name);
|
|
||||||
|
|
||||||
item.setRegistryName(NaturesAura.MOD_ID, name);
|
item.setRegistryName(NaturesAura.MOD_ID, name);
|
||||||
ForgeRegistries.ITEMS.register(item);
|
ForgeRegistries.ITEMS.register(item);
|
||||||
|
|
||||||
|
@ -232,6 +220,7 @@ public final class ModRegistry {
|
||||||
item.onPreInit(event);
|
item.onPreInit(event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
public static void init(FMLCommonSetupEvent event) {
|
public static void init(FMLCommonSetupEvent event) {
|
||||||
for (IModItem item : ALL_ITEMS) {
|
for (IModItem item : ALL_ITEMS) {
|
||||||
|
|
Loading…
Reference in a new issue