Skip to content

Instantly share code, notes, and snippets.

@desht
desht / convmodel.pl
Last active February 23, 2022 11:20
Convmodel.pl : rough & ready Perl script to convert MC 1.16 Java entity models to MC 1.17+ format
#!/usr/bin/perl
#
# Usage: convmodel.pl < YourOldModel.java
#
# Looks for declarations & instatiations of ModelRenderer, then any calls to
# .setPos(), .addBox() etc. and converts those to MC 1.17+ equivalents
#
# Spits out a new constructor for your model class, and a static createBodyLayer()
# method suitable for using when you register your layer definitions in your
# EntityRenderersEvent.RegisterLayerDefinitions event listener
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
maven { url = 'https://maven.parchmentmc.org' }
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
classpath 'org.parchmentmc:librarian:1.+'
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:4+"
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file '/home/des/forge/1.16.5/ModularRouters/build.gradle' line: 26
* What went wrong:
A problem occurred evaluating root project 'ModularRouters'.
[26Oct2021 12:34:22.331] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeclientuserdev, --version, MOD_DEV, --assetIndex, 1.17, --assetsDir, /home/des/.gradle/caches/forge_gradle/assets, --gameDir, ., --fml.forgeVersion, 37.0.103, --fml.mcVersion, 1.17.1, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20210706.113038]
[26Oct2021 12:34:22.334] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 9.0.7+91+master.8569cdf starting: java version 16.0.1 by AdoptOpenJDK
[26Oct2021 12:34:22.343] [main/DEBUG] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Found launch services [fmlclientdev,forgeclient,minecraft,fmlserveruserdev,fmlclient,fmldatauserdev,forgeserverdev,forgeserveruserdev,forgeclientdev,forgeclientuserdev,forgeserver,forgedatadev,fmlserver,fmlclientuserdev,fmlserverdev,forgedatauserdev,testharness]
[26Oct2021 12:34:22.352] [main/DEBUG] [cpw.mods.modlauncher.NameMappingServiceHandler/MODLAUNCHER]: Found naming ser
/usr/lib/jvm/adoptopenjdk-16-hotspot-amd64/bin/java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:37869,suspend=y,server=n -Dvisualvm.id=214581199618293 -Dforge.logging.console.level=debug -Dforge.logging.markers=SCAN,CONFIG -DlegacyClassPath.file=/home/des/forge/1.17.1/ModularRouters/build/classpath/runClient_minecraftClasspath.txt -Dmixin.env.remapRefMap=true -Dmixin.env.refMapRemappingFile=/home/des/forge/1.17.1/ModularRouters/build/createSrgToMcp/output.srg -DignoreList=bootstraplauncher,securejarhandler,asm-commons,asm-util,asm-analysis,asm-tree,asm,client-extra,fmlcore,javafmllanguage,mclanguage,forge- -DnativesDirectory=/home/des/forge/1.17.1/ModularRouters/build/natives -DmergeModules=jna-5.8.0.jar,jna-platform-58.0.jar,java-objc-bridge-1.0.0.jar -p /home/des/.gradle/caches/modules-2/files-2.1/cpw.mods/bootstraplauncher/0.1.17/899fb8e3912bb7d14a6f9611de117f77db710ec3/bootstraplauncher-0.1.17.jar:/home/des/.gradle/caches/modules-2/files-2.1/cpw.mods/securejarhandler/0.9.54/24b670f2c026ec9777e64a
/usr/lib/jvm/adoptopenjdk-16-hotspot-amd64/bin/java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:35555,suspend=y,server=n -Dvisualvm.id=212959982420623 -Dforge.logging.console.level=debug -Dforge.logging.markers=CONFIG -DlegacyClassPath.file=/home/des/forge/1.17.1/ModularRouters/build/classpath/runClient_minecraftClasspath.txt -Dmixin.env.remapRefMap=true -Dmixin.env.refMapRemappingFile=/home/des/forge/1.17.1/ModularRouters/build/createSrgToMcp/output.srg -DignoreList=bootstraplauncher,securejarhandler,asm-commons,asm-util,asm-analysis,asm-tree,asm,client-extra,fmlcore,javafmllanguage,mclanguage,forge- -DnativesDirectory=/home/des/forge/1.17.1/ModularRouters/build/natives -DmergeModules=jna-5.8.0.jar,jna-platform-58.0.jar,java-objc-bridge-1.0.0.jar -p /home/des/.gradle/caches/modules-2/files-2.1/cpw.mods/bootstraplauncher/0.1.17/899fb8e3912bb7d14a6f9611de117f77db710ec3/bootstraplauncher-0.1.17.jar:/home/des/.gradle/caches/modules-2/files-2.1/cpw.mods/securejarhandler/0.9.54/24b670f2c026ec9777e64a2c212
@desht
desht / gist:3c3a2d56ec3ac43288bdbec0c55cbd9a
Created September 1, 2021 09:29
JEI 1.17.x ghost ingredient crash
[10:28:55] [Render thread/INFO]: OpenGL debug message: id=1280, source=API, type=ERROR, severity=HIGH, message='GL_INVALID_ENUM error generated. Cannot enable <cap> in the current profile.'
[10:28:55] [Render thread/INFO]: OpenGL debug message: id=1281, source=API, type=ERROR, severity=HIGH, message='GL_INVALID_VALUE error generated. Operation is not valid from a preview context.'
FATAL ERROR in native method: Thread[Render thread,5,main]: No context is current or a function that is not available in the current context was called. The JVM will abort execution.
at org.lwjgl.opengl.GL11.glBegin(org.lwjgl.opengl/Native Method)
at mezz.jei.gui.ghost.GhostIngredientDrag.drawItem(jei@8.0.0.10/GhostIngredientDrag.java:83)
at mezz.jei.gui.ghost.GhostIngredientDragManager.drawTooltips(jei@8.0.0.10/GhostIngredientDragManager.java:51)
at mezz.jei.gui.overlay.IngredientListOverlay.drawTooltips(jei@8.0.0.10/IngredientListOverlay.java:177)
at mezz.jei.gui.GuiEventHandler.onDrawScreenEventPost(jei@8.0.0.10/GuiEventHand
WARNING: This project is configured to use the official obfuscation mappings provided by Mojang. These mapping fall under their associated license, you should be fully aware of this license. For the latest license text, refer below, or the reference copy here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md, You can hide this warning by running the `hideOfficialWarningUntilChanged` task
WARNING: (c) 2020 Microsoft Corporation. These mappings are provided "as-is" and you bear the risk of using them. You may copy and use the mappings for development purposes, but you may not redistribute the mappings complete and unmodified. Microsoft makes no warranties, express or implied, with respect to the mappings provided here. Use and modification of this document or the source code (in any form) of Minecraft: Java Edition is governed by the Minecraft End User License Agreement available at https://account.mojang.com/documents/minecraft_eula.
Error getting artifact: curse.maven:theoneprobe-245211:3402
@desht
desht / playerglobals.md
Last active August 1, 2021 10:58
PneumaticCraft player-global variables

Player globals

  • Existing prefix "#" for global variables now means "player-global" variables
  • New prefix "%" for global variables means "server-global" variables - shared among all players on a server, like "#" globals used to be
  • GPS Tool, GPS Area Tool and Remote items which have global variable names in their saved NBT will have those saved var names updated with a "#" prefix when first accessed
    • Previously these items just stored an unprefixed variable name
  • GPS Tool and Remote GUI's now allow specification of "#" or "%" as a prefix for global variables where they are entered
  • Player-global and server-global variables can exist with the same name, e.g. #var1 and %var1 can both exist, and are separate variables
  • Existing global variables in a older world will appear as server-global
  • This may cause backwards compat issue with existing programs that refer to a previously-set value for a global variable (since a query for #var1 now references a player-global, which won't exist initially)
@desht
desht / pncr-recipes.zs
Created June 18, 2021 08:54
Example PNC:R 1.16.5 crafttweaker entries
<recipetype:pneumaticcraft:assembly_laser>.addRecipe("slime_to_magma", <tag:items:forge:slimeballs> * 8, <item:minecraft:magma_cream>);
<recipetype:pneumaticcraft:assembly_drill>.addRecipe("glass_to_pane", <item:minecraft:glass>, <item:minecraft:glass_pane> * 4);
<recipetype:pneumaticcraft:refinery>.addRecipe("fun_lava_stuff", <fluid:minecraft:lava> * 50, [<fluid:pneumaticcraft:lpg> * 25, <fluid:pneumaticcraft:lubricant> * 25], 473);
<recipetype:pneumaticcraft:explosion_crafting>.removeAll();
<recipetype:pneumaticcraft:explosion_crafting>.addRecipe("quick_nether_brick", <item:minecraft:netherrack>, [ <item:minecraft:nether_brick> ], 75);
<recipetype:pneumaticcraft:fluid_mixer>.addRecipe("diesel_lava_to_lubricant", <fluid:pneumaticcraft:diesel> * 50, <fluid:minecraft:lava> * 50, <fluid:pneumaticcraft:lubricant> * 100, <item:minecraft:air> * 0, 1.0, 20);
<recipetype:pneumaticcraft:fluid_mixer>.addRecipe("water_plastic_to_sheets", <fluid:pneumaticcraft:plastic> * 1000, <fluid:minecraft:water> * 2000, <fluid:m