added crystal clusters

This commit is contained in:
Ellpeck 2017-02-13 23:17:08 +01:00
parent 910f4aaf9e
commit d9487f8ef3
29 changed files with 721 additions and 23 deletions

View file

@ -0,0 +1,144 @@
/*
* This file ("BlockCrystalCluster.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.blocks;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase;
import de.ellpeck.actuallyadditions.mod.gen.WorldGenLushCaves;
import de.ellpeck.actuallyadditions.mod.items.InitItems;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
import de.ellpeck.actuallyadditions.mod.util.IColorProvidingBlock;
import de.ellpeck.actuallyadditions.mod.util.IColorProvidingItem;
import net.minecraft.block.BlockDirectional;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.color.IBlockColor;
import net.minecraft.client.renderer.color.IItemColor;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import org.apache.commons.lang3.ArrayUtils;
import java.util.Random;
public class BlockCrystalCluster extends BlockBase implements IColorProvidingBlock, IColorProvidingItem{
private final TheCrystals crystal;
public BlockCrystalCluster(String name, TheCrystals crystal){
super(Material.GLASS, name);
this.crystal = crystal;
this.setHardness(0.25F);
this.setResistance(1.0F);
this.setSoundType(SoundType.GLASS);
this.setLightOpacity(1);
this.setLightLevel(0.7F);
}
@Override
public boolean isFullCube(IBlockState state){
return false;
}
@Override
public boolean isOpaqueCube(IBlockState state){
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());
}
@Override
public EnumRarity getRarity(ItemStack stack){
return EnumRarity.EPIC;
}
@Override
public IBlockState getStateFromMeta(int meta){
return this.getDefaultState().withProperty(BlockDirectional.FACING, EnumFacing.getFront(meta));
}
@Override
public int getMetaFromState(IBlockState state){
return state.getValue(BlockDirectional.FACING).getIndex();
}
@Override
protected BlockStateContainer createBlockState(){
return new BlockStateContainer(this, BlockDirectional.FACING);
}
@Override
public IBlockState withRotation(IBlockState state, Rotation rot){
return state.withProperty(BlockDirectional.FACING, rot.rotate(state.getValue(BlockDirectional.FACING)));
}
@Override
public IBlockState withMirror(IBlockState state, Mirror mirror){
return this.withRotation(state, mirror.toRotation(state.getValue(BlockDirectional.FACING)));
}
@Override
@SideOnly(Side.CLIENT)
public IBlockColor getBlockColor(){
return new IBlockColor(){
@Override
public int colorMultiplier(IBlockState state, IBlockAccess world, BlockPos pos, int tintIndex){
return BlockCrystalCluster.this.crystal.clusterColor;
}
};
}
@Override
@SideOnly(Side.CLIENT)
public BlockRenderLayer getBlockLayer(){
return BlockRenderLayer.TRANSLUCENT;
}
@Override
public IItemColor getItemColor(){
return new IItemColor(){
@Override
public int getColorFromItemstack(ItemStack stack, int tintIndex){
return BlockCrystalCluster.this.crystal.clusterColor;
}
};
}
@Override
public Item getItemDropped(IBlockState state, Random rand, int fortune){
return InitItems.itemCrystalShard;
}
@Override
public int damageDropped(IBlockState state){
return ArrayUtils.indexOf(WorldGenLushCaves.CRYSTAL_CLUSTERS, this);
}
@Override
public int quantityDropped(Random random){
return random.nextInt(5)+2;
}
}

View file

@ -14,6 +14,7 @@ import de.ellpeck.actuallyadditions.mod.blocks.BlockLaserRelay.Type;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockPlant;
import de.ellpeck.actuallyadditions.mod.blocks.base.BlockStair;
import de.ellpeck.actuallyadditions.mod.blocks.metalists.TheMiscBlocks;
import de.ellpeck.actuallyadditions.mod.items.metalists.TheCrystals;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import de.ellpeck.actuallyadditions.mod.util.compat.CompatUtil;
import net.minecraft.block.Block;
@ -109,10 +110,22 @@ public final class InitBlocks{
public static Block blockTinyTorch;
public static Block blockFarmer;
public static Block blockBatteryBox;
public static Block blockCrystalClusterRedstone;
public static Block blockCrystalClusterLapis;
public static Block blockCrystalClusterDiamond;
public static Block blockCrystalClusterCoal;
public static Block blockCrystalClusterEmerald;
public static Block blockCrystalClusterIron;
public static void init(){
ModUtil.LOGGER.info("Initializing Blocks...");
blockCrystalClusterRedstone = new BlockCrystalCluster("block_crystal_cluster_redstone", TheCrystals.REDSTONE);
blockCrystalClusterLapis = new BlockCrystalCluster("block_crystal_cluster_lapis", TheCrystals.LAPIS);
blockCrystalClusterDiamond = new BlockCrystalCluster("block_crystal_cluster_diamond", TheCrystals.DIAMOND);
blockCrystalClusterCoal = new BlockCrystalCluster("block_crystal_cluster_coal", TheCrystals.COAL);
blockCrystalClusterEmerald = new BlockCrystalCluster("block_crystal_cluster_emerald", TheCrystals.EMERALD);
blockCrystalClusterIron = new BlockCrystalCluster("block_crystal_cluster_iron", TheCrystals.IRON);
blockBatteryBox = new BlockBatteryBox("block_battery_box");
blockItemViewerHopping = new BlockItemViewerHopping("block_item_viewer_hopping");
blockFarmer = new BlockFarmer("block_farmer");

View file

@ -25,6 +25,9 @@ import net.minecraftforge.oredict.ShapelessOreRecipe;
public final class MiscCrafting{
public static final IRecipe[] RECIPES_CRYSTAL_SHARDS = new IRecipe[TheCrystals.values().length];
public static final IRecipe[] RECIPES_CRYSTAL_SHARDS_BACK = new IRecipe[TheCrystals.values().length];
public static final IRecipe[] RECIPES_CRYSTALS = new IRecipe[TheCrystals.values().length];
public static final IRecipe[] RECIPES_CRYSTAL_BLOCKS = new IRecipe[TheCrystals.values().length];
@ -52,6 +55,13 @@ public final class MiscCrafting{
RECIPES_EMPOWERED_CRYSTAL_BLOCKS[i] = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemCrystalEmpowered, 9, i), new ItemStack(InitBlocks.blockCrystalEmpowered, 1, i)));
RECIPES_EMPOWERED_CRYSTALS[i] = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemCrystal, 1, i),
"XXX", "XXX", "XXX",
'X', new ItemStack(InitItems.itemCrystalShard, 1, i)));
RECIPES_CRYSTAL_SHARDS[i] = RecipeUtil.lastIRecipe();
GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemCrystalShard, 9, i), new ItemStack(InitItems.itemCrystal, 1, i)));
RECIPES_CRYSTAL_SHARDS_BACK[i] = RecipeUtil.lastIRecipe();
}
//Dough

View file

@ -236,10 +236,17 @@ public class CreativeTab extends CreativeTabs{
this.add(InitItems.itemPaxelCrystalGreen);
this.add(InitItems.itemPaxelCrystalWhite);
this.add(InitBlocks.blockCrystalClusterRedstone);
this.add(InitBlocks.blockCrystalClusterLapis);
this.add(InitBlocks.blockCrystalClusterDiamond);
this.add(InitBlocks.blockCrystalClusterCoal);
this.add(InitBlocks.blockCrystalClusterEmerald);
this.add(InitBlocks.blockCrystalClusterIron);
this.add(InitBlocks.blockCrystal);
this.add(InitBlocks.blockCrystalEmpowered);
this.add(InitItems.itemCrystal);
this.add(InitItems.itemCrystalEmpowered);
this.add(InitItems.itemCrystalShard);
this.add(InitItems.itemJams);

View file

@ -15,9 +15,11 @@ import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import de.ellpeck.actuallyadditions.mod.misc.DungeonLoot;
import de.ellpeck.actuallyadditions.mod.tile.TileEntityGiantChest;
import net.minecraft.block.Block;
import net.minecraft.block.BlockDirectional;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Blocks;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.World;
@ -35,6 +37,15 @@ import java.util.Random;
public class WorldGenLushCaves{
public static final Block[] CRYSTAL_CLUSTERS = new Block[]{
InitBlocks.blockCrystalClusterRedstone,
InitBlocks.blockCrystalClusterLapis,
InitBlocks.blockCrystalClusterDiamond,
InitBlocks.blockCrystalClusterCoal,
InitBlocks.blockCrystalClusterEmerald,
InitBlocks.blockCrystalClusterIron
};
public boolean generate(World world, Random rand, BlockPos position, StructureBoundingBox blockRegion){
this.generateCave(world, position, rand, blockRegion);
return true;
@ -50,10 +61,10 @@ public class WorldGenLushCaves{
spheresBox.maxZ += 7;
for(int i = 0; i <= spheres; i++){
//center already is random value within population area
this.makeSphereWithGrassFloor(world, center.add(rand.nextInt(11)-5, rand.nextInt(7)-3, rand.nextInt(11)-5), rand.nextInt(3)+5, spheresBox);
this.makeSphereWithGrassFloor(world, center.add(rand.nextInt(11)-5, rand.nextInt(7)-3, rand.nextInt(11)-5), rand.nextInt(3)+5, spheresBox, rand);
}
this.genTreesAndTallGrass(world, center, 11, spheres*3, rand, chunkRegion);
this.genTreesAndTallGrass(world, center, 11, spheres*2, rand, chunkRegion);
}
private void genTreesAndTallGrass(World world, BlockPos center, int radius, int amount, Random rand, StructureBoundingBox box){
@ -61,12 +72,29 @@ public class WorldGenLushCaves{
for(double x = -radius; x < radius; x++){
for(double y = -radius; y < radius; y++){
for(double z = -radius; z < radius; z++){
if(rand.nextDouble() >= 0.5D){
BlockPos pos = center.add(x, y, z);
if(box.isVecInside(pos) && world.getBlockState(pos).getBlock() == Blocks.GRASS){
if(box.isVecInside(pos)){
if(rand.nextDouble() >= 0.5D){
if(world.getBlockState(pos).getBlock() == Blocks.GRASS){
possiblePoses.add(pos);
}
}
else if(rand.nextInt(20) == 0){
EnumFacing[] values = EnumFacing.values();
EnumFacing side = values[rand.nextInt(values.length)];
BlockPos posSide = pos.offset(side);
if(!this.checkIndestructable(world, posSide)){
IBlockState state = world.getBlockState(pos);
IBlockState stateSide = world.getBlockState(posSide);
if(state.getBlock().isAir(state, world, pos) && stateSide.getBlock().isSideSolid(stateSide, world, posSide, side.getOpposite())){
Block block = CRYSTAL_CLUSTERS[rand.nextInt(CRYSTAL_CLUSTERS.length)];
world.setBlockState(pos, block.getDefaultState().withProperty(BlockDirectional.FACING, side.getOpposite()), 2);
}
}
}
}
}
}
}
@ -118,7 +146,7 @@ public class WorldGenLushCaves{
}
}
private void makeSphereWithGrassFloor(World world, BlockPos center, int radius, StructureBoundingBox boundingBox){
private void makeSphereWithGrassFloor(World world, BlockPos center, int radius, StructureBoundingBox boundingBox, Random rand){
for(double x = -radius; x < radius; x++){
for(double y = -radius; y < radius; y++){
for(double z = -radius; z < radius; z++){
@ -137,11 +165,12 @@ public class WorldGenLushCaves{
for(double z = -radius; z < radius; z++){
for(double y = -radius; y <= -3; y++){
BlockPos pos = center.add(x, y, z);
if(boundingBox.isVecInside(pos)){
if(boundingBox.isVecInside(pos) && !this.checkIndestructable(world, pos)){
IBlockState state = world.getBlockState(pos);
BlockPos posUp = pos.up();
if(!this.checkIndestructable(world, posUp)){
IBlockState stateUp = world.getBlockState(posUp);
if(!this.checkIndestructable(world, pos) && !this.checkIndestructable(world, posUp)){
if(!state.getBlock().isAir(state, world, pos) && stateUp.getBlock().isAir(stateUp, world, posUp)){
world.setBlockState(pos, Blocks.GRASS.getDefaultState());
}

View file

@ -196,10 +196,12 @@ public final class InitItems{
public static Item itemLaserUpgradeInvisibility;
public static Item itemLaserUpgradeRange;
public static Item itemInfraredGoggles;
public static Item itemCrystalShard;
public static void init(){
ModUtil.LOGGER.info("Initializing Items...");
itemCrystalShard = new ItemCrystalShard("item_crystal_shard");
itemInfraredGoggles = new ItemInfraredGoggles("item_infrared_goggles");
itemLaserUpgradeRange = new ItemLaserRelayUpgrade("item_laser_upgrade_range");
itemLaserUpgradeInvisibility = new ItemLaserRelayUpgrade("item_laser_upgrade_invisibility");

View file

@ -113,7 +113,7 @@ public class ItemAllToolAA extends ItemToolAA implements IColorProvidingItem{
@SideOnly(Side.CLIENT)
@Override
public IItemColor getColor(){
public IItemColor getItemColor(){
return new IItemColor(){
@Override
public int getColorFromItemstack(ItemStack stack, int pass){

View file

@ -0,0 +1,82 @@
/*
* This file ("ItemCrystalShard.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.items;
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
import de.ellpeck.actuallyadditions.mod.blocks.BlockCrystal;
import de.ellpeck.actuallyadditions.mod.items.base.ItemBase;
import de.ellpeck.actuallyadditions.mod.util.IColorProvidingItem;
import de.ellpeck.actuallyadditions.mod.util.StringUtil;
import net.minecraft.client.renderer.color.IItemColor;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public class ItemCrystalShard extends ItemBase implements IColorProvidingItem{
public ItemCrystalShard(String name){
super(name);
this.setHasSubtypes(true);
this.setMaxDamage(0);
}
@Override
public int getMetadata(int damage){
return damage;
}
@Override
public String getUnlocalizedName(ItemStack stack){
return stack.getItemDamage() >= BlockCrystal.ALL_CRYSTALS.length ? StringUtil.BUGGED_ITEM_NAME : this.getUnlocalizedName()+"_"+BlockCrystal.ALL_CRYSTALS[stack.getItemDamage()].name;
}
@Override
public EnumRarity getRarity(ItemStack stack){
return stack.getItemDamage() >= BlockCrystal.ALL_CRYSTALS.length ? EnumRarity.COMMON : BlockCrystal.ALL_CRYSTALS[stack.getItemDamage()].rarity;
}
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, NonNullList list){
for(int j = 0; j < BlockCrystal.ALL_CRYSTALS.length; j++){
list.add(new ItemStack(this, 1, j));
}
}
@Override
protected void registerRendering(){
for(int i = 0; i < BlockCrystal.ALL_CRYSTALS.length; i++){
ActuallyAdditions.proxy.addRenderRegister(new ItemStack(this, 1, i), this.getRegistryName(), "inventory");
}
}
@Override
@SideOnly(Side.CLIENT)
public IItemColor getItemColor(){
return new IItemColor(){
@Override
public int getColorFromItemstack(ItemStack stack, int tintIndex){
int damage = stack.getItemDamage();
if(damage >= 0 && damage < BlockCrystal.ALL_CRYSTALS.length){
return BlockCrystal.ALL_CRYSTALS[damage].clusterColor;
}
else{
return 0;
}
}
};
}
}

View file

@ -67,7 +67,7 @@ public class ItemDust extends ItemBase implements IColorProvidingItem{
@SideOnly(Side.CLIENT)
@Override
public IItemColor getColor(){
public IItemColor getItemColor(){
return new IItemColor(){
@Override
public int getColorFromItemstack(ItemStack stack, int pass){

View file

@ -107,7 +107,7 @@ public class ItemJams extends ItemFoodBase implements IColorProvidingItem{
@Override
@SideOnly(Side.CLIENT)
public IItemColor getColor(){
public IItemColor getItemColor(){
return new IItemColor(){
@Override
public int getColorFromItemstack(ItemStack stack, int pass){

View file

@ -162,7 +162,7 @@ public class ItemPotionRing extends ItemBase implements IColorProvidingItem, IDi
@Override
@SideOnly(Side.CLIENT)
public IItemColor getColor(){
public IItemColor getItemColor(){
return new IItemColor(){
@Override
public int getColorFromItemstack(ItemStack stack, int tintIndex){

View file

@ -16,21 +16,23 @@ import net.minecraft.util.IStringSerializable;
public enum TheCrystals implements IStringSerializable{
REDSTONE("red", Util.CRYSTAL_RED_RARITY, 158F/255F, 43F/255F, 39F/255F),
LAPIS("blue", Util.CRYSTAL_BLUE_RARITY, 37F/255F, 49F/255F, 147F/255F),
DIAMOND("light_blue", Util.CRYSTAL_LIGHT_BLUE_RARITY, 99F/255F, 135F/255F, 210F/255F),
COAL("black", Util.CRYSTAL_BLACK_RARITY, 0.2F, 0.2F, 0.2F),
EMERALD("green", Util.CRYSTAL_GREEN_RARITY, 54F/255F, 75F/255F, 24F/255F),
IRON("white", Util.CRYSTAL_WHITE_RARITY, 0.8F, 0.8F, 0.8F);
REDSTONE("red", Util.CRYSTAL_RED_RARITY, 0xFF2F21, 158F/255F, 43F/255F, 39F/255F),
LAPIS("blue", Util.CRYSTAL_BLUE_RARITY, 0x5171FF, 37F/255F, 49F/255F, 147F/255F),
DIAMOND("light_blue", Util.CRYSTAL_LIGHT_BLUE_RARITY, 0x35F1FF, 99F/255F, 135F/255F, 210F/255F),
COAL("black", Util.CRYSTAL_BLACK_RARITY, 0x434442, 0.2F, 0.2F, 0.2F),
EMERALD("green", Util.CRYSTAL_GREEN_RARITY, 0x44E033, 54F/255F, 75F/255F, 24F/255F),
IRON("white", Util.CRYSTAL_WHITE_RARITY, 0xCEDDD4, 0.8F, 0.8F, 0.8F);
public final String name;
public final EnumRarity rarity;
public final float[] conversionColorParticles;
public final int clusterColor;
TheCrystals(String name, EnumRarity rarity, float... conversionColorParticles){
TheCrystals(String name, EnumRarity rarity, int clusterColor, float... conversionColorParticles){
this.name = name;
this.rarity = rarity;
this.conversionColorParticles = conversionColorParticles;
this.clusterColor = clusterColor;
}
@Override

View file

@ -18,6 +18,7 @@ import de.ellpeck.actuallyadditions.mod.fluids.InitFluids;
import de.ellpeck.actuallyadditions.mod.misc.special.SpecialRenderInit;
import de.ellpeck.actuallyadditions.mod.tile.*;
import de.ellpeck.actuallyadditions.mod.util.FluidStateMapper;
import de.ellpeck.actuallyadditions.mod.util.IColorProvidingBlock;
import de.ellpeck.actuallyadditions.mod.util.IColorProvidingItem;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import net.minecraft.block.Block;
@ -43,6 +44,7 @@ import java.util.Map;
public class ClientProxy implements IProxy{
private static final List<Item> COLOR_PRODIVIDING_ITEMS_FOR_REGISTERING = new ArrayList<Item>();
private static final List<Block> COLOR_PRODIVIDING_BLOCKS_FOR_REGISTERING = new ArrayList<Block>();
private static final Map<ItemStack, ModelResourceLocation> MODEL_LOCATIONS_FOR_REGISTERING = new HashMap<ItemStack, ModelResourceLocation>();
@Override
@ -98,7 +100,16 @@ public class ClientProxy implements IProxy{
for(Item item : COLOR_PRODIVIDING_ITEMS_FOR_REGISTERING){
if(item instanceof IColorProvidingItem){
Minecraft.getMinecraft().getItemColors().registerItemColorHandler(((IColorProvidingItem)item).getColor(), item);
Minecraft.getMinecraft().getItemColors().registerItemColorHandler(((IColorProvidingItem)item).getItemColor(), item);
}
}
for(Block block : COLOR_PRODIVIDING_BLOCKS_FOR_REGISTERING){
if(block instanceof IColorProvidingBlock){
Minecraft.getMinecraft().getBlockColors().registerBlockColorHandler(((IColorProvidingBlock)block).getBlockColor(), block);
}
if(block instanceof IColorProvidingItem){
Minecraft.getMinecraft().getItemColors().registerItemColorHandler(((IColorProvidingItem)block).getItemColor(), block);
}
}
}
@ -120,6 +131,11 @@ public class ClientProxy implements IProxy{
COLOR_PRODIVIDING_ITEMS_FOR_REGISTERING.add(item);
}
@Override
public void addColoredBlock(Block block){
COLOR_PRODIVIDING_BLOCKS_FOR_REGISTERING.add(block);
}
@Override
public EntityPlayer getCurrentPlayer(){
return Minecraft.getMinecraft().player;

View file

@ -10,6 +10,7 @@
package de.ellpeck.actuallyadditions.mod.proxy;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@ -30,5 +31,8 @@ public interface IProxy{
void addColoredItem(Item item);
void addColoredBlock(Block block);
EntityPlayer getCurrentPlayer();
}

View file

@ -11,6 +11,7 @@
package de.ellpeck.actuallyadditions.mod.proxy;
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@ -46,6 +47,11 @@ public class ServerProxy implements IProxy{
}
@Override
public void addColoredBlock(Block block){
}
@Override
public EntityPlayer getCurrentPlayer(){
return null;

View file

@ -0,0 +1,22 @@
/*
* This file ("IColorProvidingBlock.java") is part of the Actually Additions mod for Minecraft.
* It is created and owned by Ellpeck and distributed
* under the Actually Additions License to be found at
* http://ellpeck.de/actaddlicense
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
*
* © 2015-2017 Ellpeck
*/
package de.ellpeck.actuallyadditions.mod.util;
import net.minecraft.client.renderer.color.IBlockColor;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
public interface IColorProvidingBlock{
@SideOnly(Side.CLIENT)
IBlockColor getBlockColor();
}

