|
@ -34,4 +34,14 @@ public class BOPBlocks
|
|||
public static Block grass;
|
||||
public static Block waterlily;
|
||||
public static Block dirt;
|
||||
public static Block stone_formations;
|
||||
public static Block fruit_block;
|
||||
public static Block ash_stone;
|
||||
public static Block hard_sand;
|
||||
public static Block hard_dirt;
|
||||
public static Block hard_ice;
|
||||
public static Block dried_dirt;
|
||||
public static Block crag_rock;
|
||||
public static Block mud_brick;
|
||||
public static Block crystal;
|
||||
}
|
||||
|
|
|
@ -16,4 +16,8 @@ public class BOPItems
|
|||
public static Item mudball;
|
||||
public static Item turnip;
|
||||
public static Item turnip_seeds;
|
||||
public static Item persimmon;
|
||||
public static Item peach;
|
||||
public static Item pear;
|
||||
public static Item crystal_shard;
|
||||
}
|
|
@ -8,8 +8,6 @@
|
|||
|
||||
package biomesoplenty.common.block;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockDirt;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
@ -18,11 +16,11 @@ import net.minecraft.block.properties.PropertyBool;
|
|||
import net.minecraft.block.properties.PropertyEnum;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import biomesoplenty.api.block.BOPBlock;
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
|
||||
|
@ -72,6 +70,31 @@ public class BlockBOPDirt extends BOPBlock
|
|||
return (Boolean.TRUE.equals(state.getValue(COARSE)) ? "coarse_" : "") + ((BOPDirtType) state.getValue(VARIANT_PROP)).getName() + "_dirt";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSustainPlant(IBlockAccess world, BlockPos pos, EnumFacing direction, net.minecraftforge.common.IPlantable plantable)
|
||||
{
|
||||
net.minecraftforge.common.EnumPlantType plantType = plantable.getPlantType(world, pos.offset(direction));
|
||||
|
||||
switch (plantType)
|
||||
{
|
||||
// support desert and plains plants
|
||||
case Desert: case Plains: return true;
|
||||
// support cave plants
|
||||
case Cave: return isSideSolid(world, pos, EnumFacing.UP);
|
||||
// support beach plants if there's water alongside
|
||||
case Beach:
|
||||
return (
|
||||
world.getBlockState(pos.east()).getBlock().getMaterial() == Material.water ||
|
||||
world.getBlockState(pos.west()).getBlock().getMaterial() == Material.water ||
|
||||
world.getBlockState(pos.north()).getBlock().getMaterial() == Material.water ||
|
||||
world.getBlockState(pos.south()).getBlock().getMaterial() == Material.water
|
||||
);
|
||||
// don't support nether plants, water plants, or crops (require farmland), or anything else by default
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// enum representing the variants of dirt
|
||||
public static enum BOPDirtType implements IStringSerializable
|
||||
{
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.block;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
public class BlockBOPGeneric extends BOPBlock
|
||||
{
|
||||
public BlockBOPGeneric() {
|
||||
// use rock as default material
|
||||
this(Material.rock);
|
||||
}
|
||||
|
||||
public BlockBOPGeneric(Material material)
|
||||
{
|
||||
super(material);
|
||||
// set some defaults
|
||||
this.setHardness(1.0F);
|
||||
this.setStepSound(Block.soundTypePiston);
|
||||
}
|
||||
|
||||
}
|
|
@ -39,7 +39,6 @@ import net.minecraft.world.biome.BiomeColorHelper;
|
|||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
// TODO: add snowiness?
|
||||
public class BlockBOPGrass extends BOPBlock implements IGrowable
|
||||
{
|
||||
public static final PropertyEnum VARIANT_PROP = PropertyEnum.create("variant", BOPGrassType.class);
|
||||
|
@ -135,6 +134,10 @@ public class BlockBOPGrass extends BOPBlock implements IGrowable
|
|||
case SMOLDERING:
|
||||
return false;
|
||||
|
||||
// origin grass supports all plants (including crop type - no need for hoe)
|
||||
case ORIGIN:
|
||||
return true;
|
||||
|
||||
default:
|
||||
switch (plantType)
|
||||
{
|
||||
|
@ -164,20 +167,13 @@ public class BlockBOPGrass extends BOPBlock implements IGrowable
|
|||
IBlockState state = world.getBlockState(pos);
|
||||
switch ((BOPGrassType) state.getValue(VARIANT_PROP))
|
||||
{
|
||||
// spectral moss burns from below in the end
|
||||
// TODO: 1.7 code had dimension=-1 here - check -1 corresponds to end
|
||||
case SPECTRALMOSS:
|
||||
if ((world.provider instanceof net.minecraft.world.WorldProviderEnd) && side == EnumFacing.UP) {return true;}
|
||||
break;
|
||||
|
||||
// smoldering grass always burns
|
||||
// smoldering grass is a fire source
|
||||
case SMOLDERING:
|
||||
return false;
|
||||
return true;
|
||||
|
||||
default:
|
||||
break;
|
||||
return false;
|
||||
}
|
||||
return super.isFireSource(world, pos, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -331,7 +327,8 @@ public class BlockBOPGrass extends BOPBlock implements IGrowable
|
|||
}
|
||||
|
||||
// This is called when bonemeal is applied on the block
|
||||
// The algorithm is functionally exactly the same as in the vanilla BlockGrass grow function, but has been rewritten to make its behavior clearer
|
||||
// The algorithm is functionally equivalent to the vanilla BlockGrass grow function, but has been rewritten to make its behavior clearer
|
||||
// TODO: grows spreads from BOP grass to vanilla grass, need to find a way to make growth on vanilla grass also spread to BOP grass
|
||||
@Override
|
||||
public void grow(World worldIn, Random rand, BlockPos pos, IBlockState state) {
|
||||
|
||||
|
@ -350,7 +347,8 @@ public class BlockBOPGrass extends BOPBlock implements IGrowable
|
|||
{
|
||||
// shift a random distance
|
||||
currPos = currPos.add(rand.nextInt(3) - 1, (rand.nextInt(3) - 1) * rand.nextInt(3) / 2, rand.nextInt(3) - 1);
|
||||
if (worldIn.getBlockState(currPos.down()).getBlock() != BOPBlocks.grass || worldIn.getBlockState(currPos).getBlock().isNormalCube())
|
||||
Block currBlockBelow = worldIn.getBlockState(currPos.down()).getBlock();
|
||||
if ( (currBlockBelow != Blocks.grass && currBlockBelow != BOPBlocks.grass) || worldIn.getBlockState(currPos).getBlock().isNormalCube())
|
||||
{
|
||||
// this block can't spread the growth
|
||||
walkOk = false;
|
||||
|
@ -428,7 +426,7 @@ public class BlockBOPGrass extends BOPBlock implements IGrowable
|
|||
// enum representing the variants of grass
|
||||
public static enum BOPGrassType implements IStringSerializable
|
||||
{
|
||||
SPECTRALMOSS, SMOLDERING, LOAMY, SANDY, SILTY;
|
||||
SPECTRALMOSS, SMOLDERING, LOAMY, SANDY, SILTY, ORIGIN;
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
|
@ -462,7 +460,7 @@ public class BlockBOPGrass extends BOPBlock implements IGrowable
|
|||
return BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT_PROP, BlockBOPDirt.BOPDirtType.SANDY);
|
||||
case SILTY:
|
||||
return BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT_PROP, BlockBOPDirt.BOPDirtType.SILTY);
|
||||
case SMOLDERING: default:
|
||||
case SMOLDERING: case ORIGIN: default:
|
||||
return Blocks.dirt.getStateFromMeta(BlockDirt.DirtType.DIRT.getMetadata());
|
||||
}
|
||||
}
|
||||
|
@ -519,6 +517,17 @@ public class BlockBOPGrass extends BOPBlock implements IGrowable
|
|||
return null;
|
||||
}
|
||||
|
||||
// origin grass spreads to any kind of dirt
|
||||
case ORIGIN:
|
||||
if ((target.getBlock() == Blocks.dirt && target.getValue(BlockDirt.VARIANT) == BlockDirt.DirtType.DIRT) || (target.getBlock() == BOPBlocks.dirt && Boolean.FALSE.equals(target.getValue(BlockBOPDirt.COARSE))))
|
||||
{
|
||||
return BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT_PROP, BlockBOPGrass.BOPGrassType.ORIGIN);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
// smoldering grass doesn't spread at all
|
||||
case SMOLDERING: default:
|
||||
return null;
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlock;
|
||||
import biomesoplenty.api.item.BOPItems;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class BlockCrystal extends BOPBlock
|
||||
{
|
||||
public BlockCrystal() {
|
||||
super(Material.glass);
|
||||
this.setHardness(0.15F);
|
||||
this.setResistance(5.0F);
|
||||
this.setLightLevel(1.0F);
|
||||
this.setStepSound(Block.soundTypeGlass);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(IBlockState state, Random rand, int fortune)
|
||||
{
|
||||
return BOPItems.crystal_shard;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int quantityDropped(Random random)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,141 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.properties.PropertyEnum;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import biomesoplenty.api.block.BOPPlant;
|
||||
import biomesoplenty.api.item.BOPItems;
|
||||
|
||||
public class BlockFruit extends BOPPlant
|
||||
{
|
||||
public static final PropertyEnum VARIANT_PROP = PropertyEnum.create("variant", FruitType.class);
|
||||
|
||||
public BlockFruit()
|
||||
{
|
||||
super(Material.plants);
|
||||
this.setStepSound(soundTypeGrass);
|
||||
this.setBlockBounds(0.25F, 0.25F, 0.25F, 0.75F, 1.0F, 0.75F);
|
||||
// TODO: once the mechanism for farming fruit is established: this.setCreativeTab(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta)
|
||||
{
|
||||
// only one property to worry about, the variant, so just map [0 => STALAGMITE, 1 => STALACTITE]
|
||||
return this.getDefaultState().withProperty(VARIANT_PROP, FruitType.values()[meta]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state)
|
||||
{
|
||||
// only one property to worry about, the variant, so just map [0 => STALAGMITE, 1 => STALACTITE]
|
||||
return ((FruitType) state.getValue(VARIANT_PROP)).ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockState createBlockState()
|
||||
{
|
||||
return new BlockState(this, new IProperty[] { VARIANT_PROP });
|
||||
}
|
||||
|
||||
@Override
|
||||
public IProperty[] getPresetProperties()
|
||||
{
|
||||
return new IProperty[] { VARIANT_PROP };
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getStateName(IBlockState state, boolean fullName)
|
||||
{
|
||||
return ((FruitType) state.getValue(VARIANT_PROP)).getName() + "_block";
|
||||
}
|
||||
|
||||
// only allow fruit to hang from leaves
|
||||
@Override
|
||||
public boolean canBlockStay(World world, BlockPos pos, IBlockState state)
|
||||
{
|
||||
Block blockAbove = world.getBlockState(pos.up()).getBlock();
|
||||
return blockAbove == Blocks.leaves || blockAbove == Blocks.leaves2; /* TODO: add BOP leave types - maybe check the material instead? */
|
||||
}
|
||||
|
||||
// In creative mode, pick block to get the fruit item
|
||||
@Override
|
||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, BlockPos pos)
|
||||
{
|
||||
IBlockState state = world.getBlockState(pos);
|
||||
Item item = ((FruitType) state.getValue(VARIANT_PROP)).getItem();
|
||||
int meta = damageDropped(state);
|
||||
return new ItemStack(item, 1, meta);
|
||||
}
|
||||
|
||||
// fruit blocks drop the corresponding fruit item when broken
|
||||
@Override
|
||||
public Item getItemDropped(IBlockState state, Random rand, int fortune)
|
||||
{
|
||||
return ((FruitType) state.getValue(VARIANT_PROP)).getItem();
|
||||
}
|
||||
|
||||
// prevent fruit block meta value affecting fruit item dropped
|
||||
@Override
|
||||
public int damageDropped(IBlockState state)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
// enum representing the fruit variants
|
||||
// TODO: take outside the class so it can be reused in leaves?
|
||||
public static enum FruitType implements IStringSerializable
|
||||
{
|
||||
|
||||
APPLE, PERSIMMON, PEACH, PEAR;
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return this.name().toLowerCase();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return getName();
|
||||
}
|
||||
|
||||
// get the item dropped when this type of fruit block is broken/picked
|
||||
public Item getItem() {
|
||||
switch (this)
|
||||
{
|
||||
case PERSIMMON:
|
||||
return BOPItems.persimmon;
|
||||
case PEACH:
|
||||
return BOPItems.peach;
|
||||
case PEAR:
|
||||
return BOPItems.pear;
|
||||
case APPLE: default:
|
||||
return Items.apple;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.block;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.properties.IProperty;
|
||||
import net.minecraft.block.properties.PropertyEnum;
|
||||
import net.minecraft.block.state.BlockState;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import biomesoplenty.api.block.BOPPlant;
|
||||
|
||||
public class BlockStoneFormations extends BOPPlant
|
||||
{
|
||||
public static final PropertyEnum VARIANT_PROP = PropertyEnum.create("variant", StoneFormationType.class);
|
||||
|
||||
public BlockStoneFormations()
|
||||
{
|
||||
super(Material.vine);
|
||||
this.setHardness(0.5F);
|
||||
this.setStepSound(soundTypePiston);
|
||||
}
|
||||
|
||||
// bounding box is not full size
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess worldIn, BlockPos pos) {
|
||||
float radius = 0.3F;
|
||||
float height = 0.6F;
|
||||
switch ((StoneFormationType) worldIn.getBlockState(pos).getValue(VARIANT_PROP))
|
||||
{
|
||||
case STALACTITE:
|
||||
// against top of block for stalactites
|
||||
this.setBlockBounds(0.5F - radius, 1.0F - height, 0.5F - radius, 0.5F + radius, 1.0F, 0.5F + radius);
|
||||
break;
|
||||
case STALAGMITE:
|
||||
// against bottom of block for stalagmites
|
||||
this.setBlockBounds(0.5F - radius, 0.0F, 0.5F - radius, 0.5F + radius, height, 0.5F + radius);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockState getStateFromMeta(int meta)
|
||||
{
|
||||
// only one property to worry about, the variant, so just map [0 => STALAGMITE, 1 => STALACTITE]
|
||||
return this.getDefaultState().withProperty(VARIANT_PROP, StoneFormationType.values()[meta]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetaFromState(IBlockState state)
|
||||
{
|
||||
// only one property to worry about, the variant, so just map [0 => STALAGMITE, 1 => STALACTITE]
|
||||
return ((StoneFormationType) state.getValue(VARIANT_PROP)).ordinal();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected BlockState createBlockState()
|
||||
{
|
||||
return new BlockState(this, new IProperty[] { VARIANT_PROP });
|
||||
}
|
||||
|
||||
@Override
|
||||
public IProperty[] getPresetProperties()
|
||||
{
|
||||
return new IProperty[] { VARIANT_PROP };
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getStateName(IBlockState state, boolean fullName)
|
||||
{
|
||||
return ((StoneFormationType) state.getValue(VARIANT_PROP)).getName();
|
||||
}
|
||||
|
||||
// only allow stalactites hanging from stone, and only allow stalagmites on top of stone
|
||||
@Override
|
||||
public boolean canBlockStay(World world, BlockPos pos, IBlockState state)
|
||||
{
|
||||
IBlockState touching;
|
||||
switch ((StoneFormationType)state.getValue(VARIANT_PROP))
|
||||
{
|
||||
case STALACTITE:
|
||||
touching = world.getBlockState(pos.up());
|
||||
break;
|
||||
case STALAGMITE: default:
|
||||
touching = world.getBlockState(pos.down());
|
||||
break;
|
||||
}
|
||||
return touching.getBlock() == Blocks.stone;
|
||||
}
|
||||
|
||||
// enum representing the 2 variants of stone formations
|
||||
public static enum StoneFormationType implements IStringSerializable
|
||||
{
|
||||
STALAGMITE, STALACTITE;
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return this.name().toLowerCase();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return getName();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -10,6 +10,7 @@ package biomesoplenty.common.init;
|
|||
|
||||
import static biomesoplenty.api.block.BOPBlocks.*;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
|
@ -18,6 +19,7 @@ import biomesoplenty.common.block.BlockAsh;
|
|||
import biomesoplenty.common.block.BlockBOPDirt;
|
||||
import biomesoplenty.common.block.BlockBOPFlower;
|
||||
import biomesoplenty.common.block.BlockBOPFlower2;
|
||||
import biomesoplenty.common.block.BlockBOPGeneric;
|
||||
import biomesoplenty.common.block.BlockBOPGrass;
|
||||
import biomesoplenty.common.block.BlockBOPLilypad;
|
||||
import biomesoplenty.common.block.BlockBOPLog;
|
||||
|
@ -30,10 +32,13 @@ import biomesoplenty.common.block.BlockBOPStone;
|
|||
import biomesoplenty.common.block.BlockBamboo;
|
||||
import biomesoplenty.common.block.BlockBones;
|
||||
import biomesoplenty.common.block.BlockCoral;
|
||||
import biomesoplenty.common.block.BlockCrystal;
|
||||
import biomesoplenty.common.block.BlockFruit;
|
||||
import biomesoplenty.common.block.BlockGem;
|
||||
import biomesoplenty.common.block.BlockGemOre;
|
||||
import biomesoplenty.common.block.BlockHive;
|
||||
import biomesoplenty.common.block.BlockMud;
|
||||
import biomesoplenty.common.block.BlockStoneFormations;
|
||||
import biomesoplenty.common.block.BlockTurnip;
|
||||
import biomesoplenty.common.block.BlockFlesh;
|
||||
import biomesoplenty.common.handler.GuiEventHandler;
|
||||
|
@ -66,7 +71,24 @@ public class ModBlocks
|
|||
grass = registerBlock(new BlockBOPGrass(), "grass");
|
||||
waterlily = registerBlock(new BlockBOPLilypad(), "waterlily");
|
||||
dirt = registerBlock(new BlockBOPDirt(), "dirt");
|
||||
stone_formations = registerBlock(new BlockStoneFormations(),"stone_formations");
|
||||
fruit_block = registerBlock(new BlockFruit(), "fruit_block");
|
||||
crystal = registerBlock(new BlockCrystal(), "crystal");
|
||||
|
||||
// generics
|
||||
ash_stone = registerBlock(new BlockBOPGeneric(), "ash_stone");
|
||||
crag_rock = registerBlock((new BlockBOPGeneric()).setStepSound(Block.soundTypeStone), "crag_rock");
|
||||
dried_dirt = registerBlock(new BlockBOPGeneric(), "dried_dirt"); dried_dirt.setHarvestLevel("pickaxe",0);
|
||||
hard_dirt = registerBlock((new BlockBOPGeneric()).setHardness(0.7F), "hard_dirt");
|
||||
hard_ice = registerBlock((new BlockBOPGeneric()).setHardness(0.75F), "hard_ice");
|
||||
hard_sand = registerBlock((new BlockBOPGeneric(Material.sand)).setHardness(0.9F).setStepSound(Block.soundTypeSand), "hard_sand");
|
||||
mud_brick = registerBlock((new BlockBOPGeneric()).setResistance(2.0F), "mud_brick");
|
||||
|
||||
|
||||
}
|
||||
|
||||
private static Block registerBlock(Block block, String name) {
|
||||
return registerBlock((BOPBlock)block,name);
|
||||
}
|
||||
|
||||
private static Block registerBlock(BOPBlock block, String name)
|
||||
|
|
|
@ -28,6 +28,10 @@ public class ModItems
|
|||
mudball = registerItem(new ItemMudball(), "mudball");
|
||||
turnip_seeds = registerItem(new ItemSeeds(BOPBlocks.turnip_block, Blocks.farmland), "turnip_seeds");
|
||||
turnip = registerItem(new ItemFood(3, 0.4F, false), "turnip");
|
||||
persimmon = registerItem(new ItemFood(5, 0.2F, false), "persimmon");
|
||||
peach = registerItem(new ItemFood(5, 0.5F, false), "peach");
|
||||
pear = registerItem(new ItemFood(5, 0.3F, false), "pear");
|
||||
crystal_shard = registerItem(new Item(), "crystal_shard");
|
||||
}
|
||||
|
||||
private static Item registerItem(Item item, String name)
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"variants": {
|
||||
"normal": { "model": "biomesoplenty:ash_stone" }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"variants": {
|
||||
"normal": { "model": "biomesoplenty:crag_rock" }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"variants": {
|
||||
"normal": { "model": "biomesoplenty:crystal" }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"variants": {
|
||||
"normal": { "model": "biomesoplenty:dried_dirt" }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"variants": {
|
||||
"variant=apple": { "model": "biomesoplenty:apple_block" },
|
||||
"variant=persimmon": { "model": "biomesoplenty:persimmon_block" },
|
||||
"variant=peach": { "model": "biomesoplenty:peach_block" },
|
||||
"variant=pear": { "model": "biomesoplenty:pear_block" }
|
||||
}
|
||||
}
|
|
@ -9,6 +9,8 @@
|
|||
"snowy=false,variant=sandy_grass_block": { "model": "biomesoplenty:sandy_grass_block" },
|
||||
"snowy=true,variant=sandy_grass_block": { "model": "biomesoplenty:sandy_grass_block_snowed" },
|
||||
"snowy=false,variant=silty_grass_block": { "model": "biomesoplenty:silty_grass_block" },
|
||||
"snowy=true,variant=silty_grass_block": { "model": "biomesoplenty:silty_grass_block_snowed" }
|
||||
"snowy=true,variant=silty_grass_block": { "model": "biomesoplenty:silty_grass_block_snowed" },
|
||||
"snowy=false,variant=origin_grass_block": { "model": "biomesoplenty:origin_grass_block" },
|
||||
"snowy=true,variant=origin_grass_block": { "model": "biomesoplenty:origin_grass_block_snowed" }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"variants": {
|
||||
"normal": { "model": "biomesoplenty:hard_dirt" }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"variants": {
|
||||
"normal": { "model": "biomesoplenty:hard_ice" }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"variants": {
|
||||
"normal": { "model": "biomesoplenty:hard_sand" }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"variants": {
|
||||
"normal": { "model": "biomesoplenty:mud_brick" }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"variants": {
|
||||
"variant=stalagmite": { "model": "biomesoplenty:stalagmite" },
|
||||
"variant=stalactite": { "model": "biomesoplenty:stalactite" }
|
||||
}
|
||||
}
|
|
@ -16,6 +16,7 @@ tile.grass.smoldering_grass_block.name=Smoldering Grass Block
|
|||
tile.grass.loamy_grass_block.name=Loamy Grass Block
|
||||
tile.grass.sandy_grass_block.name=Sandy Grass Block
|
||||
tile.grass.silty_grass_block.name=Silty Grass Block
|
||||
tile.grass.origin_grass_block.name=Origin Grass Block
|
||||
|
||||
tile.coral.pink.name=Pink Coral
|
||||
tile.coral.orange.name=Orange Coral
|
||||
|
@ -140,7 +141,28 @@ tile.dirt.coarse_loamy_dirt.name=Coarse Loamy Dirt
|
|||
tile.dirt.coarse_sandy_dirt.name=Coarse Sandy Dirt
|
||||
tile.dirt.coarse_silty_dirt.name=Coarse Silty Dirt
|
||||
|
||||
tile.stone_formations.stalagmite.name=Stalagmite
|
||||
tile.stone_formations.stalactite.name=Stalactite
|
||||
|
||||
tile.fruit_block.apple_block.name=Apple Block
|
||||
tile.fruit_block.persimmon_block.name=Persimmon Block
|
||||
tile.fruit_block.peach_block.name=Peach Block
|
||||
tile.fruit_block.pear_block.name=Pear Block
|
||||
|
||||
tile.ash_stone.name=Ash Stone
|
||||
tile.hard_sand.name=Hardened Sand
|
||||
tile.hard_dirt.name=Hardened Dirt
|
||||
tile.hard_ice.name=Hardened Ice
|
||||
tile.dried_dirt.name=Dried Dirt
|
||||
tile.crag_rock.name=Crag Rock
|
||||
tile.mud_brick.name=Mud Bricks
|
||||
tile.crystal.name=Celestial Crystal
|
||||
|
||||
item.fleshchunk.name=Chunk of Flesh
|
||||
item.mudball.name=Mud Ball
|
||||
item.turnip.name=Turnip
|
||||
item.turnip_seeds.name=Turnip Seeds
|
||||
item.persimmon.name=Persimmon
|
||||
item.peach.name=Peach
|
||||
item.pear.name=Pear
|
||||
item.crystal_shard.name=Celestial Crystal Shard
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cross",
|
||||
"textures": {
|
||||
"cross": "biomesoplenty:blocks/apple_block"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "biomesoplenty:blocks/ash_stone"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "biomesoplenty:blocks/crag_rock"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "biomesoplenty:blocks/crystal"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "biomesoplenty:blocks/dried_dirt"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "biomesoplenty:blocks/hard_dirt"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "biomesoplenty:blocks/hard_ice"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "biomesoplenty:blocks/hard_sand"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "biomesoplenty:blocks/mud_brick"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"parent": "block/cube_bottom_top",
|
||||
"textures": {
|
||||
"particle": "biomesoplenty:blocks/dirt_origin",
|
||||
"bottom": "biomesoplenty:blocks/dirt_origin",
|
||||
"top": "biomesoplenty:blocks/grass_origin_top",
|
||||
"side": "biomesoplenty:blocks/grass_origin_side"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"parent": "block/cube_bottom_top",
|
||||
"textures": {
|
||||
"particle": "biomesoplenty:blocks/dirt_origin",
|
||||
"bottom": "biomesoplenty:blocks/dirt_origin",
|
||||
"top": "biomesoplenty:blocks/grass_origin_top",
|
||||
"side": "biomesoplenty:blocks/grass_origin_side_snowed"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cross",
|
||||
"textures": {
|
||||
"cross": "biomesoplenty:blocks/peach_block"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cross",
|
||||
"textures": {
|
||||
"cross": "biomesoplenty:blocks/pear_block"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cross",
|
||||
"textures": {
|
||||
"cross": "biomesoplenty:blocks/persimmon_block"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cross",
|
||||
"textures": {
|
||||
"cross": "biomesoplenty:blocks/stalactite"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "block/cross",
|
||||
"textures": {
|
||||
"cross": "biomesoplenty:blocks/stalagmite"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"parent": "biomesoplenty:block/ash_stone",
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ 10, -45, 170 ],
|
||||
"translation": [ 0, 1.5, -2.75 ],
|
||||
"scale": [ 0.375, 0.375, 0.375 ]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"parent": "biomesoplenty:block/crag_rock",
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ 10, -45, 170 ],
|
||||
"translation": [ 0, 1.5, -2.75 ],
|
||||
"scale": [ 0.375, 0.375, 0.375 ]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"parent": "biomesoplenty:block/crystal",
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ 10, -45, 170 ],
|
||||
"translation": [ 0, 1.5, -2.75 ],
|
||||
"scale": [ 0.375, 0.375, 0.375 ]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"parent": "builtin/generated",
|
||||
"textures": {
|
||||
"layer0": "biomesoplenty:items/crystal_shard"
|
||||
},
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ -90, 0, 0 ],
|
||||
"translation": [ 0, 1, -3 ],
|
||||
"scale": [ 0.55, 0.55, 0.55 ]
|
||||
},
|
||||
"firstperson": {
|
||||
"rotation": [ 0, -135, 25 ],
|
||||
"translation": [ 0, 4, 2 ],
|
||||
"scale": [ 1.7, 1.7, 1.7 ]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"parent": "biomesoplenty:block/dried_dirt",
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ 10, -45, 170 ],
|
||||
"translation": [ 0, 1.5, -2.75 ],
|
||||
"scale": [ 0.375, 0.375, 0.375 ]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"parent": "biomesoplenty:block/hard_dirt",
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ 10, -45, 170 ],
|
||||
"translation": [ 0, 1.5, -2.75 ],
|
||||
"scale": [ 0.375, 0.375, 0.375 ]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"parent": "biomesoplenty:block/hard_ice",
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ 10, -45, 170 ],
|
||||
"translation": [ 0, 1.5, -2.75 ],
|
||||
"scale": [ 0.375, 0.375, 0.375 ]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"parent": "biomesoplenty:block/hard_sand",
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ 10, -45, 170 ],
|
||||
"translation": [ 0, 1.5, -2.75 ],
|
||||
"scale": [ 0.375, 0.375, 0.375 ]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"parent": "biomesoplenty:block/mud_brick",
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ 10, -45, 170 ],
|
||||
"translation": [ 0, 1.5, -2.75 ],
|
||||
"scale": [ 0.375, 0.375, 0.375 ]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"parent": "biomesoplenty:block/origin_grass_block",
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ 10, -45, 170 ],
|
||||
"translation": [ 0, 1.5, -2.75 ],
|
||||
"scale": [ 0.375, 0.375, 0.375 ]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"parent": "builtin/generated",
|
||||
"textures": {
|
||||
"layer0": "biomesoplenty:items/peach"
|
||||
},
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ -90, 0, 0 ],
|
||||
"translation": [ 0, 1, -3 ],
|
||||
"scale": [ 0.55, 0.55, 0.55 ]
|
||||
},
|
||||
"firstperson": {
|
||||
"rotation": [ 0, -135, 25 ],
|
||||
"translation": [ 0, 4, 2 ],
|
||||
"scale": [ 1.7, 1.7, 1.7 ]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"parent": "builtin/generated",
|
||||
"textures": {
|
||||
"layer0": "biomesoplenty:items/pear"
|
||||
},
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ -90, 0, 0 ],
|
||||
"translation": [ 0, 1, -3 ],
|
||||
"scale": [ 0.55, 0.55, 0.55 ]
|
||||
},
|
||||
"firstperson": {
|
||||
"rotation": [ 0, -135, 25 ],
|
||||
"translation": [ 0, 4, 2 ],
|
||||
"scale": [ 1.7, 1.7, 1.7 ]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"parent": "builtin/generated",
|
||||
"textures": {
|
||||
"layer0": "biomesoplenty:items/persimmon"
|
||||
},
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ -90, 0, 0 ],
|
||||
"translation": [ 0, 1, -3 ],
|
||||
"scale": [ 0.55, 0.55, 0.55 ]
|
||||
},
|
||||
"firstperson": {
|
||||
"rotation": [ 0, -135, 25 ],
|
||||
"translation": [ 0, 4, 2 ],
|
||||
"scale": [ 1.7, 1.7, 1.7 ]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"parent": "builtin/generated",
|
||||
"textures": {
|
||||
"layer0": "biomesoplenty:blocks/stalactite"
|
||||
},
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ -90, 0, 0 ],
|
||||
"translation": [ 0, 1, -3 ],
|
||||
"scale": [ 0.55, 0.55, 0.55 ]
|
||||
},
|
||||
"firstperson": {
|
||||
"rotation": [ 0, -135, 25 ],
|
||||
"translation": [ 0, 4, 2 ],
|
||||
"scale": [ 1.7, 1.7, 1.7 ]
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"parent": "builtin/generated",
|
||||
"textures": {
|
||||
"layer0": "biomesoplenty:blocks/stalagmite"
|
||||
},
|
||||
"display": {
|
||||
"thirdperson": {
|
||||
"rotation": [ -90, 0, 0 ],
|
||||
"translation": [ 0, 1, -3 ],
|
||||
"scale": [ 0.55, 0.55, 0.55 ]
|
||||
},
|
||||
"firstperson": {
|
||||
"rotation": [ 0, -135, 25 ],
|
||||
"translation": [ 0, 4, 2 ],
|
||||
"scale": [ 1.7, 1.7, 1.7 ]
|
||||
}
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 329 B |
After Width: | Height: | Size: 536 B |
After Width: | Height: | Size: 769 B |
After Width: | Height: | Size: 439 B |
After Width: | Height: | Size: 354 B |
After Width: | Height: | Size: 640 B |
After Width: | Height: | Size: 480 B |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 698 B |
After Width: | Height: | Size: 466 B |
After Width: | Height: | Size: 601 B |
After Width: | Height: | Size: 613 B |
After Width: | Height: | Size: 526 B |
After Width: | Height: | Size: 308 B |
After Width: | Height: | Size: 317 B |
After Width: | Height: | Size: 312 B |
After Width: | Height: | Size: 273 B |
After Width: | Height: | Size: 281 B |
After Width: | Height: | Size: 437 B |
After Width: | Height: | Size: 355 B |
After Width: | Height: | Size: 364 B |
After Width: | Height: | Size: 351 B |