mirror of
https://github.com/GTNewHorizons/ForgeRelocation.git
synced 2026-10-27 06:43:58 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aebd3ebf8c | ||
|
|
ccb66ee3b1 | ||
|
|
d37209b9e1 | ||
|
|
972ccacc69 | ||
|
|
e58530f587 | ||
|
|
c75c509fda | ||
|
|
b2c051b597 | ||
|
|
5b34a69e2b | ||
|
|
582ed32314 | ||
|
|
f1324c86be |
No files matched your search
@@ -30,3 +30,4 @@ src/main/resources/mixins.*.json
|
||||
*.bat
|
||||
*.DS_Store
|
||||
!gradlew.bat
|
||||
layout.json
|
||||
@@ -1,6 +0,0 @@
|
||||
jar {
|
||||
manifest {
|
||||
attributes 'FMLCorePlugin': 'mrtjp.relocation.asm.RelocationPlugin'
|
||||
attributes 'FMLCorePluginContainsFMLMod': true
|
||||
}
|
||||
}
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
dependencies {
|
||||
api 'com.github.GTNewHorizons:MrTJPCore:1.2.0:dev'
|
||||
|
||||
api('com.github.GTNewHorizons:CodeChickenCore:1.4.3:dev')
|
||||
api 'com.github.GTNewHorizons:MrTJPCore:1.3.2:dev'
|
||||
}
|
||||
+15
-4
@@ -14,7 +14,7 @@ modId = ForgeRelocation
|
||||
modGroup = mrtjp.relocation
|
||||
|
||||
# Whether to use modGroup as the maven publishing group.
|
||||
# Due to a history of using JitPack, the default is com.github.GTNewHorizons for all mods.
|
||||
# When false, com.github.GTNewHorizons is used.
|
||||
useModGroupForPublishing = false
|
||||
|
||||
# Updates your build.gradle and settings.gradle automatically whenever an update is available.
|
||||
@@ -85,6 +85,11 @@ accessTransformersFile =
|
||||
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
|
||||
usesMixins = false
|
||||
|
||||
# Set to a non-empty string to configure mixins in a separate source set under src/VALUE, instead of src/main.
|
||||
# This can speed up compile times thanks to not running the mixin annotation processor on all input sources.
|
||||
# Mixin classes will have access to "main" classes, but not the other way around.
|
||||
separateMixinSourceSet =
|
||||
|
||||
# Adds some debug arguments like verbose output and class export.
|
||||
usesMixinDebug = false
|
||||
|
||||
@@ -97,7 +102,7 @@ mixinsPackage =
|
||||
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
|
||||
# This parameter is for legacy compatibility only
|
||||
# Example value: (coreModClass = asm.FMLPlugin) + (modGroup = com.myname.mymodid) -> com.myname.mymodid.asm.FMLPlugin
|
||||
coreModClass =
|
||||
coreModClass = asm.RelocationPlugin
|
||||
|
||||
# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class
|
||||
# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false!
|
||||
@@ -117,9 +122,15 @@ minimizeShadowedDependencies = true
|
||||
# If disabled, won't rename the shadowed classes.
|
||||
relocateShadowedDependencies = true
|
||||
|
||||
# Adds the GTNH maven, CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
|
||||
# Adds CurseMaven, Modrinth, and some more well-known 1.7.10 repositories.
|
||||
includeWellKnownRepositories = true
|
||||
|
||||
# A list of repositories to exclude from the includeWellKnownRepositories setting. Should be a space separated
|
||||
# list of strings, with the acceptable keys being(case does not matter):
|
||||
# cursemaven
|
||||
# modrinth
|
||||
excludeWellKnownRepositories =
|
||||
|
||||
# Change these to your Maven coordinates if you want to publish to a custom Maven repository instead of the default GTNH Maven.
|
||||
# Authenticate with the MAVEN_USER and MAVEN_PASSWORD environment variables.
|
||||
# If you need a more complex setup disable maven publishing here and add a publishing repository to addon.gradle.
|
||||
@@ -140,7 +151,7 @@ modrinthProjectId =
|
||||
# type can be one of [project, version],
|
||||
# and the name is the Modrinth project or version slug/id of the other mod.
|
||||
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
|
||||
# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
|
||||
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
|
||||
modrinthRelations =
|
||||
|
||||
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
@@ -84,7 +86,7 @@ done
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
@@ -203,7 +205,7 @@ fi
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
Vendored
+2
@@ -13,6 +13,8 @@
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.23'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.41'
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
[{
|
||||
"repo": "https://github.com/GTNewHorizons/MrTJPCore/releases/download/1.1.1/",
|
||||
"file": "MrTJPCore-1.7.10-1.1.1.jar",
|
||||
"dev": "MrTJPCore-1.7.10-1.1.1-dev.jar",
|
||||
"class": "mrtjp.core.handler.MrTJPCoreMod"
|
||||
}]
|
||||
@@ -191,9 +191,9 @@ object RenderFrame extends ISimpleBlockRenderingHandler {
|
||||
) {
|
||||
TextureUtils.bindAtlas(0)
|
||||
val state = CCRenderState.instance
|
||||
state.reset()
|
||||
state.resetInstance()
|
||||
state.lightMatrix.locate(w, x, y, z)
|
||||
state.setBrightness(w, x, y, z)
|
||||
state.setBrightnessInstance(w, x, y, z)
|
||||
|
||||
if (r.hasOverrideBlockTexture) {
|
||||
getOrGenerateModel(0).render(
|
||||
@@ -206,15 +206,15 @@ object RenderFrame extends ISimpleBlockRenderingHandler {
|
||||
def renderInvBlock(r: RenderBlocks, meta: Int) {
|
||||
TextureUtils.bindAtlas(0)
|
||||
val state = CCRenderState.instance
|
||||
state.reset()
|
||||
state.setDynamic()
|
||||
state.pullLightmap()
|
||||
state.resetInstance()
|
||||
state.setDynamicInstance()
|
||||
state.pullLightmapInstance()
|
||||
|
||||
state.startDrawing()
|
||||
state.startDrawingInstance()
|
||||
RenderFrame.render(new Vector3(-0.5, -0.5, -0.5), 0)
|
||||
|
||||
state.render()
|
||||
state.draw()
|
||||
state.renderInstance()
|
||||
state.drawInstance()
|
||||
}
|
||||
|
||||
def registerIcons(reg: IIconRegister) {
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package mrtjp.relocation.asm
|
||||
|
||||
import java.util.{Map => JMap}
|
||||
import cpw.mods.fml.relauncher.IFMLLoadingPlugin
|
||||
|
||||
@IFMLLoadingPlugin.MCVersion("1.7.10")
|
||||
@IFMLLoadingPlugin.TransformerExclusions(value =
|
||||
Array("mrtjp.relocation.asm.*", "scala")
|
||||
)
|
||||
class RelocationPlugin extends IFMLLoadingPlugin {
|
||||
|
||||
override def getASMTransformerClass = Array(
|
||||
"mrtjp.relocation.asm.Transformer"
|
||||
)
|
||||
override def getSetupClass = null
|
||||
override def getModContainerClass = null
|
||||
override def getAccessTransformerClass = null
|
||||
override def injectData(data: JMap[String, AnyRef]): Unit = {}
|
||||
}
|
||||
@@ -5,12 +5,9 @@
|
||||
*/
|
||||
package mrtjp.relocation.asm
|
||||
|
||||
import java.util.{Map => JMap}
|
||||
|
||||
import cpw.mods.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper.{
|
||||
INSTANCE => mapper
|
||||
}
|
||||
import cpw.mods.fml.relauncher.{IFMLCallHook, IFMLLoadingPlugin}
|
||||
import mrtjp.relocation.handler.RelocationMod
|
||||
import net.minecraft.launchwrapper.{IClassTransformer, Launch}
|
||||
import org.objectweb.asm.Opcodes._
|
||||
@@ -19,24 +16,6 @@ import org.objectweb.asm.{ClassReader, ClassWriter}
|
||||
|
||||
import scala.collection.JavaConversions._
|
||||
|
||||
/** Add "Dfml.coreMods.load=mrtjp.relocation.asm.RelocationPlugin" to launch
|
||||
* configs to enable in a development workspace.
|
||||
*/
|
||||
@IFMLLoadingPlugin.MCVersion("1.7.10")
|
||||
@IFMLLoadingPlugin.TransformerExclusions(value =
|
||||
Array("mrtjp.relocation.asm.*", "scala")
|
||||
)
|
||||
class RelocationPlugin extends IFMLLoadingPlugin with IFMLCallHook {
|
||||
override def getASMTransformerClass = Array(
|
||||
"mrtjp.relocation.asm.Transformer"
|
||||
)
|
||||
override def getSetupClass = "mrtjp.relocation.asm.RelocationPlugin"
|
||||
override def getModContainerClass = null
|
||||
override def getAccessTransformerClass = null
|
||||
override def injectData(data: JMap[String, AnyRef]): Unit = {}
|
||||
override def call(): Void = null
|
||||
}
|
||||
|
||||
class Transformer extends IClassTransformer {
|
||||
type MethodChecker = (String, MethodNode) => Boolean
|
||||
type InsTransformer = MethodNode => Unit
|
||||
|
||||
@@ -52,7 +52,9 @@ object RelocationClientEventHandler {
|
||||
|
||||
@SubscribeEvent
|
||||
def clientTick(event: TickEvent.ClientTickEvent) {
|
||||
if (event.phase == TickEvent.Phase.END)
|
||||
if (event.phase == TickEvent.Phase.END) {
|
||||
MovementManager2.onTick(true)
|
||||
MovingRenderer.onTick()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,6 @@ object MovingRenderer {
|
||||
|
||||
private def mc = Minecraft.getMinecraft
|
||||
private def world = mc.theWorld
|
||||
private def tes = Tessellator.instance
|
||||
|
||||
private def render(x: Int, y: Int, z: Int, rpos: Vector3) {
|
||||
val oldOcclusion = mc.gameSettings.ambientOcclusion
|
||||
@@ -65,8 +64,9 @@ object MovingRenderer {
|
||||
)
|
||||
|
||||
for (pass <- 0 to 1) {
|
||||
tes.startDrawingQuads()
|
||||
tes.setTranslation(
|
||||
val tess = Tessellator.instance
|
||||
tess.startDrawingQuads()
|
||||
tess.setTranslation(
|
||||
-TileEntityRendererDispatcher.staticPlayerX + MathLib
|
||||
.clamp(-1f, 1f, rpos.x.toFloat),
|
||||
-TileEntityRendererDispatcher.staticPlayerY + MathLib
|
||||
@@ -77,7 +77,7 @@ object MovingRenderer {
|
||||
rpos.z.toFloat
|
||||
)
|
||||
)
|
||||
tes.setColorOpaque(1, 1, 1)
|
||||
tess.setColorOpaque(1, 1, 1)
|
||||
|
||||
block.getRenderBlockPass
|
||||
if (block.canRenderInPass(pass)) {
|
||||
@@ -86,8 +86,8 @@ object MovingRenderer {
|
||||
renderHack = true
|
||||
}
|
||||
|
||||
tes.setTranslation(0, 0, 0)
|
||||
tes.draw()
|
||||
tess.setTranslation(0, 0, 0)
|
||||
tess.draw()
|
||||
}
|
||||
RenderHelper.enableStandardItemLighting()
|
||||
mc.entityRenderer.disableLightmap(frame)
|
||||
@@ -106,6 +106,13 @@ object MovingRenderer {
|
||||
render(b.x, b.y, b.z, renderPos(s, frame))
|
||||
}
|
||||
|
||||
def onTick() = {
|
||||
if (oldWorld != null && world == null) {
|
||||
oldWorld = null
|
||||
renderBlocks = null
|
||||
}
|
||||
}
|
||||
|
||||
def onPreRenderTick(time: Float) {
|
||||
isRendering = true
|
||||
frame = time
|
||||
|
||||
Reference in new issue
Block a user