mirror of
https://github.com/GTNewHorizons/ForgeMultipart.git
synced 2026-11-26 23:13:07 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a0af5e19cf | ||
|
|
3f27188181 | ||
|
|
4fc6b9cff2 | ||
|
|
ef67761bc3 | ||
|
|
d50ec43d76 | ||
|
|
05eb683a33 | ||
|
|
11b6142320 | ||
|
|
de264540d2 |
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
-2
@@ -1,6 +1,7 @@
|
|||||||
// Add your dependencies here
|
// Add your dependencies here
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
compileOnly("com.github.GTNewHorizons:Angelica:1.0.0-beta45:dev")
|
||||||
devOnlyNonPublishable("com.github.GTNewHorizons:NotEnoughItems:2.7.8-GTNH:dev")
|
|
||||||
|
devOnlyNonPublishable("com.github.GTNewHorizons:NotEnoughItems:2.7.51-GTNH:dev")
|
||||||
}
|
}
|
||||||
+1
-1
@@ -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.
|
||||||
|
|||||||
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.11.1-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
|
||||||
|
|||||||
@@ -86,8 +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 -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||||
' "$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
|
||||||
@@ -206,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.
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ pluginManagement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.30'
|
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(): Unit = {
|
||||||
|
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()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -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