mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-22 05:02:34 +00:00
Auto-format fix imports, tabs/spaces
This commit is contained in:
1 parent
5816af57bc
commit
cce3b7b901
174 files changed
+1025
-1259
No files matched your search
@@ -3,8 +3,8 @@ package binnie.botany;
|
||||
import binnie.Constants;
|
||||
import binnie.botany.api.EnumAcidity;
|
||||
import binnie.botany.api.EnumSoilType;
|
||||
import binnie.botany.api.IFlower;
|
||||
import binnie.botany.api.IBlockSoil;
|
||||
import binnie.botany.api.IFlower;
|
||||
import binnie.botany.ceramic.BlockCeramic;
|
||||
import binnie.botany.ceramic.BlockCeramicPatterned;
|
||||
import binnie.botany.ceramic.BlockStainedGlass;
|
||||
|
||||
@@ -2,7 +2,6 @@ package binnie.botany;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -8,8 +8,6 @@ import net.minecraft.item.Item;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public interface IAlleleFlowerSpecies extends IAlleleSpecies, IAlleleProperty<IAlleleFlowerSpecies> {
|
||||
|
||||
IFlowerType getType();
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
package binnie.botany.api;
|
||||
|
||||
import binnie.botany.api.EnumAcidity;
|
||||
import binnie.botany.api.EnumMoisture;
|
||||
import binnie.botany.api.EnumSoilType;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
@@ -3,8 +3,6 @@ package binnie.botany.api;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IClassification;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public interface IFlowerFactory {
|
||||
|
||||
IAlleleFlowerSpeciesBuilder createSpecies(String uid, String unlocalizedName, String authority, String unlocalizedDescription, boolean isDominant, IClassification branch, String binomial, IFlowerType flowerType);
|
||||
|
||||
@@ -6,8 +6,6 @@ import net.minecraft.item.Item;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public interface IFlowerType<I extends IFlowerType<I>> extends Comparable<I> {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -66,7 +66,7 @@ public class BlockCeramic extends Block implements IColoredBlock, IItemModelRegi
|
||||
}
|
||||
return hasBeenBroken;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public TileEntity createTileEntity(World world, IBlockState state) {
|
||||
return new TileCeramic();
|
||||
@@ -76,11 +76,11 @@ public class BlockCeramic extends Block implements IColoredBlock, IItemModelRegi
|
||||
public boolean hasTileEntity(IBlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
|
||||
TileCeramic ceramic = TileUtil.getTile(worldIn, pos, TileCeramic.class);
|
||||
if(ceramic != null){
|
||||
if (ceramic != null) {
|
||||
ceramic.setColor(EnumFlowerColor.VALUES[stack.getItemDamage()]);
|
||||
}
|
||||
}
|
||||
@@ -96,7 +96,7 @@ public class BlockCeramic extends Block implements IColoredBlock, IItemModelRegi
|
||||
@Override
|
||||
public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) {
|
||||
TileCeramic ceramic = TileUtil.getTile(world, pos, TileCeramic.class);
|
||||
if(ceramic != null){
|
||||
if (ceramic != null) {
|
||||
return ceramic.getStack();
|
||||
}
|
||||
return super.getPickBlock(state, target, world, pos, player);
|
||||
@@ -106,7 +106,7 @@ public class BlockCeramic extends Block implements IColoredBlock, IItemModelRegi
|
||||
@Override
|
||||
public int colorMultiplier(IBlockState state, IBlockAccess world, BlockPos pos, int tintIndex) {
|
||||
TileCeramic ceramic = TileUtil.getTile(world, pos, TileCeramic.class);
|
||||
if(ceramic != null){
|
||||
if (ceramic != null) {
|
||||
return ceramic.getColor().getColor(false);
|
||||
}
|
||||
return EnumFlowerColor.get(0).getColor(false);
|
||||
|
||||
@@ -56,7 +56,7 @@ public class BlockStainedGlass extends Block implements IBlockMetadata, IColored
|
||||
public BlockRenderLayer getBlockLayer() {
|
||||
return BlockRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerModel(Item item, IModelManager manager) {
|
||||
@@ -65,21 +65,21 @@ public class BlockStainedGlass extends Block implements IBlockMetadata, IColored
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) {
|
||||
IBlockState iblockstate = blockAccess.getBlockState(pos.offset(side));
|
||||
Block block = iblockstate.getBlock();
|
||||
if (blockState != iblockstate) {
|
||||
return true;
|
||||
}
|
||||
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) {
|
||||
IBlockState iblockstate = blockAccess.getBlockState(pos.offset(side));
|
||||
Block block = iblockstate.getBlock();
|
||||
if (blockState != iblockstate) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (block == this){
|
||||
return false;
|
||||
}
|
||||
if (block == this) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return super.shouldSideBeRendered(blockState, blockAccess, pos, side);
|
||||
}
|
||||
return super.shouldSideBeRendered(blockState, blockAccess, pos, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
|
||||
@@ -128,7 +128,7 @@ public class BlockStainedGlass extends Block implements IBlockMetadata, IColored
|
||||
public int getPlacedMeta(final ItemStack stack, final World world, final BlockPos pos, final EnumFacing clickedBlock) {
|
||||
return TileEntityMetadata.getItemDamage(stack);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getDroppedMeta(IBlockState state, int tileMetadata) {
|
||||
return tileMetadata;
|
||||
@@ -174,7 +174,7 @@ public class BlockStainedGlass extends Block implements IBlockMetadata, IColored
|
||||
|
||||
@Override
|
||||
public int colorMultiplier(IBlockState state, IBlockAccess worldIn, BlockPos pos, int tintIndex) {
|
||||
if(worldIn == null || pos == null){
|
||||
if (worldIn == null || pos == null) {
|
||||
return 0;
|
||||
}
|
||||
return EnumFlowerColor.get(TileEntityMetadata.getTileMetadata(worldIn, pos)).getColor(false);
|
||||
|
||||
@@ -12,7 +12,7 @@ public class ItemCeramic extends ItemBlock implements IColoredItem {
|
||||
public ItemCeramic(BlockCeramic block) {
|
||||
super(block);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getMetadata(final int metadata) {
|
||||
return metadata;
|
||||
@@ -23,7 +23,7 @@ public class ItemCeramic extends ItemBlock implements IColoredItem {
|
||||
public int getColorFromItemstack(ItemStack stack, int tintIndex) {
|
||||
return EnumFlowerColor.get(stack.getMetadata()).getColor(false);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getItemStackDisplayName(ItemStack itemStack) {
|
||||
|
||||
@@ -10,9 +10,6 @@ import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class PigmentRecipe implements IRecipe {
|
||||
@Override
|
||||
public boolean matches(final InventoryCrafting crafting, final World world) {
|
||||
|
||||
@@ -8,38 +8,38 @@ import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class TileCeramic extends TileEntity {
|
||||
protected EnumFlowerColor color = EnumFlowerColor.Black;
|
||||
|
||||
|
||||
public void setColor(EnumFlowerColor color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
|
||||
public EnumFlowerColor getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT(NBTTagCompound compound) {
|
||||
compound.setInteger("Color", color.getID());
|
||||
return super.writeToNBT(compound);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound compound) {
|
||||
super.readFromNBT(compound);
|
||||
color = EnumFlowerColor.VALUES[compound.getInteger("Color")];
|
||||
}
|
||||
|
||||
public ItemStack getStack(){
|
||||
|
||||
public ItemStack getStack() {
|
||||
return getStack(1);
|
||||
}
|
||||
|
||||
public ItemStack getStack(int amount){
|
||||
|
||||
public ItemStack getStack(int amount) {
|
||||
int ID = 0;
|
||||
if(color != null){
|
||||
if (color != null) {
|
||||
ID = color.getID();
|
||||
}
|
||||
return new ItemStack(Botany.ceramic, amount, ID);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -118,7 +118,7 @@ public class BlockCeramicBrick extends Block implements IMultipassBlock<CeramicB
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerStateMapper() {
|
||||
ResourceLocation resourceLocation = new ResourceLocation(Constants.BOTANY_MOD_ID, "ceramicBrick");
|
||||
ResourceLocation resourceLocation = new ResourceLocation(Constants.BOTANY_MOD_ID, "ceramicBrick");
|
||||
ModelLoader.setCustomStateMapper(this, new DefaultStateMapper(resourceLocation));
|
||||
ModelManager.registerCustomBlockModel(new BlockModelEntry(
|
||||
new ModelResourceLocation(resourceLocation, "normal"),
|
||||
@@ -132,7 +132,7 @@ public class BlockCeramicBrick extends Block implements IMultipassBlock<CeramicB
|
||||
manager.registerItemModel(item, new CeramicBrickMeshDefinition());
|
||||
}
|
||||
|
||||
private class CeramicBrickMeshDefinition implements ItemMeshDefinition{
|
||||
private class CeramicBrickMeshDefinition implements ItemMeshDefinition {
|
||||
|
||||
@Override
|
||||
public ModelResourceLocation getModelLocation(ItemStack stack) {
|
||||
@@ -158,7 +158,7 @@ public class BlockCeramicBrick extends Block implements IMultipassBlock<CeramicB
|
||||
|
||||
@Override
|
||||
public IBlockState getExtendedState(IBlockState state, IBlockAccess world, BlockPos pos) {
|
||||
return ((IExtendedBlockState)super.getExtendedState(state, world, pos)).withProperty(UnlistedBlockPos.POS, pos).withProperty(UnlistedBlockAccess.BLOCKACCESS, world);
|
||||
return ((IExtendedBlockState) super.getExtendedState(state, world, pos)).withProperty(UnlistedBlockPos.POS, pos).withProperty(UnlistedBlockAccess.BLOCKACCESS, world);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -169,7 +169,7 @@ public class BlockCeramicBrick extends Block implements IMultipassBlock<CeramicB
|
||||
@Override
|
||||
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
|
||||
TileCeramicBrick ceramic = TileUtil.getTile(worldIn, pos, TileCeramicBrick.class);
|
||||
if(ceramic != null){
|
||||
if (ceramic != null) {
|
||||
int damage = stack.getItemDamage();
|
||||
ceramic.setColors(EnumFlowerColor.get(damage & 0xFF), EnumFlowerColor.get(damage >> 8 & 0xFF));
|
||||
}
|
||||
@@ -178,7 +178,7 @@ public class BlockCeramicBrick extends Block implements IMultipassBlock<CeramicB
|
||||
@Override
|
||||
public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) {
|
||||
TileCeramicBrick ceramic = TileUtil.getTile(world, pos, TileCeramicBrick.class);
|
||||
if(ceramic != null){
|
||||
if (ceramic != null) {
|
||||
return ceramic.pair().getStack(0);
|
||||
}
|
||||
return super.getPickBlock(state, target, world, pos, player);
|
||||
@@ -188,10 +188,10 @@ public class BlockCeramicBrick extends Block implements IMultipassBlock<CeramicB
|
||||
@Override
|
||||
public int colorMultiplier(IBlockState state, IBlockAccess world, BlockPos pos, int tintIndex) {
|
||||
TileCeramicBrick ceramic = TileUtil.getTile(world, pos, TileCeramicBrick.class);
|
||||
if(ceramic != null){
|
||||
if (ceramic != null) {
|
||||
if (tintIndex == 1) {
|
||||
return ceramic.getColorFirst().getColor(false);
|
||||
}else if(tintIndex == 2){
|
||||
} else if (tintIndex == 2) {
|
||||
return ceramic.getColorSecond().getColor(false);
|
||||
}
|
||||
}
|
||||
@@ -223,7 +223,7 @@ public class BlockCeramicBrick extends Block implements IMultipassBlock<CeramicB
|
||||
IBlockAccess world = extendedState.getValue(UnlistedBlockAccess.BLOCKACCESS);
|
||||
BlockPos pos = extendedState.getValue(UnlistedBlockPos.POS);
|
||||
TileCeramicBrick ceramic = TileUtil.getTile(world, pos, TileCeramicBrick.class);
|
||||
if(ceramic != null){
|
||||
if (ceramic != null) {
|
||||
return ceramic.pair();
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -58,13 +58,13 @@ public class CeramicBrickPair {
|
||||
Preconditions.checkState(sprites != null, "Sprites have not been registered.");
|
||||
return sprites[pass];
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(!(obj instanceof CeramicBrickPair)){
|
||||
if (!(obj instanceof CeramicBrickPair)) {
|
||||
return false;
|
||||
}
|
||||
return ((CeramicBrickPair)obj).ordinal() == ordinal();
|
||||
return ((CeramicBrickPair) obj).ordinal() == ordinal();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -16,7 +16,7 @@ import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
public enum CeramicBrickType implements IStringSerializable {
|
||||
Tile("tile", "Ceramic Tile"){
|
||||
Tile("tile", "Ceramic Tile") {
|
||||
@Override
|
||||
public ItemStack getRecipe(List<ItemStack> stacks) {
|
||||
if (stacks.size() != 4) {
|
||||
@@ -50,19 +50,19 @@ public enum CeramicBrickType implements IStringSerializable {
|
||||
return new CeramicBrickPair(c, c, CeramicBrickType.Tile).getStack(3);
|
||||
}
|
||||
},
|
||||
Brick("brick", "Ceramic Bricks"){
|
||||
Brick("brick", "Ceramic Bricks") {
|
||||
@Override
|
||||
public ItemStack getRecipe(List<ItemStack> stacks) {
|
||||
return getBrickRecipe(this, stacks);
|
||||
}
|
||||
},
|
||||
StripeBrick("brickstripe", "Striped Ceramic Bricks"){
|
||||
StripeBrick("brickstripe", "Striped Ceramic Bricks") {
|
||||
@Override
|
||||
public ItemStack getRecipe(List<ItemStack> stacks) {
|
||||
return getBrickRecipe(this, stacks);
|
||||
}
|
||||
},
|
||||
LargeBrick("bricklarge", "Large Ceramic Bricks"){
|
||||
LargeBrick("bricklarge", "Large Ceramic Bricks") {
|
||||
@Override
|
||||
public ItemStack getRecipe(List<ItemStack> stacks) {
|
||||
if (stacks.size() == 1) {
|
||||
@@ -111,7 +111,7 @@ public enum CeramicBrickType implements IStringSerializable {
|
||||
}
|
||||
}
|
||||
},
|
||||
Split("split", "Split Ceramic Tile"){
|
||||
Split("split", "Split Ceramic Tile") {
|
||||
@Override
|
||||
public ItemStack getRecipe(List<ItemStack> stacks) {
|
||||
if (stacks.size() != 4) {
|
||||
@@ -139,7 +139,7 @@ public enum CeramicBrickType implements IStringSerializable {
|
||||
return new CeramicBrickPair(EnumFlowerColor.get(colors[0]), EnumFlowerColor.get(colors[1]), CeramicBrickType.Split).getStack(4);
|
||||
}
|
||||
},
|
||||
Chequered("cheque", "Chequered Ceramic Tile"){
|
||||
Chequered("cheque", "Chequered Ceramic Tile") {
|
||||
@Override
|
||||
public ItemStack getRecipe(List<ItemStack> stacks) {
|
||||
if (stacks.size() != 4) {
|
||||
@@ -168,7 +168,7 @@ public enum CeramicBrickType implements IStringSerializable {
|
||||
return new CeramicBrickPair(EnumFlowerColor.get(colors[0]), EnumFlowerColor.get(colors[1]), CeramicBrickType.Chequered).getStack(4);
|
||||
}
|
||||
},
|
||||
Mixed("mixed", "Mixed Ceramic Tile"){
|
||||
Mixed("mixed", "Mixed Ceramic Tile") {
|
||||
@Override
|
||||
public ItemStack getRecipe(List<ItemStack> stacks) {
|
||||
if (stacks.size() != 4) {
|
||||
@@ -207,19 +207,19 @@ public enum CeramicBrickType implements IStringSerializable {
|
||||
return new CeramicBrickPair(EnumFlowerColor.get(colors[0]), EnumFlowerColor.get(colors[1]), CeramicBrickType.Mixed).getStack(4);
|
||||
}
|
||||
},
|
||||
VerticalBrick("verticalbrick", "Vertical Ceramic Bricks"){
|
||||
VerticalBrick("verticalbrick", "Vertical Ceramic Bricks") {
|
||||
@Override
|
||||
public ItemStack getRecipe(List<ItemStack> stacks) {
|
||||
return getVerticalBrickRecipe(stacks);
|
||||
}
|
||||
},
|
||||
VerticalStripeBrick("verticalbrickstripe", "Vertical Striped Ceramic Bricks"){
|
||||
VerticalStripeBrick("verticalbrickstripe", "Vertical Striped Ceramic Bricks") {
|
||||
@Override
|
||||
public ItemStack getRecipe(List<ItemStack> stacks) {
|
||||
return getVerticalBrickRecipe(stacks);
|
||||
}
|
||||
},
|
||||
VerticalLargeBrick("verticalbricklarge", "Large Vertical Ceramic Bricks"){
|
||||
VerticalLargeBrick("verticalbricklarge", "Large Vertical Ceramic Bricks") {
|
||||
@Override
|
||||
public ItemStack getRecipe(List<ItemStack> stacks) {
|
||||
return getVerticalBrickRecipe(stacks);
|
||||
@@ -227,7 +227,7 @@ public enum CeramicBrickType implements IStringSerializable {
|
||||
};
|
||||
|
||||
public static final CeramicBrickType[] VALUES = values();
|
||||
|
||||
|
||||
String id;
|
||||
String name;
|
||||
|
||||
@@ -250,7 +250,7 @@ public enum CeramicBrickType implements IStringSerializable {
|
||||
|
||||
public abstract ItemStack getRecipe(List<ItemStack> stacks);
|
||||
|
||||
protected ItemStack getVerticalBrickRecipe(List<ItemStack> stacks){
|
||||
protected ItemStack getVerticalBrickRecipe(List<ItemStack> stacks) {
|
||||
if (stacks.size() != 1) {
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
@@ -271,7 +271,7 @@ public enum CeramicBrickType implements IStringSerializable {
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
protected ItemStack getBrickRecipe(CeramicBrickType ceramicType, List<ItemStack> stacks){
|
||||
protected ItemStack getBrickRecipe(CeramicBrickType ceramicType, List<ItemStack> stacks) {
|
||||
if (stacks.size() == 1) {
|
||||
final ItemStack stack5 = stacks.get(0);
|
||||
final CeramicBrickPair type = new CeramicBrickPair(stack5);
|
||||
@@ -317,7 +317,7 @@ public enum CeramicBrickType implements IStringSerializable {
|
||||
protected boolean isMortar(final ItemStack stack) {
|
||||
return stack.getItem() == Botany.misc && stack.getItemDamage() == BotanyItems.Mortar.ordinal();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name().toLowerCase(Locale.ENGLISH);
|
||||
|
||||
@@ -10,7 +10,7 @@ public class ItemCeramicBrick extends ItemBlock implements IColoredItem {
|
||||
public ItemCeramicBrick(BlockCeramicBrick block) {
|
||||
super(block);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getMetadata(final int metadata) {
|
||||
return metadata;
|
||||
@@ -27,7 +27,7 @@ public class ItemCeramicBrick extends ItemBlock implements IColoredItem {
|
||||
}
|
||||
return 16777215;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getItemStackDisplayName(ItemStack itemStack) {
|
||||
|
||||
@@ -7,12 +7,10 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class TileCeramicBrick extends TileEntity{
|
||||
public class TileCeramicBrick extends TileEntity {
|
||||
private EnumFlowerColor colorFirst = EnumFlowerColor.Black;
|
||||
private EnumFlowerColor colorSecond = EnumFlowerColor.White;
|
||||
|
||||
|
||||
public void setColors(EnumFlowerColor colorFirst, EnumFlowerColor colorSecond) {
|
||||
this.colorFirst = colorFirst;
|
||||
this.colorSecond = colorSecond;
|
||||
@@ -40,40 +38,40 @@ public class TileCeramicBrick extends TileEntity{
|
||||
public int ordinal() {
|
||||
return this.colorFirst.ordinal() + this.colorSecond.ordinal() * 256 + getBlockMetadata() * 256 * 256;
|
||||
}
|
||||
|
||||
public CeramicBrickPair pair(){
|
||||
|
||||
public CeramicBrickPair pair() {
|
||||
return new CeramicBrickPair(colorFirst, colorSecond, CeramicBrickType.VALUES[getBlockMetadata()]);
|
||||
}
|
||||
|
||||
|
||||
public EnumFlowerColor getColorFirst() {
|
||||
return colorFirst;
|
||||
}
|
||||
|
||||
|
||||
public EnumFlowerColor getColorSecond() {
|
||||
return colorSecond;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public NBTTagCompound writeToNBT(NBTTagCompound compound) {
|
||||
compound.setInteger("First", colorFirst.ordinal());
|
||||
compound.setInteger("Second", colorSecond.ordinal());
|
||||
return super.writeToNBT(compound);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public NBTTagCompound getUpdateTag() {
|
||||
return writeToNBT(new NBTTagCompound());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound compound) {
|
||||
super.readFromNBT(compound);
|
||||
if(compound.hasKey("First")){
|
||||
if (compound.hasKey("First")) {
|
||||
colorFirst = EnumFlowerColor.VALUES[compound.getInteger("First")];
|
||||
}
|
||||
if(compound.hasKey("Second")){
|
||||
if (compound.hasKey("Second")) {
|
||||
colorSecond = EnumFlowerColor.VALUES[compound.getInteger("Second")];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -24,7 +24,7 @@ public abstract class FarmLogic implements IFarmLogic {
|
||||
protected final IBlockState getBlockState(World world, BlockPos pos) {
|
||||
return world.getBlockState(pos);
|
||||
}
|
||||
|
||||
|
||||
protected final Block getBlock(World world, BlockPos pos) {
|
||||
return getBlockState(world, pos).getBlock();
|
||||
}
|
||||
|
||||
@@ -36,9 +36,7 @@ import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ import binnie.botany.api.IFlowerGenome;
|
||||
import binnie.botany.api.IFlowerType;
|
||||
import binnie.botany.core.BotanyCore;
|
||||
import binnie.botany.genetics.Flower;
|
||||
import binnie.core.BinnieCore;
|
||||
import com.google.common.base.Preconditions;
|
||||
import forestry.api.core.IItemModelRegister;
|
||||
import forestry.api.core.IModelManager;
|
||||
|
||||
@@ -31,7 +31,6 @@ import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockSoil extends Block implements IBlockSoil, IItemModelRegister {
|
||||
@@ -54,38 +53,38 @@ public class BlockSoil extends Block implements IBlockSoil, IItemModelRegister {
|
||||
this.setHardness(0.5f);
|
||||
this.setSoundType(SoundType.GROUND);
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) {
|
||||
switch (side){
|
||||
case UP:
|
||||
return true;
|
||||
case NORTH:
|
||||
case SOUTH:
|
||||
case WEST:
|
||||
case EAST:
|
||||
IBlockState iblockstate = blockAccess.getBlockState(pos.offset(side));
|
||||
Block block = iblockstate.getBlock();
|
||||
return !iblockstate.isOpaqueCube() && block != Blocks.FARMLAND && block != Blocks.GRASS_PATH && block != this;
|
||||
default:
|
||||
return super.shouldSideBeRendered(blockState, blockAccess, pos, side);
|
||||
}
|
||||
}
|
||||
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side) {
|
||||
switch (side) {
|
||||
case UP:
|
||||
return true;
|
||||
case NORTH:
|
||||
case SOUTH:
|
||||
case WEST:
|
||||
case EAST:
|
||||
IBlockState iblockstate = blockAccess.getBlockState(pos.offset(side));
|
||||
Block block = iblockstate.getBlock();
|
||||
return !iblockstate.isOpaqueCube() && block != Blocks.FARMLAND && block != Blocks.GRASS_PATH && block != this;
|
||||
default:
|
||||
return super.shouldSideBeRendered(blockState, blockAccess, pos, side);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to determine ambient occlusion and culling when rebuilding chunks for render
|
||||
*/
|
||||
@Override
|
||||
public boolean isOpaqueCube(IBlockState state){
|
||||
return false;
|
||||
}
|
||||
/**
|
||||
* Used to determine ambient occlusion and culling when rebuilding chunks for render
|
||||
*/
|
||||
@Override
|
||||
public boolean isOpaqueCube(IBlockState state) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isFullCube(IBlockState state){
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean isFullCube(IBlockState state) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName() {
|
||||
|
||||
@@ -4,8 +4,8 @@ import binnie.botany.Botany;
|
||||
import binnie.botany.api.EnumAcidity;
|
||||
import binnie.botany.api.EnumMoisture;
|
||||
import binnie.botany.api.EnumSoilType;
|
||||
import binnie.botany.api.IFlower;
|
||||
import binnie.botany.api.IBlockSoil;
|
||||
import binnie.botany.api.IFlower;
|
||||
import binnie.botany.flower.TileEntityFlower;
|
||||
import binnie.botany.items.BotanyItems;
|
||||
import binnie.core.BinnieCore;
|
||||
|
||||
@@ -38,7 +38,6 @@ import net.minecraftforge.oredict.RecipeSorter;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -165,10 +164,10 @@ public class ModuleGardening implements IInitializable {
|
||||
ModuleGardening.queuedAlkalineFertilisers.put(BotanyItems.AshPowder.get(1), 1);
|
||||
ModuleGardening.queuedAlkalineFertilisers.put(BotanyItems.PulpPowder.get(1), 1);
|
||||
ModuleGardening.queuedAlkalineFertilisers.put(Mods.Forestry.stack("ash"), 2);
|
||||
ModuleGardening.queuedAlkalineFertilisers.put(Mods.Forestry.stack( "wood_pulp"), 2);
|
||||
ModuleGardening.queuedAlkalineFertilisers.put(Mods.Forestry.stack("wood_pulp"), 2);
|
||||
ModuleGardening.queuedNutrientFertilisers.put(BotanyItems.CompostPowder.get(1), 1);
|
||||
ModuleGardening.queuedNutrientFertilisers.put(BotanyItems.FertiliserPowder.get(1), 1);
|
||||
ModuleGardening.queuedNutrientFertilisers.put(Mods.Forestry.stack( "fertilizer_bio"), 2);
|
||||
ModuleGardening.queuedNutrientFertilisers.put(Mods.Forestry.stack("fertilizer_bio"), 2);
|
||||
ModuleGardening.queuedNutrientFertilisers.put(Mods.Forestry.stack("fertilizer_compound"), 2);
|
||||
for (final Map.Entry<ItemStack, Integer> entry : ModuleGardening.queuedAcidFertilisers.entrySet()) {
|
||||
this.addAcidFertiliser(entry.getKey(), entry.getValue());
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
package binnie.botany.genetics;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.api.IBotanistTracker;
|
||||
import binnie.botany.core.BotanyCore;
|
||||
import forestry.api.genetics.IBreedingTracker;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.core.genetics.BreedingTracker;
|
||||
|
||||
@@ -90,7 +90,7 @@ public enum EnumFlowerColor implements IFlowerColour, IAlleleInteger, IStringSer
|
||||
YellowGreen("yellowGreen", 10145074);
|
||||
|
||||
public static final EnumFlowerColor[] VALUES = values();
|
||||
|
||||
|
||||
int color;
|
||||
int colorDis;
|
||||
String uid;
|
||||
|
||||
@@ -16,9 +16,7 @@ import forestry.core.genetics.Individual;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
@@ -12,8 +12,6 @@ import net.minecraft.util.NonNullList;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemClay extends Item implements IColoredItem, IItemModelRegister {
|
||||
public ItemClay() {
|
||||
this.setUnlocalizedName("clay");
|
||||
|
||||
@@ -12,8 +12,6 @@ import net.minecraft.util.NonNullList;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemPigment extends Item implements IItemModelRegister, IColoredItem {
|
||||
public ItemPigment() {
|
||||
this.setUnlocalizedName("pigment");
|
||||
|
||||
Reference in new issue
Block a user