View file

@ -17,6 +17,6 @@ import net.minecraftforge.fml.relauncher.SideOnly;
public interface IColorProvidingItem{
@SideOnly(Side.CLIENT)
IItemColor getColor();
IItemColor getItemColor();
}

View file

@ -55,6 +55,10 @@ public final class ItemUtil{
IMCHandler.doBlockIMC(block);
if(block instanceof IColorProvidingBlock){
ActuallyAdditions.proxy.addColoredBlock(block);
}
addUnderscoreNameToMapUnderscorelessName(block.getRegistryName());
}

View file

@ -0,0 +1,22 @@
{
"forge_marker": 1,
"defaults": {
"model": "actuallyadditions:block_crystal_cluster",
"textures": {
"particle": "actuallyadditions:blocks/block_crystal_cluster"
},
"transform": "forge:default-block"
},
"variants": {
"normal": [{}],
"inventory": [{}],
"facing": {
"down": { "x": 180 },
"up": {},
"north": { "x": 90 },
"south": { "x": 270 },
"west": { "x": 90, "y": 270 },
"east": { "x": 270, "y": 270 }
}
}
}

View file

@ -0,0 +1,22 @@
{
"forge_marker": 1,
"defaults": {
"model": "actuallyadditions:block_crystal_cluster",
"textures": {
"particle": "actuallyadditions:blocks/block_crystal_cluster"
},
"transform": "forge:default-block"
},
"variants": {
"normal": [{}],
"inventory": [{}],
"facing": {
"down": { "x": 180 },
"up": {},
"north": { "x": 90 },
"south": { "x": 270 },
"west": { "x": 90, "y": 270 },
"east": { "x": 270, "y": 270 }
}
}
}

