89 lines
3.6 KiB
Groovy
Raw Normal View History

import com.jaquadro.minecraft.storagedrawers.api.storage.attribute.IFrameable
import com.nomiceu.nomilabs.util.ItemMeta
import net.minecraft.item.Item
import net.minecraft.item.ItemStack
import net.minecraft.util.ResourceLocation
import net.minecraftforge.registries.IForgeRegistryEntry
import static com.nomiceu.nomilabs.groovy.GroovyHelpers.JEIHelpers.addRecipeOutputTooltip
Update Nomi-Labs, GT, GCYM, GrS and More (#790) This PR updates Nomi-Labs to 0.7.0, allowing for associate updates to GT, GCYM, GrS and Architecture Craft, as well as the removal of Random Patches, Just Enough Dimensions, and Difficulty Lock. Although GT 2.8.10 also fixed Extreme RAM Usage in Alfheim 1.3, (See PR https://github.com/GregTechCEu/GregTech/pull/2475) this PR **does not** update Alfheim to 1.3. This is because Alfheim 1.3, although not consuming large amounts of memory, still consumes more memory than 1.1.1, and causes fps spikes. Also, because Nomi-Labs now implements a native and better difficulty lock, of which works on dedicated servers, `server.properties` overrides, as well as previously changed parts in README and Pack Mode Switchers (in https://github.com/Nomi-CEu/Nomi-CEu/pull/292), have been removed. This PR also fixes an issue with corrupted images and jar files in built packs. /* Github Stuff */ [FIXUP] [[fixes]] sha = "bd58b9072f45d647734ae66168cbd27bf9b2f220" newTitle = "Update GT and Related Mods for 1.7" newBody = ''' [EXPAND] [[messages]] messageTitle = "Update GT to 2.8+, add Nomi Labs" messageBody = """ [BREAKING] [DETAILS] details = [ \"**Please DO NOT revert any saves that have been loaded in this release to 1.6.1b, 1.6.1a, or prior!**\", \"**Lots of Recipes have been moved to the Assembly Line, and now require Assembly Line Research.**\", \"Adds Assembly Line Research\", \"Adds ME Hatches and Buses, for combining Multiblocks with AE Networks\", \"Adds Filtered Output Hatches\", \"Adds EU Multiblock Power Storage\", \"Adds Multiblock Transformer and Laser Power Transfer\", \"Adds Long Distance Pipes\", \"Creating Waypoints in the Prospector\", \"Fixing many Bugs\", \"And many more!\" ] [DETAILS] [PRIORITY] priority = 100 [PRIORITY] """ [[messages]] messageTitle = "Multiblock Changes" messageBody = """ [BREAKING] [DETAILS] details = [ \"Multiblocks accept a new **maximum** of 2 Energy Hatches.\", \"All Custom Multiblocks, such as Naquadah Reactors and Multiverse Projectors, now have **minimum casing requirements** and a **maintenance hatch**.\", \"Some Custom Multiblocks now have Distinct Mode\", \"All Custom Multiblocks now have custom Front Overlays\", \"Reworked & Improved Multiblock UIs\" ] [DETAILS] [PRIORITY] priority = 50 [PRIORITY] """ [EXPAND] ''' [FIXUP] [EXPAND] [[messages]] messageTitle = "Upgrade AE2 Stuff to AE2 Stuff Unofficial" messageBody = ''' [BREAKING] [DETAILS] details = [ "Pattern Encoders have been Removed!", "Any existing Pattern Encoders, whether items, in patterns or placed, have been remapped to AE2 Interfaces.", "All Usages in Recipes have also been changed to AE2 Interfaces!", ] [DETAILS] [PRIORITY] priority=25 [PRIORITY] ''' [[messages]] messageTitle = "Update GT to 2.8.10" messageBody = ''' [BREAKING] [DETAILS] details = [ "Allows GregTech Data Sticks to Copy ME Hatch Settings", "Adds an 'Stocking' Version of ME Hatches and Buses", "Support for Displaying Power Substation on Central Monitor", ] [DETAILS] [PRIORITY] priority=20 [PRIORITY] [IGNORE] checks = { compareBefore = "1.7-alpha-4" } # Only apply this if the commit being compared against is 1.7-alpha-4 or newer [IGNORE] ''' [[messages]] messageTitle = "Update Nomi Labs to 0.7.0" messageBody = ''' [BREAKING] [DETAILS] details = [ "Improvement of DME Simulation Chamber (now increases Tiers and Data Counts of Models)", "Custom Implementation of Difficulty Lock, now works on Dedicated Servers", "Replacement of the Void Dimension, fixing issues with Difficulty Changing", "Replacement of Custom Window Titles and Logos, Allowing the Removal of Random Patches", "Improvements to FTB Utils and Effortless Building", "Allows Setting of Default Keybinds for New Players", ] [DETAILS] [PRIORITY] priority=15 [PRIORITY] [IGNORE] checks = { compareBefore = "1.7-alpha-4" } # Only apply this if the commit being compared against is 1.7-alpha-4 or newer [IGNORE] ''' [EXPAND] [MOD INFO] [[infos]] projectID = 254317 info = "Replaced by Nomi Labs" [[infos]] projectID = 285612 info = "Replaced by Nomi Labs" [[infos]] projectID = 390886 info = "Replaced by Nomi Labs" [[infos]] projectID = 538092 info = "Replaced by Betterer P2P" [MOD INFO]
2024-07-11 21:32:57 +10:00
import static com.nomiceu.nomilabs.groovy.GroovyHelpers.TranslationHelpers.translatable
import static com.nomiceu.nomilabs.groovy.GroovyHelpers.SafeMethodHelpers.callInstanceMethodOfClass
// Hand Framing Tool
crafting.addShaped("hand_framing_tool_recipe", item("nomilabs:hand_framing_tool"), [
[null, null, item("storagedrawers:framingtable")],
[null, item("minecraft:stick"), null],
[item("minecraft:stick"), null, null]
])
// Dummy Hand Framing Recipes
// Specify Hand Framing Tool separately, so we can add its tooltip properly
List<ItemStack> items = [
item("storagedrawers:customdrawers"),
item("storagedrawers:customdrawers", 1),
item("storagedrawers:customdrawers", 2),
item("storagedrawers:customdrawers", 3),
item("storagedrawers:customdrawers", 4),
item("storagedrawers:customtrim"),
item("framedcompactdrawers:framed_compact_drawer"),
item("framedcompactdrawers:framed_slave"),
item("framedcompactdrawers:framed_drawer_controller")
]
ItemStack tool = item("nomilabs:hand_framing_tool")
items.add(tool)
for (ItemStack stack : items) {
for (boolean trim : [true, false]) {
for (boolean front : [true, false]) {
def recipeName = getRecipeName(stack, trim, front)
def recipeStack = addNBT(stack, trim, front)
crafting.addShaped(recipeName, recipeStack, [
[item("xtones:zane"), trim ? item("extendedcrafting:storage", 4) : null, null],
[front ? item("xtones:zane", 15) : null, stack, null],
[null, null, null]
])
addRecipeOutputTooltip(recipeStack, resource(recipeName),
ItemMeta.compare(tool, recipeStack) ?
Update Nomi-Labs, GT, GCYM, GrS and More (#790) This PR updates Nomi-Labs to 0.7.0, allowing for associate updates to GT, GCYM, GrS and Architecture Craft, as well as the removal of Random Patches, Just Enough Dimensions, and Difficulty Lock. Although GT 2.8.10 also fixed Extreme RAM Usage in Alfheim 1.3, (See PR https://github.com/GregTechCEu/GregTech/pull/2475) this PR **does not** update Alfheim to 1.3. This is because Alfheim 1.3, although not consuming large amounts of memory, still consumes more memory than 1.1.1, and causes fps spikes. Also, because Nomi-Labs now implements a native and better difficulty lock, of which works on dedicated servers, `server.properties` overrides, as well as previously changed parts in README and Pack Mode Switchers (in https://github.com/Nomi-CEu/Nomi-CEu/pull/292), have been removed. This PR also fixes an issue with corrupted images and jar files in built packs. /* Github Stuff */ [FIXUP] [[fixes]] sha = "bd58b9072f45d647734ae66168cbd27bf9b2f220" newTitle = "Update GT and Related Mods for 1.7" newBody = ''' [EXPAND] [[messages]] messageTitle = "Update GT to 2.8+, add Nomi Labs" messageBody = """ [BREAKING] [DETAILS] details = [ \"**Please DO NOT revert any saves that have been loaded in this release to 1.6.1b, 1.6.1a, or prior!**\", \"**Lots of Recipes have been moved to the Assembly Line, and now require Assembly Line Research.**\", \"Adds Assembly Line Research\", \"Adds ME Hatches and Buses, for combining Multiblocks with AE Networks\", \"Adds Filtered Output Hatches\", \"Adds EU Multiblock Power Storage\", \"Adds Multiblock Transformer and Laser Power Transfer\", \"Adds Long Distance Pipes\", \"Creating Waypoints in the Prospector\", \"Fixing many Bugs\", \"And many more!\" ] [DETAILS] [PRIORITY] priority = 100 [PRIORITY] """ [[messages]] messageTitle = "Multiblock Changes" messageBody = """ [BREAKING] [DETAILS] details = [ \"Multiblocks accept a new **maximum** of 2 Energy Hatches.\", \"All Custom Multiblocks, such as Naquadah Reactors and Multiverse Projectors, now have **minimum casing requirements** and a **maintenance hatch**.\", \"Some Custom Multiblocks now have Distinct Mode\", \"All Custom Multiblocks now have custom Front Overlays\", \"Reworked & Improved Multiblock UIs\" ] [DETAILS] [PRIORITY] priority = 50 [PRIORITY] """ [EXPAND] ''' [FIXUP] [EXPAND] [[messages]] messageTitle = "Upgrade AE2 Stuff to AE2 Stuff Unofficial" messageBody = ''' [BREAKING] [DETAILS] details = [ "Pattern Encoders have been Removed!", "Any existing Pattern Encoders, whether items, in patterns or placed, have been remapped to AE2 Interfaces.", "All Usages in Recipes have also been changed to AE2 Interfaces!", ] [DETAILS] [PRIORITY] priority=25 [PRIORITY] ''' [[messages]] messageTitle = "Update GT to 2.8.10" messageBody = ''' [BREAKING] [DETAILS] details = [ "Allows GregTech Data Sticks to Copy ME Hatch Settings", "Adds an 'Stocking' Version of ME Hatches and Buses", "Support for Displaying Power Substation on Central Monitor", ] [DETAILS] [PRIORITY] priority=20 [PRIORITY] [IGNORE] checks = { compareBefore = "1.7-alpha-4" } # Only apply this if the commit being compared against is 1.7-alpha-4 or newer [IGNORE] ''' [[messages]] messageTitle = "Update Nomi Labs to 0.7.0" messageBody = ''' [BREAKING] [DETAILS] details = [ "Improvement of DME Simulation Chamber (now increases Tiers and Data Counts of Models)", "Custom Implementation of Difficulty Lock, now works on Dedicated Servers", "Replacement of the Void Dimension, fixing issues with Difficulty Changing", "Replacement of Custom Window Titles and Logos, Allowing the Removal of Random Patches", "Improvements to FTB Utils and Effortless Building", "Allows Setting of Default Keybinds for New Players", ] [DETAILS] [PRIORITY] priority=15 [PRIORITY] [IGNORE] checks = { compareBefore = "1.7-alpha-4" } # Only apply this if the commit being compared against is 1.7-alpha-4 or newer [IGNORE] ''' [EXPAND] [MOD INFO] [[infos]] projectID = 254317 info = "Replaced by Nomi Labs" [[infos]] projectID = 285612 info = "Replaced by Nomi Labs" [[infos]] projectID = 390886 info = "Replaced by Nomi Labs" [[infos]] projectID = 538092 info = "Replaced by Betterer P2P" [MOD INFO]
2024-07-11 21:32:57 +10:00
translatable("tooltip.hand_framing.tool") :
translatable("tooltip.hand_framing.drawer"),
translatable("tooltip.hand_framing.top_left"),
translatable("tooltip.hand_framing.top_right"),
translatable("tooltip.hand_framing.bottom_left"))
}
}
}
static String getRecipeName(ItemStack stack, boolean trim, boolean front) {
String baseName = "nomiceu:hand_framing_"
// We have to use safe method helpers, because some items from Framed Compacting Drawers mislabel addInformation,
// Without SideOnly, so it crashes.
// Use the special of class type so the addInformation method isn't loaded.
def rl = (ResourceLocation) callInstanceMethodOfClass(IForgeRegistryEntry<Item>.class, stack.getItem(), "getRegistryName", null)
if (rl != null)
baseName = baseName + rl.getNamespace() + "_" + rl.getPath()
baseName = baseName + "." + stack.getMetadata() + "_side"
if (trim) baseName = baseName + "_trim"
if (front) baseName = baseName + "_front"
return baseName
}
static ItemStack addNBT(ItemStack stack, boolean trim, boolean front) {
def sideStack = item("xtones:zane")
def trimStack = trim ? item("extendedcrafting:storage", 4) : ItemStack.EMPTY
def frontStack = front ? item("xtones:zane", 15) : ItemStack.EMPTY
// We have to use safe method helpers, because some items from Framed Compacting Drawers mislabel addInformation,
// Without SideOnly, so it crashes.
// Use the special of class type so the addInformation method isn't loaded.
def frameable = (IFrameable) stack.getItem()
stack = (ItemStack) callInstanceMethodOfClass(IFrameable.class, frameable, "decorate", [stack.copy(), sideStack, trimStack, frontStack])
if (stack == null)
return stack
return stack
}