mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-25 06:24:26 +00:00
Merge branch 'master-MC1.11.2' of https://github.com/ForestryMC/Binnie into master-MC1.11.2
This commit is contained in:
commit
1e0d11b1ac
11 files changed
+32
-8
No files matched your search
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user