mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-18 19:39:37 +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
@@ -12,5 +12,5 @@ public final class Constants {
|
||||
public static final String LIQUID_SEED_OIL = "seedoil";
|
||||
public static final String LIQUID_CREOSOTE = "Creosote Oil";
|
||||
public static final String LIQUID_BIO_ETHANOL = "bioethanol";
|
||||
public static final String LIQUID_FOR_HONEY= "for.honey";
|
||||
public static final String LIQUID_FOR_HONEY = "for.honey";
|
||||
}
|
||||
@@ -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");
|
||||
|
||||
@@ -19,9 +19,7 @@ import binnie.core.models.ModelManager;
|
||||
import binnie.core.network.BinnieCorePacketID;
|
||||
import binnie.core.network.BinniePacketHandler;
|
||||
import binnie.core.network.IPacketID;
|
||||
import binnie.core.proxy.BinnieModProxy;
|
||||
import binnie.core.proxy.BinnieProxy;
|
||||
import binnie.core.proxy.IBinnieModProxy;
|
||||
import binnie.core.proxy.IBinnieProxy;
|
||||
import binnie.core.triggers.ModuleTrigger;
|
||||
import binnie.craftgui.minecraft.ModuleCraftGUI;
|
||||
@@ -58,7 +56,7 @@ public final class BinnieCore extends AbstractMod {
|
||||
public BinnieCore() {
|
||||
FluidRegistry.enableUniversalBucket();
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("NullableProblems")
|
||||
@Mod.Instance(Constants.CORE_MOD_ID)
|
||||
private static BinnieCore instance;
|
||||
@@ -193,7 +191,7 @@ public final class BinnieCore extends AbstractMod {
|
||||
@SubscribeEvent
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void handleSpeciesDiscovered(final ForestryEvent.SpeciesDiscovered event) {
|
||||
if(event.username == null){
|
||||
if (event.username == null) {
|
||||
return;
|
||||
}
|
||||
final EntityPlayerMP player = FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().getPlayerByUUID(event.username.getId());
|
||||
@@ -214,7 +212,7 @@ public final class BinnieCore extends AbstractMod {
|
||||
// }
|
||||
Binnie.RESOURCE.registerSprites();
|
||||
}
|
||||
|
||||
|
||||
@SubscribeEvent
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void handleModelBake(ModelBakeEvent event) {
|
||||
|
||||
@@ -45,13 +45,13 @@ public class BlockMetadata extends BlockContainer implements IBlockMetadata {
|
||||
public boolean hasTileEntity(IBlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) {
|
||||
return getPickBlock(world, pos);
|
||||
}
|
||||
|
||||
/* IBLOCKMETADATA */
|
||||
|
||||
/* IBLOCKMETADATA */
|
||||
@Override
|
||||
public String getDisplayName(final ItemStack par1ItemStack) {
|
||||
return this.getLocalizedName();
|
||||
@@ -61,7 +61,7 @@ public class BlockMetadata extends BlockContainer implements IBlockMetadata {
|
||||
public int getPlacedMeta(final ItemStack item, final World world, final BlockPos pos, final EnumFacing clickedBlock) {
|
||||
return TileEntityMetadata.getItemDamage(item);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getDroppedMeta(IBlockState state, int tileMetadata) {
|
||||
return getMetaFromState(state);
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package binnie.core.block;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
@@ -11,12 +9,14 @@ import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public interface IMultipassBlock<K> {
|
||||
|
||||
default AxisAlignedBB getItemBoundingBox(){
|
||||
|
||||
default AxisAlignedBB getItemBoundingBox() {
|
||||
return Block.FULL_BLOCK_AABB;
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
int getRenderPasses();
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public class TileEntityMetadata extends TileEntity {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public NBTTagCompound getUpdateTag() {
|
||||
return writeToNBT(new NBTTagCompound());
|
||||
@@ -63,16 +63,16 @@ public class TileEntityMetadata extends TileEntity {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onDataPacket(NetworkManager net, SPacketUpdateTileEntity pkt) {
|
||||
super.onDataPacket(net, pkt);
|
||||
|
||||
if(pkt instanceof PacketMetadata){
|
||||
|
||||
if (pkt instanceof PacketMetadata) {
|
||||
setTileMetadata(((PacketMetadata) pkt).getMetadata(), true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SPacketUpdateTileEntity getUpdatePacket() {
|
||||
return new PacketMetadata(pos, meta, getUpdateTag());
|
||||
|
||||
@@ -6,8 +6,6 @@ import forestry.api.circuits.ChipsetManager;
|
||||
import forestry.api.circuits.ICircuitLayout;
|
||||
import forestry.api.circuits.ICircuitSocketType;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class BinnieCircuitLayout implements ICircuitLayout {
|
||||
private final String uid;
|
||||
private final AbstractMod mod;
|
||||
|
||||
@@ -27,7 +27,6 @@ import forestry.api.genetics.ISpeciesRoot;
|
||||
import forestry.api.genetics.ISpeciesType;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package binnie.core.genetics;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import forestry.api.apiculture.DefaultBeeListener;
|
||||
import forestry.api.apiculture.IBee;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
@@ -20,7 +19,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -8,7 +8,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemGenesis extends ItemCore {
|
||||
|
||||
@@ -9,7 +9,6 @@ import net.minecraft.util.NonNullList;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.List;
|
||||
|
||||
public class ItemMisc extends ItemCore {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
package binnie.core.liquid;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
class BinnieFluid extends Fluid {
|
||||
private final String name;
|
||||
private final IFluidType fluidType;
|
||||
|
||||
@@ -23,11 +23,11 @@ public enum FluidContainerType {
|
||||
public int getMaxStackSize() {
|
||||
return 16;
|
||||
}
|
||||
|
||||
public static FluidContainerType[] getBinnieContainers(){
|
||||
|
||||
public static FluidContainerType[] getBinnieContainers() {
|
||||
return new FluidContainerType[]{GLASS, CYLINDER};
|
||||
}
|
||||
|
||||
|
||||
public String getName() {
|
||||
return this.name().toLowerCase();
|
||||
}
|
||||
@@ -44,9 +44,9 @@ public enum FluidContainerType {
|
||||
public void setItem(ItemFluidContainer item) {
|
||||
this.item = item;
|
||||
}
|
||||
|
||||
public ItemStack get(int amount){
|
||||
if (item == null){
|
||||
|
||||
public ItemStack get(int amount) {
|
||||
if (item == null) {
|
||||
throw new IllegalArgumentException("Null container item: " + this);
|
||||
}
|
||||
return new ItemStack(item, amount);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package binnie.core.liquid;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.capability.templates.FluidHandlerItemStackSimple;
|
||||
@@ -24,7 +23,7 @@ public class FluidHandlerItemBinnie extends FluidHandlerItemStackSimple {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(fluid instanceof BinnieFluid) {
|
||||
if (fluid instanceof BinnieFluid) {
|
||||
BinnieFluid binnieFluid = (BinnieFluid) fluid;
|
||||
return binnieFluid.getType().canPlaceIn(containerType);
|
||||
}
|
||||
@@ -40,14 +39,13 @@ public class FluidHandlerItemBinnie extends FluidHandlerItemStackSimple {
|
||||
public boolean canDrainFluidType(FluidStack fluid) {
|
||||
return contentsAllowed(fluid);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setContainerToEmpty()
|
||||
{
|
||||
super.setContainerToEmpty();
|
||||
container.setItemDamage(0); // show the empty container model
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void setContainerToEmpty() {
|
||||
super.setContainerToEmpty();
|
||||
container.setItemDamage(0); // show the empty container model
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setFluid(FluidStack fluid) {
|
||||
super.setFluid(fluid);
|
||||
|
||||
@@ -34,7 +34,6 @@ import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
public class ItemFluidContainer extends ItemFood implements IItemModelRegister {
|
||||
private final FluidContainerType container;
|
||||
@@ -92,13 +91,13 @@ public class ItemFluidContainer extends ItemFood implements IItemModelRegister {
|
||||
}
|
||||
return container.getEmpty();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack onItemUseFinish(ItemStack stack, World world, EntityLivingBase entityLiving) {
|
||||
if(entityLiving instanceof EntityPlayer){
|
||||
if (entityLiving instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) entityLiving;
|
||||
player.getFoodStats().addStats(this, stack);
|
||||
world.playSound((EntityPlayer)null, player.posX, player.posY, player.posZ, SoundEvents.ENTITY_PLAYER_BURP, SoundCategory.PLAYERS, 0.5F, world.rand.nextFloat() * 0.1F + 0.9F);
|
||||
world.playSound((EntityPlayer) null, player.posX, player.posY, player.posZ, SoundEvents.ENTITY_PLAYER_BURP, SoundCategory.PLAYERS, 0.5F, world.rand.nextFloat() * 0.1F + 0.9F);
|
||||
onFoodEaten(stack, world, player);
|
||||
return this.container.getEmpty();
|
||||
}
|
||||
@@ -120,7 +119,7 @@ public class ItemFluidContainer extends ItemFood implements IItemModelRegister {
|
||||
|
||||
@Override
|
||||
public EnumAction getItemUseAction(final ItemStack stack) {
|
||||
if(isDrinkable(stack)){
|
||||
if (isDrinkable(stack)) {
|
||||
return EnumAction.DRINK;
|
||||
}
|
||||
return EnumAction.NONE;
|
||||
@@ -132,25 +131,25 @@ public class ItemFluidContainer extends ItemFood implements IItemModelRegister {
|
||||
if (this.isDrinkable(stack) && playerIn.canEat(false)) {
|
||||
playerIn.setActiveHand(handIn);
|
||||
return new ActionResult<>(EnumActionResult.SUCCESS, stack);
|
||||
}else{
|
||||
} else {
|
||||
return super.onItemRightClick(worldIn, playerIn, handIn);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getMaxItemUseDuration(ItemStack stack) {
|
||||
if(isDrinkable(stack)){
|
||||
if (isDrinkable(stack)) {
|
||||
return 32;
|
||||
}else{
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getSaturationModifier(ItemStack stack){
|
||||
return 0.0F;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public float getSaturationModifier(ItemStack stack) {
|
||||
return 0.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getHealAmount(ItemStack stack) {
|
||||
return 0;
|
||||
@@ -161,7 +160,7 @@ public class ItemFluidContainer extends ItemFood implements IItemModelRegister {
|
||||
final IDrinkLiquid liquid = DrinkManager.getLiquid(fluid);
|
||||
return liquid != null && liquid.isConsumable();
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerModel(Item item, IModelManager manager) {
|
||||
@@ -169,32 +168,32 @@ public class ItemFluidContainer extends ItemFood implements IItemModelRegister {
|
||||
manager.registerItemModel(item, meshDefinition);
|
||||
ModelBakery.registerItemVariants(item, meshDefinition.location, meshDefinition.empty);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ICapabilityProvider initCapabilities(ItemStack stack, NBTTagCompound nbt){
|
||||
public ICapabilityProvider initCapabilities(ItemStack stack, NBTTagCompound nbt) {
|
||||
return new FluidHandlerItemBinnie(stack, container);
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private class FluidContainerMeshDefinition implements ItemMeshDefinition{
|
||||
private class FluidContainerMeshDefinition implements ItemMeshDefinition {
|
||||
|
||||
final ModelResourceLocation location;
|
||||
final ModelResourceLocation empty;
|
||||
|
||||
|
||||
public FluidContainerMeshDefinition() {
|
||||
ResourceLocation location = getRegistryName();
|
||||
this.location = new ModelResourceLocation(location, "inventory");
|
||||
this.empty = new ModelResourceLocation(new ResourceLocation(location.getResourceDomain(), location.getResourcePath() + "_empty"), "inventory");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ModelResourceLocation getModelLocation(ItemStack stack) {
|
||||
if(stack.getItemDamage() == 0){
|
||||
if (stack.getItemDamage() == 0) {
|
||||
return empty;
|
||||
}
|
||||
return location;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package binnie.core.liquid;
|
||||
|
||||
import binnie.core.ManagerBase;
|
||||
import forestry.core.items.EnumContainerType;
|
||||
import forestry.core.render.TextureManager;
|
||||
import forestry.core.utils.OreDictUtil;
|
||||
import net.minecraft.init.Items;
|
||||
@@ -63,7 +62,7 @@ public class ManagerLiquid extends ManagerBase {
|
||||
GameRegistry.addShapelessRecipe(new ItemStack(Items.GLASS_BOTTLE), FluidContainerType.GLASS.get(1));
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(FluidContainerType.GLASS.get(3),
|
||||
" b ", "g g", " g ",
|
||||
'g', OreDictUtil.BLOCK_GLASS, 'b', OreDictUtil.SLAB_WOOD));
|
||||
'g', OreDictUtil.BLOCK_GLASS, 'b', OreDictUtil.SLAB_WOOD));
|
||||
}
|
||||
|
||||
public IFluidType getFluidType(final String liquid) {
|
||||
|
||||
@@ -53,7 +53,7 @@ class BlockMachine extends BlockContainer implements IBlockMachine {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube(IBlockState state) {
|
||||
return false;
|
||||
|
||||
@@ -6,8 +6,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraft.util.text.TextComponentString;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
class DefaultInventory implements IInventory {
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
|
||||
@@ -2,8 +2,6 @@ package binnie.core.machines.component;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public interface IComponentRecipe {
|
||||
boolean isRecipe();
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import binnie.core.machines.IMachine;
|
||||
import binnie.core.machines.MachineComponent;
|
||||
import binnie.core.machines.power.ITankMachine;
|
||||
import binnie.core.machines.power.TankInfo;
|
||||
import com.google.common.collect.Iterables;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
@@ -8,11 +8,11 @@ import net.minecraft.util.ResourceLocation;
|
||||
public class DefaultStateMapper extends StateMapperBase {
|
||||
|
||||
private ResourceLocation resourceLocation;
|
||||
|
||||
|
||||
public DefaultStateMapper(ResourceLocation resourceLocation) {
|
||||
this.resourceLocation = resourceLocation;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected ModelResourceLocation getModelResourceLocation(IBlockState state) {
|
||||
return new ModelResourceLocation(resourceLocation, "normal");
|
||||
|
||||
@@ -35,7 +35,6 @@ import net.minecraftforge.common.model.TRSRTransformation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.vecmath.Vector3f;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -190,11 +189,11 @@ public class ModelManager implements IModelManager {
|
||||
stateMapperRegister.registerStateMapper();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static void reloadSprites() {
|
||||
for (ISpriteRegister spriteRegister : spriteRegister) {
|
||||
if(spriteRegister != null){
|
||||
if (spriteRegister != null) {
|
||||
spriteRegister.registerSprites(ForestryAPI.textureManager);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,21 +1,16 @@
|
||||
package binnie.core.models;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import binnie.core.block.IMultipassBlock;
|
||||
import forestry.api.core.IModelBaker;
|
||||
import forestry.core.blocks.properties.UnlistedBlockAccess;
|
||||
import forestry.core.blocks.properties.UnlistedBlockPos;
|
||||
import forestry.core.models.ModelBlockCached;
|
||||
import forestry.core.models.baker.ModelBaker;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
@@ -23,6 +18,8 @@ import net.minecraftforge.common.property.IExtendedBlockState;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ModelMutlipass<B extends Block & IMultipassBlock<K>, K> extends ModelBlockCached<B, K> {
|
||||
|
||||
@@ -39,7 +36,7 @@ public class ModelMutlipass<B extends Block & IMultipassBlock<K>, K> extends Mod
|
||||
protected K getWorldKey(IBlockState state) {
|
||||
return ((B) state.getBlock()).getWorldKey(state);
|
||||
}
|
||||
|
||||
|
||||
@Nullable
|
||||
protected IBakedModel bakeModel(IBlockState state, K key) {
|
||||
if (key == null) {
|
||||
@@ -72,7 +69,7 @@ public class ModelMutlipass<B extends Block & IMultipassBlock<K>, K> extends Mod
|
||||
protected void bakeBlock(B block, K key, IModelBaker baker, boolean inventory) {
|
||||
for (int pass = 0; pass < block.getRenderPasses(); pass++) {
|
||||
TextureAtlasSprite[] sprites = new TextureAtlasSprite[6];
|
||||
for(EnumFacing facing : EnumFacing.VALUES){
|
||||
for (EnumFacing facing : EnumFacing.VALUES) {
|
||||
sprites[facing.ordinal()] = block.getSprite(key, facing, pass);
|
||||
}
|
||||
baker.addBlockModel(null, sprites, pass);
|
||||
@@ -82,7 +79,7 @@ public class ModelMutlipass<B extends Block & IMultipassBlock<K>, K> extends Mod
|
||||
//TODO: Adding a preaking sprite
|
||||
baker.setParticleSprite(block.getSprite(key, null, 0));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected IBakedModel bakeModel(ItemStack stack, World world, K key) {
|
||||
if (key == null) {
|
||||
@@ -95,7 +92,7 @@ public class ModelMutlipass<B extends Block & IMultipassBlock<K>, K> extends Mod
|
||||
return null;
|
||||
}
|
||||
B bBlock = blockClass.cast(block);
|
||||
|
||||
|
||||
// baker.setRenderBounds(bBlock.getItemBoundingBox());
|
||||
bakeBlock(bBlock, key, baker, true);
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public class PanelModelBaker implements IModelBaker {
|
||||
|
||||
public PanelModelBaker() {
|
||||
quadsUV = new float[]{0, 0, 1, 1, 0, 0, 1, 1};
|
||||
defUVs = new float[] { 0, 0, 1, 1 };
|
||||
defUVs = new float[]{0, 0, 1, 1};
|
||||
}
|
||||
|
||||
// @Override
|
||||
@@ -87,7 +87,7 @@ public class PanelModelBaker implements IModelBaker {
|
||||
public void addBlockModel(@Nullable BlockPos pos, TextureAtlasSprite[] sprites, int colorIndex) {
|
||||
setColorIndex(colorIndex);
|
||||
|
||||
if(pos != null){
|
||||
if (pos != null) {
|
||||
World world = Proxies.common.getRenderWorld();
|
||||
IBlockState blockState = world.getBlockState(pos);
|
||||
for (EnumFacing facing : EnumFacing.VALUES) {
|
||||
@@ -95,7 +95,7 @@ public class PanelModelBaker implements IModelBaker {
|
||||
addFace(facing, sprites[facing.ordinal()]);
|
||||
}
|
||||
}
|
||||
}else {
|
||||
} else {
|
||||
for (EnumFacing facing : EnumFacing.VALUES) {
|
||||
addFace(facing, sprites[facing.ordinal()]);
|
||||
}
|
||||
@@ -110,7 +110,7 @@ public class PanelModelBaker implements IModelBaker {
|
||||
|
||||
@Override
|
||||
public void addBakedModel(@Nullable IBlockState state, IBakedModel model) {
|
||||
if(model != null){
|
||||
if (model != null) {
|
||||
this.bakedModels.add(Pair.of(state, model));
|
||||
}
|
||||
}
|
||||
@@ -202,7 +202,7 @@ public class PanelModelBaker implements IModelBaker {
|
||||
}
|
||||
|
||||
//Add baked models to the current model.
|
||||
for(Pair<IBlockState, IBakedModel> bakedModel : bakedModels){
|
||||
for (Pair<IBlockState, IBakedModel> bakedModel : bakedModels) {
|
||||
currentModel.addModelQuads(bakedModel);
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ public class PanelModelBaker implements IModelBaker {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setModelState(IModelState modelState){
|
||||
public void setModelState(IModelState modelState) {
|
||||
currentModel.setModelState(modelState);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,35 +1,35 @@
|
||||
package binnie.core.network.packet;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.network.play.server.SPacketUpdateTileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class PacketMetadata extends SPacketUpdateTileEntity {
|
||||
|
||||
public int metadata;
|
||||
|
||||
|
||||
public PacketMetadata(BlockPos blockPos, int metadata, NBTTagCompound compound) {
|
||||
super(blockPos, 0, compound);
|
||||
this.metadata = metadata;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void writePacketData(PacketBuffer buf) throws IOException {
|
||||
super.writePacketData(buf);
|
||||
buf.writeInt(metadata);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void readPacketData(PacketBuffer buf) throws IOException {
|
||||
super.readPacketData(buf);
|
||||
metadata = buf.readInt();
|
||||
}
|
||||
|
||||
|
||||
public int getMetadata() {
|
||||
return metadata;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -18,7 +18,6 @@ import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class BinnieModProxy implements IBinnieModProxy {
|
||||
@@ -48,12 +47,12 @@ public class BinnieModProxy implements IBinnieModProxy {
|
||||
public Block registerBlock(Block block) {
|
||||
return GameRegistry.register(block);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public <T extends Block> void registerBlock(T block, ItemBlock itemBlock) {
|
||||
registerBlock(block);
|
||||
|
||||
if(itemBlock.getRegistryName() == null){
|
||||
if (itemBlock.getRegistryName() == null) {
|
||||
itemBlock.setRegistryName(block.getRegistryName());
|
||||
}
|
||||
registerItem(itemBlock);
|
||||
@@ -96,10 +95,10 @@ public class BinnieModProxy implements IBinnieModProxy {
|
||||
public void registermodel(Item item, int meta, ModelResourceLocation modelResourceLocation) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void registerBlockModel(final BlockModelEntry index) {
|
||||
}
|
||||
|
||||
|
||||
public void registerModel(ModelEntry index) {
|
||||
}
|
||||
|
||||
|
||||
@@ -104,7 +104,7 @@ public class BinnieProxy extends BinnieModProxy implements IBinnieProxy {
|
||||
public void registerTileEntity(final Class<? extends TileEntity> tile, final String id, @Nullable final Object renderer) {
|
||||
registerTileEntity(tile, id);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void registerTileEntity(final Class<? extends TileEntity> tile, final String id) {
|
||||
GameRegistry.registerTileEntity(tile, id);
|
||||
@@ -158,7 +158,7 @@ public class BinnieProxy extends BinnieModProxy implements IBinnieProxy {
|
||||
public void bindTexture(final ResourceLocation location) {
|
||||
}
|
||||
|
||||
public void reloadSprites(){
|
||||
public void reloadSprites() {
|
||||
}
|
||||
|
||||
public EntityPlayer getPlayer() {
|
||||
|
||||
@@ -24,7 +24,6 @@ import net.minecraftforge.fml.client.registry.ClientRegistry;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.io.File;
|
||||
@@ -54,7 +53,7 @@ public final class BinnieProxyClient extends BinnieProxy implements IBinnieProxy
|
||||
public void registerModels() {
|
||||
getModelManager().registerModels();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void reloadSprites() {
|
||||
ModelManager.reloadSprites();
|
||||
|
||||
@@ -2,14 +2,10 @@ package binnie.core.proxy;
|
||||
|
||||
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.network.INetworkedEntity;
|
||||
import binnie.core.network.packet.MessageBase;
|
||||
import binnie.core.resource.BinnieResource;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@@ -50,7 +46,7 @@ public interface IBinnieProxy extends IProxyCore {
|
||||
Object createObject(final String p0);
|
||||
|
||||
void registerTileEntity(final Class<? extends TileEntity> tile, final String id, @Nullable final Object renderer);
|
||||
|
||||
|
||||
void registerTileEntity(final Class<? extends TileEntity> tile, final String id);
|
||||
|
||||
void createPipe(final Item p0);
|
||||
|
||||
@@ -13,7 +13,7 @@ public interface IProxyCore extends IInitializable {
|
||||
Item registerItem(Item item);
|
||||
|
||||
Block registerBlock(Block block);
|
||||
|
||||
|
||||
<B extends Block> void registerBlock(B block, ItemBlock itemBlock);
|
||||
|
||||
public void registerModels();
|
||||
|
||||
@@ -26,7 +26,7 @@ public class BinnieSprite extends BinnieResource {
|
||||
Preconditions.checkState(this.sprite != null, "Tried to get sprite before it is registered.");
|
||||
return this.sprite;
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerSprites() {
|
||||
sprite = TextureManager.registerSprite(getResourceLocation());
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package binnie.core.util;
|
||||
|
||||
import net.minecraft.world.WorldSavedData;
|
||||
import net.minecraft.world.storage.ISaveHandler;
|
||||
import net.minecraft.world.storage.MapStorage;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@@ -13,58 +13,48 @@ import java.io.File;
|
||||
|
||||
public class FakeSaveHandler implements ISaveHandler {
|
||||
@Override
|
||||
public WorldInfo loadWorldInfo()
|
||||
{
|
||||
public WorldInfo loadWorldInfo() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkSessionLock() throws MinecraftException
|
||||
{
|
||||
public void checkSessionLock() throws MinecraftException {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChunkLoader getChunkLoader(WorldProvider provider)
|
||||
{
|
||||
public IChunkLoader getChunkLoader(WorldProvider provider) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveWorldInfoWithPlayer(WorldInfo worldInformation, NBTTagCompound tagCompound)
|
||||
{
|
||||
public void saveWorldInfoWithPlayer(WorldInfo worldInformation, NBTTagCompound tagCompound) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveWorldInfo(WorldInfo worldInformation)
|
||||
{
|
||||
public void saveWorldInfo(WorldInfo worldInformation) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPlayerFileData getPlayerNBTManager()
|
||||
{
|
||||
public IPlayerFileData getPlayerNBTManager() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void flush()
|
||||
{
|
||||
public void flush() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getMapFileFromName(String mapName)
|
||||
{
|
||||
public File getMapFileFromName(String mapName) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public File getWorldDirectory()
|
||||
{
|
||||
public File getWorldDirectory() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public TemplateManager getStructureTemplateManager()
|
||||
{
|
||||
public TemplateManager getStructureTemplateManager() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,6 @@ package binnie.core.util;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
|
||||
@@ -3,7 +3,6 @@ package binnie.core.util;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class TileUtil {
|
||||
|
||||
@@ -13,7 +13,6 @@ 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;
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import binnie.craftgui.controls.scroll.ControlScrollableContent;
|
||||
import binnie.craftgui.core.IWidget;
|
||||
import binnie.craftgui.events.EventKey;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Collection;
|
||||
|
||||
public class ControlListBox<T> extends ControlScrollableContent<ControlList<T>> implements IControlValue<T> {
|
||||
|
||||
@@ -4,7 +4,6 @@ import binnie.craftgui.controls.core.Control;
|
||||
import binnie.craftgui.controls.core.IControlValue;
|
||||
import binnie.craftgui.core.Attribute;
|
||||
import binnie.craftgui.core.CraftGUI;
|
||||
import binnie.craftgui.core.IWidget;
|
||||
import binnie.craftgui.events.EventMouse;
|
||||
import binnie.craftgui.resource.minecraft.CraftGUITexture;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
||||
@@ -9,7 +9,6 @@ import binnie.craftgui.events.EventValueChanged;
|
||||
import com.google.common.collect.Iterables;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public class ControlTabBar<T> extends Control implements IControlValue<T> {
|
||||
private T value;
|
||||
|
||||
@@ -250,7 +250,7 @@ public class Widget implements IWidget {
|
||||
public final void recieveEvent(final Event event) {
|
||||
for (final EventHandler<? extends Event> handler : this.globalEventHandlers) {
|
||||
if (handler.handles(event)) {
|
||||
((EventHandler<Event>)handler).onEvent(event);
|
||||
((EventHandler<Event>) handler).onEvent(event);
|
||||
}
|
||||
}
|
||||
List<IWidget> widgets = new ArrayList<>(this.getWidgets());
|
||||
|
||||
@@ -21,7 +21,6 @@ import net.minecraftforge.fml.client.config.GuiUtils;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@@ -2,8 +2,6 @@ package binnie.craftgui.events;
|
||||
|
||||
import binnie.craftgui.core.IWidget;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public abstract class EventHandler<E extends Event> {
|
||||
Class<E> eventClass;
|
||||
Origin origin;
|
||||
|
||||
@@ -203,7 +203,7 @@ public class ContainerCraftGUI extends Container {
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean handleNBTClient( final EntityPlayer player, final String name, final NBTTagCompound action) {
|
||||
public boolean handleNBTClient(final EntityPlayer player, final String name, final NBTTagCompound action) {
|
||||
if (name.contains("tank-update")) {
|
||||
this.onTankUpdate(action);
|
||||
} else if (name.equals("power-update")) {
|
||||
|
||||
@@ -31,7 +31,7 @@ public class ControlSlotArray extends Control implements Iterable<ControlSlot> {
|
||||
}
|
||||
|
||||
public ControlSlotArray create(final InventoryType type, final int[] index) {
|
||||
ControlSlotArray controlSlots = new ControlSlotArray(parent, x, y, columns, rows);
|
||||
ControlSlotArray controlSlots = new ControlSlotArray(parent, x, y, columns, rows);
|
||||
int i = 0;
|
||||
for (int row = 0; row < rows; ++row) {
|
||||
for (int column = 0; column < columns; ++column) {
|
||||
|
||||
@@ -16,8 +16,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public abstract class ControlSlotBase extends Control implements ITooltip {
|
||||
private ControlItemDisplay itemDisplay;
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class ControlTabIcon<T> extends ControlTab<T> {
|
||||
private ControlItemDisplay item;
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ import binnie.craftgui.minecraft.Window;
|
||||
import binnie.craftgui.resource.Texture;
|
||||
import binnie.craftgui.resource.minecraft.CraftGUITextureSheet;
|
||||
import binnie.craftgui.resource.minecraft.StandardTexture;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IAlleleSpecies;
|
||||
import forestry.api.genetics.IMutation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
||||
@@ -6,6 +6,7 @@ import binnie.craftgui.minecraft.Window;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import forestry.api.genetics.IAlleleSpecies;
|
||||
import forestry.api.genetics.IClassification;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@@ -394,7 +394,7 @@ public enum ExtraBeesSpecies implements IAlleleBeeSpecies {
|
||||
final int rockBody = 10066329;
|
||||
final int endBody = 14278302;
|
||||
|
||||
for (ExtraBeesSpecies species : values()) {
|
||||
for (ExtraBeesSpecies species : values()) {
|
||||
species.importTemplate(getDefaultTemplate());
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import binnie.extrabees.ExtraBees;
|
||||
import binnie.extrabees.genetics.ExtraBeesFlowers;
|
||||
import forestry.api.apiculture.BeeManager;
|
||||
import forestry.api.apiculture.IAlleleBeeEffect;
|
||||
import forestry.api.apiculture.IArmorApiarist;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
@@ -23,7 +22,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.projectile.EntitySmallFireball;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.inventory.EntityEquipmentSlot;
|
||||
import net.minecraft.item.ItemDye;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
|
||||
@@ -12,7 +12,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -9,7 +9,6 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ItemPunnettSquare extends Item {
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package binnie.extrabees.gui;
|
||||
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.machines.Machine;
|
||||
import binnie.core.machines.TileEntityMachine;
|
||||
import binnie.craftgui.minecraft.Window;
|
||||
import binnie.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
import binnie.craftgui.minecraft.control.ControlSlotArray;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package binnie.extrabees.gui;
|
||||
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.machines.Machine;
|
||||
import binnie.core.machines.TileEntityMachine;
|
||||
import binnie.craftgui.minecraft.Window;
|
||||
import binnie.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
import binnie.craftgui.minecraft.control.ControlSlot;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
package binnie.extrabees.gui;
|
||||
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.machines.Machine;
|
||||
import binnie.core.machines.TileEntityMachine;
|
||||
import binnie.craftgui.core.geometry.Position;
|
||||
import binnie.craftgui.minecraft.Window;
|
||||
import binnie.craftgui.minecraft.control.ControlEnergyBar;
|
||||
|
||||
@@ -12,8 +12,6 @@ import forestry.api.genetics.IChromosomeType;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class ControlChromosome extends Control implements IControlValue<IChromosomeType>, ITooltip {
|
||||
private IChromosomeType value;
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import forestry.api.recipes.RecipeManagers;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@@ -12,8 +12,6 @@ import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class ItemHoneyComb extends ItemProduct implements IColoredItem {
|
||||
|
||||
public ItemHoneyComb() {
|
||||
|
||||
@@ -10,8 +10,6 @@ import net.minecraft.util.NonNullList;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemProduct extends Item implements IItemModelRegister {
|
||||
IItemEnum[] types;
|
||||
|
||||
|
||||
@@ -7,8 +7,6 @@ import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemBeehive extends ItemBlock {
|
||||
public ItemBeehive(final Block block) {
|
||||
super(block);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package binnie.extratrees;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.Constants;
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.core.BinnieCore;
|
||||
@@ -16,15 +15,18 @@ import binnie.extratrees.carpentry.ModuleCarpentry;
|
||||
import binnie.extratrees.config.ConfigurationMain;
|
||||
import binnie.extratrees.core.ExtraTreesGUID;
|
||||
import binnie.extratrees.core.ModuleCore;
|
||||
import binnie.extratrees.genetics.*;
|
||||
import binnie.extratrees.genetics.AlleleETFruit;
|
||||
import binnie.extratrees.genetics.ButterflySpecies;
|
||||
import binnie.extratrees.genetics.ETTreeDefinition;
|
||||
import binnie.extratrees.genetics.ModuleGenetics;
|
||||
import binnie.extratrees.item.ModuleItems;
|
||||
import binnie.extratrees.kitchen.ModuleKitchen;
|
||||
import binnie.extratrees.machines.ModuleMachine;
|
||||
import binnie.extratrees.proxy.Proxy;
|
||||
import com.google.common.base.Preconditions;
|
||||
import forestry.api.arboriculture.ITreeRoot;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.AlleleSpeciesRegisterEvent;
|
||||
import forestry.api.genetics.IClassification;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraftforge.client.event.ModelBakeEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
@@ -35,18 +37,15 @@ import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@Mod(modid = Constants.EXTRA_TREES_MOD_ID, name = "Binnie's Extra Trees", useMetadata = true, dependencies = "required-after:" + Constants.CORE_MOD_ID)
|
||||
public class ExtraTrees extends AbstractMod {
|
||||
|
||||
@@ -203,10 +202,10 @@ public class ExtraTrees extends AbstractMod {
|
||||
Map<String, ETTreeDefinition> map = Arrays.stream(ETTreeDefinition.values()).collect(Collectors.toMap(o -> o.name().toLowerCase(), o -> o));
|
||||
models.forEach(model -> {
|
||||
String species = model.getVariant().split("=")[1];
|
||||
ETTreeDefinition treeSpecies = map.get(species);
|
||||
int primaryColor = treeSpecies.getLeafColor().getRGB();
|
||||
int secondaryColor = treeSpecies.getWoodColor().getRGB();
|
||||
e.getModelRegistry().putObject(model, new DoublePassBakedModel(e.getModelRegistry().getObject(model), primaryColor, secondaryColor));
|
||||
ETTreeDefinition treeSpecies = map.get(species);
|
||||
int primaryColor = treeSpecies.getLeafColor().getRGB();
|
||||
int secondaryColor = treeSpecies.getWoodColor().getRGB();
|
||||
e.getModelRegistry().putObject(model, new DoublePassBakedModel(e.getModelRegistry().getObject(model), primaryColor, secondaryColor));
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
public interface IDesignMaterial {
|
||||
ItemStack getStack();
|
||||
|
||||
|
||||
ItemStack getStack(boolean fireproof);
|
||||
|
||||
String getName();
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
package binnie.extratrees.block;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import binnie.Constants;
|
||||
import binnie.extratrees.block.property.PropertyETType;
|
||||
import binnie.extratrees.genetics.ETTreeDefinition;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import forestry.api.arboriculture.IFruitProvider;
|
||||
import forestry.api.arboriculture.ITreeGenome;
|
||||
import forestry.api.core.IItemModelRegister;
|
||||
import forestry.api.core.IModelManager;
|
||||
import forestry.api.core.Tabs;
|
||||
import forestry.core.blocks.IColoredBlock;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.material.Material;
|
||||
@@ -27,25 +26,17 @@ import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.common.IShearable;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.api.arboriculture.IFruitProvider;
|
||||
import forestry.api.arboriculture.ITreeGenome;
|
||||
import forestry.api.core.IItemModelRegister;
|
||||
import forestry.api.core.IModelManager;
|
||||
import forestry.api.core.Tabs;
|
||||
import forestry.arboriculture.PluginArboriculture;
|
||||
import forestry.arboriculture.genetics.TreeDefinition;
|
||||
import forestry.core.blocks.IColoredBlock;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class BlockETDecorativeLeaves extends Block implements IItemModelRegister, IColoredBlock, IShearable {
|
||||
private static final int VARIANTS_PER_BLOCK = 16;
|
||||
@@ -56,7 +47,7 @@ public abstract class BlockETDecorativeLeaves extends Block implements IItemMode
|
||||
for (int blockNumber = 0; blockNumber < blockCount; blockNumber++) {
|
||||
final PropertyETType variant = PropertyETType.create("variant", blockNumber, VARIANTS_PER_BLOCK);
|
||||
BlockETDecorativeLeaves block = new BlockETDecorativeLeaves(blockNumber) {
|
||||
@Override
|
||||
@Override
|
||||
public PropertyETType getVariant() {
|
||||
return variant;
|
||||
}
|
||||
|
||||
@@ -22,9 +22,6 @@ import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
public class BlockETDoor extends BlockDoor implements IBlockMetadata {
|
||||
// private IIcon getFlippedIcon(final boolean upper, final boolean flip, final int tileMeta) {
|
||||
// final DoorType type = getDoorType(tileMeta);
|
||||
@@ -212,7 +209,7 @@ public class BlockETDoor extends BlockDoor implements IBlockMetadata {
|
||||
// public boolean hasTileEntity(final int meta) {
|
||||
// return true;
|
||||
// }
|
||||
|
||||
|
||||
@Override
|
||||
public boolean eventReceived(IBlockState state, World world, BlockPos pos, int id, int param) {
|
||||
TileEntity tileentity = world.getTileEntity(pos);
|
||||
@@ -223,7 +220,7 @@ public class BlockETDoor extends BlockDoor implements IBlockMetadata {
|
||||
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;
|
||||
|
||||
@@ -66,7 +66,7 @@ public enum EnumETLog implements IWoodType {
|
||||
public String getName() {
|
||||
return name().toLowerCase();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getName();
|
||||
@@ -76,20 +76,20 @@ public enum EnumETLog implements IWoodType {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void addRecipe() {
|
||||
if (this.plank == null) {
|
||||
return;
|
||||
}
|
||||
ItemStack log = TreeManager.woodAccess.getStack(this, WoodBlockKind.LOG, false);
|
||||
ItemStack result = plank.getStack(false);
|
||||
result.setCount(4);
|
||||
GameRegistry.addShapelessRecipe(result, log);
|
||||
|
||||
ItemStack logFireproof = TreeManager.woodAccess.getStack(this, WoodBlockKind.LOG, true);
|
||||
ItemStack resultFireproof = plank.getStack(true);
|
||||
resultFireproof.setCount(4);
|
||||
GameRegistry.addShapelessRecipe(resultFireproof, logFireproof);
|
||||
}
|
||||
public void addRecipe() {
|
||||
if (this.plank == null) {
|
||||
return;
|
||||
}
|
||||
ItemStack log = TreeManager.woodAccess.getStack(this, WoodBlockKind.LOG, false);
|
||||
ItemStack result = plank.getStack(false);
|
||||
result.setCount(4);
|
||||
GameRegistry.addShapelessRecipe(result, log);
|
||||
|
||||
ItemStack logFireproof = TreeManager.woodAccess.getStack(this, WoodBlockKind.LOG, true);
|
||||
ItemStack resultFireproof = plank.getStack(true);
|
||||
resultFireproof.setCount(4);
|
||||
GameRegistry.addShapelessRecipe(resultFireproof, logFireproof);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getHardness() {
|
||||
@@ -100,14 +100,14 @@ public enum EnumETLog implements IWoodType {
|
||||
public int getCarbonization() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public float getCharcoalChance(int numberOfCharcoal) {
|
||||
if(numberOfCharcoal == 3){
|
||||
if (numberOfCharcoal == 3) {
|
||||
return 0.75F;
|
||||
}else if(numberOfCharcoal == 4){
|
||||
} else if (numberOfCharcoal == 4) {
|
||||
return 0.5F;
|
||||
}else if(numberOfCharcoal == 5){
|
||||
} else if (numberOfCharcoal == 5) {
|
||||
return 0.25F;
|
||||
}
|
||||
return 0.15F;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package binnie.extratrees.block;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import binnie.core.BinnieCore;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public enum FruitPod {
|
||||
Cocoa,
|
||||
Banana,
|
||||
@@ -23,7 +23,7 @@ public enum FruitPod {
|
||||
public short[] getTextures() {
|
||||
return this.textures;
|
||||
}
|
||||
|
||||
|
||||
public String getModelName() {
|
||||
return name().toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
|
||||
@@ -4,9 +4,10 @@ import binnie.extratrees.api.IDesignMaterial;
|
||||
import forestry.api.arboriculture.IWoodType;
|
||||
|
||||
public interface IPlankType extends IDesignMaterial {
|
||||
// IIcon getIcon();
|
||||
// IIcon getIcon();
|
||||
String getPlankTextureName();
|
||||
|
||||
String getDescription();
|
||||
|
||||
|
||||
IWoodType getWoodType();
|
||||
}
|
||||
@@ -5,6 +5,8 @@ import net.minecraft.block.properties.PropertyEnum;
|
||||
|
||||
public interface IWoodKind {
|
||||
PropertyEnum<EnumETLog> getVariant();
|
||||
|
||||
EnumETLog getWoodType(int meta);
|
||||
|
||||
WoodBlockKind getWoodKind();
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
package binnie.extratrees.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import binnie.extratrees.genetics.ETTreeDefinition;
|
||||
import forestry.api.arboriculture.IFruitProvider;
|
||||
import forestry.api.arboriculture.ITreeGenome;
|
||||
@@ -10,6 +8,8 @@ import forestry.arboriculture.items.ItemBlockLeaves;
|
||||
import forestry.core.items.IColoredItem;
|
||||
import forestry.core.items.ItemBlockForestry;
|
||||
import forestry.core.utils.Translator;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package binnie.extratrees.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import binnie.Constants;
|
||||
import binnie.core.IInitializable;
|
||||
import binnie.core.Mods;
|
||||
import binnie.core.block.ItemMetadata;
|
||||
import binnie.core.liquid.ILiquidType;
|
||||
import binnie.extratrees.ExtraTrees;
|
||||
import binnie.extratrees.block.decor.*;
|
||||
import binnie.extratrees.block.decor.BlockHedge;
|
||||
import binnie.extratrees.block.decor.BlockMultiFence;
|
||||
import binnie.extratrees.block.decor.FenceType;
|
||||
import binnie.extratrees.block.decor.MultiFenceRecipeEmbedded;
|
||||
import binnie.extratrees.block.decor.MultiFenceRecipeSize;
|
||||
import binnie.extratrees.block.decor.MultiFenceRecipeSolid;
|
||||
import binnie.extratrees.block.wood.BlockETFence;
|
||||
import binnie.extratrees.block.wood.BlockETLog;
|
||||
import binnie.extratrees.block.wood.BlockETPlank;
|
||||
@@ -44,7 +44,10 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.RecipeSorter;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
public class ModuleBlocks implements IInitializable {
|
||||
@@ -254,8 +257,8 @@ public class ModuleBlocks implements IInitializable {
|
||||
@Override
|
||||
public void postInit() {
|
||||
IWoodAccess woodAccess = TreeManager.woodAccess;
|
||||
for(PlankType.ExtraTreePlanks plankType : PlankType.ExtraTreePlanks.VALUES){
|
||||
for(boolean fireproof : new boolean[]{false, true}){
|
||||
for (PlankType.ExtraTreePlanks plankType : PlankType.ExtraTreePlanks.VALUES) {
|
||||
for (boolean fireproof : new boolean[]{false, true}) {
|
||||
ItemStack planks = woodAccess.getStack(plankType.getWoodType(), WoodBlockKind.PLANKS, fireproof);
|
||||
ItemStack slabs = woodAccess.getStack(plankType.getWoodType(), WoodBlockKind.SLAB, fireproof);
|
||||
ItemStack stairs = woodAccess.getStack(plankType.getWoodType(), WoodBlockKind.STAIRS, fireproof);
|
||||
@@ -306,7 +309,7 @@ public class ModuleBlocks implements IInitializable {
|
||||
this.addSqueezer(log, liquid, amount, 0.5f);
|
||||
}
|
||||
|
||||
private static void addRecipeAtPosition(int position, IRecipe recipe){
|
||||
private static void addRecipeAtPosition(int position, IRecipe recipe) {
|
||||
CraftingManager manager = CraftingManager.getInstance();
|
||||
manager.getRecipeList().add(position, recipe);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public class PlankType {
|
||||
Banana(0);
|
||||
|
||||
public static final ExtraTreePlanks[] VALUES = values();
|
||||
|
||||
|
||||
private EnumETLog woodType;
|
||||
private final int color;
|
||||
//IIcon icon;
|
||||
@@ -77,7 +77,7 @@ public class PlankType {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public static void initWoodTypes(){
|
||||
public static void initWoodTypes() {
|
||||
Fir.setWoodType(EnumETLog.Fir);
|
||||
Cedar.setWoodType(EnumETLog.Cedar);
|
||||
Hemlock.setWoodType(EnumETLog.Hemlock);
|
||||
@@ -115,23 +115,23 @@ public class PlankType {
|
||||
PinkIvory.setWoodType(EnumETLog.PinkIvory);
|
||||
Banana.setWoodType(EnumETLog.Banana);
|
||||
}
|
||||
|
||||
|
||||
public void setWoodType(EnumETLog woodType) {
|
||||
this.woodType = woodType;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public EnumETLog getWoodType() {
|
||||
return woodType;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return ExtraTrees.proxy.localise("block.planks." + this.toString().toLowerCase());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlankTextureName(){
|
||||
public String getPlankTextureName() {
|
||||
return Constants.EXTRA_TREES_MOD_ID + ":blocks/planks/" + name();
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ public class PlankType {
|
||||
public int getColour() {
|
||||
return this.color;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack getStack(boolean fireproof) {
|
||||
return TreeManager.woodAccess.getStack(woodType, WoodBlockKind.PLANKS, fireproof);
|
||||
@@ -197,7 +197,7 @@ public class PlankType {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlankTextureName(){
|
||||
public String getPlankTextureName() {
|
||||
return "minecraft:blocks/planks_" + name().toLowerCase();
|
||||
}
|
||||
|
||||
@@ -205,12 +205,12 @@ public class PlankType {
|
||||
public int getColour() {
|
||||
return this.color;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack getStack() {
|
||||
return getStack(true);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IWoodType getWoodType() {
|
||||
return woodType;
|
||||
@@ -272,7 +272,7 @@ public class PlankType {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlankTextureName(){
|
||||
public String getPlankTextureName() {
|
||||
return "forestry:blocks/wood/planks." + name().toLowerCase();
|
||||
}
|
||||
|
||||
@@ -290,12 +290,12 @@ public class PlankType {
|
||||
public int getColour() {
|
||||
return this.color;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IWoodType getWoodType() {
|
||||
return woodType;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack getStack(boolean fireproof) {
|
||||
return TreeManager.woodAccess.getStack(woodType, WoodBlockKind.PLANKS, fireproof);
|
||||
@@ -322,7 +322,7 @@ public class PlankType {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//TODO: extrabiomes 1.10.2
|
||||
/*public enum ExtraBiomesPlank implements IPlankType {
|
||||
Redwood(10185538),
|
||||
|
||||
@@ -15,13 +15,11 @@ import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class WoodManager {
|
||||
public static String getDisplayName(IWoodTyped wood, IWoodType woodType) {
|
||||
WoodBlockKind blockKind = wood.getBlockKind();
|
||||
@@ -48,7 +46,7 @@ public class WoodManager {
|
||||
|
||||
return displayName;
|
||||
}
|
||||
|
||||
|
||||
public static IPlankType getPlankType(final int index) {
|
||||
final IDesignMaterial wood = CarpentryManager.carpentryInterface.getWoodMaterial(index);
|
||||
if (wood instanceof IPlankType) {
|
||||
|
||||
Loaded 100 of 174 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user