View file

@ -0,0 +1,22 @@
{
"forge_marker": 1,
"defaults": {
"model": "actuallyadditions:block_crystal_cluster",
"textures": {
"particle": "actuallyadditions:blocks/block_crystal_cluster"
},
"transform": "forge:default-block"
},
"variants": {
"normal": [{}],
"inventory": [{}],
"facing": {
"down": { "x": 180 },
"up": {},
"north": { "x": 90 },
"south": { "x": 270 },
"west": { "x": 90, "y": 270 },
"east": { "x": 270, "y": 270 }
}
}
}

View file

@ -0,0 +1,22 @@
{
"forge_marker": 1,
"defaults": {
"model": "actuallyadditions:block_crystal_cluster",
"textures": {
"particle": "actuallyadditions:blocks/block_crystal_cluster"
},
"transform": "forge:default-block"
},
"variants": {
"normal": [{}],
"inventory": [{}],
"facing": {
"down": { "x": 180 },
"up": {},
"north": { "x": 90 },
"south": { "x": 270 },
"west": { "x": 90, "y": 270 },
"east": { "x": 270, "y": 270 }
}
}
}

View file

@ -0,0 +1,22 @@
{
"forge_marker": 1,
"defaults": {
"model": "actuallyadditions:block_crystal_cluster",
"textures": {
"particle": "actuallyadditions:blocks/block_crystal_cluster"
},
"transform": "forge:default-block"
},
"variants": {
"normal": [{}],
"inventory": [{}],
"facing": {
"down": { "x": 180 },
"up": {},
"north": { "x": 90 },
"south": { "x": 270 },
"west": { "x": 90, "y": 270 },
"east": { "x": 270, "y": 270 }
}
}
}

