mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-21 04:32:24 +00:00
[1.7.10] Removed unfinished features (#118)
* Removed unused Honey Crystal * Removed unfinished kitchen machines Removed Alcohol * Removed unused items * Removed unused PNGs * Fix README.md
This commit is contained in:
1 parent
31caf3c4c3
commit
fe56638f16
124 files changed
+45
-3824
No files matched your search
@@ -0,0 +1,39 @@
|
||||
package binnie.extratrees.craftgui;
|
||||
|
||||
import binnie.core.craftgui.IWidget;
|
||||
import binnie.core.craftgui.events.EventMouse;
|
||||
import binnie.core.craftgui.minecraft.Window;
|
||||
import binnie.core.craftgui.minecraft.control.ControlSlotBase;
|
||||
import binnie.core.machines.Machine;
|
||||
import binnie.core.machines.TileEntityMachine;
|
||||
import binnie.core.machines.component.IComponentRecipe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class ControlRecipeSlot extends ControlSlotBase {
|
||||
public ControlRecipeSlot(IWidget parent, int x, int y) {
|
||||
super(parent, x, y, 50);
|
||||
addSelfEventHandler(new MouseDownHandler());
|
||||
setRotating();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getItemStack() {
|
||||
IComponentRecipe recipe = Machine.getInterface(IComponentRecipe.class, Window.get(this).getInventory());
|
||||
return recipe.isRecipe() ? recipe.getProduct() : null;
|
||||
}
|
||||
|
||||
private class MouseDownHandler extends EventMouse.Down.Handler {
|
||||
@Override
|
||||
public void onEvent(EventMouse.Down event) {
|
||||
TileEntity tile = (TileEntity) Window.get(getWidget()).getInventory();
|
||||
if (tile == null || !(tile instanceof TileEntityMachine)) {
|
||||
return;
|
||||
}
|
||||
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
Window.get(getWidget()).sendClientAction("recipe", nbt);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user