blob: b6caa48360279ecaa7f775bd15ca95f4f5e20583 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
package binnie.core.genetics;
import com.mojang.authlib.GameProfile;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
import forestry.api.core.IErrorState;
import forestry.api.genetics.IHousing;
import forestry.core.EnumErrorCode;
import java.util.Set;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
class VirtualHousing
implements IHousing
{
private EntityPlayer player;
public VirtualHousing(EntityPlayer player)
{
this.player = player;
}
public int getXCoord()
{
return (int)this.player.posX;
}
public int getYCoord()
{
return (int)this.player.posY;
}
public int getZCoord()
{
return (int)this.player.posZ;
}
public int getBiomeId()
{
return this.player.worldObj.getBiomeGenForCoords(getXCoord(), getYCoord()).biomeID;
}
public EnumTemperature getTemperature()
{
return EnumTemperature.getFromValue(getBiome().temperature);
}
public EnumHumidity getHumidity()
{
return EnumHumidity.getFromValue(getBiome().rainfall);
}
public World getWorld()
{
return this.player.worldObj;
}
public void setErrorState(int state) {}
public int getErrorOrdinal()
{
return 0;
}
public boolean addProduct(ItemStack product, boolean all)
{
return false;
}
public GameProfile getOwnerName()
{
return this.player.getGameProfile();
}
public BiomeGenBase getBiome()
{
return this.player.worldObj.getBiomeGenForCoords(getXCoord(), getZCoord());
}
public EnumErrorCode getErrorState()
{
return null;
}
public void setErrorState(IErrorState state) {}
public boolean setErrorCondition(boolean condition, IErrorState errorState)
{
return false;
}
public Set<IErrorState> getErrorStates()
{
return null;
}
}
|