View file

@ -0,0 +1,22 @@
{
"forge_marker": 1,
"defaults": {
"model": "actuallyadditions:block_crystal_cluster",
"textures": {
"particle": "actuallyadditions:blocks/block_crystal_cluster"
},
"transform": "forge:default-block"
},
"variants": {
"normal": [{}],
"inventory": [{}],
"facing": {
"down": { "x": 180 },
"up": {},
"north": { "x": 90 },
"south": { "x": 270 },
"west": { "x": 90, "y": 270 },
"east": { "x": 270, "y": 270 }
}
}
}

View file

@ -239,6 +239,12 @@ tile.actuallyadditions.block_distributor_item.name=Item Distributor
tile.actuallyadditions.block_bio_reactor.name=Bio Reactor
tile.actuallyadditions.block_farmer.name=Farmer
tile.actuallyadditions.block_battery_box.name=Battery Box
tile.actuallyadditions.block_crystal_cluster_redstone.name=Red Crystal Cluster
tile.actuallyadditions.block_crystal_cluster_lapis.name=Blue Crystal Cluster
tile.actuallyadditions.block_crystal_cluster_diamond.name=Light Blue Crystal Cluster
tile.actuallyadditions.block_crystal_cluster_coal.name=Black Crystal Cluster
tile.actuallyadditions.block_crystal_cluster_emerald.name=Green Crystal Cluster
tile.actuallyadditions.block_crystal_cluster_iron.name=White Crystal Cluster
#ESD
tile.actuallyadditions.block_inputter.name=ESD
@ -523,6 +529,12 @@ item.actuallyadditions.item_filling_wand.name=Handheld Filler
item.actuallyadditions.item_laser_upgrade_invisibility.name=Laser Relay Modifier: Invisibility
item.actuallyadditions.item_infrared_goggles.name=Infrared Goggles
item.actuallyadditions.item_laser_upgrade_range.name=Laser Relay Modifier: Range
item.actuallyadditions.item_crystal_shard_red.name=Red Crystal Shard
item.actuallyadditions.item_crystal_shard_blue.name=Blue Crystal Shard
item.actuallyadditions.item_crystal_shard_light_blue.name=Light Blue Crystal Shard
item.actuallyadditions.item_crystal_shard_black.name=Black Crystal Shard
item.actuallyadditions.item_crystal_shard_green.name=Green Crystal Shard
item.actuallyadditions.item_crystal_shard_white.name=White Crystal Shard
#Tooltips
tooltip.actuallyadditions.onSuffix.desc=On

