Merge branch 'master-MC1.11.2' of https://github.com/ForestryMC/Binnie into master-MC1.11.2

This commit is contained in:
Nedelosk committed 2017-07-10 00:48:04 +02:00
commit 1e0d11b1ac
11 files changed
+32 -8

No files matched your search

@@ -39,7 +39,7 @@ public class Widget implements IWidget {
this.size = Point.ZERO;
this.offset = Point.ZERO;
this.cropped = false;
this.colour = 16777215;
this.colour = 0xffffff;
this.globalEventHandlers = new ArrayList<>();
this.enabled = true;
this.visible = true;
@@ -222,7 +222,7 @@ public abstract class Window extends TopLevelWidget implements INetwork.ReceiveG
@Override
@SideOnly(Side.CLIENT)
public void onRenderBackground(int guiWidth, int guiHeight) {
RenderUtil.setColour(16777215);
RenderUtil.setColour(0xffffff);
if (this.getBackground1() != null) {
CraftGUI.render.texture(this.getBackground1(), Point.ZERO);
}
@@ -66,7 +66,6 @@ public class RenderUtil {
}
minecraft.getRenderItem().renderItemOverlayIntoGUI(font, itemStack, pos.x(), pos.y(), null);
GlStateManager.disableBlend();
net.minecraft.client.renderer.RenderHelper.disableStandardItemLighting();
GlStateManager.popAttrib();
}
@@ -105,12 +105,17 @@ public class ComponentInventorySlots extends ComponentInventory implements IInve
}
this.markDirty();
}
@Override
public boolean isEmpty() {
return this.inventory.isEmpty();
}
@Override
public String getName() {
return "";
}
@Override
public int getInventoryStackLimit() {
return 64;
@@ -36,6 +36,7 @@ public enum CoreErrorCode implements IErrorStateDefinition {
CoreErrorCode(String name, IErrorStateDefinition parent, EnumErrorType type) {
this.name = name;
this.parent = parent;
this.type = type;
}
public String getDescription(){
@@ -3,9 +3,11 @@ package binnie.extrabees.client.gui;
import javax.annotation.Nonnull;
import java.awt.Dimension;
import forestry.core.utils.SlotUtil;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.items.IItemHandlerModifiable;
@@ -53,4 +55,9 @@ public abstract class AbstractAlvearyContainer extends Container {
public boolean canInteractWith(@Nonnull EntityPlayer playerIn) {
return true;
}
@Override
public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) {
return SlotUtil.transferStackInSlot(this.inventorySlots, playerIn, index);
}
}
@@ -35,6 +35,14 @@ public class BreweryCrafting implements INbtWritable {
ItemStack yeast = new ItemStack(nbt.getCompoundTag("yeast"));
return new BreweryCrafting(inputFluid, ingredient, inputGrains, yeast);
}
public boolean hasInputGrainsEmpty(){
return inputGrains == null || (isEmptyStack(inputGrains[0]) && isEmptyStack(inputGrains[1]) && isEmptyStack(inputGrains[2]));
}
private boolean isEmptyStack(ItemStack stack){
return stack == null || stack.isEmpty();
}
@Override
public NBTTagCompound writeToNBT(final NBTTagCompound nbt) {
@@ -31,7 +31,7 @@ public class BreweryRecipe implements IBreweryRecipe {
if (!this.yeast.isItemEqual(crafting.yeast)) {
return null;
}
if(crafting.inputGrains != null && crafting.inputGrains.length > 0){
if(!crafting.hasInputGrainsEmpty()){
return null;
}
if(!crafting.ingredient.isEmpty()){
@@ -6,6 +6,7 @@ import java.util.List;
import java.util.Map;
import java.util.Objects;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -173,6 +174,7 @@ public class ControlTileSelect extends Control implements IControlValue<IDesign>
public void onRenderForeground(int guiWidth, int guiHeight) {
final ItemStack image = ((WindowWoodworker) this.getTopParent()).getDesignerType().getDisplayStack(this.getValue());
RenderUtil.drawItem(new Point(1, 1), image);
GlStateManager.disableBlend();
if (((IControlValue) this.getParent()).getValue() != this.getValue()) {
if (Window.get(this).getMousedOverWidget() == this) {
RenderUtil.drawGradientRect(this.getArea().inset(1), 1157627903, 1157627903);
@@ -180,6 +182,7 @@ public class ControlTileSelect extends Control implements IControlValue<IDesign>
RenderUtil.drawGradientRect(this.getArea().inset(1), -1433892728, -1433892728);
}
}
GlStateManager.enableBlend();
}
}
}
+2 -2
View File
@@ -61,7 +61,7 @@ public class Genetics extends AbstractMod {
@Mod.EventHandler
public void preInit(final FMLPreInitializationEvent evt) {
proxy.registerItem(dictionaryBees = new ItemBeeDictionary());
dictionaryBees = proxy.registerItem(new ItemBeeDictionary());
proxy.registerItem(new ItemPunnettSquare());
this.preInit();
}
@@ -69,12 +69,12 @@ public class Genetics extends AbstractMod {
@Mod.EventHandler
public void init(final FMLInitializationEvent evt) {
this.init();
RecipeManagers.carpenterManager.addRecipe(100, Binnie.LIQUID.getFluidStack(ManagerLiquid.WATER, 2000), ItemStack.EMPTY, new ItemStack(dictionaryBees), "X#X", "YEY", "RDR", '#', Blocks.GLASS_PANE, 'X', Items.GOLD_INGOT, 'Y', "ingotTin", 'R', Items.REDSTONE, 'D', Items.DIAMOND, 'E', Items.EMERALD);
}
@Mod.EventHandler
public void postInit(final FMLPostInitializationEvent evt) {
this.postInit();
RecipeManagers.carpenterManager.addRecipe(100, Binnie.LIQUID.getFluidStack(ManagerLiquid.WATER, 2000), ItemStack.EMPTY, new ItemStack(dictionaryBees), "X#X", "YEY", "RDR", '#', Blocks.GLASS_PANE, 'X', Items.GOLD_INGOT, 'Y', "ingotTin", 'R', Items.REDSTONE, 'D', Items.DIAMOND, 'E', Items.EMERALD);
}
@Override
@@ -67,6 +67,7 @@ public enum GeneticsErrorCode implements IErrorStateDefinition {
GeneticsErrorCode(String name, IErrorStateDefinition parent, EnumErrorType type) {
this.name = name;
this.parent = parent;
this.type = type;
}
public String getDescription(){