mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-25 14:24:42 +00:00
First 1.8.9 Version
This commit is contained in:
1 parent
d35cc1df09
commit
5a3850c264
1657 files changed
+26844
-13269
No files matched your search
@@ -12,14 +12,11 @@ package forestry.arboriculture;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.api.arboriculture.IFruitProvider;
|
||||
import forestry.api.arboriculture.ITreeGenome;
|
||||
import forestry.api.genetics.IFruitFamily;
|
||||
@@ -70,7 +67,7 @@ public class FruitProviderNone implements IFruitProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack[] getFruits(ITreeGenome genome, World world, int x, int y, int z, int ripeningTime) {
|
||||
public ItemStack[] getFruits(ITreeGenome genome, World world, BlockPos pos, int ripeningTime) {
|
||||
return new ItemStack[0];
|
||||
}
|
||||
|
||||
@@ -80,17 +77,17 @@ public class FruitProviderNone implements IFruitProvider {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean trySpawnFruitBlock(ITreeGenome genome, World world, int x, int y, int z) {
|
||||
public boolean trySpawnFruitBlock(ITreeGenome genome, World world, BlockPos pos) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getColour(ITreeGenome genome, IBlockAccess world, int x, int y, int z, int ripeningTime) {
|
||||
public int getColour(ITreeGenome genome, IBlockAccess world, BlockPos pos, int ripeningTime) {
|
||||
return 0xffffff;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean markAsFruitLeaf(ITreeGenome genome, World world, int x, int y, int z) {
|
||||
public boolean markAsFruitLeaf(ITreeGenome genome, World world, BlockPos pos) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -113,21 +110,30 @@ public class FruitProviderNone implements IFruitProvider {
|
||||
public String getDescription() {
|
||||
return "fruits." + key;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public short getIconIndex(ITreeGenome genome, IBlockAccess world, int x, int y, int z, int ripeningTime, boolean fancy) {
|
||||
public short getSpriteIndex(ITreeGenome genome, IBlockAccess world, BlockPos pos, int ripeningTime, boolean fancy) {
|
||||
if (overlay != null) {
|
||||
return overlay.texUID;
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister register) {
|
||||
public void registerSprites() {
|
||||
if (overlay != null) {
|
||||
TextureManager.registerTexUID(register, overlay.texUID, "leaves/fruits." + overlay.ident);
|
||||
TextureManager.registerSpriteUID(overlay.texUID, "blocks/leaves/fruits." + overlay.ident);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModelName() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getModID() {
|
||||
return "forestry";
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user