View file

@ -0,0 +1,207 @@
{
"__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)",
"textures": {
"0": "actuallyadditions:blocks/block_crystal_cluster"
},
"elements": [
{
"name": "Cube",
"from": [ 4.0, 1.0, 0.0 ],
"to": [ 7.0, 7.0, 7.0 ],
"faces": {
"north": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 6.0 ], "tintindex": 0 },
"east": { "texture": "#0", "uv": [ 0.0, 0.0, 7.0, 6.0 ], "tintindex": 0 },
"up": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 7.0 ], "tintindex": 0 },
"down": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 7.0 ], "tintindex": 0 }
}
},
{
"name": "Cube",
"from": [ 11.0, 0.0, 0.0 ],
"to": [ 18.0, 4.0, 9.0 ],
"rotation": { "origin": [ 11.0, 6.0, 0.0 ], "axis": "y", "angle": -45.0 },
"faces": {
"north": { "texture": "#0", "uv": [ 0.0, 0.0, 7.0, 4.0 ], "tintindex": 0 },
"east": { "texture": "#0", "uv": [ 0.0, 0.0, 9.0, 4.0 ], "tintindex": 0 },
"up": { "texture": "#0", "uv": [ 0.0, 0.0, 7.0, 9.0 ], "tintindex": 0 }
}
},
{
"name": "Cube",
"from": [ 7.900000013411045, 0.0, 7.899999998509884 ],
"to": [ 13.900000013411045, 8.0, 13.899999998509884 ],
"rotation": { "origin": [ 13.0, 8.0, 8.0 ], "axis": "y", "angle": -22.5 },
"faces": {
"north": { "texture": "#0", "uv": [ 0.0, 0.0, 6.0, 8.0 ], "tintindex": 0 },
"east": { "texture": "#0", "uv": [ 0.0, 0.0, 6.0, 8.0 ], "tintindex": 0 },
"south": { "texture": "#0", "uv": [ 0.0, 0.0, 6.0, 8.0 ], "tintindex": 0 },
"west": { "texture": "#0", "uv": [ 0.0, 0.0, 6.0, 8.0 ], "tintindex": 0 },
"up": { "texture": "#0", "uv": [ 0.0, 0.0, 6.0, 6.0 ], "tintindex": 0 },
"down": { "texture": "#0", "uv": [ 0.0, 0.0, 6.0, 6.0 ], "tintindex": 0 }
}
},
{
"name": "Cube",
"from": [ 1.0, 2.0, 8.0 ],
"to": [ 10.700000010430813, 6.0, 13.899999998509884 ],
"rotation": { "origin": [ 4.0, 6.0, 8.0 ], "axis": "x", "angle": 22.5 },
"faces": {
"north": { "texture": "#0", "uv": [ 0.0, 0.0, 9.700000010430813, 4.0 ], "tintindex": 0 },
"south": { "texture": "#0", "uv": [ 0.0, 0.0, 9.700000010430813, 4.0 ], "tintindex": 0 },
"west": { "texture": "#0", "uv": [ 0.0, 0.0, 5.899999998509884, 4.0 ], "tintindex": 0 },
"up": { "texture": "#0", "uv": [ 0.0, 0.0, 9.700000010430813, 5.899999998509884 ], "tintindex": 0 },
"down": { "texture": "#0", "uv": [ 0.0, 0.0, 9.700000010430813, 5.899999998509884 ], "tintindex": 0 }
}
},
{
"name": "Cube",
"from": [ 1.0, 0.0, 8.0 ],
"to": [ 13.0, 3.0, 16.600000008940697 ],
"rotation": { "origin": [ 1.0, 6.0, 8.0 ], "axis": "y", "angle": 22.5 },
"faces": {
"east": { "texture": "#0", "uv": [ 0.0, 0.0, 8.600000008940697, 3.0 ], "tintindex": 0 },
"south": { "texture": "#0", "uv": [ 0.0, 0.0, 12.0, 3.0 ], "tintindex": 0 },
"west": { "texture": "#0", "uv": [ 0.0, 0.0, 8.600000008940697, 3.0 ], "tintindex": 0 },
"up": { "texture": "#0", "uv": [ 0.0, 0.0, 12.0, 8.600000008940697 ], "tintindex": 0},
"down": { "texture": "#0", "uv": [ 0.0, 0.0, 12.0, 8.600000008940697 ], "tintindex": 0 }
}
},
{
"name": "Cube",
"from": [ 5.799999997019768, 4.899999983608723, -2.0 ],
"to": [ 9.799999997019768, 19.899999983608723, 2.0 ],
"rotation": { "origin": [ 1.0, 6.0, 1.0 ], "axis": "y", "angle": -22.5 },
"faces": {
"north": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 15.0 ], "tintindex": 0 },
"east": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 15.0 ], "tintindex": 0 },
"south": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 15.0 ], "tintindex": 0 },
"west": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 15.0 ], "tintindex": 0 },
"up": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 4.0 ], "tintindex": 0 }
}
},
{
"name": "Cube",
"from": [ 1.5000000670552254, 0.9000000134110451, 0.0 ],
"to": [ 4.000000059604645, 7.0, 8.0 ],
"rotation": { "origin": [ 4.0, 7.0, 8.0 ], "axis": "z", "angle": 22.5 },
"faces": {
"north": { "texture": "#0", "uv": [ 0.0, 0.0, 2.4999999925494194, 6.099999986588955 ], "tintindex": 0 },
"west": { "texture": "#0", "uv": [ 0.0, 0.0, 8.0, 6.099999986588955 ], "tintindex": 0 },
"up": { "texture": "#0", "uv": [ 0.0, 0.0, 2.4999999925494194, 8.0 ], "tintindex": 0 },
"down": { "texture": "#0", "uv": [ 0.0, 0.0, 2.4999999925494194, 8.0 ], "tintindex": 0 }
}
},
{
"name": "Cube",
"from": [ 1.0000000149011612, 0.0, 4.0 ],
"to": [ 3.299999989569187, 4.099999986588955, 8.0 ],
"faces": {
"north": { "texture": "#0", "uv": [ 0.0, 0.0, 2.299999974668026, 4.099999986588955 ], "tintindex": 0 },
"west": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 4.099999986588955 ], "tintindex": 0 },
"up": { "texture": "#0", "uv": [ 0.0, 0.0, 2.299999974668026, 4.0 ], "tintindex": 0 },
"down": { "texture": "#0", "uv": [ 0.0, 0.0, 2.299999974668026, 4.0 ], "tintindex": 0 }
}
},
{
"name": "Cube",
"from": [ 5.0, 4.0, 4.399999991059303 ],
"to": [ 8.0, 14.0, 7.399999991059303 ],
"rotation": { "origin": [ 6.799999997019768, 7.000000014901161, 0.9000000134110451 ], "axis": "z", "angle": 45.0 },
"faces": {
"north": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 10.0 ], "tintindex": 0 },
"east": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 10.0 ], "tintindex": 0 },
"south": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 10.0 ], "tintindex": 0 },
"west": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 10.0 ], "tintindex": 0 },
"up": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 3.0 ], "tintindex": 0 }
}
},
{
"name": "Cube",
"from": [ 8.100000001490116, 7.999999985098839, 9.0 ],
"to": [ 11.100000001490116, 19.49999999254942, 12.0 ],
"rotation": { "origin": [ 8.099999986588955, 8.000000014901161, 11.000000014901161 ], "axis": "z", "angle": -22.5 },
"faces": {
"north": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 11.50000000745058 ], "tintindex": 0 },
"east": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 11.50000000745058 ], "tintindex": 0 },
"south": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 11.50000000745058 ], "tintindex": 0},
"west": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 11.50000000745058 ], "tintindex": 0 },
"up": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 3.0 ], "tintindex": 0 }
}
},
{
"name": "Cube",
"from": [ 5.900000013411045, 4.0, 6.799999997019768 ],
"to": [ 8.900000013411045, 14.0, 9.799999997019768 ],
"rotation": { "origin": [ 8.0, 7.100000016391277, 4.900000013411045 ], "axis": "x", "angle": 22.5 },
"faces": {
"north": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 10.0 ], "tintindex": 0 },
"east": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 10.0 ], "tintindex": 0 },
"south": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 10.0 ], "tintindex": 0 },
"west": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 10.0 ], "tintindex": 0 },
"up": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 3.0 ], "tintindex": 0 }
}
},
{
"name": "Cube",
"from": [ 10.0, 3.0, 3.0 ],
"to": [ 13.0, 11.0, 8.0 ],
"rotation": { "origin": [ 13.0, 4.0, 4.0 ], "axis": "z", "angle": -22.5 },
"faces": {
"north": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 8.0 ], "tintindex": 0 },
"east": { "texture": "#0", "uv": [ 0.0, 0.0, 5.0, 8.0 ], "tintindex": 0 },
"south": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 8.0 ], "tintindex": 0 },
"west": { "texture": "#0", "uv": [ 0.0, 0.0, 5.0, 8.0 ], "tintindex": 0 },
"up": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 5.0 ], "tintindex": 0 }
}
},
{
"name": "Cube",
"from": [ 1.4901161193847656E-8, 0.0, -1.5999999940395355 ],
"to": [ 5.799999997019768, 2.099999986588955, 4.000000029802322 ],
"rotation": { "origin": [ 0.0, 8.0, 4.0 ], "axis": "y", "angle": -45.0 },
"faces": {
"north": { "texture": "#0", "uv": [ 0.0, 0.0, 5.799999982118607, 2.099999986588955 ], "tintindex": 0 },
"south": { "texture": "#0", "uv": [ 0.0, 0.0, 5.799999982118607, 2.099999986588955 ], "tintindex": 0 },
"west": { "texture": "#0", "uv": [ 0.0, 0.0, 5.600000023841858, 2.099999986588955 ], "tintindex": 0 },
"up": { "texture": "#0", "uv": [ 0.0, 0.0, 5.799999982118607, 5.600000023841858 ], "tintindex": 0 },
"down": { "texture": "#0", "uv": [ 0.0, 0.0, 5.799999982118607, 5.600000023841858 ], "tintindex": 0 }
}
},
{
"name": "Cube",
"from": [ 4.0, 0.0, 0.8999999985098839 ],
"to": [ 7.0, 6.0, 7.899999998509884 ],
"rotation": { "origin": [ 7.200000002980232, 8.0, -1.0 ], "axis": "y", "angle": 22.5 },
"faces": {
"north": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 6.0 ], "tintindex": 0 },
"east": { "texture": "#0", "uv": [ 0.0, 0.0, 7.0, 6.0 ], "tintindex": 0 },
"up": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 7.0 ], "tintindex": 0 },
"down": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 7.0 ], "tintindex": 0 }
}
},
{
"name": "Cube",
"from": [ 7.300000004470348, 0.0, 0.0 ],
"to": [ 11.300000004470348, 5.0, 7.0 ],
"faces": {
"north": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 5.0 ], "tintindex": 0 },
"east": { "texture": "#0", "uv": [ 0.0, 0.0, 7.0, 5.0 ], "tintindex": 0 },
"west": { "texture": "#0", "uv": [ 0.0, 0.0, 7.0, 5.0 ], "tintindex": 0 },
"up": { "texture": "#0", "uv": [ 0.0, 0.0, 4.0, 7.0 ], "tintindex": 0 }
}
},
{
"name": "Cube",
"from": [ 1.900000013411045, 5.0, 10.799999997019768 ],
"to": [ 4.900000013411045, 15.0, 13.799999997019768 ],
"rotation": { "origin": [ 13.0, 18.100000016391277, -0.3999999910593033 ], "axis": "x", "angle": 22.5 },
"faces": {
"north": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 10.0 ], "tintindex": 0 },
"east": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 10.0 ], "tintindex": 0 },
"south": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 10.0 ], "tintindex": 0 },
"west": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 10.0 ], "tintindex": 0 },
"up": { "texture": "#0", "uv": [ 0.0, 0.0, 3.0, 3.0 ], "tintindex": 0 }
}
}
]
}

View file

@ -0,0 +1,6 @@
{
"parent": "actuallyadditions:item/standard_item",
"textures": {
"layer0": "actuallyadditions:items/item_crystal_shard"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B