Compare commits

...
20 Commits
Author SHA1 Message Date
bombcar 64b5b41f02 [bs] update buildscript 2024-01-11 22:22:29 +01:00
bombcar 15a0f7f6c6 update for CCC/L 1.2.0 2024-01-11 22:22:29 +01:00
bombcar 66fb9ddbb3 udpate dependencies 2024-01-11 22:22:29 +01:00
Raven Szewczyk 0fff3926fe [ci skip] upgraded build system 2024-01-08 21:24:38 +00:00
Martin Robertz 2e62cb2a32 update deps 2024-01-02 11:29:29 +01:00
chochem 2db573f5c3 also fix mining level for obsidian snakestone 2024-01-02 01:32:50 +01:00
chochem ff494012ed update dep 2024-01-01 21:45:12 +01:00
chochem d5dbfe5f6d fix mining levels with iguana 2024-01-01 21:45:12 +01:00
Martin Robertz a2b32f4d73 update bs+deps 2024-01-01 20:13:10 +01:00
Caedis 2a93fbd33d spotless 2024-01-01 19:28:34 +01:00
Caedis 52496b770a add vanilla mining levels 2024-01-01 19:28:34 +01:00
Martin Robertz c964972006 backdate deps 2023-12-28 19:12:30 +01:00
Martin Robertz cd20d23b1b update gradle + deps + bs 2023-12-28 18:42:39 +01:00
makamys 631c562f34 Make Forge Multipart dependency optional
Fixes regression in 2150548
2023-12-28 08:59:15 -08:00
makamys 3e6930d1f1 Don't relocate CTMLib
Fixes Techguns compat
2023-12-28 08:58:54 -08:00
Martin Robertz 82955ad34d update waila dep 2023-11-16 13:57:16 +01:00
Pelotrio d726351abc Add method to clear static textures on world unload 2023-11-16 13:52:58 +01:00
Pelotrio ea103bcc80 Remove static keyword from render block variables
The static keyword was removed from several instances of RenderBlocksCTM and RenderBlocksCTMFullbright variables in various SubmapManager classes and ChiselController class. This was done to fix a potential memory leak issue where these static objects could persist in memory even when they're no longer needed. Also, related to this change, the onWorldUnload method that used to clear static reference of RenderBlocksCTMFullbright has been removed from ChiselController.
2023-11-16 13:52:58 +01:00
Martin Robertz f4291635b2 fix dependencies 2023-11-12 11:11:48 +01:00
Martin Robertz 739e5fc9c3 fix 2023-11-12 11:09:00 +01:00
21 changed files with 146 additions and 101 deletions

No files matched your search

