mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-25 06:24:27 +00:00
Flowers can now be manually bound to spreaders or pools.
This commit is contained in:
1 parent
4d1eaab7e3
commit
03ac83c856
3 files changed
+36
-3
No files matched your search
@@ -180,6 +180,22 @@ public class SubTileFunctional extends SubTileEntity {
|
||||
return new ChunkCoordinates(linkedPool.xCoord, linkedPool.yCoord, linkedPool.zCoord);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSelect(EntityPlayer player, ItemStack wand, int x, int y, int z, int side) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean bindTo(EntityPlayer player, ItemStack wand, int x, int y, int z, int side) {
|
||||
TileEntity tile = player.worldObj.getTileEntity(x, y, z);
|
||||
if(tile instanceof IManaPool) {
|
||||
linkedPool = tile;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderHUD(Minecraft mc, ScaledResolution res) {
|
||||
String name = StatCollector.translateToLocal("tile.botania:flower." + getUnlocalizedName() + ".name");
|
||||
|
||||
@@ -25,6 +25,7 @@ import net.minecraft.util.StatCollector;
|
||||
import vazkii.botania.api.BotaniaAPI;
|
||||
import vazkii.botania.api.internal.IManaNetwork;
|
||||
import vazkii.botania.api.mana.IManaCollector;
|
||||
import vazkii.botania.api.mana.IManaPool;
|
||||
import vazkii.botania.common.core.handler.ConfigHandler;
|
||||
|
||||
/**
|
||||
@@ -212,6 +213,22 @@ public class SubTileGenerating extends SubTileEntity {
|
||||
return new ChunkCoordinates(linkedCollector.xCoord, linkedCollector.yCoord, linkedCollector.zCoord);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSelect(EntityPlayer player, ItemStack wand, int x, int y, int z, int side) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean bindTo(EntityPlayer player, ItemStack wand, int x, int y, int z, int side) {
|
||||
TileEntity tile = player.worldObj.getTileEntity(x, y, z);
|
||||
if(tile instanceof IManaCollector) {
|
||||
linkedCollector = tile;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderHUD(Minecraft mc, ScaledResolution res) {
|
||||
String name = StatCollector.translateToLocal("tile.botania:flower." + getUnlocalizedName() + ".name");
|
||||
|
||||
@@ -78,10 +78,10 @@ public final class BoundTileRenderer {
|
||||
axis.maxX -= pos.posX;
|
||||
axis.minY -= pos.posY;
|
||||
axis.maxY -= pos.posY;
|
||||
axis.minZ -= pos.posZ;
|
||||
axis.maxZ -= pos.posZ;
|
||||
axis.minZ -= pos.posZ + 1;
|
||||
axis.maxZ -= pos.posZ + 1;
|
||||
|
||||
GL11.glScalef(1F, 1F, -1F);
|
||||
GL11.glScalef(1F, 1F, 1F);
|
||||
|
||||
GL11.glLineWidth(1F);
|
||||
renderBlockOutline(axis);
|
||||
|
||||
Reference in new issue
Block a user