Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
39e860974a | ||
|
|
c4c1953ae1 | ||
|
|
6efa21100b | ||
|
|
c3e1675ac8 | ||
|
|
cc9b8ab774 | ||
|
|
674d2b389b | ||
|
|
78dbb36fec | ||
|
|
6385002193 |
No files matched your search
@@ -28,3 +28,4 @@ whitelist.json
|
||||
src/main/resources/mixins.*.json
|
||||
*.bat
|
||||
layout.json
|
||||
.DS_Store
|
||||
@@ -1,14 +1,14 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
implementation("com.github.GTNewHorizons:CodeChickenCore:1.4.7:dev")
|
||||
implementation("com.github.GTNewHorizons:NotEnoughItems:2.8.35-GTNH:dev")
|
||||
implementation("com.github.GTNewHorizons:ForgeMultipart:1.7.0:dev")
|
||||
implementation("com.github.GTNewHorizons:CodeChickenCore:1.4.10:dev")
|
||||
implementation("com.github.GTNewHorizons:NotEnoughItems:2.8.48-GTNH:dev")
|
||||
implementation("com.github.GTNewHorizons:ForgeMultipart:1.7.2:dev")
|
||||
|
||||
compileOnly("org.projectlombok:lombok:1.18.24")
|
||||
annotationProcessor("org.projectlombok:lombok:1.18.24")
|
||||
|
||||
devOnlyNonPublishable("com.github.GTNewHorizons:waila:1.9.7:dev") {
|
||||
devOnlyNonPublishable("com.github.GTNewHorizons:waila:1.9.15:dev") {
|
||||
transitive = false
|
||||
}
|
||||
devOnlyNonPublishable("com.github.GTNewHorizons:WailaHarvestability:1.3.4-GTNH:dev")
|
||||
@@ -17,7 +17,7 @@ dependencies {
|
||||
transitive = false
|
||||
}
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:Angelica:1.0.0-beta68:api") {
|
||||
compileOnly("com.github.GTNewHorizons:Angelica:1.0.0-beta68a:api") {
|
||||
transitive = false
|
||||
}
|
||||
}
|
||||
@@ -41,7 +41,11 @@ developmentEnvironmentUserName = Developer
|
||||
|
||||
# Enables using modern Java syntax (up to version 17) via Jabel, while still targeting JVM 8.
|
||||
# See https://github.com/bsideup/jabel for details on how this works.
|
||||
enableModernJavaSyntax = false
|
||||
enableModernJavaSyntax = true
|
||||
|
||||
# If set, ignores the above setting and compiles with the given toolchain. This may cause unexpected issues,
|
||||
# and should *not* be used in most situations. -1 disables this.
|
||||
# forceToolchainVersion = -1
|
||||
|
||||
# Enables injecting missing generics into the decompiled source code for a better coding experience.
|
||||
# Turns most publicly visible List, Map, etc. into proper List<E>, Map<K, V> types.
|
||||
@@ -209,3 +213,6 @@ curseForgeRelations =
|
||||
# This is meant to be set in $HOME/.gradle/gradle.properties.
|
||||
# ideaCheckSpotlessOnBuild = true
|
||||
|
||||
# Non-GTNH properties
|
||||
org.gradle.configuration-cache = true
|
||||
org.gradle.parallel = true
|
||||
@@ -0,0 +1,12 @@
|
||||
#This file is generated by updateDaemonJvm
|
||||
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect
|
||||
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/b41931cf1e70bc8e08d7dd19c343ef00/redirect
|
||||
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect
|
||||
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/b41931cf1e70bc8e08d7dd19c343ef00/redirect
|
||||
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/46949723aaa20c7b64d7ecfed7207034/redirect
|
||||
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/d6690dfd71c4c91e08577437b5b2beb0/redirect
|
||||
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect
|
||||
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/b41931cf1e70bc8e08d7dd19c343ef00/redirect
|
||||
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/3cd7045fca9a72cd9bc7d14a385e594c/redirect
|
||||
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/552c7bffe0370c66410a51c55985b511/redirect
|
||||
toolchainVersion=25
|
||||
@@ -1,6 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
# Copyright © 2015 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -114,7 +114,6 @@ case "$( uname )" in #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH="\\\"\\\""
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
@@ -172,7 +171,6 @@ fi
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
@@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||
"$@"
|
||||
|
||||
|
||||
@@ -70,11 +70,10 @@ goto fail
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
|
||||
@@ -17,7 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.48'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.7'
|
||||
}
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.launchwrapper.Launch;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
@@ -271,6 +272,8 @@ public enum TextureType {
|
||||
CUSTOM;
|
||||
|
||||
/* Some util stuff for shared code between v* and r* */
|
||||
public static final boolean fixedBottomFaceUV = (boolean) Launch.blackboard
|
||||
.getOrDefault("hodgepodge.FixesConfig.fixBottomFaceUV", Boolean.FALSE);
|
||||
|
||||
public static IIcon getVIcon(TextureType type, TextureSubmap map, int x, int y, int z, int side) {
|
||||
int variationSize = (type == TextureType.V9) ? 3 : 2;
|
||||
@@ -291,6 +294,9 @@ public enum TextureType {
|
||||
//For DOWN, reverse the indexes for only Z
|
||||
textureZ = (variationSize - textureZ - 1);
|
||||
}*/
|
||||
else if (side == 0 && fixedBottomFaceUV) {
|
||||
textureX = variationSize - textureX - 1;
|
||||
}
|
||||
|
||||
int index;
|
||||
if (side == 0 || side == 1) {
|
||||
|
||||
@@ -1647,7 +1647,7 @@ public enum Features {
|
||||
.setCreativeTab(ChiselTabs.tabStoneChiselBlocks)
|
||||
.setStepSound(Block.soundTypeStone)
|
||||
.setHardness(1.5F);
|
||||
Carving.chisel.addVariation("hardenedClay", Blocks.hardened_clay, 0, 0);
|
||||
Carving.chisel.addVariation("hardened_clay", Blocks.hardened_clay, 0, 0);
|
||||
hardenedClay.carverHelper.addVariation("tile.hardened_clay.0.desc", 0, "hardenedclay/braid");
|
||||
hardenedClay.carverHelper.addVariation("tile.hardened_clay.1.desc", 1, "hardenedclay/bricks-cracked");
|
||||
hardenedClay.carverHelper.addVariation("tile.hardened_clay.2.desc", 2, "hardenedclay/bricks-encased");
|
||||
@@ -1681,7 +1681,7 @@ public enum Features {
|
||||
hardenedClay2.carverHelper.addVariation("tile.hardened_clay.24.desc", 8, "hardenedclay/twisted");
|
||||
hardenedClay2.carverHelper.addVariation("tile.hardened_clay.25.desc", 9, "hardenedclay/weaver");
|
||||
hardenedClay2.carverHelper.registerBlock(hardenedClay2, "hardened_clay2");
|
||||
hardenedClay2.carverHelper.registerVariations("hardenedClay");
|
||||
hardenedClay2.carverHelper.registerVariations("hardened_clay");
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1701,7 +1701,7 @@ public enum Features {
|
||||
String oreName = "hardenedClay" + sGNames[i].replaceAll(" ", "");
|
||||
String texName = "hardenedclay/" + sGNames[i].toLowerCase()
|
||||
.replaceAll(" ", "") + "/";
|
||||
Carving.chisel.addVariation(groupName, Blocks.stained_hardened_clay, i, 0);
|
||||
Carving.chisel.addVariation(blockName, Blocks.stained_hardened_clay, i, 0);
|
||||
hardenedClay.carverHelper.addVariation("tile." + blockName + ".0.desc", 0, texName + "braid");
|
||||
hardenedClay.carverHelper.addVariation("tile." + blockName + ".1.desc", 1, texName + "bricks-cracked");
|
||||
hardenedClay.carverHelper.addVariation("tile." + blockName + ".2.desc", 2, texName + "bricks-encased");
|
||||
@@ -1735,7 +1735,7 @@ public enum Features {
|
||||
hardenedClay2.carverHelper.addVariation("tile." + blockName + ".24.desc", 8, texName + "twisted");
|
||||
hardenedClay2.carverHelper.addVariation("tile." + blockName + ".25.desc", 9, texName + "weaver");
|
||||
hardenedClay2.carverHelper.registerBlock(hardenedClay2, blockName + "2");
|
||||
hardenedClay2.carverHelper.registerVariations(groupName);
|
||||
hardenedClay2.carverHelper.registerVariations(blockName);
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -2050,6 +2050,7 @@ public enum Features {
|
||||
}
|
||||
|
||||
Carving.chisel.addVariation("iron_block", Blocks.iron_block, 0, 0);
|
||||
iron_block.carverHelper.addVariation("tile.iron.0.desc", 0, "iron/terrain-iron-rusted");
|
||||
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");
|
||||
iron_block.carverHelper.addVariation("tile.iron.3.desc", 3, "iron/terrain-iron-gears");
|
||||
@@ -3810,6 +3811,12 @@ public enum Features {
|
||||
7,
|
||||
"technical/new/concrete/concreteBlocks",
|
||||
new SubmapManagerCombinedCTM(9, "technical/new/concrete/concreteBlocks", TextureType.R9));
|
||||
technical4.carverHelper.addVariation("tile.technical4.8.desc", 8, "technical/new/cinderblock", 42);
|
||||
technical4.carverHelper.addVariation("tile.technical4.9.desc", 9, "technical/new/polishedcinderblock", 43);
|
||||
technical4.carverHelper.addVariation("tile.technical4.10.desc", 10, "technical/new/cinderbrick", 44);
|
||||
technical4.carverHelper.addVariation("tile.technical4.11.desc", 11, "technical/new/cardboardbox", 45);
|
||||
technical4.carverHelper.addVariation("tile.technical4.12.desc", 12, "technical/new/foldedcardboard", 46);
|
||||
technical4.carverHelper.addVariation("tile.technical4.13.desc", 13, "technical/new/cardboardscrap", 47);
|
||||
// The animation is malfunctioning. :(
|
||||
// technical4.carverHelper.addVariation("tile.technical4.7.desc", 7, "technical/new/TapeDrive");
|
||||
technical4.carverHelper.registerBlock(technical4, "technical4");
|
||||
@@ -4536,6 +4543,76 @@ public enum Features {
|
||||
'B',
|
||||
new ItemStack(Items.slime_ball, 1));
|
||||
}
|
||||
},
|
||||
|
||||
LANTERN {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
BlockCarvable lantern = (BlockCarvable) new BlockCarvable().setCreativeTab(ChiselTabs.tabOtherChiselBlocks)
|
||||
.setHardness(1F)
|
||||
.setLightLevel(1.0F)
|
||||
.setStepSound(Block.soundTypeGlass);
|
||||
|
||||
lantern.carverHelper.addVariation("tile.lantern.0.desc", 0, "lantern/lantern");
|
||||
lantern.carverHelper.addVariation("tile.lantern.1.desc", 1, "lantern/glowlantern");
|
||||
lantern.carverHelper.addVariation("tile.lantern.2.desc", 2, "lantern/redlantern");
|
||||
lantern.carverHelper.addVariation("tile.lantern.3.desc", 3, "lantern/soullantern");
|
||||
lantern.carverHelper.addVariation("tile.lantern.4.desc", 4, "lantern/cursedlantern");
|
||||
lantern.carverHelper.addVariation("tile.lantern.5.desc", 5, "lantern/endlantern");
|
||||
|
||||
lantern.carverHelper.registerAll(lantern, "lantern");
|
||||
}
|
||||
|
||||
@Override
|
||||
void addRecipes() {
|
||||
GameRegistry.addRecipe(
|
||||
new ItemStack(ChiselBlocks.lantern, 1, 0),
|
||||
"gig",
|
||||
"iGi",
|
||||
"gig",
|
||||
'i',
|
||||
new ItemStack(Items.iron_ingot, 1, 0),
|
||||
'G',
|
||||
new ItemStack(Blocks.glowstone, 1),
|
||||
'g',
|
||||
new ItemStack(Items.glowstone_dust, 1));
|
||||
}
|
||||
},
|
||||
|
||||
SHEETMETAL {
|
||||
|
||||
@Override
|
||||
void addBlocks() {
|
||||
BlockCarvable sheetmetal = (BlockCarvable) new BlockCarvable()
|
||||
.setCreativeTab(ChiselTabs.tabOtherChiselBlocks)
|
||||
.setHardness(1F)
|
||||
.setStepSound(Block.soundTypeMetal);
|
||||
|
||||
sheetmetal.carverHelper.addVariation("tile.sheetmetal.0.desc", 0, "sheetmetal/walling");
|
||||
sheetmetal.carverHelper.addVariation("tile.sheetmetal.1.desc", 1, "sheetmetal/siding");
|
||||
sheetmetal.carverHelper.addVariation("tile.sheetmetal.2.desc", 2, "sheetmetal/paneling");
|
||||
sheetmetal.carverHelper.addVariation("tile.sheetmetal.3.desc", 3, "sheetmetal/plating");
|
||||
sheetmetal.carverHelper.addVariation("tile.sheetmetal.4.desc", 4, "sheetmetal/treading");
|
||||
sheetmetal.carverHelper.addVariation("tile.sheetmetal.5.desc", 5, "sheetmetal/rustywalling");
|
||||
sheetmetal.carverHelper.addVariation("tile.sheetmetal.6.desc", 6, "sheetmetal/rustysiding");
|
||||
sheetmetal.carverHelper.addVariation("tile.sheetmetal.7.desc", 7, "sheetmetal/rustypaneling");
|
||||
sheetmetal.carverHelper.addVariation("tile.sheetmetal.8.desc", 8, "sheetmetal/rustyplating");
|
||||
sheetmetal.carverHelper.addVariation("tile.sheetmetal.9.desc", 9, "sheetmetal/rustytreading");
|
||||
|
||||
sheetmetal.carverHelper.registerAll(sheetmetal, "sheetmetal");
|
||||
}
|
||||
|
||||
@Override
|
||||
void addRecipes() {
|
||||
GameRegistry.addRecipe(
|
||||
new ItemStack(ChiselBlocks.sheetmetal, 32, 0),
|
||||
"iii",
|
||||
" ",
|
||||
"iii",
|
||||
'i',
|
||||
new ItemStack(Items.iron_ingot, 1, 0));
|
||||
}
|
||||
};
|
||||
|
||||
private static final String[] dyeOres = { "dyeBlack", "dyeRed", "dyeGreen", "dyeBrown", "dyeBlue", "dyePurple",
|
||||
|
||||
@@ -40,7 +40,7 @@ public class BlockCarvableStairs extends BlockStairs implements ICarvable {
|
||||
|
||||
@Override
|
||||
public int damageDropped(int i) {
|
||||
return i / 8;
|
||||
return i & 0x8;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -62,7 +62,7 @@ public class BlockRoadLine extends BlockCarvable {
|
||||
if (par1World.isRemote) return;
|
||||
|
||||
if (!this.canPlaceBlockAt(par1World, par2, par3, par4)) {
|
||||
this.dropBlockAsItem(par1World, par2, par3, par4, 0, 0);
|
||||
this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
|
||||
par1World.setBlockToAir(par2, par3, par4);
|
||||
}
|
||||
|
||||
|
||||
@@ -21,91 +21,81 @@ public class SubmapManagerVoidstone extends SubmapManagerBase {
|
||||
|
||||
// TODO there must be a better more generic way to do this...
|
||||
@SideOnly(Side.CLIENT)
|
||||
private class RenderBlocksVoidstone extends RenderBlocksCTM {
|
||||
private static class RenderBlocksVoidstone extends RenderBlocksCTM {
|
||||
|
||||
@Override
|
||||
public void renderFaceXNeg(Block block, double x, double y, double z, IIcon icon) {
|
||||
super.renderFaceXNeg(block, x, y, z, icon);
|
||||
renderMinX += 0.005;
|
||||
setOverrideBlockTexture(getBase(x, y, z, ForgeDirection.WEST.ordinal()));
|
||||
super.renderFaceXNeg(block, x, y, z, null);
|
||||
clearOverrideBlockTexture();
|
||||
|
||||
super.renderFaceXNeg(block, x, y, z, icon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceXPos(Block block, double x, double y, double z, IIcon icon) {
|
||||
super.renderFaceXPos(block, x, y, z, icon);
|
||||
setOverrideBlockTexture(getBase(x, y, z, ForgeDirection.EAST.ordinal()));
|
||||
renderMaxX -= 0.005;
|
||||
super.renderFaceXPos(block, x, y, z, null);
|
||||
clearOverrideBlockTexture();
|
||||
|
||||
super.renderFaceXPos(block, x, y, z, icon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceYNeg(Block block, double x, double y, double z, IIcon icon) {
|
||||
super.renderFaceYNeg(block, x, y, z, icon);
|
||||
setOverrideBlockTexture(getBase(x, y, z, ForgeDirection.DOWN.ordinal()));
|
||||
renderMinY += 0.005;
|
||||
super.renderFaceYNeg(block, x, y, z, null);
|
||||
clearOverrideBlockTexture();
|
||||
|
||||
super.renderFaceYNeg(block, x, y, z, icon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceYPos(Block block, double x, double y, double z, IIcon icon) {
|
||||
super.renderFaceYPos(block, x, y, z, icon);
|
||||
setOverrideBlockTexture(getBase(x, y, z, ForgeDirection.UP.ordinal()));
|
||||
renderMaxY -= 0.005;
|
||||
super.renderFaceYPos(block, x, y, z, null);
|
||||
clearOverrideBlockTexture();
|
||||
|
||||
super.renderFaceYPos(block, x, y, z, icon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceZNeg(Block block, double x, double y, double z, IIcon icon) {
|
||||
super.renderFaceZNeg(block, x, y, z, icon);
|
||||
setOverrideBlockTexture(getBase(x, y, z, ForgeDirection.NORTH.ordinal()));
|
||||
renderMinZ += 0.005;
|
||||
super.renderFaceZNeg(block, x, y, z, null);
|
||||
clearOverrideBlockTexture();
|
||||
|
||||
super.renderFaceZNeg(block, x, y, z, icon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderFaceZPos(Block block, double x, double y, double z, IIcon icon) {
|
||||
super.renderFaceZPos(block, x, y, z, icon);
|
||||
setOverrideBlockTexture(getBase(x, y, z, ForgeDirection.SOUTH.ordinal()));
|
||||
renderMaxZ -= 0.005;
|
||||
super.renderFaceZPos(block, x, y, z, null);
|
||||
clearOverrideBlockTexture();
|
||||
|
||||
super.renderFaceZPos(block, x, y, z, icon);
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
this.submap = null;
|
||||
private IIcon getBase(double x, double y, double z, int side) {
|
||||
return TextureType.getVIcon(
|
||||
TextureType.V4,
|
||||
base,
|
||||
MathHelper.floor_double(x),
|
||||
MathHelper.floor_double(y),
|
||||
MathHelper.floor_double(z),
|
||||
side);
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private static ThreadLocal<RenderBlocksVoidstone> renderBlocksThreadLocal;
|
||||
|
||||
private static void initStatics() {
|
||||
if (renderBlocksThreadLocal == null) {
|
||||
renderBlocksThreadLocal = new ThreadLocal<>();
|
||||
}
|
||||
}
|
||||
|
||||
private ISubmapManager overlay;
|
||||
private TextureSubmap base;
|
||||
private static TextureSubmap base;
|
||||
|
||||
private IIcon getBase(double x, double y, double z, int side) {
|
||||
return TextureType.getVIcon(
|
||||
TextureType.V4,
|
||||
base,
|
||||
MathHelper.floor_double(x),
|
||||
MathHelper.floor_double(y),
|
||||
MathHelper.floor_double(z),
|
||||
side);
|
||||
}
|
||||
|
||||
private String texture;
|
||||
private int meta;
|
||||
private final String texture;
|
||||
private final int meta;
|
||||
|
||||
public SubmapManagerVoidstone(String texture, int meta) {
|
||||
this.texture = texture;
|
||||
@@ -133,18 +123,22 @@ public class SubmapManagerVoidstone extends SubmapManagerBase {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public RenderBlocks createRenderContext(RenderBlocks rendererOld, Block block, IBlockAccess world) {
|
||||
initStatics();
|
||||
if (renderBlocksThreadLocal == null) {
|
||||
renderBlocksThreadLocal = ThreadLocal.withInitial(RenderBlocksVoidstone::new);
|
||||
}
|
||||
|
||||
RenderBlocksVoidstone rb = renderBlocksThreadLocal.get();
|
||||
if (rb == null) {
|
||||
rb = new RenderBlocksVoidstone();
|
||||
renderBlocksThreadLocal.set(rb);
|
||||
} else rb.reset();
|
||||
RenderBlocks ctx = overlay.createRenderContext(rendererOld, block, world);
|
||||
rb.setRenderBoundsFromBlock(block);
|
||||
|
||||
if (ctx instanceof RenderBlocksCTM) {
|
||||
rb.submap = ((RenderBlocksCTM) ctx).submap;
|
||||
rb.submapSmall = ((RenderBlocksCTM) ctx).submapSmall;
|
||||
} else {
|
||||
rb.submap = null;
|
||||
rb.submapSmall = null;
|
||||
}
|
||||
|
||||
return rb;
|
||||
}
|
||||
}
|
||||
@@ -361,6 +361,61 @@ public class RenderBlocksCTM extends RenderBlocks {
|
||||
|
||||
protected void side(Block block, SubSide side, int iconIndex) {
|
||||
|
||||
// If we have an overridden texture when we're supposed to render a CTM texture,
|
||||
// we'll treat it as a normal block texture but still render it the CTM way: quarter of a texture at a time.
|
||||
// This way has one benefit: if an overridden texture is a base block texture and a CTM texture (that is being
|
||||
// rendered next) is an overlay texture above the base, we're avoiding any z-fighting issues because we
|
||||
// create identical vertices and now only order of rendering dictates which texture will be rendered above
|
||||
if (hasOverrideBlockTexture()) {
|
||||
IIcon icon = overrideBlockTexture;
|
||||
|
||||
double u0 = icon.getMinU();
|
||||
double u1 = icon.getMaxU();
|
||||
double v0 = icon.getMinV();
|
||||
double v1 = icon.getMaxV();
|
||||
|
||||
double uMid = (u0 + u1) / 2;
|
||||
double vMid = (v0 + v1) / 2;
|
||||
|
||||
// Map all LB-style subsides to bottom-left quarter, RB to bottom-right, RT to top-right, LT to top-left
|
||||
switch (side) {
|
||||
// bottom-left quarter
|
||||
case XNEG_LB, XPOS_LB, YNEG_LB, YPOS_LB, ZNEG_LB, ZPOS_LB -> {
|
||||
minU = u0;
|
||||
maxU = uMid;
|
||||
minV = vMid;
|
||||
maxV = v1;
|
||||
}
|
||||
|
||||
// bottom-right quarter
|
||||
case XNEG_RB, XPOS_RB, YNEG_RB, YPOS_RB, ZNEG_RB, ZPOS_RB -> {
|
||||
minU = uMid;
|
||||
maxU = u1;
|
||||
minV = vMid;
|
||||
maxV = v1;
|
||||
}
|
||||
|
||||
// top-right quarter
|
||||
case XNEG_RT, XPOS_RT, YNEG_RT, YPOS_RT, ZNEG_RT, ZPOS_RT -> {
|
||||
minU = uMid;
|
||||
maxU = u1;
|
||||
minV = v0;
|
||||
maxV = vMid;
|
||||
}
|
||||
|
||||
// top-left quarter
|
||||
case XNEG_LT, XPOS_LT, YNEG_LT, YPOS_LT, ZNEG_LT, ZPOS_LT -> {
|
||||
minU = u0;
|
||||
maxU = uMid;
|
||||
minV = v0;
|
||||
maxV = vMid;
|
||||
}
|
||||
}
|
||||
|
||||
side.render(this);
|
||||
return;
|
||||
}
|
||||
|
||||
IIcon icon;
|
||||
TextureSubmap map;
|
||||
if (iconIndex >= 16) {
|
||||
@@ -378,25 +433,10 @@ public class RenderBlocksCTM extends RenderBlocks {
|
||||
icon = map.getSubIcon(x, y);
|
||||
}
|
||||
|
||||
double umax = icon.getMaxU();
|
||||
double umin = icon.getMinU();
|
||||
double vmax = icon.getMaxV();
|
||||
double vmin = icon.getMinV();
|
||||
|
||||
minU = umin;
|
||||
maxU = umax;
|
||||
minV = vmin;
|
||||
maxV = vmax;
|
||||
|
||||
// uCache[0] = umin;
|
||||
// uCache[1] = umax;
|
||||
// uCache[2] = umax;
|
||||
// uCache[3] = umin;
|
||||
//
|
||||
// vCache[0] = vmax;
|
||||
// vCache[1] = vmax;
|
||||
// vCache[2] = vmin;
|
||||
// vCache[3] = vmin;
|
||||
minU = icon.getMinU();
|
||||
maxU = icon.getMaxU();
|
||||
minV = icon.getMinV();
|
||||
maxV = icon.getMaxV();
|
||||
|
||||
side.render(this);
|
||||
}
|
||||
@@ -404,7 +444,7 @@ public class RenderBlocksCTM extends RenderBlocks {
|
||||
@Override
|
||||
public void renderFaceXNeg(Block block, double x, double y, double z, IIcon icon) {
|
||||
pre(ForgeDirection.WEST);
|
||||
if (!inWorld || hasOverrideBlockTexture() || submap == null) {
|
||||
if (!inWorld || submap == null) {
|
||||
super.renderFaceXNeg(block, 0, 0, 0, icon);
|
||||
} else {
|
||||
int tex[] = ctm.getSubmapIndices(blockAccess, bx, by, bz, 4);
|
||||
@@ -429,7 +469,7 @@ public class RenderBlocksCTM extends RenderBlocks {
|
||||
@Override
|
||||
public void renderFaceXPos(Block block, double x, double y, double z, IIcon icon) {
|
||||
pre(ForgeDirection.EAST);
|
||||
if (!inWorld || hasOverrideBlockTexture() || submap == null) {
|
||||
if (!inWorld || submap == null) {
|
||||
super.renderFaceXPos(block, 0, 0, 0, icon);
|
||||
} else {
|
||||
int tex[] = ctm.getSubmapIndices(blockAccess, bx, by, bz, 5);
|
||||
@@ -454,7 +494,7 @@ public class RenderBlocksCTM extends RenderBlocks {
|
||||
@Override
|
||||
public void renderFaceZNeg(Block block, double x, double y, double z, IIcon icon) {
|
||||
pre(ForgeDirection.NORTH);
|
||||
if (!inWorld || hasOverrideBlockTexture() || submap == null) {
|
||||
if (!inWorld || submap == null) {
|
||||
super.renderFaceZNeg(block, 0, 0, 0, icon);
|
||||
} else {
|
||||
int tex[] = ctm.getSubmapIndices(blockAccess, bx, by, bz, 2);
|
||||
@@ -479,7 +519,7 @@ public class RenderBlocksCTM extends RenderBlocks {
|
||||
@Override
|
||||
public void renderFaceZPos(Block block, double x, double y, double z, IIcon icon) {
|
||||
pre(ForgeDirection.SOUTH);
|
||||
if (!inWorld || hasOverrideBlockTexture() || submap == null) {
|
||||
if (!inWorld || submap == null) {
|
||||
super.renderFaceZPos(block, 0, 0, 0, icon);
|
||||
} else {
|
||||
int tex[] = ctm.getSubmapIndices(blockAccess, bx, by, bz, 3);
|
||||
@@ -504,7 +544,7 @@ public class RenderBlocksCTM extends RenderBlocks {
|
||||
@Override
|
||||
public void renderFaceYNeg(Block block, double x, double y, double z, IIcon icon) {
|
||||
pre(ForgeDirection.DOWN);
|
||||
if (!inWorld || hasOverrideBlockTexture() || submap == null) {
|
||||
if (!inWorld || submap == null) {
|
||||
super.renderFaceYNeg(block, 0, 0, 0, icon);
|
||||
} else {
|
||||
int tex[] = ctm.getSubmapIndices(blockAccess, bx, by, bz, 0);
|
||||
@@ -529,7 +569,7 @@ public class RenderBlocksCTM extends RenderBlocks {
|
||||
@Override
|
||||
public void renderFaceYPos(Block block, double x, double y, double z, IIcon icon) {
|
||||
pre(ForgeDirection.UP);
|
||||
if (!inWorld || hasOverrideBlockTexture() || submap == null) {
|
||||
if (!inWorld || submap == null) {
|
||||
super.renderFaceYPos(block, 0, 0, 0, icon);
|
||||
} else {
|
||||
int tex[] = ctm.getSubmapIndices(blockAccess, bx, by, bz, 1);
|
||||
|
||||
@@ -173,5 +173,9 @@ public final class ChiselBlocks {
|
||||
// 1.19, skipped 10 versions but thats fine
|
||||
public static final BlockCarvable froglight = null;
|
||||
|
||||
// Backports from Dustrial Decor. Original artists are WDSPC and Evo_94!
|
||||
public static final BlockCarvable lantern = null;
|
||||
public static final BlockCarvable sheetmetal = null;
|
||||
|
||||
private ChiselBlocks() {}
|
||||
}
|
||||
@@ -881,6 +881,12 @@ tile.technical4.4.desc=Thermal Exhaust Plating
|
||||
tile.technical4.5.desc=Makeshift Plating
|
||||
tile.technical4.6.desc=Pipe Dream
|
||||
tile.technical4.7.desc=Worn Concrete
|
||||
tile.technical4.8.desc=Cinder Block
|
||||
tile.technical4.9.desc=Cinder Block (Polished)
|
||||
tile.technical4.10.desc=Cinder Brick
|
||||
tile.technical4.11.desc=Cardboard Box
|
||||
tile.technical4.12.desc=Folded Cardboard
|
||||
tile.technical4.13.desc=Cardboard Scrap
|
||||
tile.technical4.16.desc=Tape Drive? (I'm too young for this.)
|
||||
|
||||
#End Stone
|
||||
@@ -1297,6 +1303,7 @@ tile.roadLine.4.desc=Hazard Tape
|
||||
|
||||
#Iron Blocks
|
||||
tile.chisel.iron_block.name=Iron Block
|
||||
tile.iron.0.desc=Rusted Block
|
||||
tile.iron.1.desc=Large Iron Ingots
|
||||
tile.iron.2.desc=Small Iron Ingots
|
||||
tile.iron.3.desc=Iron Gears
|
||||
@@ -2698,5 +2705,27 @@ tile.froglight.7.desc=Orundum
|
||||
tile.froglight.8.desc=Blood-Stained
|
||||
tile.froglight.9.desc=Ichor
|
||||
|
||||
#Lanterns
|
||||
tile.chisel.lantern.name=Lantern
|
||||
tile.lantern.0.desc=Simple
|
||||
tile.lantern.1.desc=Glow
|
||||
tile.lantern.2.desc=Redstone
|
||||
tile.lantern.3.desc=Soul
|
||||
tile.lantern.4.desc=Cursed
|
||||
tile.lantern.5.desc=Ender
|
||||
|
||||
#Sheetmetal
|
||||
tile.chisel.sheetmetal.name=Sheetmetal
|
||||
tile.sheetmetal.0.desc=Walling
|
||||
tile.sheetmetal.1.desc=Siding
|
||||
tile.sheetmetal.2.desc=Paneling
|
||||
tile.sheetmetal.3.desc=Plating
|
||||
tile.sheetmetal.4.desc=Treading
|
||||
tile.sheetmetal.5.desc=Walling (Rusty)
|
||||
tile.sheetmetal.6.desc=Siding (Rusty)
|
||||
tile.sheetmetal.7.desc=Paneling (Rusty)
|
||||
tile.sheetmetal.8.desc=Plating (Rusty)
|
||||
tile.sheetmetal.9.desc=Treading (Rusty)
|
||||
|
||||
tile.chisel.amber.name=Block of Amber
|
||||
tile.chisel.bloodBrick.name=Bloodstone Brick
|
||||
|
After Width: | Height: | Size: 407 B |
|
After Width: | Height: | Size: 394 B |
|
After Width: | Height: | Size: 553 B |
|
After Width: | Height: | Size: 479 B |
|
After Width: | Height: | Size: 394 B |
|
After Width: | Height: | Size: 531 B |
|
After Width: | Height: | Size: 454 B |
|
After Width: | Height: | Size: 394 B |
|
After Width: | Height: | Size: 513 B |
|
After Width: | Height: | Size: 456 B |
|
After Width: | Height: | Size: 394 B |
|
After Width: | Height: | Size: 508 B |
|
After Width: | Height: | Size: 459 B |
|
After Width: | Height: | Size: 394 B |
|
After Width: | Height: | Size: 476 B |
|
After Width: | Height: | Size: 462 B |
|
After Width: | Height: | Size: 394 B |
|
After Width: | Height: | Size: 521 B |
|
After Width: | Height: | Size: 458 B |
|
After Width: | Height: | Size: 402 B |
|
After Width: | Height: | Size: 429 B |
|
After Width: | Height: | Size: 514 B |
|
After Width: | Height: | Size: 482 B |
|
After Width: | Height: | Size: 431 B |
|
After Width: | Height: | Size: 456 B |
|
After Width: | Height: | Size: 472 B |
|
After Width: | Height: | Size: 318 B |
|
After Width: | Height: | Size: 268 B |
|
After Width: | Height: | Size: 303 B |
|
After Width: | Height: | Size: 330 B |
|
After Width: | Height: | Size: 330 B |
|
After Width: | Height: | Size: 376 B |
|
After Width: | Height: | Size: 438 B |
|
After Width: | Height: | Size: 350 B |
|
After Width: | Height: | Size: 438 B |
|
After Width: | Height: | Size: 442 B |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 418 B |
|
After Width: | Height: | Size: 436 B |