mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-21 12:42:53 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29814550bb | ||
|
|
15769b9ee9 |
No files matched your search
+23
-4
@@ -1,4 +1,4 @@
|
|||||||
//version: 1704751096
|
//version: 1705357285
|
||||||
/*
|
/*
|
||||||
DO NOT CHANGE THIS FILE!
|
DO NOT CHANGE THIS FILE!
|
||||||
Also, you may replace this file at any time if there is an update available.
|
Also, you may replace this file at any time if there is an update available.
|
||||||
@@ -122,6 +122,7 @@ propertyDefaultIfUnset("modrinthProjectId", "")
|
|||||||
propertyDefaultIfUnset("modrinthRelations", "")
|
propertyDefaultIfUnset("modrinthRelations", "")
|
||||||
propertyDefaultIfUnset("curseForgeProjectId", "")
|
propertyDefaultIfUnset("curseForgeProjectId", "")
|
||||||
propertyDefaultIfUnset("curseForgeRelations", "")
|
propertyDefaultIfUnset("curseForgeRelations", "")
|
||||||
|
propertyDefaultIfUnset("versionPattern", "")
|
||||||
propertyDefaultIfUnset("minimizeShadowedDependencies", true)
|
propertyDefaultIfUnset("minimizeShadowedDependencies", true)
|
||||||
propertyDefaultIfUnset("relocateShadowedDependencies", true)
|
propertyDefaultIfUnset("relocateShadowedDependencies", true)
|
||||||
// Deprecated properties (kept for backwards compat)
|
// Deprecated properties (kept for backwards compat)
|
||||||
@@ -370,6 +371,7 @@ catch (Exception ignored) {
|
|||||||
// Pulls version first from the VERSION env and then git tag
|
// Pulls version first from the VERSION env and then git tag
|
||||||
String identifiedVersion
|
String identifiedVersion
|
||||||
String versionOverride = System.getenv("VERSION") ?: null
|
String versionOverride = System.getenv("VERSION") ?: null
|
||||||
|
boolean checkVersion = false
|
||||||
try {
|
try {
|
||||||
// Produce a version based on the tag, or for branches something like 0.2.2-configurable-maven-and-extras.38+43090270b6-dirty
|
// Produce a version based on the tag, or for branches something like 0.2.2-configurable-maven-and-extras.38+43090270b6-dirty
|
||||||
if (versionOverride == null) {
|
if (versionOverride == null) {
|
||||||
@@ -388,6 +390,8 @@ try {
|
|||||||
}
|
}
|
||||||
} else if (isDirty) {
|
} else if (isDirty) {
|
||||||
identifiedVersion += "-${branchName}+${gitDetails.gitHash}-dirty"
|
identifiedVersion += "-${branchName}+${gitDetails.gitHash}-dirty"
|
||||||
|
} else {
|
||||||
|
checkVersion = true
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
identifiedVersion = versionOverride
|
identifiedVersion = versionOverride
|
||||||
@@ -409,6 +413,8 @@ ext {
|
|||||||
|
|
||||||
if (identifiedVersion == versionOverride) {
|
if (identifiedVersion == versionOverride) {
|
||||||
out.style(Style.Failure).text('Override version to ').style(Style.Identifier).text(modVersion).style(Style.Failure).println('!\7')
|
out.style(Style.Failure).text('Override version to ').style(Style.Identifier).text(modVersion).style(Style.Failure).println('!\7')
|
||||||
|
} else if (checkVersion && versionPattern && !(identifiedVersion ==~ versionPattern)) {
|
||||||
|
throw new GradleException("Invalid version: '$identifiedVersion' does not match version pattern '$versionPattern'")
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "com.github.GTNewHorizons"
|
group = "com.github.GTNewHorizons"
|
||||||
@@ -428,18 +434,31 @@ minecraft {
|
|||||||
for (f in replaceGradleTokenInFile.split(',')) {
|
for (f in replaceGradleTokenInFile.split(',')) {
|
||||||
tagReplacementFiles.add f
|
tagReplacementFiles.add f
|
||||||
}
|
}
|
||||||
|
out.style(Style.Info).text('replaceGradleTokenInFile is deprecated! Consider using generateGradleTokenClass.').println()
|
||||||
}
|
}
|
||||||
if (gradleTokenModId) {
|
if (gradleTokenModId) {
|
||||||
injectedTags.put gradleTokenModId, modId
|
if (replaceGradleTokenInFile) {
|
||||||
|
injectedTags.put gradleTokenModId, modId
|
||||||
|
} else {
|
||||||
|
out.style(Style.Failure).text('gradleTokenModId is deprecated! The field will no longer be generated.').println()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (gradleTokenModName) {
|
if (gradleTokenModName) {
|
||||||
injectedTags.put gradleTokenModName, modName
|
if (replaceGradleTokenInFile) {
|
||||||
|
injectedTags.put gradleTokenModName, modName
|
||||||
|
} else {
|
||||||
|
out.style(Style.Failure).text('gradleTokenModName is deprecated! The field will no longer be generated.').println()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (gradleTokenVersion) {
|
if (gradleTokenVersion) {
|
||||||
injectedTags.put gradleTokenVersion, modVersion
|
injectedTags.put gradleTokenVersion, modVersion
|
||||||
}
|
}
|
||||||
if (gradleTokenGroupName) {
|
if (gradleTokenGroupName) {
|
||||||
injectedTags.put gradleTokenGroupName, modGroup
|
if (replaceGradleTokenInFile) {
|
||||||
|
injectedTags.put gradleTokenGroupName, modGroup
|
||||||
|
} else {
|
||||||
|
out.style(Style.Failure).text('gradleTokenGroupName is deprecated! The field will no longer be generated.').println()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (enableGenericInjection.toBoolean()) {
|
if (enableGenericInjection.toBoolean()) {
|
||||||
injectMissingGenerics.set(true)
|
injectMissingGenerics.set(true)
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api('com.github.GTNewHorizons:ForestryMC:4.8.2:dev')
|
api('com.github.GTNewHorizons:ForestryMC:4.8.2:dev')
|
||||||
implementation('com.github.GTNewHorizons:GTNHLib:0.1.0:dev')
|
implementation('com.github.GTNewHorizons:GTNHLib:0.2.1:dev')
|
||||||
|
|
||||||
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.5.4-GTNH:dev')
|
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.5.4-GTNH:dev')
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import net.minecraft.client.renderer.OpenGlHelper;
|
|||||||
import net.minecraft.client.renderer.RenderHelper;
|
import net.minecraft.client.renderer.RenderHelper;
|
||||||
import net.minecraft.client.renderer.Tessellator;
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.inventory.Slot;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.JsonToNBT;
|
import net.minecraft.nbt.JsonToNBT;
|
||||||
import net.minecraft.nbt.NBTException;
|
import net.minecraft.nbt.NBTException;
|
||||||
@@ -31,7 +30,7 @@ import binnie.core.craftgui.events.EventMouse;
|
|||||||
import binnie.core.craftgui.geometry.IArea;
|
import binnie.core.craftgui.geometry.IArea;
|
||||||
import binnie.core.craftgui.geometry.IBorder;
|
import binnie.core.craftgui.geometry.IBorder;
|
||||||
import binnie.core.craftgui.geometry.IPoint;
|
import binnie.core.craftgui.geometry.IPoint;
|
||||||
import binnie.core.craftgui.minecraft.control.ControlSlot;
|
import binnie.core.craftgui.minecraft.control.ControlSlotBase;
|
||||||
import binnie.core.nei.NEIHook;
|
import binnie.core.nei.NEIHook;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@@ -117,6 +116,7 @@ public class GuiCraftGUI extends GuiContainer {
|
|||||||
} else {
|
} else {
|
||||||
tooltip.setType(Tooltip.Type.STANDARD);
|
tooltip.setType(Tooltip.Type.STANDARD);
|
||||||
window.getTooltip(tooltip);
|
window.getTooltip(tooltip);
|
||||||
|
NEIHook.renderToolTips(mouseX, mouseY);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tooltip.exists()) {
|
if (tooltip.exists()) {
|
||||||
@@ -525,7 +525,11 @@ public class GuiCraftGUI extends GuiContainer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack getStackUnderMouse(int x, int y) {
|
public ItemStack getStackUnderMouse(int x, int y) {
|
||||||
return window.calculateMousedOverWidgets().stream().filter(widget -> widget instanceof ControlSlot).findFirst()
|
for (IWidget widget : window.calculateMousedOverWidgets()) {
|
||||||
.map(w -> ((ControlSlot) w).slot).map(Slot::getStack).orElse(null);
|
if (widget instanceof ControlSlotBase && widget.isVisible()) {
|
||||||
|
return ((ControlSlotBase) widget).getItemStack();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,6 +13,7 @@ import binnie.core.craftgui.geometry.IArea;
|
|||||||
import binnie.core.craftgui.geometry.IPoint;
|
import binnie.core.craftgui.geometry.IPoint;
|
||||||
import binnie.core.craftgui.minecraft.Window;
|
import binnie.core.craftgui.minecraft.Window;
|
||||||
import binnie.core.craftgui.resource.minecraft.CraftGUITexture;
|
import binnie.core.craftgui.resource.minecraft.CraftGUITexture;
|
||||||
|
import binnie.core.nei.NEIHook;
|
||||||
|
|
||||||
public abstract class ControlSlotBase extends Control implements ITooltip {
|
public abstract class ControlSlotBase extends Control implements ITooltip {
|
||||||
|
|
||||||
@@ -60,6 +61,7 @@ public abstract class ControlSlotBase extends Control implements ITooltip {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void getTooltip(Tooltip tooltip) {
|
public void getTooltip(Tooltip tooltip) {
|
||||||
|
if (NEIHook.enabled) return;
|
||||||
ItemStack item = getItemStack();
|
ItemStack item = getItemStack();
|
||||||
if (item == null) {
|
if (item == null) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in new issue
Block a user