+2 -3
View File
@@ -15,7 +15,7 @@ To set up the mod as to allow you to make changes, do the following:
### IntelliJ IDEA
1. Run `gradlew idea`.
2. Open IntelliJ and point to either the project folder or the build.gradle file.
2. Open IntelliJ and point to either the project folder or the `build.gradle` file.
3. After opening the project in IntelliJ, run `gradlew genIntellijRuns` in the command terminal you opened earlier.
### Eclipse
@@ -24,9 +24,8 @@ To set up the mod as to allow you to make changes, do the following:
2. Open Eclipse and import the folder as a project.
You now have a functional local copy of Chisel, ready to develop on.
___
Formatting
----------
When coding for Chisel 2, please use the provided [formatter settings](eclipseFormat.xml) to format your code. Poorly formatted code, or PRs which reformat existing code will likely not be accepted.
When coding for the GTNH branch, please run `gradlew spotlessApply` before posting a PR.
+5 -8
View File
@@ -1,6 +1,6 @@
Chisel
=======
Chisel is a mod for Minecraft which adds aesthetic blocks to the game through the use of a chisel.
Chisel is a mod for Minecraft which adds aesthetic blocks to the game through the use of a chisel.
Originally created by AUTOMATIC_MAIDEN, it was ported to Minecraft 1.7.2 by asie, and maintained by Pokefenn/Cricket during 1.7.10.
@@ -12,9 +12,7 @@ It was previously maintained by [tterrag](http://github.com/tterrag1098), [Drull
Pull Requests
---------------
Pull requests with new features, translations, and bugfixes are very welcome. Please make sure to always submit PRs against the ***dev*** branch, not master.
Do not make PRs that are solely formatting or other aesthetic things.
Pull requests with new features, translations, and bugfixes are very welcome.
If your PR is going to take a lot of work, it may be best to make an issue so we can discuss the feature before you create it.
@@ -22,10 +20,9 @@ See the [CONTRIBUTING](CONTRIBUTING.md) file for more details.
Issue Reporting
----------------
If you wish to report an issue with the mod, please submit one to the issue tracker in this repository. When creating an
If you wish to report an issue with this version of the mod, please submit one to the [GTNH issue tracker](https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues). When creating an
issue, please be sure to include:
- The version of Chisel you are using ("latest" is not an acceptable version)
- The version of Forge you are using
- If applicable, the crash report (preferably via [Pastebin](http://pastebin.com/)). generated by the error
- The version of Chisel or GTNH you are using ("latest" is not an acceptable version)
- The crash report (preferably via [Pastebin](http://pastebin.com/)) generated by the error, if any
- Depending on the error, an image of the problem
+21 -39
View File
@@ -1,4 +1,4 @@
//version: 1699290261
//version: 1704751096
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
@@ -28,27 +28,11 @@ import java.util.concurrent.TimeUnit
buildscript {
repositories {
mavenCentral()
maven {
name 'forge'
url 'https://maven.minecraftforge.net'
}
maven {
// GTNH RetroFuturaGradle and ASM Fork
name "GTNH Maven"
url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
allowInsecureProtocol = true
url "https://nexus.gtnewhorizons.com/repository/public/"
}
maven {
name 'sonatype'
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
maven {
name 'Scala CI dependencies'
url 'https://repo1.maven.org/maven2/'
}
mavenLocal()
}
}
@@ -64,12 +48,12 @@ plugins {
id 'org.ajoberstar.grgit' version '4.1.1' // 4.1.1 is the last jvm8 supporting version, unused, available for addon.gradle
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
id 'com.palantir.git-version' version '3.0.0' apply false
id 'de.undercouch.download' version '5.4.0'
id 'de.undercouch.download' version '5.5.0'
id 'com.github.gmazzo.buildconfig' version '3.1.0' apply false // Unused, available for addon.gradle
id 'com.diffplug.spotless' version '6.13.0' apply false // 6.13.0 is the last jvm8 supporting version
id 'com.modrinth.minotaur' version '2.+' apply false
id 'com.matthewprenger.cursegradle' version '1.4.0' apply false
id 'com.gtnewhorizons.retrofuturagradle' version '1.3.24'
id 'com.gtnewhorizons.retrofuturagradle' version '1.3.27'
}
print("You might want to check out './gradlew :faq' if your build fails.\n")
@@ -133,7 +117,7 @@ propertyDefaultIfUnset("forceEnableMixins", false)
propertyDefaultIfUnset("channel", "stable")
propertyDefaultIfUnset("mappingsVersion", "12")
propertyDefaultIfUnset("usesMavenPublishing", true)
propertyDefaultIfUnset("mavenPublishUrl", "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases")
propertyDefaultIfUnset("mavenPublishUrl", "https://nexus.gtnewhorizons.com/repository/releases/")
propertyDefaultIfUnset("modrinthProjectId", "")
propertyDefaultIfUnset("modrinthRelations", "")
propertyDefaultIfUnset("curseForgeProjectId", "")
@@ -302,7 +286,7 @@ if (apiPackage) {
}
if (accessTransformersFile) {
for (atFile in accessTransformersFile.split(",")) {
for (atFile in accessTransformersFile.split(" ")) {
String targetFile = "src/main/resources/META-INF/" + atFile.trim()
if (!getFile(targetFile).exists()) {
throw new GradleException("Could not resolve \"accessTransformersFile\"! Could not find " + targetFile)
@@ -588,13 +572,15 @@ afterEvaluate {
repositories {
maven {
name 'Overmind forge repo mirror'
url 'https://gregtech.overminddl1.com/'
name = "GTNH Maven"
url = "https://nexus.gtnewhorizons.com/repository/public/"
// Links for convenience:
// Simple HTML browsing: https://nexus.gtnewhorizons.com/service/rest/repository/browse/releases/
// Rich web UI browsing: https://nexus.gtnewhorizons.com/#browse/browse:releases
}
maven {
name = "GTNH Maven"
url = "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
allowInsecureProtocol = true
name 'Overmind forge repo mirror'
url 'https://gregtech.overminddl1.com/'
}
maven {
name 'sonatype'
@@ -628,7 +614,7 @@ repositories {
}
maven {
name = "ic2"
url = getURL("https://maven.ic2.player.to/", "https://maven2.ic2.player.to/")
url = getURL("https://maven2.ic2.player.to/", "https://maven.ic2.player.to/")
content {
includeGroup "net.industrial-craft"
}
@@ -687,6 +673,8 @@ configurations.all {
substitute module('com.github.GTNewHorizons:SpongePoweredMixin') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods")
substitute module('com.github.GTNewHorizons:SpongeMixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Unimixins replaces other mixin mods")
substitute module('io.github.legacymoddingmc:unimixins') using module(mixinProviderSpecNoClassifer) withClassifier("dev") because("Our previous unimixins upload was missing the dev classifier")
substitute module('org.scala-lang:scala-library:2.11.1') using module('org.scala-lang:scala-library:2.11.5') because('To allow mixing with Java 8 targets')
}
}
@@ -793,12 +781,12 @@ ext.java17PatchDependenciesCfg = configurations.create("java17PatchDependencies"
}
dependencies {
def lwjgl3ifyVersion = '1.5.1'
def lwjgl3ifyVersion = '1.5.7'
if (modId != 'lwjgl3ify') {
java17Dependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}")
}
if (modId != 'hodgepodge') {
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.3.17')
java17Dependencies('com.github.GTNewHorizons:Hodgepodge:2.4.4')
}
java17PatchDependencies("com.github.GTNewHorizons:lwjgl3ify:${lwjgl3ifyVersion}:forgePatches") {transitive = false}
@@ -973,8 +961,7 @@ if (usesShadowedDependencies.toBoolean()) {
configurations.runtimeElements.outgoing.artifact(tasks.named("shadowJar", ShadowJar))
configurations.apiElements.outgoing.artifact(tasks.named("shadowJar", ShadowJar))
tasks.named("jar", Jar) {
enabled = false
finalizedBy(tasks.shadowJar)
archiveClassifier.set('dev-preshadow')
}
tasks.named("reobfJar", ReobfuscatedJar) {
inputJar.set(tasks.named("shadowJar", ShadowJar).flatMap({it.archiveFile}))
@@ -983,11 +970,6 @@ if (usesShadowedDependencies.toBoolean()) {
javaComponent.withVariantsFromConfiguration(configurations.shadowRuntimeElements) {
skip()
}
for (runTask in ["runClient", "runServer", "runClient17", "runServer17"]) {
tasks.named(runTask).configure {
dependsOn("shadowJar")
}
}
}
ext.publishableDevJar = usesShadowedDependencies.toBoolean() ? tasks.shadowJar : tasks.jar
ext.publishableObfJar = tasks.reobfJar
@@ -1191,7 +1173,7 @@ publishing {
if (usesMavenPublishing.toBoolean() && System.getenv("MAVEN_USER") != null) {
maven {
url = mavenPublishUrl
allowInsecureProtocol = mavenPublishUrl.startsWith("http://") // Mostly for the GTNH maven
allowInsecureProtocol = mavenPublishUrl.startsWith("http://")
credentials {
username = System.getenv("MAVEN_USER") ?: "NONE"
password = System.getenv("MAVEN_PASSWORD") ?: "NONE"
@@ -1310,7 +1292,7 @@ def addCurseForgeRelation(String type, String name) {
// Updating
def buildscriptGradleVersion = "8.2.1"
def buildscriptGradleVersion = "8.5"
tasks.named('wrapper', Wrapper).configure {
gradleVersion = buildscriptGradleVersion
+6 -7
View File
@@ -1,21 +1,20 @@
// Add your dependencies here
dependencies {
implementation("com.github.GTNewHorizons:CodeChickenCore:1.1.11:dev")
implementation("com.github.GTNewHorizons:CodeChickenLib:1.1.8:dev")
implementation("com.github.GTNewHorizons:NotEnoughItems:2.4.12-GTNH:dev")
implementation("com.github.GTNewHorizons:CodeChickenCore:1.2.0:dev")
implementation("com.github.GTNewHorizons:CodeChickenLib:1.2.0:dev")
implementation("com.github.GTNewHorizons:NotEnoughItems:2.5.4-GTNH:dev")
implementation("com.github.GTNewHorizons:ForgeMultipart:1.4.7:dev")
compileOnly("org.projectlombok:lombok:1.18.24")
annotationProcessor("org.projectlombok:lombok:1.18.24")
shadowImplementation("com.github.GTNewHorizons:CTMLib:1.4.4:dev")
compileOnly("com.github.GTNewHorizons:waila:1.6.2:dev") {
transitive = false
}
compileOnly("com.github.GTNewHorizons:ForgeMultipart:1.4.0:dev") {
devOnlyNonPublishable("com.github.GTNewHorizons:waila:1.6.5:dev") {
transitive = false
}
devOnlyNonPublishable("com.github.GTNewHorizons:WailaHarvestability:1.2.0-GTNH:dev")
compileOnly("curse.maven:ee3-65509:2305023") { // https://www.curseforge.com/minecraft/mc-mods/ee3/files/2305023
transitive = false
+3
View File
@@ -62,3 +62,6 @@ usesShadowedDependencies = true
# Optional parameter to customize the produced artifacts. Use this to preserver artifact naming when migrating older
# projects. New projects should not use this parameter.
#customArchiveBaseName =
# Use the team.chisel.ctmlib package name for CTMLib like upstream Chisel (needed by Techguns)
relocateShadowedDependencies = false
Binary file not shown.
+2 -1
View File
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Vendored
+17 -12
View File
@@ -83,10 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# 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
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@@ -133,10 +131,13 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
@@ -144,7 +145,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
@@ -152,7 +153,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@@ -197,11 +198,15 @@ if "$cygwin" || "$msys" ; then
done
fi
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
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,
# 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.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
+4 -5
View File
@@ -4,10 +4,9 @@ pluginManagement {
maven {
// RetroFuturaGradle
name "GTNH Maven"
url "http://jenkins.usrv.eu:8081/nexus/content/groups/public/"
allowInsecureProtocol = true
url "https://nexus.gtnewhorizons.com/repository/public/"
mavenContent {
includeGroup("com.gtnewhorizons.retrofuturagradle")
includeGroupByRegex("com\\.gtnewhorizons\\..+")
}
}
gradlePluginPortal()
@@ -17,8 +16,8 @@ pluginManagement {
}
plugins {
id 'com.diffplug.blowdryerSetup' version '1.6.0'
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.4.0' // Provides java toolchains
id 'com.diffplug.blowdryerSetup' version '1.7.1'
id 'org.gradle.toolchains.foojay-resolver-convention' version '0.7.0' // Provides java toolchains
}
blowdryerSetup {
@@ -19,13 +19,13 @@ import com.cricketcraft.chisel.api.ChiselAPIProps;
import com.cricketcraft.chisel.api.FMPIMC;
import com.cricketcraft.chisel.api.rendering.TextureType;
import codechicken.microblock.MicroMaterialRegistry;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import team.chisel.block.BlockCarvableGlowie;
import team.chisel.client.render.FullBrightMicroMaterial;
import team.chisel.compat.fmp.FMPCompat;
import team.chisel.ctmlib.ISubmapManager;
public class CarvableHelper {
@@ -190,14 +190,8 @@ public class CarvableHelper {
Block block = info.getVariation()
.getBlock();
if (block instanceof BlockCarvableGlowie) {
int meta = info.getVariation()
.getBlockMeta();
MicroMaterialRegistry.registerMaterial(
new FullBrightMicroMaterial(block, meta),
block.getUnlocalizedName() + ((meta > 0) ? ("_" + meta) : ""));
if (Loader.isModLoaded("ForgeMultipart") && block instanceof BlockCarvableGlowie) {
FMPCompat.registerGlowieVariation(info, block);
} else {
if (block.renderAsNormalBlock() || block.isOpaqueCube() || block.isNormalCube()) {
FMPIMC.registerFMP(
@@ -345,7 +345,12 @@ public enum TextureType {
}
}
public ISubmapManager createManagerFor(ICarvingVariation variation, String texturePath) {
public static void clearStatics() {
theRenderBlocksCTM = null;
theRenderBlocksColumn = null;
}
public ISubmapManager createManagerFor(ICarvingVariation variation, String texturePath) {
return new SubmapManagerDefault(this, variation, texturePath);
}
+4
View File
@@ -75,6 +75,7 @@ public class Chisel {
public static final BlockCarvable.SoundType soundMetalFootstep = new BlockCarvable.SoundType("metal", 1.0f, 1.0f);
public static boolean multipartLoaded = false;
public static boolean gtnhLoaded = false;
public static boolean iguanaTweaksLoaded = false;
public static int renderEldritchId;
public static int renderAutoChiselId;
public static int renderGlowId;
@@ -148,6 +149,9 @@ public class Chisel {
if (Loader.isModLoaded("dreamcraft")) {
gtnhLoaded = true;
}
if (Loader.isModLoaded("IguanaTweaksTConstruct")) {
iguanaTweaksLoaded = true;
}
TabsInit.preInit();
Features.preInit();
Statistics.init();
+46
View File
@@ -939,6 +939,13 @@ public enum Features {
.setHardness(5F)
.setResistance(10F)
.setStepSound(Block.soundTypeMetal);
if (Chisel.iguanaTweaksLoaded) {
diamond_block.setHarvestLevel("pickaxe", 4);
} else {
diamond_block.setHarvestLevel("pickaxe", 2);
}
Carving.chisel.addVariation("diamond_block", Blocks.diamond_block, 0, 0);
diamond_block.carverHelper.addVariation("tile.diamond.1.desc", 1, "diamond/terrain-diamond-embossed");
diamond_block.carverHelper.addVariation("tile.diamond.2.desc", 2, "diamond/terrain-diamond-gem");
@@ -1031,6 +1038,13 @@ public enum Features {
.setHardness(5.0F)
.setResistance(10.0F)
.setStepSound(Block.soundTypeMetal);
if (Chisel.iguanaTweaksLoaded) {
emerald_block.setHarvestLevel("pickaxe", 4);
} else {
emerald_block.setHarvestLevel("pickaxe", 2);
}
Carving.chisel.addVariation("emerald_block", Blocks.emerald_block, 0, 0);
emerald_block.carverHelper.addVariation("tile.emerald.1.desc", 1, "emerald/panel");
emerald_block.carverHelper.addVariation("tile.emerald.2.desc", 2, "emerald/panelclassic");
@@ -1512,6 +1526,13 @@ public enum Features {
.setHardness(3F)
.setResistance(10F)
.setStepSound(Block.soundTypeMetal);
if (Chisel.iguanaTweaksLoaded) {
gold_block.setHarvestLevel("pickaxe", 3);
} else {
gold_block.setHarvestLevel("pickaxe", 2);
}
Carving.chisel.addVariation("gold_block", Blocks.gold_block, 0, 0);
gold_block.carverHelper.addVariation("tile.gold.1.desc", 1, "gold/terrain-gold-largeingot");
gold_block.carverHelper.addVariation("tile.gold.2.desc", 2, "gold/terrain-gold-smallingot");
@@ -1920,6 +1941,13 @@ public enum Features {
.setHardness(5F)
.setResistance(10F)
.setStepSound(Block.soundTypeMetal);
if (Chisel.iguanaTweaksLoaded) {
iron_block.setHarvestLevel("pickaxe", 2);
} else {
iron_block.setHarvestLevel("pickaxe", 1);
}
Carving.chisel.addVariation("iron_block", Blocks.iron_block, 0, 0);
iron_block.carverHelper.addVariation("tile.iron.1.desc", 1, "iron/terrain-iron-largeingot");
iron_block.carverHelper.addVariation("tile.iron.2.desc", 2, "iron/terrain-iron-smallingot");
@@ -2031,6 +2059,13 @@ public enum Features {
.setHardness(3F)
.setResistance(5F)
.setStepSound(Block.soundTypeStone);
if (Chisel.iguanaTweaksLoaded) {
lapis_block.setHarvestLevel("pickaxe", 2);
} else {
lapis_block.setHarvestLevel("pickaxe", 1);
}
Carving.chisel.addVariation("lapis_block", Blocks.lapis_block, 0, 0);
lapis_block.carverHelper.addVariation("tile.lapis.1.desc", 1, "lapis/terrain-lapisblock-chunky");
lapis_block.carverHelper.addVariation("tile.lapis.2.desc", 2, "lapis/terrain-lapisblock-panel");
@@ -2789,6 +2824,12 @@ public enum Features {
.setResistance(2000.0F)
.setStepSound(Block.soundTypeStone);
if (Chisel.iguanaTweaksLoaded) {
obsidian.setHarvestLevel("pickaxe", 5);
} else {
obsidian.setHarvestLevel("pickaxe", 3);
}
Carving.chisel.addVariation("obsidian", Blocks.obsidian, 0, 0);
obsidian.carverHelper.addVariation("tile.obsidian.1.desc", 1, "obsidian/pillar");
obsidian.carverHelper.addVariation("tile.obsidian.2.desc", 2, "obsidian/pillar-quartz");
@@ -3479,6 +3520,11 @@ public enum Features {
.setHardness(50.0F)
.setResistance(2000.0F);
GameRegistry.registerBlock(obsidian_snakestone, ItemCarvable.class, "obsidian_snakestone");
if (Chisel.iguanaTweaksLoaded) {
obsidian_snakestone.setHarvestLevel("pickaxe", 5);
} else {
obsidian_snakestone.setHarvestLevel("pickaxe", 3);
}
Carving.chisel.addVariation("obsidian", obsidian_snakestone, 1, 100);
Carving.chisel.addVariation("obsidian", obsidian_snakestone, 13, 101);
// Carving.chisel.registerOre("obsidianSnakestone",
@@ -8,16 +8,19 @@ public class FullBrightLighting implements CCRenderState.IVertexOperation {
public int id;
public boolean load() {
if (!CCRenderState.computeLighting) {
final CCRenderState state = CCRenderState.instance();
if (!state.computeLighting) {
return false;
}
CCRenderState.pipeline.addDependency(CCRenderState.colourAttrib);
CCRenderState.pipeline.addDependency(CCRenderState.lightCoordAttrib);
state.pipeline.addDependency(CCRenderState.colourAttrib);
state.pipeline.addDependency(CCRenderState.lightCoordAttrib);
return true;
}
public void operate() {
CCRenderState.setBrightness(FULL_BRIGHT_BLOCK_BRIGHTNESS);
CCRenderState.instance()
.setBrightness(FULL_BRIGHT_BLOCK_BRIGHTNESS);
}
public int operationID() {
@@ -18,7 +18,7 @@ public class FullBrightMicroMaterial extends BlockMicroMaterial {
@SideOnly(Side.CLIENT)
public void renderMicroFace(final Vector3 pos, final int pass, final Cuboid6 bounds) {
CCRenderState.pipeline.builder()
CCRenderState.instance().pipeline.builder()
.add((CCRenderState.IVertexOperation) pos.translation())
.add((CCRenderState.IVertexOperation) this.icont())
.add((CCRenderState.IVertexOperation) ColourMultiplier.instance(FULL_BRIGHT_COLOR_MULTIPLIER))
@@ -75,7 +75,7 @@ public class SubmapManagerAntiblock extends SubmapManagerBase {
};
@SideOnly(Side.CLIENT)
private static RenderBlocksCTMFullbright rb;
private RenderBlocksCTMFullbright rb;
private String color;
private TextureSubmap submap, submapSmall;
@@ -14,7 +14,7 @@ import team.chisel.ctmlib.TextureSubmap;
public class SubmapManagerCarpetFloor extends SubmapManagerBase {
@SideOnly(Side.CLIENT)
private static RenderBlocksCTM rb;
private RenderBlocksCTM rb;
private TextureSubmap submap;
private TextureSubmap submapSmall;
@@ -16,7 +16,7 @@ import team.chisel.ctmlib.TextureSubmap;
public class SubmapManagerSlab implements ISubmapManager {
@SideOnly(Side.CLIENT)
private static RenderBlocksCTM rb;
private RenderBlocksCTM rb;
private TextureSubmap submap;
private TextureSubmap submapSmall;
@@ -48,7 +48,7 @@ public class SubmapManagerSpecialMaterial extends SubmapManagerBase {
}
};
private static RenderBlocksCTMFullbright renderBlocksFullbright;
private RenderBlocksCTMFullbright renderBlocksFullbright;
private String color;
private MaterialType materialType;
@@ -85,8 +85,4 @@ public class SubmapManagerSpecialMaterial extends SubmapManagerBase {
return renderBlocksFullbright;
}
public static void clearRenderBlocksInstance() {
renderBlocksFullbright = null;
}
}
@@ -3,13 +3,16 @@ package team.chisel.compat.fmp;
import net.minecraft.block.Block;
import net.minecraft.world.World;
import com.cricketcraft.chisel.api.carving.IVariationInfo;
import com.google.common.collect.Lists;
import codechicken.lib.vec.BlockCoord;
import codechicken.microblock.MicroMaterialRegistry;
import codechicken.multipart.MultiPartRegistry;
import codechicken.multipart.MultiPartRegistry.IPartConverter;
import codechicken.multipart.MultiPartRegistry.IPartFactory;
import codechicken.multipart.TMultiPart;
import team.chisel.client.render.FullBrightMicroMaterial;
import team.chisel.init.ChiselBlocks;
public class FMPCompat implements IPartFactory, IPartConverter {
@@ -42,4 +45,13 @@ public class FMPCompat implements IPartFactory, IPartConverter {
}
return null;
}
public static void registerGlowieVariation(IVariationInfo info, Block block) {
int meta = info.getVariation()
.getBlockMeta();
MicroMaterialRegistry.registerMaterial(
new FullBrightMicroMaterial(block, meta),
block.getUnlocalizedName() + ((meta > 0) ? ("_" + meta) : ""));
}
}
@@ -18,6 +18,7 @@ import com.cricketcraft.chisel.api.IChiselItem;
import com.cricketcraft.chisel.api.carving.ICarvingGroup;
import com.cricketcraft.chisel.api.carving.ICarvingVariation;
import com.cricketcraft.chisel.api.carving.IChiselMode;
import com.cricketcraft.chisel.api.rendering.TextureType;
import com.google.common.collect.Queues;
import cpw.mods.fml.common.FMLCommonHandler;
@@ -26,7 +27,6 @@ import cpw.mods.fml.common.gameevent.TickEvent.Phase;
import cpw.mods.fml.common.gameevent.TickEvent.ServerTickEvent;
import team.chisel.Chisel;
import team.chisel.carving.Carving;
import team.chisel.client.render.SubmapManagerSpecialMaterial;
import team.chisel.utils.General;
public final class ChiselController {
@@ -166,7 +166,7 @@ public final class ChiselController {
@SubscribeEvent
public void onWorldUnload(WorldEvent.Unload event) {
if (event.world.isRemote) {
SubmapManagerSpecialMaterial.clearRenderBlocksInstance();
TextureType.clearStatics();
}
}