mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-17 02:55:13 +00:00
Move FieldKit from botany to genetics module
This commit is contained in:
1 parent
c2481365b9
commit
46140e2e66
13 files changed
+71
-64
No files matched your search
+2
-2
@@ -13,11 +13,11 @@ import binnie.core.util.I18N;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class PageColourMix extends PageAbstract<IFlowerColor> {
|
||||
public class PageColorMix extends PageAbstract<IFlowerColor> {
|
||||
ControlText title;
|
||||
ControlColorMixBox list;
|
||||
|
||||
public PageColourMix(IWidget parent, DatabaseTab tab) {
|
||||
public PageColorMix(IWidget parent, DatabaseTab tab) {
|
||||
super(parent, tab);
|
||||
title = new ControlTextCentered(this, 8.0f, I18N.localise("botany.gui.controls.pageColorFurtherTitle"));
|
||||
list = new ControlColorMixBox(this, 4, 20, 136, 152, ControlColorMixBox.Type.Further);
|
||||
@@ -47,7 +47,7 @@ public class WindowBotanistDatabase extends WindowAbstractDatabase {
|
||||
new PageBranchSpecies(getInfoPages(Mode.Branches), new DatabaseTab(Botany.instance, "branches.species"));
|
||||
createMode(FlowerMode.COLOR, new ColorModeWidget());
|
||||
new PageColorMixResultant(getInfoPages(FlowerMode.COLOR), new DatabaseTab(Botany.instance, "colour.resultant"));
|
||||
new PageColourMix(getInfoPages(FlowerMode.COLOR), new DatabaseTab(Botany.instance, "colour.further"));
|
||||
new PageColorMix(getInfoPages(FlowerMode.COLOR), new DatabaseTab(Botany.instance, "colour.further"));
|
||||
new PageBreeder(getInfoPages(Mode.Breeder), getUsername(), new DatabaseTab(Botany.instance, "breeder"));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package binnie.core;
|
||||
|
||||
import binnie.Binnie;
|
||||
import binnie.botany.items.ItemFieldKit;
|
||||
import binnie.genetics.item.ItemFieldKit;
|
||||
import binnie.core.block.MultipassBlockRenderer;
|
||||
import binnie.core.block.TileEntityMetadata;
|
||||
import binnie.core.craftgui.minecraft.ModuleCraftGUI;
|
||||
|
||||
@@ -3,7 +3,7 @@ package binnie.core.item;
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.api.IFlower;
|
||||
import binnie.botany.flower.TileEntityFlower;
|
||||
import binnie.botany.items.ItemFieldKit;
|
||||
import binnie.genetics.item.ItemFieldKit;
|
||||
import binnie.botany.network.PacketID;
|
||||
import binnie.core.BinnieCore;
|
||||
import binnie.core.IInitializable;
|
||||
|
||||
@@ -24,8 +24,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
public class WindowGenepool extends WindowMachine {
|
||||
static Texture ProgressBase = new StandardTexture(64, 0, 130, 21, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
static Texture Progress = new StandardTexture(64, 21, 130, 21, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
static Texture progressBase = new StandardTexture(64, 0, 130, 21, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
static Texture progress = new StandardTexture(64, 21, 130, 21, ExtraBeeTexture.GUIProgress.getTexture());
|
||||
|
||||
public WindowGenepool(EntityPlayer player, IInventory inventory, Side side) {
|
||||
super(280, 198, player, inventory, side);
|
||||
@@ -40,15 +40,20 @@ public class WindowGenepool extends WindowMachine {
|
||||
super.initialiseClient();
|
||||
int x = 16;
|
||||
int y = 32;
|
||||
new ControlLiquidTank(this, x, y).setTankID(1);
|
||||
new ControlLiquidTank(this, x, y).setTankID(Genepool.TANK_ETHANOL);
|
||||
|
||||
x += 26;
|
||||
new ControlSlotArray(this, x, y + 3, 2, 3).create(Genepool.SLOT_RESERVE);
|
||||
|
||||
x += 38;
|
||||
new ControlIconDisplay(this, x, y + 3 + 18 + 1, GUIIcon.ArrowRight.getIcon());
|
||||
new ControlIconDisplay(this, x, y + 22, GUIIcon.ArrowRight.getIcon());
|
||||
|
||||
x += 18;
|
||||
new ControlSlot(this, x, y + 3 + 18).assign(0);
|
||||
new ControlSlot(this, x, y + 21).assign(Genepool.SLOT_BEE);
|
||||
|
||||
x += 18;
|
||||
new ControlMachineProgress(this, x, y + 19, WindowGenepool.ProgressBase, WindowGenepool.Progress, Position.LEFT);
|
||||
new ControlMachineProgress(this, x, y + 19, progressBase, progress, Position.LEFT);
|
||||
|
||||
x += 130;
|
||||
new ControlLiquidTank(this, x, y).setTankID(Genepool.TANK_DNA);
|
||||
new ControlEnergyBar(this, 21, 115, 16, 60, Position.BOTTOM);
|
||||
|
||||
+7
-7
@@ -1,10 +1,10 @@
|
||||
package binnie.botany.items;
|
||||
package binnie.genetics.item;
|
||||
|
||||
import binnie.botany.Botany;
|
||||
import binnie.botany.CreativeTabBotany;
|
||||
import binnie.core.BinnieCore;
|
||||
import binnie.core.gui.BinnieCoreGUI;
|
||||
import binnie.core.util.I18N;
|
||||
import binnie.genetics.GeneticsCreativeTab;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
@@ -24,7 +24,7 @@ public class ItemFieldKit extends Item {
|
||||
|
||||
public ItemFieldKit() {
|
||||
setUnlocalizedName("fieldKit");
|
||||
setCreativeTab(CreativeTabBotany.instance);
|
||||
setCreativeTab(GeneticsCreativeTab.instance);
|
||||
setMaxStackSize(1);
|
||||
setMaxDamage(64);
|
||||
}
|
||||
@@ -67,12 +67,12 @@ public class ItemFieldKit extends Item {
|
||||
public void addInformation(ItemStack itemStack, EntityPlayer player, List tooltip, boolean advanced) {
|
||||
int i = getMaxDamage() - itemStack.getItemDamage();
|
||||
if (i == 0) {
|
||||
tooltip.add(I18N.localise("botany.item.fieldKit.tooltip.noPaper"));
|
||||
tooltip.add(I18N.localise("genetics.item.fieldKit.tooltip.noPaper"));
|
||||
} else {
|
||||
if (i > 1) {
|
||||
tooltip.add(I18N.localise("botany.item.fieldKit.tooltip.sheetsOfPaper", i));
|
||||
tooltip.add(I18N.localise("genetics.item.fieldKit.tooltip.sheetsOfPaper", i));
|
||||
} else {
|
||||
tooltip.add(I18N.localise("botany.item.fieldKit.tooltip.sheetOfPaper", i));
|
||||
tooltip.add(I18N.localise("genetics.item.fieldKit.tooltip.sheetOfPaper", i));
|
||||
}
|
||||
}
|
||||
super.addInformation(itemStack, player, tooltip, advanced);
|
||||
@@ -80,6 +80,6 @@ public class ItemFieldKit extends Item {
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
return I18N.localise("botany.item.fieldKit.name");
|
||||
return I18N.localise("genetics.item.fieldKit.name");
|
||||
}
|
||||
}
|
||||
@@ -25,36 +25,38 @@ public class GenepoolComponentFX extends MachineComponent implements IRender.Ran
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void onDisplayTick(World world, int x, int y, int z, Random rand) {
|
||||
if (rand.nextFloat() < 1.0f && getUtil().getProcess().isInProgress()) {
|
||||
BinnieCore.proxy.getMinecraftInstance().effectRenderer.addEffect(new EntityFX(world, x + 0.3 + rand.nextDouble() * 0.4, y + 1, z + 0.3 + rand.nextDouble() * 0.4, 0.0, 0.0, 0.0) {
|
||||
double axisX = posX;
|
||||
double axisZ = posZ;
|
||||
double angle = rand.nextDouble() * 2.0 * 3.1415;
|
||||
|
||||
{
|
||||
axisX = 0.0;
|
||||
axisZ = 0.0;
|
||||
angle = 0.0;
|
||||
motionX = 0.0;
|
||||
motionZ = 0.0;
|
||||
motionY = rand.nextFloat() * 0.01;
|
||||
particleMaxAge = 25;
|
||||
particleGravity = 0.0f;
|
||||
noClip = true;
|
||||
setRBGColorF(0.4f + 0.6f * rand.nextFloat(), 0.6f * rand.nextFloat(), 0.6f + 0.4f * rand.nextFloat());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
setAlphaF((float) Math.cos(1.57 * particleAge / particleMaxAge));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFXLayer() {
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
if (rand.nextFloat() >= 1.0f || !getUtil().getProcess().isInProgress()) {
|
||||
return;
|
||||
}
|
||||
|
||||
BinnieCore.proxy.getMinecraftInstance().effectRenderer.addEffect(new EntityFX(world, x + 0.3 + rand.nextDouble() * 0.4, y + 1, z + 0.3 + rand.nextDouble() * 0.4, 0.0, 0.0, 0.0) {
|
||||
double axisX = posX;
|
||||
double axisZ = posZ;
|
||||
double angle = rand.nextDouble() * 2.0 * 3.1415;
|
||||
|
||||
{
|
||||
axisX = 0.0;
|
||||
axisZ = 0.0;
|
||||
angle = 0.0;
|
||||
motionX = 0.0;
|
||||
motionZ = 0.0;
|
||||
motionY = rand.nextFloat() * 0.01;
|
||||
particleMaxAge = 25;
|
||||
particleGravity = 0.0f;
|
||||
noClip = true;
|
||||
setRBGColorF(0.4f + 0.6f * rand.nextFloat(), 0.6f * rand.nextFloat(), 0.6f + 0.4f * rand.nextFloat());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
setAlphaF((float) Math.cos(1.57 * particleAge / particleMaxAge));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFXLayer() {
|
||||
return 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user