mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-18 11:29:23 +00:00
port to forestry 4.2
This commit is contained in:
1 parent
dbc5c1a564
commit
f969f63b66
3697 files changed
+78372
No files matched your search
@@ -0,0 +1,70 @@
|
||||
//
|
||||
// Decompiled by Procyon v0.5.30
|
||||
//
|
||||
|
||||
package binnie.extrabees.gui;
|
||||
|
||||
import binnie.extrabees.ExtraBees;
|
||||
import binnie.core.AbstractMod;
|
||||
import binnie.craftgui.minecraft.control.ControlItemDisplay;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import binnie.extrabees.apiary.machine.AlvearyMutator;
|
||||
import binnie.craftgui.controls.ControlText;
|
||||
import binnie.craftgui.core.geometry.TextJustification;
|
||||
import binnie.craftgui.core.geometry.IArea;
|
||||
import binnie.craftgui.minecraft.control.ControlSlot;
|
||||
import binnie.core.machines.TileEntityMachine;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import binnie.craftgui.minecraft.control.ControlPlayerInventory;
|
||||
import binnie.core.machines.Machine;
|
||||
import binnie.craftgui.minecraft.Window;
|
||||
|
||||
public class WindowAlvearyMutator extends Window
|
||||
{
|
||||
Machine machine;
|
||||
ControlPlayerInventory playerInventory;
|
||||
|
||||
public WindowAlvearyMutator(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
super(176.0f, 176.0f, player, inventory, side);
|
||||
this.machine = ((TileEntityMachine) inventory).getMachine();
|
||||
}
|
||||
|
||||
public static Window create(final EntityPlayer player, final IInventory inventory, final Side side) {
|
||||
if (player == null || inventory == null) {
|
||||
return null;
|
||||
}
|
||||
return new WindowAlvearyMutator(player, inventory, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialiseClient() {
|
||||
this.setTitle("Mutator");
|
||||
this.playerInventory = new ControlPlayerInventory(this);
|
||||
final ControlSlot slot = new ControlSlot(this, 79.0f, 30.0f);
|
||||
slot.assign(0);
|
||||
new ControlText(this, new IArea(0.0f, 52.0f, this.w(), 16.0f), "Possible Mutagens:", TextJustification.MiddleCenter).setColour(5592405);
|
||||
final int size = AlvearyMutator.getMutagens().size();
|
||||
final int w = size * 18;
|
||||
if (size > 0) {
|
||||
float x = (this.w() - w) / 2.0f;
|
||||
for (final ItemStack stack : AlvearyMutator.getMutagens()) {
|
||||
final ControlItemDisplay display = new ControlItemDisplay(this, x, 66.0f);
|
||||
display.setItemStack(stack);
|
||||
display.hastooltip = true;
|
||||
x += 18.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractMod getMod() {
|
||||
return ExtraBees.instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "AlvearyMutator";
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user