Updated decorative blocks (removing reactor frames)
|
@ -2,6 +2,7 @@ package cr0s.warpdrive.block.decoration;
|
|||
|
||||
import cr0s.warpdrive.block.BlockAbstractBase;
|
||||
import cr0s.warpdrive.data.EnumDecorativeType;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.PropertyEnum;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
|
@ -9,7 +10,11 @@ import net.minecraft.block.state.IBlockState;
|
|||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import cr0s.warpdrive.WarpDrive;
|
||||
import cr0s.warpdrive.data.EnumTier;
|
||||
|
@ -17,6 +22,9 @@ import cr0s.warpdrive.data.EnumTier;
|
|||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockDecorative extends BlockAbstractBase {
|
||||
|
||||
public static final PropertyEnum<EnumDecorativeType> TYPE = PropertyEnum.create("type", EnumDecorativeType.class);
|
||||
|
@ -45,7 +53,7 @@ public class BlockDecorative extends BlockAbstractBase {
|
|||
@Override
|
||||
public IBlockState getStateFromMeta(final int metadata) {
|
||||
return getDefaultState()
|
||||
.withProperty(TYPE, EnumDecorativeType.get(metadata));
|
||||
.withProperty(TYPE, EnumDecorativeType.byMetadata(metadata));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -66,6 +74,42 @@ public class BlockDecorative extends BlockAbstractBase {
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isOpaqueCube(final IBlockState blockState) {
|
||||
return blockState.getValue(TYPE) != EnumDecorativeType.GLASS;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isTranslucent(final IBlockState blockState) {
|
||||
return blockState.getValue(TYPE) == EnumDecorativeType.GLASS;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public boolean shouldSideBeRendered(final IBlockState blockState, @Nonnull final IBlockAccess blockAccess, @Nonnull final BlockPos blockPos, final EnumFacing facing) {
|
||||
final BlockPos blockPosSide = blockPos.offset(facing);
|
||||
final IBlockState blockStateSide = blockAccess.getBlockState(blockPosSide);
|
||||
if (blockStateSide.getBlock().isAir(blockStateSide, blockAccess, blockPosSide)) {
|
||||
return true;
|
||||
}
|
||||
final EnumFacing opposite = facing.getOpposite();
|
||||
if ( blockStateSide.getBlock() instanceof BlockDecorative ) {
|
||||
return !( blockState.getValue(TYPE) == EnumDecorativeType.GLASS
|
||||
&& blockStateSide.getValue(TYPE) == EnumDecorativeType.GLASS );
|
||||
}
|
||||
return !blockAccess.isSideSolid(blockPosSide, opposite, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(final IBlockState blockState) {
|
||||
return blockState.getBlock().getMetaFromState(blockState);
|
||||
|
|
|
@ -19,6 +19,6 @@ public class ItemBlockDecorative extends ItemBlockAbstractBase {
|
|||
if (itemStack == null) {
|
||||
return getTranslationKey();
|
||||
}
|
||||
return getTranslationKey() + EnumDecorativeType.get(itemStack.getItemDamage()).getName();
|
||||
return getTranslationKey() + EnumDecorativeType.byMetadata(itemStack.getItemDamage()).getName();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,66 +0,0 @@
|
|||
package cr0s.warpdrive.block.energy;
|
||||
|
||||
import cr0s.warpdrive.block.BlockAbstractBase;
|
||||
import cr0s.warpdrive.config.WarpDriveConfig;
|
||||
import cr0s.warpdrive.data.EnumTier;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.block.BlockGlass;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockEnanReactorFrameGlass extends BlockAbstractBase {
|
||||
|
||||
public BlockEnanReactorFrameGlass(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.GLASS);
|
||||
|
||||
setHardness(WarpDriveConfig.HULL_HARDNESS[enumTier.getIndex()] / 3.0F);
|
||||
setResistance(WarpDriveConfig.HULL_BLAST_RESISTANCE[enumTier.getIndex()] / 3.0F * 5.0F / 3.0F);
|
||||
setTranslationKey("warpdrive.energy.enan_reactor_frame." + enumTier.getName());
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isOpaqueCube(final IBlockState blockState) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Override
|
||||
public boolean isTranslucent(final IBlockState blockState) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public BlockRenderLayer getRenderLayer() {
|
||||
return BlockRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public boolean shouldSideBeRendered(final IBlockState blockState, @Nonnull final IBlockAccess blockAccess, @Nonnull final BlockPos blockPos, final EnumFacing facing) {
|
||||
final BlockPos blockPosSide = blockPos.offset(facing);
|
||||
if (blockAccess.isAirBlock(blockPosSide)) {
|
||||
return true;
|
||||
}
|
||||
final EnumFacing opposite = facing.getOpposite();
|
||||
final IBlockState blockStateSide = blockAccess.getBlockState(blockPosSide);
|
||||
if ( blockStateSide.getBlock() instanceof BlockGlass
|
||||
|| blockStateSide.getBlock() instanceof BlockEnanReactorFrameGlass ) {
|
||||
return blockState.getBlock().getMetaFromState(blockState)
|
||||
!= blockStateSide.getBlock().getMetaFromState(blockStateSide);
|
||||
}
|
||||
return !blockAccess.isSideSolid(blockPosSide, opposite, false);
|
||||
}
|
||||
}
|
|
@ -1,74 +0,0 @@
|
|||
package cr0s.warpdrive.block.energy;
|
||||
|
||||
import cr0s.warpdrive.block.BlockAbstractBase;
|
||||
import cr0s.warpdrive.block.ItemBlockAbstractBase;
|
||||
import cr0s.warpdrive.config.WarpDriveConfig;
|
||||
import cr0s.warpdrive.data.BlockProperties;
|
||||
import cr0s.warpdrive.data.EnumFrameType;
|
||||
import cr0s.warpdrive.data.EnumTier;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.BlockStateContainer;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockEnanReactorFramePlain extends BlockAbstractBase {
|
||||
|
||||
public BlockEnanReactorFramePlain(final String registryName, final EnumTier enumTier) {
|
||||
super(registryName, enumTier, Material.ROCK);
|
||||
|
||||
setHardness(WarpDriveConfig.HULL_HARDNESS[enumTier.getIndex()] / 3.0F);
|
||||
setResistance(WarpDriveConfig.HULL_BLAST_RESISTANCE[enumTier.getIndex()] / 3.0F * 5.0F / 3.0F);
|
||||
setTranslationKey("warpdrive.energy.enan_reactor_frame." + enumTier.getName());
|
||||
|
||||
setDefaultState(getDefaultState()
|
||||
.withProperty(BlockProperties.FRAME, EnumFrameType.PLAIN)
|
||||
);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Nonnull
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(final int metadata) {
|
||||
return this.getDefaultState().withProperty(BlockProperties.FRAME, EnumFrameType.byMetadata(metadata));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(final IBlockState blockState) {
|
||||
return blockState.getValue(BlockProperties.FRAME).getMetadata();
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
protected BlockStateContainer createBlockState() {
|
||||
return new BlockStateContainer(this, BlockProperties.FRAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(final IBlockState blockState) {
|
||||
return blockState.getValue(BlockProperties.FRAME).getMetadata();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(final CreativeTabs creativeTab, final NonNullList<ItemStack> list) {
|
||||
for (final EnumFrameType enumFrameType : EnumFrameType.values()) {
|
||||
list.add(new ItemStack(this, 1, enumFrameType.getMetadata()));
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public ItemBlock createItemBlock() {
|
||||
return new ItemBlockAbstractBase(this, true, true);
|
||||
}
|
||||
}
|
|
@ -18,7 +18,6 @@ import cr0s.warpdrive.item.ItemTuningDriver;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.item.EnumDyeColor;
|
||||
|
||||
|
@ -88,8 +87,12 @@ public class Recipes {
|
|||
|
||||
// decoration
|
||||
registerOreDictionary("warpDecorative", BlockDecorative.getItemStack(EnumDecorativeType.PLAIN));
|
||||
registerOreDictionary("warpDecorative", BlockDecorative.getItemStack(EnumDecorativeType.ENERGIZED));
|
||||
registerOreDictionary("warpDecorative", BlockDecorative.getItemStack(EnumDecorativeType.NETWORK));
|
||||
registerOreDictionary("warpDecorative", BlockDecorative.getItemStack(EnumDecorativeType.GLASS));
|
||||
registerOreDictionary("warpDecorative", BlockDecorative.getItemStack(EnumDecorativeType.GRATED));
|
||||
registerOreDictionary("warpDecorative", BlockDecorative.getItemStack(EnumDecorativeType.STRIPES_BLACK_DOWN));
|
||||
registerOreDictionary("warpDecorative", BlockDecorative.getItemStack(EnumDecorativeType.STRIPES_BLACK_UP));
|
||||
registerOreDictionary("warpDecorative", BlockDecorative.getItemStack(EnumDecorativeType.STRIPES_YELLOW_DOWN));
|
||||
registerOreDictionary("warpDecorative", BlockDecorative.getItemStack(EnumDecorativeType.STRIPES_YELLOW_UP));
|
||||
|
||||
// tuning fork
|
||||
for (int dyeColor = 0; dyeColor < 16; dyeColor++) {
|
||||
|
@ -203,6 +206,8 @@ public class Recipes {
|
|||
'd', Blocks.DIAMOND_BLOCK));
|
||||
}
|
||||
|
||||
// @TODO implement machine casing from hull + iron bars/etc., gives 2
|
||||
|
||||
itemStackMachineCasings = new ItemStack[] { itemStackMachineCasingLV, itemStackMachineCasingMV, itemStackMachineCasingHV, itemStackMachineCasingEV };
|
||||
itemStackMotors = new ItemStack[] { itemStackMotorLV, itemStackMotorMV, itemStackMotorHV, itemStackMotorEV };
|
||||
|
||||
|
@ -1007,25 +1012,63 @@ public class Recipes {
|
|||
}
|
||||
|
||||
private static void initDecoration() {
|
||||
// Decorative blocks
|
||||
// Decorative blocks are metallic in nature
|
||||
// base block is very cheap (iron and paper)
|
||||
WarpDrive.register(new ShapedOreRecipe(groupDecorations,
|
||||
BlockDecorative.getItemStackNoCache(EnumDecorativeType.PLAIN, 8), false, "sss", "scs", "sss",
|
||||
's', Blocks.STONE,
|
||||
'c', Items.PAPER));
|
||||
BlockDecorative.getItemStackNoCache(EnumDecorativeType.PLAIN, 12), false, "ipi", "pbp", "ipi",
|
||||
'i', Items.IRON_INGOT,
|
||||
'b', Blocks.IRON_BARS,
|
||||
'p', Items.PAPER ));
|
||||
|
||||
// variations are 'died' from each others
|
||||
WarpDrive.register(new ShapedOreRecipe(groupDecorations,
|
||||
BlockDecorative.getItemStackNoCache(EnumDecorativeType.PLAIN, 8), false, "sss", "scs", "sss",
|
||||
's', "warpDecorative",
|
||||
'c', "dyeWhite"), "_dye");
|
||||
WarpDrive.register(new ShapedOreRecipe(groupDecorations,
|
||||
BlockDecorative.getItemStackNoCache(EnumDecorativeType.ENERGIZED, 8), false, "sss", "scs", "sss",
|
||||
BlockDecorative.getItemStackNoCache(EnumDecorativeType.GRATED, 8), false, "sss", "sbs", "sss",
|
||||
's', "warpDecorative",
|
||||
'c', "dyeRed"), "_dye");
|
||||
'b', barsIron ), "_dye");
|
||||
WarpDrive.register(new ShapedOreRecipe(groupDecorations,
|
||||
BlockDecorative.getItemStackNoCache(EnumDecorativeType.NETWORK, 8), false, "sss", "scs", "sss",
|
||||
BlockDecorative.getItemStackNoCache(EnumDecorativeType.GLASS, 8), false, "sss", "scs", "sss",
|
||||
's', "warpDecorative",
|
||||
'c', "dyeBlue"), "_dye");
|
||||
'c', "glass" ), "_dye");
|
||||
WarpDrive.register(new ShapedOreRecipe(groupDecorations,
|
||||
BlockDecorative.getItemStackNoCache(EnumDecorativeType.STRIPES_BLACK_DOWN, 7), false, "bss", "sss", "ssy",
|
||||
's', "warpDecorative",
|
||||
'b', "dyeBlack",
|
||||
'y', "dyeYellow" ), "_dye");
|
||||
WarpDrive.register(new ShapedOreRecipe(groupDecorations,
|
||||
BlockDecorative.getItemStackNoCache(EnumDecorativeType.STRIPES_BLACK_UP, 7), false, "ssy", "sss", "bss",
|
||||
's', "warpDecorative",
|
||||
'b', "dyeBlack",
|
||||
'y', "dyeYellow" ), "_dye");
|
||||
WarpDrive.register(new ShapedOreRecipe(groupDecorations,
|
||||
BlockDecorative.getItemStackNoCache(EnumDecorativeType.STRIPES_YELLOW_DOWN, 7), false, "yss", "sss", "ssb",
|
||||
's', "warpDecorative",
|
||||
'b', "dyeBlack",
|
||||
'y', "dyeYellow" ), "_dye");
|
||||
WarpDrive.register(new ShapedOreRecipe(groupDecorations,
|
||||
BlockDecorative.getItemStackNoCache(EnumDecorativeType.STRIPES_YELLOW_UP, 7), false, "ssb", "sss", "yss",
|
||||
's', "warpDecorative",
|
||||
'b', "dyeBlack",
|
||||
'y', "dyeYellow" ), "_dye");
|
||||
|
||||
// Lamp
|
||||
// stripes can toggled to each others (reducing dye consumption)
|
||||
WarpDrive.register(new ShapelessOreRecipe(groupDecorations,
|
||||
BlockDecorative.getItemStackNoCache(EnumDecorativeType.STRIPES_BLACK_DOWN, 1),
|
||||
BlockDecorative.getItemStackNoCache(EnumDecorativeType.STRIPES_BLACK_UP, 1) ), "_toggle");
|
||||
WarpDrive.register(new ShapelessOreRecipe(groupDecorations,
|
||||
BlockDecorative.getItemStackNoCache(EnumDecorativeType.STRIPES_BLACK_UP, 1),
|
||||
BlockDecorative.getItemStackNoCache(EnumDecorativeType.STRIPES_YELLOW_DOWN, 1) ), "_toggle");
|
||||
WarpDrive.register(new ShapelessOreRecipe(groupDecorations,
|
||||
BlockDecorative.getItemStackNoCache(EnumDecorativeType.STRIPES_YELLOW_DOWN, 1),
|
||||
BlockDecorative.getItemStackNoCache(EnumDecorativeType.STRIPES_YELLOW_UP, 1) ), "_toggle");
|
||||
WarpDrive.register(new ShapelessOreRecipe(groupDecorations,
|
||||
BlockDecorative.getItemStackNoCache(EnumDecorativeType.STRIPES_YELLOW_UP, 1),
|
||||
BlockDecorative.getItemStackNoCache(EnumDecorativeType.STRIPES_BLACK_DOWN, 1) ), "_toggle");
|
||||
|
||||
// Lamps
|
||||
WarpDrive.register(new ShapedOreRecipe(groupDecorations,
|
||||
WarpDrive.blockLamp_bubble, false, " g ", "glg", "h ",
|
||||
'g', "blockGlass",
|
||||
|
@ -1205,45 +1248,6 @@ public class Recipes {
|
|||
'l', ItemComponent.getItemStack(EnumComponentType.LENS),
|
||||
'S', ItemComponent.getItemStack(EnumComponentType.SUPERCONDUCTOR) ));
|
||||
|
||||
// Enantiomorphic reactor frame is 1 Hull block, 4 Iron bars, gives 4
|
||||
WarpDrive.register(new ShapedOreRecipe(groupMachines,
|
||||
new ItemStack(WarpDrive.blockEnanReactorFrames_plain[EnumTier.BASIC.getIndex()], 4, 0), false, " b ", "bhb", " b ",
|
||||
'h', "blockHull1_plain",
|
||||
'b', barsIron));
|
||||
WarpDrive.register(new ShapedOreRecipe(groupMachines,
|
||||
new ItemStack(WarpDrive.blockEnanReactorFrames_plain[EnumTier.ADVANCED.getIndex()], 4, 0), false, " b ", "bhb", " b ",
|
||||
'h', "blockHull2_plain",
|
||||
'b', barsIron));
|
||||
WarpDrive.register(new ShapedOreRecipe(groupMachines,
|
||||
new ItemStack(WarpDrive.blockEnanReactorFrames_plain[EnumTier.SUPERIOR.getIndex()], 4, 0), false, " b ", "bhb", " b ",
|
||||
'h', "blockHull3_plain",
|
||||
'b', barsIron));
|
||||
WarpDrive.register(new ShapedOreRecipe(groupMachines,
|
||||
new ItemStack(WarpDrive.blockEnanReactorFrames_glass[EnumTier.BASIC.getIndex()], 4, 0), false, " b ", "bhb", " b ",
|
||||
'h', "blockHull1_glass",
|
||||
'b', barsIron));
|
||||
WarpDrive.register(new ShapedOreRecipe(groupMachines,
|
||||
new ItemStack(WarpDrive.blockEnanReactorFrames_glass[EnumTier.ADVANCED.getIndex()], 4, 0), false, " b ", "bhb", " b ",
|
||||
'h', "blockHull2_glass",
|
||||
'b', barsIron));
|
||||
WarpDrive.register(new ShapedOreRecipe(groupMachines,
|
||||
new ItemStack(WarpDrive.blockEnanReactorFrames_glass[EnumTier.SUPERIOR.getIndex()], 4, 0), false, " b ", "bhb", " b ",
|
||||
'h', "blockHull3_glass",
|
||||
'b', barsIron));
|
||||
|
||||
// Enantiomorphic reactor frame symbols are from dies
|
||||
for (final EnumTier enumTier : EnumTier.nonCreative()) {
|
||||
final Block blockFrame = WarpDrive.blockEnanReactorFrames_plain[enumTier.getIndex()];
|
||||
WarpDrive.register(new ShapedOreRecipe(groupMachines,
|
||||
new ItemStack(blockFrame, 1, 1), false, " y ", " f ", "y y",
|
||||
'f', blockFrame,
|
||||
'y', "dyeYellow" ));
|
||||
WarpDrive.register(new ShapedOreRecipe(groupMachines,
|
||||
new ItemStack(blockFrame, 1, 2), false, " y ", "yf ", " y ",
|
||||
'f', blockFrame,
|
||||
'y', "dyeYellow" ));
|
||||
}
|
||||
|
||||
// Enantiomorphic reactor stabilization laser is 1 HV Machine casing, 2 Advanced hull, 1 Computer interface, 1 Power interface, 1 Lens, 1 Redstone, 2 Glass panes
|
||||
WarpDrive.register(new ShapedOreRecipe(groupMachines,
|
||||
new ItemStack(WarpDrive.blockEnanReactorLaser), false, "g h", "ldm", "g c",
|
||||
|
|
|
@ -2,7 +2,6 @@ package cr0s.warpdrive.data;
|
|||
|
||||
import net.minecraft.block.properties.PropertyBool;
|
||||
import net.minecraft.block.properties.PropertyDirection;
|
||||
import net.minecraft.block.properties.PropertyEnum;
|
||||
|
||||
public class BlockProperties {
|
||||
|
||||
|
@ -10,6 +9,5 @@ public class BlockProperties {
|
|||
public static final PropertyBool ACTIVE = PropertyBool.create("active");
|
||||
public static final UnlistedPropertyBlockState CAMOUFLAGE = new UnlistedPropertyBlockState("camouflage");
|
||||
public static final PropertyDirection FACING = PropertyDirection.create("facing");
|
||||
public static final PropertyEnum<EnumFrameType> FRAME = PropertyEnum.create("frame", EnumFrameType.class);
|
||||
|
||||
}
|
||||
|
|
|
@ -7,11 +7,17 @@ import java.util.HashMap;
|
|||
|
||||
public enum EnumDecorativeType implements IStringSerializable {
|
||||
|
||||
PLAIN ("plain"),
|
||||
ENERGIZED ("energized"),
|
||||
NETWORK ("network");
|
||||
PLAIN ("plain" , 0),
|
||||
GRATED ("grated" , 1),
|
||||
GLASS ("glass" , 2),
|
||||
STRIPES_BLACK_DOWN ("stripes_black_down" , 3),
|
||||
STRIPES_BLACK_UP ("stripes_black_up" , 4),
|
||||
STRIPES_YELLOW_DOWN ("stripes_yellow_down" , 5),
|
||||
STRIPES_YELLOW_UP ("stripes_yellow_up" , 6),
|
||||
;
|
||||
|
||||
private final String name;
|
||||
private final int metadata;
|
||||
|
||||
// cached values
|
||||
public static final int length;
|
||||
|
@ -19,22 +25,25 @@ public enum EnumDecorativeType implements IStringSerializable {
|
|||
|
||||
static {
|
||||
length = EnumDecorativeType.values().length;
|
||||
for (final EnumDecorativeType decorativeType : values()) {
|
||||
ID_MAP.put(decorativeType.ordinal(), decorativeType);
|
||||
for (final EnumDecorativeType enumDecorativeType : values()) {
|
||||
ID_MAP.put(enumDecorativeType.getMetadata(), enumDecorativeType);
|
||||
}
|
||||
}
|
||||
|
||||
EnumDecorativeType(final String name) {
|
||||
EnumDecorativeType(final String name, final int metadata) {
|
||||
this.name = name;
|
||||
this.metadata = metadata;
|
||||
}
|
||||
|
||||
public static EnumDecorativeType get(final int damage) {
|
||||
return ID_MAP.get(damage);
|
||||
public static EnumDecorativeType byMetadata(final int metadata) {
|
||||
return ID_MAP.get(metadata);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getName() {
|
||||
return name;
|
||||
public String getName() { return name; }
|
||||
|
||||
public int getMetadata() {
|
||||
return metadata;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,45 +0,0 @@
|
|||
package cr0s.warpdrive.data;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.HashMap;
|
||||
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
|
||||
public enum EnumFrameType implements IStringSerializable {
|
||||
|
||||
PLAIN ("plain" , 0),
|
||||
RADIATION ("radiation", 1),
|
||||
ELECTRIC ("electric" , 2),
|
||||
;
|
||||
|
||||
private final String name;
|
||||
private final int metadata;
|
||||
|
||||
// cached values
|
||||
public static final int length;
|
||||
private static final HashMap<Integer, EnumFrameType> ID_MAP = new HashMap<>();
|
||||
|
||||
static {
|
||||
length = EnumFrameType.values().length;
|
||||
for (final EnumFrameType enumFrameType : values()) {
|
||||
ID_MAP.put(enumFrameType.getMetadata(), enumFrameType);
|
||||
}
|
||||
}
|
||||
|
||||
EnumFrameType(final String name, final int metadata) {
|
||||
this.name = name;
|
||||
this.metadata = metadata;
|
||||
}
|
||||
|
||||
public static EnumFrameType byMetadata(final int metadata) {
|
||||
return ID_MAP.get(metadata);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getName() { return name; }
|
||||
|
||||
public int getMetadata() {
|
||||
return metadata;
|
||||
}
|
||||
}
|
71
src/main/java/cr0s/warpdrive/data/EnumStickerType.java
Normal file
|
@ -0,0 +1,71 @@
|
|||
package cr0s.warpdrive.data;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.HashMap;
|
||||
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
|
||||
public enum EnumStickerType implements IStringSerializable {
|
||||
|
||||
// directions
|
||||
ARROW_UP ("arrow_up" , 50),
|
||||
ARROW_DOWN ("arrow_down" , 51),
|
||||
ARROW_LEFT ("arrow_left" , 52),
|
||||
ARROW_RIGHT ("arrow_right" , 53),
|
||||
ARROW_VERTICAL ("arrow_vertical" , 54),
|
||||
ARROW_HORIZONTAL ("arrow_horizontal" , 55),
|
||||
ARROW_LEFT_TURN ("arrow_left_turn" , 56),
|
||||
ARROW_RIGHT_TURN ("arrow_right_turn" , 57),
|
||||
ARROW_Y ("arrow_y" , 58),
|
||||
ARROW_CROSS ("arrow_cross" , 59),
|
||||
|
||||
// hazards
|
||||
COLD ("cold" , 100),
|
||||
CORROSIVE ("corrosive" , 101), // skin irritation or corrosion, metal corrosion
|
||||
ELECTRIC ("electric" , 102),
|
||||
ENVIRONMENT ("environment" , 103), // dead fish
|
||||
EXPLOSIVE ("explosive" , 104),
|
||||
FLAMMABLE ("flammable" , 105), // flame
|
||||
HEALTH ("health" , 106),
|
||||
HEAT ("heat" , 107),
|
||||
INFECTIOUS ("infectious" , 108),
|
||||
LASER ("laser" , 109),
|
||||
NOISE ("noise" , 110), // noise reduction headset
|
||||
OXIDIZING ("oxidizing" , 111), // flame over circle
|
||||
PRESSURE ("pressure" , 112), // gaz pressure
|
||||
RADIATION ("radiation" , 113),
|
||||
TOXIC ("toxic" , 114), // acute toxicity is skull and crossbones
|
||||
WARNING ("warning" , 115), // exclamation mark
|
||||
;
|
||||
|
||||
private final String name;
|
||||
private final int metadata;
|
||||
|
||||
// cached values
|
||||
public static final int length;
|
||||
private static final HashMap<Integer, EnumStickerType> ID_MAP = new HashMap<>();
|
||||
|
||||
static {
|
||||
length = EnumStickerType.values().length;
|
||||
for (final EnumStickerType enumStickerType : values()) {
|
||||
ID_MAP.put(enumStickerType.getMetadata(), enumStickerType);
|
||||
}
|
||||
}
|
||||
|
||||
EnumStickerType(final String name, final int metadata) {
|
||||
this.name = name;
|
||||
this.metadata = metadata;
|
||||
}
|
||||
|
||||
public static EnumStickerType byMetadata(final int metadata) {
|
||||
return ID_MAP.get(metadata);
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String getName() { return name; }
|
||||
|
||||
public int getMetadata() {
|
||||
return metadata;
|
||||
}
|
||||
}
|
|
@ -11,9 +11,13 @@
|
|||
"normal": [{}],
|
||||
"inventory": [{}],
|
||||
"type": {
|
||||
"plain" : { "textures": { "all": "warpdrive:blocks/decoration/decorative-plain" } },
|
||||
"energized": { "textures": { "all": "warpdrive:blocks/decoration/decorative-energized" } },
|
||||
"network" : { "textures": { "all": "warpdrive:blocks/decoration/decorative-network" } }
|
||||
"plain" : { "textures": { "all": "warpdrive:blocks/decoration/decorative-plain" } },
|
||||
"grated" : { "textures": { "all": "warpdrive:blocks/decoration/decorative-grated" } },
|
||||
"glass" : { "textures": { "all": "warpdrive:blocks/decoration/decorative-glass" } },
|
||||
"stripes_black_down" : { "textures": { "all": "warpdrive:blocks/decoration/decorative-stripes_black_down" } },
|
||||
"stripes_black_up" : { "textures": { "all": "warpdrive:blocks/decoration/decorative-stripes_black_up" } },
|
||||
"stripes_yellow_down": { "textures": { "all": "warpdrive:blocks/decoration/decorative-stripes_yellow_down" } },
|
||||
"stripes_yellow_up" : { "textures": { "all": "warpdrive:blocks/decoration/decorative-stripes_yellow_up" } }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"model": "minecraft:cube_all",
|
||||
"textures": {
|
||||
"all": "warpdrive:blocks/energy/enan_reactor_frame_glass"
|
||||
},
|
||||
"transform": "forge:default-block"
|
||||
},
|
||||
"variants": {
|
||||
"normal": [{}],
|
||||
"inventory": [{}]
|
||||
}
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"model": "minecraft:cube_all",
|
||||
"textures": {
|
||||
"all": "warpdrive:blocks/energy/enan_reactor_frame_plain-plain"
|
||||
},
|
||||
"transform": "forge:default-block"
|
||||
},
|
||||
"variants": {
|
||||
"normal": [{}],
|
||||
"inventory": [{}],
|
||||
"frame": {
|
||||
"plain" : { "textures": { "all": "warpdrive:blocks/energy/enan_reactor_frame_plain-plain" } },
|
||||
"radiation" : { "textures": { "all": "warpdrive:blocks/energy/enan_reactor_frame_plain-radiation" } },
|
||||
"electric" : { "textures": { "all": "warpdrive:blocks/energy/enan_reactor_frame_plain-electric" } }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"model": "minecraft:cube_all",
|
||||
"textures": {
|
||||
"all": "warpdrive:blocks/energy/enan_reactor_frame_glass"
|
||||
},
|
||||
"transform": "forge:default-block"
|
||||
},
|
||||
"variants": {
|
||||
"normal": [{}],
|
||||
"inventory": [{}]
|
||||
}
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"model": "minecraft:cube_all",
|
||||
"textures": {
|
||||
"all": "warpdrive:blocks/energy/enan_reactor_frame_plain-plain"
|
||||
},
|
||||
"transform": "forge:default-block"
|
||||
},
|
||||
"variants": {
|
||||
"normal": [{}],
|
||||
"inventory": [{}],
|
||||
"frame": {
|
||||
"plain" : { "textures": { "all": "warpdrive:blocks/energy/enan_reactor_frame_plain-plain" } },
|
||||
"radiation" : { "textures": { "all": "warpdrive:blocks/energy/enan_reactor_frame_plain-radiation" } },
|
||||
"electric" : { "textures": { "all": "warpdrive:blocks/energy/enan_reactor_frame_plain-electric" } }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"model": "minecraft:cube_all",
|
||||
"textures": {
|
||||
"all": "warpdrive:blocks/energy/enan_reactor_frame_glass"
|
||||
},
|
||||
"transform": "forge:default-block"
|
||||
},
|
||||
"variants": {
|
||||
"normal": [{}],
|
||||
"inventory": [{}]
|
||||
}
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"model": "minecraft:cube_all",
|
||||
"textures": {
|
||||
"all": "warpdrive:blocks/energy/enan_reactor_frame_plain-plain"
|
||||
},
|
||||
"transform": "forge:default-block"
|
||||
},
|
||||
"variants": {
|
||||
"normal": [{}],
|
||||
"inventory": [{}],
|
||||
"frame": {
|
||||
"plain" : { "textures": { "all": "warpdrive:blocks/energy/enan_reactor_frame_plain-plain" } },
|
||||
"radiation" : { "textures": { "all": "warpdrive:blocks/energy/enan_reactor_frame_plain-radiation" } },
|
||||
"electric" : { "textures": { "all": "warpdrive:blocks/energy/enan_reactor_frame_plain-electric" } }
|
||||
}
|
||||
}
|
||||
}
|
|
@ -207,9 +207,13 @@ item.warpdrive.tool.wrench.tooltip=§bRight click a block§7 to rotate it
|
|||
|
||||
|
||||
tile.warpdrive.decoration.bedrock_glass.name=Bedrock Glass !!!
|
||||
tile.warpdrive.decoration.decorative.energized.name=Energiegeladener Block
|
||||
tile.warpdrive.decoration.decorative.network.name=Netzwerk Block
|
||||
tile.warpdrive.decoration.decorative.plain.name=Ebenen Block
|
||||
tile.warpdrive.decoration.decorative.plain.name=Plain metal decoration
|
||||
tile.warpdrive.decoration.decorative.grated.name=Grated metal decoration
|
||||
tile.warpdrive.decoration.decorative.glass.name=Grated glass decoration
|
||||
tile.warpdrive.decoration.decorative.stripes_black_down.name=Black & yellow stripes down
|
||||
tile.warpdrive.decoration.decorative.stripes_black_up.name=Black & yellow stripes up
|
||||
tile.warpdrive.decoration.decorative.stripes_yellow_down.name=Yellow & black stripes down
|
||||
tile.warpdrive.decoration.decorative.stripes_yellow_up.name=Yellow & black stripes up
|
||||
tile.warpdrive.decoration.gas.name=Gas Block
|
||||
tile.warpdrive.decoration.lamp_bubble.name=Bubble Lamp !!!
|
||||
tile.warpdrive.decoration.lamp_flat.name=Flat Lamp !!!
|
||||
|
|
|
@ -204,9 +204,13 @@ item.warpdrive.tool.wrench.tooltip=§bRight click a block§7 to rotate it
|
|||
|
||||
|
||||
tile.warpdrive.decoration.bedrock_glass.name=Bedrock Glass
|
||||
tile.warpdrive.decoration.decorative.energized.name=Energized Block
|
||||
tile.warpdrive.decoration.decorative.network.name=Network Block
|
||||
tile.warpdrive.decoration.decorative.plain.name=Plain Block
|
||||
tile.warpdrive.decoration.decorative.plain.name=Plain metal decoration
|
||||
tile.warpdrive.decoration.decorative.grated.name=Grated metal decoration
|
||||
tile.warpdrive.decoration.decorative.glass.name=Grated glass decoration
|
||||
tile.warpdrive.decoration.decorative.stripes_black_down.name=Black & yellow stripes down
|
||||
tile.warpdrive.decoration.decorative.stripes_black_up.name=Black & yellow stripes up
|
||||
tile.warpdrive.decoration.decorative.stripes_yellow_down.name=Yellow & black stripes down
|
||||
tile.warpdrive.decoration.decorative.stripes_yellow_up.name=Yellow & black stripes up
|
||||
tile.warpdrive.decoration.gas.name=Gas Block
|
||||
tile.warpdrive.decoration.lamp_bubble.name=Bubble Lamp
|
||||
tile.warpdrive.decoration.lamp_flat.name=Flat Lamp
|
||||
|
|
|
@ -204,9 +204,13 @@ item.warpdrive.tool.wrench.tooltip=§bCliques droit sur un block§7 pour le tour
|
|||
|
||||
|
||||
tile.warpdrive.decoration.bedrock_glass.name=Vitre de bedrock
|
||||
tile.warpdrive.decoration.decorative.energized.name=Block energisé
|
||||
tile.warpdrive.decoration.decorative.network.name=Bloc de réseau
|
||||
tile.warpdrive.decoration.decorative.plain.name=Bloc ordinaire
|
||||
tile.warpdrive.decoration.decorative.plain.name=Métal décoratif
|
||||
tile.warpdrive.decoration.decorative.grated.name=Métal rapé décoratif
|
||||
tile.warpdrive.decoration.decorative.glass.name=Vitre rapée décorative
|
||||
tile.warpdrive.decoration.decorative.stripes_black_down.name=Rayures noir et jaune descendante
|
||||
tile.warpdrive.decoration.decorative.stripes_black_up.name=Rayures noir et jaune montante
|
||||
tile.warpdrive.decoration.decorative.stripes_yellow_down.name=Rayures jaune et noir descendante
|
||||
tile.warpdrive.decoration.decorative.stripes_yellow_up.name=Rayures jaune et noir montante
|
||||
tile.warpdrive.decoration.gas.name=Bloc de gaz
|
||||
tile.warpdrive.decoration.lamp_bubble.name=Lampe bulle
|
||||
tile.warpdrive.decoration.lamp_flat.name=Lampe plate
|
||||
|
|
|
@ -204,9 +204,13 @@ item.warpdrive.tool.wrench.tooltip=§bRight click a block§7 to rotate it
|
|||
|
||||
|
||||
tile.warpdrive.decoration.bedrock_glass.name=Bedrock Glass
|
||||
tile.warpdrive.decoration.decorative.energized.name=Geactiveerd Blok
|
||||
tile.warpdrive.decoration.decorative.network.name=Netwerk Blok
|
||||
tile.warpdrive.decoration.decorative.plain.name=Oppervlaksblok
|
||||
tile.warpdrive.decoration.decorative.plain.name=Plain metal decoration
|
||||
tile.warpdrive.decoration.decorative.grated.name=Grated metal decoration
|
||||
tile.warpdrive.decoration.decorative.glass.name=Grated glass decoration
|
||||
tile.warpdrive.decoration.decorative.stripes_black_down.name=Black & yellow stripes down
|
||||
tile.warpdrive.decoration.decorative.stripes_black_up.name=Black & yellow stripes up
|
||||
tile.warpdrive.decoration.decorative.stripes_yellow_down.name=Yellow & black stripes down
|
||||
tile.warpdrive.decoration.decorative.stripes_yellow_up.name=Yellow & black stripes up
|
||||
tile.warpdrive.decoration.gas.name=Gasblok
|
||||
tile.warpdrive.decoration.lamp_bubble.name=Bubble Lamp
|
||||
tile.warpdrive.decoration.lamp_flat.name=Flat Lamp
|
||||
|
|
|
@ -204,9 +204,13 @@ item.warpdrive.tool.wrench.tooltip=§bRight click a block§7 to rotate it
|
|||
|
||||
|
||||
tile.warpdrive.decoration.bedrock_glass.name=Bedrock Glass
|
||||
tile.warpdrive.decoration.decorative.energized.name=Энергизированный блок
|
||||
tile.warpdrive.decoration.decorative.network.name=Сетевой блок
|
||||
tile.warpdrive.decoration.decorative.plain.name=Простой блок
|
||||
tile.warpdrive.decoration.decorative.plain.name=Plain metal decoration
|
||||
tile.warpdrive.decoration.decorative.grated.name=Grated metal decoration
|
||||
tile.warpdrive.decoration.decorative.glass.name=Grated glass decoration
|
||||
tile.warpdrive.decoration.decorative.stripes_black_down.name=Black & yellow stripes down
|
||||
tile.warpdrive.decoration.decorative.stripes_black_up.name=Black & yellow stripes up
|
||||
tile.warpdrive.decoration.decorative.stripes_yellow_down.name=Yellow & black stripes down
|
||||
tile.warpdrive.decoration.decorative.stripes_yellow_up.name=Yellow & black stripes up
|
||||
tile.warpdrive.decoration.gas.name=Газ
|
||||
tile.warpdrive.decoration.lamp_bubble.name=Bubble Lamp
|
||||
tile.warpdrive.decoration.lamp_flat.name=Flat Lamp
|
||||
|
|
|
@ -204,9 +204,13 @@ item.warpdrive.tool.wrench.tooltip=§bRight click a block§7 to rotate it
|
|||
|
||||
|
||||
tile.warpdrive.decoration.bedrock_glass.name=基岩玻璃
|
||||
tile.warpdrive.decoration.decorative.energized.name=能量方块
|
||||
tile.warpdrive.decoration.decorative.network.name=网络方块
|
||||
tile.warpdrive.decoration.decorative.plain.name=平坦方块
|
||||
tile.warpdrive.decoration.decorative.plain.name=Plain metal decoration
|
||||
tile.warpdrive.decoration.decorative.grated.name=Grated metal decoration
|
||||
tile.warpdrive.decoration.decorative.glass.name=Grated glass decoration
|
||||
tile.warpdrive.decoration.decorative.stripes_black_down.name=Black & yellow stripes down
|
||||
tile.warpdrive.decoration.decorative.stripes_black_up.name=Black & yellow stripes up
|
||||
tile.warpdrive.decoration.decorative.stripes_yellow_down.name=Yellow & black stripes down
|
||||
tile.warpdrive.decoration.decorative.stripes_yellow_up.name=Yellow & black stripes up
|
||||
tile.warpdrive.decoration.gas.name=气密方块
|
||||
tile.warpdrive.decoration.lamp_bubble.name=Bubble Lamp
|
||||
tile.warpdrive.decoration.lamp_flat.name=Flat Lamp
|
||||
|
|
|
@ -204,9 +204,13 @@ item.warpdrive.tool.wrench.tooltip=§bRight click a block§7 to rotate it
|
|||
|
||||
|
||||
tile.warpdrive.decoration.bedrock_glass.name=Bedrock Glass
|
||||
tile.warpdrive.decoration.decorative.energized.name=通電方塊
|
||||
tile.warpdrive.decoration.decorative.network.name=網絡方塊
|
||||
tile.warpdrive.decoration.decorative.plain.name=戰機方塊
|
||||
tile.warpdrive.decoration.decorative.plain.name=Plain metal decoration
|
||||
tile.warpdrive.decoration.decorative.grated.name=Grated metal decoration
|
||||
tile.warpdrive.decoration.decorative.glass.name=Grated glass decoration
|
||||
tile.warpdrive.decoration.decorative.stripes_black_down.name=Black & yellow stripes down
|
||||
tile.warpdrive.decoration.decorative.stripes_black_up.name=Black & yellow stripes up
|
||||
tile.warpdrive.decoration.decorative.stripes_yellow_down.name=Yellow & black stripes down
|
||||
tile.warpdrive.decoration.decorative.stripes_yellow_up.name=Yellow & black stripes up
|
||||
tile.warpdrive.decoration.gas.name=氣體方塊
|
||||
tile.warpdrive.decoration.lamp_bubble.name=Bubble Lamp
|
||||
tile.warpdrive.decoration.lamp_flat.name=Flat Lamp
|
||||
|
|
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 5.1 KiB |
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |