mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-27 15:33:05 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f27188181 | ||
|
|
4fc6b9cff2 | ||
|
|
ef67761bc3 | ||
|
|
d50ec43d76 | ||
|
|
05eb683a33 | ||
|
|
11b6142320 | ||
|
|
de264540d2 | ||
|
|
bc3542efd2 | ||
|
|
ad7a1d3cea | ||
|
|
1bd4ef4a0f |
No files matched your search
@@ -27,3 +27,4 @@ whitelist.json
|
|||||||
*.iws
|
*.iws
|
||||||
src/main/resources/mixins.*.json
|
src/main/resources/mixins.*.json
|
||||||
*.bat
|
*.bat
|
||||||
|
layout.json
|
||||||
+3
-3
@@ -1,7 +1,7 @@
|
|||||||
// Add your dependencies here
|
// Add your dependencies here
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api("com.github.GTNewHorizons:CodeChickenLib:1.2.1:dev")
|
compileOnly("com.github.GTNewHorizons:Angelica:1.0.0-beta45:dev")
|
||||||
|
|
||||||
devOnlyNonPublishable("com.github.GTNewHorizons:NotEnoughItems:2.6.0-GTNH:dev")
|
devOnlyNonPublishable("com.github.GTNewHorizons:NotEnoughItems:2.7.51-GTNH:dev")
|
||||||
}
|
}
|
||||||
+13
-2
@@ -14,7 +14,7 @@ modId = ForgeMultipart
|
|||||||
modGroup = codechicken
|
modGroup = codechicken
|
||||||
|
|
||||||
# Whether to use modGroup as the maven publishing group.
|
# 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
|
useModGroupForPublishing = false
|
||||||
|
|
||||||
# Updates your build.gradle and settings.gradle automatically whenever an update is available.
|
# Updates your build.gradle and settings.gradle automatically whenever an update is available.
|
||||||
@@ -85,6 +85,11 @@ accessTransformersFile = multipart_at.cfg
|
|||||||
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
|
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
|
||||||
usesMixins = false
|
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.
|
# Adds some debug arguments like verbose output and class export.
|
||||||
usesMixinDebug = false
|
usesMixinDebug = false
|
||||||
|
|
||||||
@@ -117,9 +122,15 @@ minimizeShadowedDependencies = true
|
|||||||
# If disabled, won't rename the shadowed classes.
|
# If disabled, won't rename the shadowed classes.
|
||||||
relocateShadowedDependencies = true
|
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
|
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.
|
# 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.
|
# 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.
|
# If you need a more complex setup disable maven publishing here and add a publishing repository to addon.gradle.
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -15,6 +15,8 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
@@ -55,7 +57,7 @@
|
|||||||
# Darwin, MinGW, and NonStop.
|
# Darwin, MinGW, and NonStop.
|
||||||
#
|
#
|
||||||
# (3) This script is generated from the Groovy template
|
# (3) This script is generated from the Groovy template
|
||||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
# within the Gradle project.
|
# within the Gradle project.
|
||||||
#
|
#
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
@@ -84,7 +86,7 @@ done
|
|||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
# 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.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
@@ -203,7 +205,7 @@ fi
|
|||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Collect all arguments for the java command:
|
# 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.
|
# 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
|
# * 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.
|
# 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 See the License for the specific language governing permissions and
|
||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
|
@rem SPDX-License-Identifier: Apache-2.0
|
||||||
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%"=="" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.22'
|
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.38'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package codechicken.microblock
|
||||||
|
|
||||||
|
import com.gtnewhorizon.gtnhlib.client.renderer.CapturingTessellator
|
||||||
|
import net.coderbot.iris.Iris
|
||||||
|
import net.minecraft.block.Block
|
||||||
|
import net.minecraft.client.renderer.Tessellator
|
||||||
|
|
||||||
|
class AngelicaCompat {
|
||||||
|
def setShaderMaterialOverride(block: Block, meta: Int) = {
|
||||||
|
try {
|
||||||
|
if (Tessellator.instance.isInstanceOf[CapturingTessellator])
|
||||||
|
Iris.setShaderMaterialOverride(block, meta)
|
||||||
|
} catch {
|
||||||
|
case ex: ClassCastException => Unit
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
def resetShaderMaterialOverride() = {
|
||||||
|
try {
|
||||||
|
if (Tessellator.instance.isInstanceOf[CapturingTessellator])
|
||||||
|
Iris.resetShaderMaterialOverride()
|
||||||
|
} catch {
|
||||||
|
case ex: ClassCastException => Unit
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,10 +13,10 @@ import codechicken.lib.render.{
|
|||||||
CCRenderState,
|
CCRenderState,
|
||||||
ColourMultiplier
|
ColourMultiplier
|
||||||
}
|
}
|
||||||
import codechicken.microblock.handler.MicroblockProxy
|
import codechicken.microblock.handler.{MicroblockMod, MicroblockProxy}
|
||||||
import net.minecraft.entity.Entity
|
import net.minecraft.entity.Entity
|
||||||
import codechicken.lib.render.uv.{UVTransformation, MultiIconTransformation}
|
import codechicken.lib.render.uv.{MultiIconTransformation, UVTransformation}
|
||||||
import cpw.mods.fml.common.registry.{GameRegistry, GameData}
|
import cpw.mods.fml.common.registry.{GameData, GameRegistry}
|
||||||
|
|
||||||
import java.util.function.Supplier
|
import java.util.function.Supplier
|
||||||
|
|
||||||
@@ -54,7 +54,17 @@ object MaterialRenderHelper {
|
|||||||
this
|
this
|
||||||
}
|
}
|
||||||
|
|
||||||
def render() = builder.render()
|
def blockAndMeta(b: Block, meta: Int) = {
|
||||||
|
if (MicroblockMod.angelicaCompat != null)
|
||||||
|
MicroblockMod.angelicaCompat.setShaderMaterialOverride(b, meta)
|
||||||
|
this
|
||||||
|
}
|
||||||
|
|
||||||
|
def render() = {
|
||||||
|
builder.render()
|
||||||
|
if (MicroblockMod.angelicaCompat != null)
|
||||||
|
MicroblockMod.angelicaCompat.resetShaderMaterialOverride()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Standard micro material class suitable for most blocks.
|
/** Standard micro material class suitable for most blocks.
|
||||||
@@ -92,6 +102,7 @@ class BlockMicroMaterial(val block: Block, val meta: Int = 0)
|
|||||||
.start(pos, pass, icont)
|
.start(pos, pass, icont)
|
||||||
.blockColour(getColour(pass))
|
.blockColour(getColour(pass))
|
||||||
.lighting()
|
.lighting()
|
||||||
|
.blockAndMeta(block, meta)
|
||||||
.render()
|
.render()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ class GrassMicroMaterial extends BlockMicroMaterial(Blocks.grass, 0) {
|
|||||||
.start(pos, pass, icont)
|
.start(pos, pass, icont)
|
||||||
.blockColour(getColour(pass))
|
.blockColour(getColour(pass))
|
||||||
.lighting()
|
.lighting()
|
||||||
|
.blockAndMeta(block, meta)
|
||||||
.render()
|
.render()
|
||||||
else
|
else
|
||||||
MaterialRenderHelper.start(pos, pass, icont).lighting().render()
|
MaterialRenderHelper.start(pos, pass, icont).lighting().render()
|
||||||
@@ -35,6 +36,7 @@ class GrassMicroMaterial extends BlockMicroMaterial(Blocks.grass, 0) {
|
|||||||
.start(pos, pass, new UVTranslation(0, bounds.max.y - 1) ++ sideIconT)
|
.start(pos, pass, new UVTranslation(0, bounds.max.y - 1) ++ sideIconT)
|
||||||
.blockColour(getColour(pass))
|
.blockColour(getColour(pass))
|
||||||
.lighting()
|
.lighting()
|
||||||
|
.blockAndMeta(block, meta)
|
||||||
.render()
|
.render()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -48,12 +50,14 @@ class TopMicroMaterial($block: Block, $meta: Int = 0)
|
|||||||
.start(pos, pass, icont)
|
.start(pos, pass, icont)
|
||||||
.blockColour(getColour(pass))
|
.blockColour(getColour(pass))
|
||||||
.lighting()
|
.lighting()
|
||||||
|
.blockAndMeta(block, meta)
|
||||||
.render()
|
.render()
|
||||||
else
|
else
|
||||||
MaterialRenderHelper
|
MaterialRenderHelper
|
||||||
.start(pos, pass, new UVTranslation(0, bounds.max.y - 1) ++ icont)
|
.start(pos, pass, new UVTranslation(0, bounds.max.y - 1) ++ icont)
|
||||||
.blockColour(getColour(pass))
|
.blockColour(getColour(pass))
|
||||||
.lighting()
|
.lighting()
|
||||||
|
.blockAndMeta(block, meta)
|
||||||
.render()
|
.render()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -74,8 +74,8 @@ trait HollowMicroblockClient
|
|||||||
|
|
||||||
override def drawBreaking(renderBlocks: RenderBlocks) {
|
override def drawBreaking(renderBlocks: RenderBlocks) {
|
||||||
val state = CCRenderState.instance
|
val state = CCRenderState.instance
|
||||||
state.reset()
|
state.resetInstance()
|
||||||
state.setPipeline(
|
state.setPipelineInstance(
|
||||||
new Translation(x, y, z),
|
new Translation(x, y, z),
|
||||||
new IconTransformation(renderBlocks.overrideBlockTexture)
|
new IconTransformation(renderBlocks.overrideBlockTexture)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -172,15 +172,15 @@ object ItemMicroPartRenderer extends IItemRenderer {
|
|||||||
GL11.glTranslatef(-0.5f, -0.5f, -0.5f)
|
GL11.glTranslatef(-0.5f, -0.5f, -0.5f)
|
||||||
TextureUtils.bindAtlas(0)
|
TextureUtils.bindAtlas(0)
|
||||||
val state = CCRenderState.instance
|
val state = CCRenderState.instance
|
||||||
state.reset()
|
state.resetInstance()
|
||||||
state.useNormals = true
|
state.useNormals = true
|
||||||
state.pullLightmap()
|
state.pullLightmapInstance()
|
||||||
state.startDrawing()
|
state.startDrawingInstance()
|
||||||
val part =
|
val part =
|
||||||
mcrClass.create(true, getMaterialID(item)).asInstanceOf[MicroblockClient]
|
mcrClass.create(true, getMaterialID(item)).asInstanceOf[MicroblockClient]
|
||||||
part.setShape(size, mcrClass.itemSlot)
|
part.setShape(size, mcrClass.itemSlot)
|
||||||
part.render(new Vector3(0.5, 0.5, 0.5).subtract(part.getBounds.center), -1)
|
part.render(new Vector3(0.5, 0.5, 0.5).subtract(part.getBounds.center), -1)
|
||||||
state.draw()
|
state.drawInstance()
|
||||||
GL11.glPopMatrix()
|
GL11.glPopMatrix()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -113,16 +113,16 @@ object ItemSawRenderer extends IItemRenderer {
|
|||||||
case _ => return
|
case _ => return
|
||||||
}
|
}
|
||||||
val state = CCRenderState.instance
|
val state = CCRenderState.instance
|
||||||
state.reset()
|
state.resetInstance()
|
||||||
state.useNormals = true
|
state.useNormals = true
|
||||||
state.pullLightmap()
|
state.pullLightmapInstance()
|
||||||
CCRenderState.changeTexture("microblock:textures/items/saw.png")
|
CCRenderState.changeTexture("microblock:textures/items/saw.png")
|
||||||
state.startDrawing()
|
state.startDrawingInstance()
|
||||||
handle.render(t)
|
handle.render(t)
|
||||||
holder.render(t)
|
holder.render(t)
|
||||||
state.draw()
|
state.drawInstance()
|
||||||
GL11.glDisable(GL11.GL_CULL_FACE)
|
GL11.glDisable(GL11.GL_CULL_FACE)
|
||||||
state.startDrawing()
|
state.startDrawingInstance()
|
||||||
blade.render(
|
blade.render(
|
||||||
t,
|
t,
|
||||||
new UVTranslation(
|
new UVTranslation(
|
||||||
@@ -130,7 +130,7 @@ object ItemSawRenderer extends IItemRenderer {
|
|||||||
(item.getItem.asInstanceOf[Saw].getCuttingStrength(item) - 1) * 4 / 64d
|
(item.getItem.asInstanceOf[Saw].getCuttingStrength(item) - 1) * 4 / 64d
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
state.draw()
|
state.drawInstance()
|
||||||
GL11.glEnable(GL11.GL_CULL_FACE)
|
GL11.glEnable(GL11.GL_CULL_FACE)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -44,12 +44,12 @@ object MicroblockRender {
|
|||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
|
||||||
// TODO: update to use a thread local copy
|
// TODO: update to use a thread local copy
|
||||||
TextureUtils.bindAtlas(0)
|
TextureUtils.bindAtlas(0)
|
||||||
state.reset()
|
state.resetInstance()
|
||||||
state.alphaOverride = 80
|
state.alphaOverride = 80
|
||||||
state.useNormals = true
|
state.useNormals = true
|
||||||
state.startDrawing()
|
state.startDrawingInstance()
|
||||||
part.render(Vector3.zero, -1)
|
part.render(Vector3.zero, -1)
|
||||||
state.draw()
|
state.drawInstance()
|
||||||
|
|
||||||
glDisable(GL_BLEND)
|
glDisable(GL_BLEND)
|
||||||
glDepthMask(true)
|
glDepthMask(true)
|
||||||
@@ -67,7 +67,7 @@ object MicroblockRender {
|
|||||||
faces: Int
|
faces: Int
|
||||||
) {
|
) {
|
||||||
val localFace = face.get()
|
val localFace = face.get()
|
||||||
CCRenderState.instance().setModel(localFace)
|
CCRenderState.instance().setModelInstance(localFace)
|
||||||
for (s <- 0 until 6 if (faces & 1 << s) == 0) {
|
for (s <- 0 until 6 if (faces & 1 << s) == 0) {
|
||||||
localFace.loadCuboidFace(c, s)
|
localFace.loadCuboidFace(c, s)
|
||||||
mat.renderMicroFace(pos, pass, c)
|
mat.renderMicroFace(pos, pass, c)
|
||||||
|
|||||||
@@ -5,12 +5,16 @@ import cpw.mods.fml.common.event.FMLInitializationEvent
|
|||||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent
|
import cpw.mods.fml.common.event.FMLPreInitializationEvent
|
||||||
import cpw.mods.fml.common.Mod.EventHandler
|
import cpw.mods.fml.common.Mod.EventHandler
|
||||||
import cpw.mods.fml.common.event.FMLServerAboutToStartEvent
|
import cpw.mods.fml.common.event.FMLServerAboutToStartEvent
|
||||||
import codechicken.microblock.MicroMaterialRegistry
|
import codechicken.microblock.{
|
||||||
import codechicken.microblock.DefaultContent
|
AngelicaCompat,
|
||||||
|
ConfigContent,
|
||||||
|
DefaultContent,
|
||||||
|
MicroMaterialRegistry
|
||||||
|
}
|
||||||
import codechicken.multipart.Tags
|
import codechicken.multipart.Tags
|
||||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent
|
import cpw.mods.fml.common.event.FMLPostInitializationEvent
|
||||||
import codechicken.microblock.ConfigContent
|
|
||||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent
|
import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent
|
||||||
|
|
||||||
import scala.collection.JavaConversions._
|
import scala.collection.JavaConversions._
|
||||||
|
|
||||||
@Mod(
|
@Mod(
|
||||||
@@ -50,4 +54,6 @@ object MicroblockMod {
|
|||||||
def handleIMC(event: IMCEvent) {
|
def handleIMC(event: IMCEvent) {
|
||||||
ConfigContent.handleIMC(event.getMessages)
|
ConfigContent.handleIMC(event.getMessages)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var angelicaCompat: AngelicaCompat = null
|
||||||
}
|
}
|
||||||
@@ -123,6 +123,9 @@ class MicroblockProxy_clientImpl extends MicroblockProxy_serverImpl {
|
|||||||
MicroMaterialRegistry.loadIcons()
|
MicroMaterialRegistry.loadIcons()
|
||||||
MinecraftForgeClient.registerItemRenderer(itemMicro, ItemMicroPartRenderer)
|
MinecraftForgeClient.registerItemRenderer(itemMicro, ItemMicroPartRenderer)
|
||||||
PacketCustom.assignHandler(MicroblockCPH.registryChannel, MicroblockCPH)
|
PacketCustom.assignHandler(MicroblockCPH.registryChannel, MicroblockCPH)
|
||||||
|
|
||||||
|
if (Loader.isModLoaded("angelica"))
|
||||||
|
MicroblockMod.angelicaCompat = new AngelicaCompat
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ object ControlKeyHandler
|
|||||||
) {
|
) {
|
||||||
import ControlKeyModifer._
|
import ControlKeyModifer._
|
||||||
var wasPressed = false
|
var wasPressed = false
|
||||||
|
var oldPlayer: EntityPlayer = null
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@@ -52,5 +53,13 @@ object ControlKeyHandler
|
|||||||
packet.sendToServer()
|
packet.sendToServer()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (oldPlayer != null) {
|
||||||
|
if (oldPlayer != Minecraft.getMinecraft.thePlayer) {
|
||||||
|
map.remove(oldPlayer)
|
||||||
|
oldPlayer = Minecraft.getMinecraft.thePlayer
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
oldPlayer = Minecraft.getMinecraft.thePlayer
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -37,8 +37,8 @@ object MultipartRenderer
|
|||||||
return
|
return
|
||||||
|
|
||||||
val state = CCRenderState.instance
|
val state = CCRenderState.instance
|
||||||
state.reset()
|
state.resetInstance()
|
||||||
state.pullLightmap()
|
state.pullLightmapInstance()
|
||||||
state.useNormals = true
|
state.useNormals = true
|
||||||
|
|
||||||
val pos = new Vector3(x, y, z)
|
val pos = new Vector3(x, y, z)
|
||||||
@@ -83,7 +83,7 @@ object MultipartRenderer
|
|||||||
}
|
}
|
||||||
|
|
||||||
val state = CCRenderState.instance
|
val state = CCRenderState.instance
|
||||||
state.reset()
|
state.resetInstance()
|
||||||
state.lightMatrix.locate(world, x, y, z)
|
state.lightMatrix.locate(world, x, y, z)
|
||||||
return tmpart.renderStatic(new Vector3(x, y, z), pass)
|
return tmpart.renderStatic(new Vector3(x, y, z), pass)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ trait TCuboidPart extends TMultiPart {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
override def drawBreaking(renderBlocks: RenderBlocks) {
|
override def drawBreaking(renderBlocks: RenderBlocks) {
|
||||||
val state = CCRenderState.instance
|
val state = CCRenderState.instance
|
||||||
state.reset()
|
state.resetInstance()
|
||||||
state.setPipeline(
|
state.setPipelineInstance(
|
||||||
new Translation(x, y, z),
|
new Translation(x, y, z),
|
||||||
new IconTransformation(renderBlocks.overrideBlockTexture)
|
new IconTransformation(renderBlocks.overrideBlockTexture)
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -30,8 +30,11 @@ object MultipartEventHandler {
|
|||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
def worldUnLoad(event: WorldEvent.Unload) {
|
def worldUnLoad(event: WorldEvent.Unload) {
|
||||||
MultipartSPH.onWorldUnload(event.world)
|
MultipartSPH.onWorldUnload(event.world)
|
||||||
if (event.world.isRemote)
|
if (event.world.isRemote) {
|
||||||
TileCache.clear()
|
TileCache.clear()
|
||||||
|
} else {
|
||||||
|
MultipartSaveLoad.loadingWorld = null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
|
|||||||
Reference in new issue
Block a user