Compare commits
No commits in common. "1.17" and "1.16.5" have entirely different histories.
613 changed files with 9082 additions and 12817 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -29,5 +29,3 @@ bin/
|
|||
run/
|
||||
output/
|
||||
*.log
|
||||
Convert.class
|
||||
ModelPart.class
|
||||
|
|
161
Convert.java
161
Convert.java
|
@ -1,161 +0,0 @@
|
|||
class ModelPart {
|
||||
static java.util.ArrayList<ModelPart> parts = new java.util.ArrayList<>(20);
|
||||
final String name;
|
||||
ModelPart parent = null;
|
||||
boolean mirror = false;
|
||||
|
||||
float x = 0, y = 0, z = 0, rx = 0, ry = 0, rz = 0;
|
||||
int u = 0, v = 0;
|
||||
float bx = 0, by = 0, bz = 0, ba = 0, bb = 0, bc = 0;
|
||||
float scale = 1;
|
||||
static int wd = 64;
|
||||
static int hg = 32;
|
||||
|
||||
|
||||
boolean hadBox = false;
|
||||
|
||||
ModelPart(Convert c, String name) {
|
||||
this(c, 0, 0, name);
|
||||
|
||||
}
|
||||
|
||||
ModelPart(Convert c, int u, int v, String name) {
|
||||
this.name = name;
|
||||
this.u = u;
|
||||
this.v = v;
|
||||
parts.add(this);
|
||||
}
|
||||
|
||||
ModelPart(int wd, int hg, int u, int v, String name) {
|
||||
this.name = name;
|
||||
this.u = u;
|
||||
this.v = v;
|
||||
ModelPart.wd = wd;
|
||||
ModelPart.hg = hg;
|
||||
parts.add(this);
|
||||
}
|
||||
|
||||
ModelPart setPos(float x, float y, float z) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
return this;
|
||||
}
|
||||
|
||||
ModelPart setRotationAngle(float x, float y, float z) {
|
||||
this.rx = x;
|
||||
this.ry = y;
|
||||
this.rz = z;
|
||||
return this;
|
||||
}
|
||||
|
||||
ModelPart addChild(ModelPart p) {
|
||||
p.parent = this;
|
||||
return this;
|
||||
}
|
||||
|
||||
ModelPart texOffs(int u, int v) {
|
||||
this.u = u;
|
||||
this.v = v;
|
||||
return this;
|
||||
}
|
||||
|
||||
ModelPart addBox(float x, float y, float z, float a, float b, float c) {
|
||||
return addBox(x, y, z, a, b, c, 1);
|
||||
}
|
||||
|
||||
ModelPart addBox(float x, float y, float z, float a, float b, float c, float _d) {
|
||||
bx = x;
|
||||
by = y;
|
||||
bz = z;
|
||||
ba = a;
|
||||
bb = b;
|
||||
bc = c;
|
||||
scale = _d;
|
||||
hadBox = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
ModelPart addBox(float x, float y, float z, float a, float b, float c, float _d, boolean mirror) {
|
||||
this.mirror = mirror;
|
||||
bx = x;
|
||||
by = y;
|
||||
bz = z;
|
||||
ba = a;
|
||||
bb = b;
|
||||
bc = c;
|
||||
hadBox = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
String s = "";
|
||||
String pName = parent == null ? "modelPartData" : parent.name;
|
||||
if (scale != 1) {
|
||||
s += "CubeDeformation deformation_" + name + " = new CubeDeformation(" + scale + "f);\n";
|
||||
}
|
||||
s += "PartDefinition " + name + " = ";
|
||||
s += pName + ".addOrReplaceChild(\"" + name + "\", CubeListBuilder.create()\n";
|
||||
if (this.mirror) s += ".mirror()\n";
|
||||
s += ".texOffs(" + u + ", " + v + ")";
|
||||
if (this.hadBox) {
|
||||
s += "\n";
|
||||
if (scale != 1)
|
||||
s += ".addBox(" + bx + "f, " + by + "f, " + bz + "f, " + ba + "f, " + bb + "f, " + bc + "f, deformation_" + name + "),\n";
|
||||
else s += ".addBox(" + bx + "f, " + by + "f, " + bz + "f, " + ba + "f, " + bb + "f, " + bc + "f),\n";
|
||||
}
|
||||
else {
|
||||
s += ",\n";
|
||||
}
|
||||
|
||||
if (x == 0 && y == 0 && z == 0 && rx == 0 && ry == 0 && rz == 0) {
|
||||
s += "PartPose.ZERO";
|
||||
}
|
||||
else if (rx == 0 && ry == 0 && rz == 0) {
|
||||
s += "PartPose.offset(" + x + "f, " + y + "f, " + z + "f)";
|
||||
}
|
||||
else {
|
||||
s += "PartPose.offsetAndRotation(" + x + "f, " + y + "f, " + z + "f, \n" + rx + "f, " + ry + "f, " + rz + "f)";
|
||||
}
|
||||
s += ");";
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
public static void print() {
|
||||
System.out.println("public static LayerDefinition getTexturedModelData() {");
|
||||
System.out.println(" MeshDefinition modelData = new MeshDefinition();");
|
||||
System.out.println(" PartDefinition modelPartData = modelData.getRoot();");
|
||||
for (ModelPart p : parts) {
|
||||
System.out.println(p);
|
||||
System.out.println();
|
||||
}
|
||||
System.out.println("return LayerDefinition.create(modelData, " + wd + ", " + hg + ");");
|
||||
System.out.println("}");
|
||||
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
|
||||
for (ModelPart p : parts) {
|
||||
String pName = p.parent == null ? "modelPart" : p.parent.name;
|
||||
System.out.println(p.name + " = " + pName + ".getChild(\"" + p.name + "\");");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ModelPart.print();
|
||||
}
|
||||
void setRotationAngle(ModelPart p, float x, float y, float z){
|
||||
p.setRotationAngle(x, y, z);
|
||||
}
|
||||
public void c (){
|
||||
float scale = 1;
|
||||
ModelPart[] SHARDS = new ModelPart[4];
|
||||
SHARDS[0] = new ModelPart(16, 16, 2, 4, "SHARDS[0]").addBox(-5.0F, 1.0F, -3.0F, 2.0F, 8.0F, 2.0F);
|
||||
SHARDS[1] = new ModelPart(16, 16, 2, 4, "SHARDS[1]").addBox(3.0F, -1.0F, -1.0F, 2.0F, 8.0F, 2.0F);
|
||||
SHARDS[2] = new ModelPart(16, 16, 2, 4, "SHARDS[2]").addBox(-1.0F, 0.0F, -5.0F, 2.0F, 4.0F, 2.0F);
|
||||
SHARDS[3] = new ModelPart(16, 16, 2, 4, "SHARDS[3]").addBox(0.0F, 3.0F, 4.0F, 2.0F, 6.0F, 2.0F);
|
||||
ModelPart CORE = new ModelPart(16, 16, 0, 0, "CORE");
|
||||
CORE.addBox(-2.0F, -2.0F, -2.0F, 4.0F, 12.0F, 4.0F);
|
||||
}
|
||||
}
|
|
@ -1,19 +1,17 @@
|
|||
[](https://jitpack.io/#paulevsGitch/BetterEnd)
|
||||
|
||||
# Better End
|
||||
|
||||
Better End Mod for Fabric, MC 1.17.1
|
||||
Better End Mod for Fabric, MC 1.16.4
|
||||
|
||||
Importing:
|
||||
|
||||
* Clone repo
|
||||
* Edit gradle.properties if necessary
|
||||
* Run command line in folder: gradlew genSources eclipse (or Another-IDE-Name)
|
||||
* Import project to IDE
|
||||
|
||||
Building:
|
||||
|
||||
* Clone repo
|
||||
* Run command line in folder: gradlew build
|
||||
* Mod .jar will be in ./build/libs
|
||||
|
||||
Mappings:
|
||||
* https://modmuss50.me/fabric.html?&version=1.16.4
|
||||
|
|
158
build.gradle
158
build.gradle
|
@ -1,18 +1,18 @@
|
|||
buildscript {
|
||||
dependencies {
|
||||
classpath 'org.kohsuke:github-api:1.114'
|
||||
}
|
||||
dependencies {
|
||||
classpath 'org.kohsuke:github-api:1.114'
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'idea'
|
||||
id 'eclipse'
|
||||
id 'fabric-loom' version '0.8-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
id 'idea'
|
||||
id 'eclipse'
|
||||
id 'fabric-loom' version '0.7-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_16
|
||||
targetCompatibility = JavaVersion.VERSION_16
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = project.mod_version
|
||||
|
@ -20,101 +20,95 @@ group = project.maven_group
|
|||
|
||||
repositories {
|
||||
maven { url "https://maven.dblsaiko.net/" }
|
||||
maven { url "https://maven.fabricmc.net/" }
|
||||
maven { url 'https://maven.blamejared.com' }
|
||||
maven { url "https://maven.shedaniel.me/" }
|
||||
maven { url 'https://jitpack.io' }
|
||||
maven { url "https://server.bbkr.space:8081/artifactory/libs-release/" }
|
||||
maven { url "https://maven.fabricmc.net/" }
|
||||
maven { url 'https://maven.blamejared.com' }
|
||||
maven { url "https://maven.shedaniel.me/" }
|
||||
maven { url 'https://jitpack.io' }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||
mappings minecraft.officialMojangMappings()
|
||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||
mappings minecraft.officialMojangMappings()
|
||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||
|
||||
useApi "vazkii.patchouli:Patchouli:1.16.4-${project.patchouli_version}"
|
||||
useApi "com.github.paulevsGitch:BCLib:${project.bclib_version}"
|
||||
|
||||
useApi "vazkii.patchouli:Patchouli:1.17-${project.patchouli_version}"
|
||||
useApi "com.github.paulevsGitch:BCLib:${project.bclib_version}"
|
||||
|
||||
useOptional "me.shedaniel:RoughlyEnoughItems-fabric:${project.rei_version}"
|
||||
useOptional "me.shedaniel:RoughlyEnoughItems-api-fabric:${project.rei_version}"
|
||||
//useOptional "grondag:canvas-mc116:${project.canvas_version}"
|
||||
useOptional "me.shedaniel:RoughlyEnoughItems:${project.rei_version}"
|
||||
useOptional "me.shedaniel:RoughlyEnoughItems-api:${project.rei_version}"
|
||||
//useOptional "grondag:canvas-mc116:${project.canvas_version}"
|
||||
}
|
||||
|
||||
def useOptional(String dep) {
|
||||
dependencies.modRuntime(dep) {
|
||||
exclude group: 'net.fabricmc.fabric-api'
|
||||
exclude group: 'net.fabricmc'
|
||||
if (!dep.contains("me.shedaniel")) {
|
||||
exclude group: 'me.shedaniel.cloth'
|
||||
exclude group: 'me.shedaniel'
|
||||
}
|
||||
}
|
||||
dependencies.modCompileOnly(dep) {
|
||||
exclude group: 'net.fabricmc.fabric-api'
|
||||
exclude group: 'net.fabricmc'
|
||||
if (!dep.contains("me.shedaniel")) {
|
||||
exclude group: 'me.shedaniel.cloth'
|
||||
exclude group: 'me.shedaniel'
|
||||
}
|
||||
}
|
||||
dependencies.modRuntime (dep) {
|
||||
exclude group: "net.fabricmc.fabric-api"
|
||||
exclude group: "net.fabricmc"
|
||||
if (!dep.contains("me.shedaniel")) {
|
||||
exclude group: "me.shedaniel"
|
||||
}
|
||||
}
|
||||
dependencies.modCompileOnly (dep) {
|
||||
exclude group: "net.fabricmc.fabric-api"
|
||||
exclude group: "net.fabricmc"
|
||||
if (!dep.contains("me.shedaniel")) {
|
||||
exclude group: "me.shedaniel"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
def useApi(String dep) {
|
||||
dependencies.modApi(dep) {
|
||||
exclude group: 'net.fabricmc.fabric-api'
|
||||
exclude group: 'net.fabricmc'
|
||||
if (!dep.contains("me.shedaniel")) {
|
||||
exclude group: 'me.shedaniel.cloth'
|
||||
exclude group: 'me.shedaniel'
|
||||
}
|
||||
}
|
||||
dependencies.modApi (dep) {
|
||||
exclude group: "net.fabricmc.fabric-api"
|
||||
exclude group: "net.fabricmc"
|
||||
if (!dep.contains("me.shedaniel")) {
|
||||
exclude group: "me.shedaniel"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
duplicatesStrategy = 'WARN'
|
||||
inputs.property "version", project.version
|
||||
duplicatesStrategy = 'WARN'
|
||||
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include "fabric.mod.json"
|
||||
expand "version": project.version
|
||||
}
|
||||
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
exclude "fabric.mod.json"
|
||||
}
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include "fabric.mod.json"
|
||||
expand "version": project.version
|
||||
}
|
||||
}
|
||||
|
||||
// ensure that the encoding is set to UTF-8, no matter what the system default is
|
||||
// this fixes some edge cases with special characters not displaying correctly
|
||||
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
|
||||
tasks.withType(JavaCompile) {
|
||||
options.encoding = "UTF-8"
|
||||
options.encoding = "UTF-8"
|
||||
}
|
||||
|
||||
javadoc {
|
||||
options.tags = ["reason"]
|
||||
options.tags = ["reason"]
|
||||
}
|
||||
|
||||
task javadocJar(type: Jar, dependsOn: javadoc) {
|
||||
classifier = 'javadoc'
|
||||
from javadoc.destinationDir
|
||||
classifier = 'javadoc'
|
||||
from javadoc.destinationDir
|
||||
}
|
||||
|
||||
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
|
||||
// if it is present.
|
||||
// If you remove this task, sources will not be generated.
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
classifier = 'sources'
|
||||
from sourceSets.main.allSource
|
||||
classifier = 'sources'
|
||||
from sourceSets.main.allSource
|
||||
}
|
||||
|
||||
jar {
|
||||
from "LICENSE"
|
||||
from "LICENSE"
|
||||
}
|
||||
|
||||
artifacts {
|
||||
archives sourcesJar
|
||||
archives javadocJar
|
||||
archives sourcesJar
|
||||
archives javadocJar
|
||||
}
|
||||
|
||||
def env = System.getenv()
|
||||
|
@ -123,24 +117,24 @@ import org.kohsuke.github.GHReleaseBuilder
|
|||
import org.kohsuke.github.GitHub
|
||||
|
||||
task release(dependsOn: [remapJar, sourcesJar, javadocJar]) {
|
||||
onlyIf {
|
||||
env.GITHUB_TOKEN
|
||||
}
|
||||
onlyIf {
|
||||
env.GITHUB_TOKEN
|
||||
}
|
||||
|
||||
doLast {
|
||||
def github = GitHub.connectUsingOAuth(env.GITHUB_TOKEN as String)
|
||||
def repository = github.getRepository("paulevsGitch/BetterEnd")
|
||||
doLast {
|
||||
def github = GitHub.connectUsingOAuth(env.GITHUB_TOKEN as String)
|
||||
def repository = github.getRepository("paulevsGitch/BetterEnd")
|
||||
|
||||
def releaseBuilder = new GHReleaseBuilder(repository, version as String)
|
||||
releaseBuilder.name("${archivesBaseName}-${version}")
|
||||
releaseBuilder.body("A changelog can be found at https://github.com/paulevsGitch/BetterEnd/commits")
|
||||
releaseBuilder.commitish("master")
|
||||
def releaseBuilder = new GHReleaseBuilder(repository, version as String)
|
||||
releaseBuilder.name("${archivesBaseName}-${version}")
|
||||
releaseBuilder.body("A changelog can be found at https://github.com/paulevsGitch/BetterEnd/commits")
|
||||
releaseBuilder.commitish("master")
|
||||
|
||||
def ghRelease = releaseBuilder.create()
|
||||
ghRelease.uploadAsset(file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar"), "application/java-archive");
|
||||
ghRelease.uploadAsset(file("${project.buildDir}/libs/${archivesBaseName}-${version}-sources.jar"), "application/java-archive");
|
||||
ghRelease.uploadAsset(file("${project.buildDir}/libs/${archivesBaseName}-${version}-javadoc.jar"), "application/java-archive");
|
||||
}
|
||||
def ghRelease = releaseBuilder.create()
|
||||
ghRelease.uploadAsset(file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar"), "application/java-archive");
|
||||
ghRelease.uploadAsset(file("${project.buildDir}/libs/${archivesBaseName}-${version}-sources.jar"), "application/java-archive");
|
||||
ghRelease.uploadAsset(file("${project.buildDir}/libs/${archivesBaseName}-${version}-javadoc.jar"), "application/java-archive");
|
||||
}
|
||||
}
|
||||
|
||||
// configure the maven publication
|
||||
|
@ -161,4 +155,4 @@ task release(dependsOn: [remapJar, sourcesJar, javadocJar]) {
|
|||
// // uncomment to publish to the local maven
|
||||
// // mavenLocal()
|
||||
// }
|
||||
//}
|
||||
//}
|
||||
|
|
|
@ -1,18 +1,21 @@
|
|||
# Done to increase the memory available to gradle.
|
||||
org.gradle.jvmargs=-Xmx2G
|
||||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/use
|
||||
minecraft_version=1.17.1
|
||||
minecraft_version=1.16.5
|
||||
yarn_mappings=6
|
||||
loader_version=0.11.6
|
||||
loader_version=0.11.3
|
||||
|
||||
# Mod Properties
|
||||
mod_version=0.10.4-pre
|
||||
maven_group=ru.betterend
|
||||
archives_base_name=better-end
|
||||
mod_version = 0.9.8-pre
|
||||
maven_group = ru.betterend
|
||||
archives_base_name = better-end
|
||||
|
||||
# Dependencies
|
||||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
||||
patchouli_version = 55-FABRIC-SNAPSHOT
|
||||
fabric_version = 0.36.1+1.17
|
||||
bclib_version = 0.2.2
|
||||
rei_version = 6.0.264-alpha
|
||||
patchouli_version = 50-FABRIC
|
||||
fabric_version = 0.32.9+1.16
|
||||
canvas_version = 1.0.+
|
||||
bclib_version = 0.1.38
|
||||
rei_version = 5.8.10
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
# From https://github.com/jitpack/jitpack.io/issues/4506#issuecomment-864562270
|
||||
before_install:
|
||||
- source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||
- sdk update
|
||||
- sdk install java 16.0.1.hs-adpt
|
||||
- sdk use java 16.0.1.hs-adpt
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"parent": "block/slab",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%_bricks",
|
||||
"side": "betterend:block/%name%_bricks",
|
||||
"top": "betterend:block/%name%_bricks"
|
||||
}
|
||||
"parent": "block/slab",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%_bricks",
|
||||
"side": "betterend:block/%name%_bricks",
|
||||
"top": "betterend:block/%name%_bricks"
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"parent": "block/inner_stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%_bricks",
|
||||
"side": "betterend:block/%name%_bricks",
|
||||
"top": "betterend:block/%name%_bricks"
|
||||
}
|
||||
"parent": "block/inner_stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%_bricks",
|
||||
"side": "betterend:block/%name%_bricks",
|
||||
"top": "betterend:block/%name%_bricks"
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"parent": "block/outer_stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%_bricks",
|
||||
"side": "betterend:block/%name%_bricks",
|
||||
"top": "betterend:block/%name%_bricks"
|
||||
}
|
||||
"parent": "block/outer_stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%_bricks",
|
||||
"side": "betterend:block/%name%_bricks",
|
||||
"top": "betterend:block/%name%_bricks"
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"parent": "block/stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%_bricks",
|
||||
"side": "betterend:block/%name%_bricks",
|
||||
"top": "betterend:block/%name%_bricks"
|
||||
}
|
||||
"parent": "block/stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%_bricks",
|
||||
"side": "betterend:block/%name%_bricks",
|
||||
"top": "betterend:block/%name%_bricks"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:block/wall_inventory",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%_bricks"
|
||||
}
|
||||
"parent": "minecraft:block/wall_inventory",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%_bricks"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:block/template_wall_post",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%_bricks"
|
||||
}
|
||||
"parent": "minecraft:block/template_wall_post",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%_bricks"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:block/template_wall_side",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%_bricks"
|
||||
}
|
||||
"parent": "minecraft:block/template_wall_side",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%_bricks"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:block/template_wall_side_tall",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%_bricks"
|
||||
}
|
||||
"parent": "minecraft:block/template_wall_side_tall",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%_bricks"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "betterend:block/%name%_bricks"
|
||||
}
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "betterend:block/%name%_bricks"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "block/button",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "block/button",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "block/button_inventory",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "block/button_inventory",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "block/button_pressed",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "block/button_pressed",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"parent": "block/slab",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%",
|
||||
"side": "betterend:block/%name%",
|
||||
"top": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "block/slab",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%",
|
||||
"side": "betterend:block/%name%",
|
||||
"top": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"parent": "block/inner_stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%",
|
||||
"side": "betterend:block/%name%",
|
||||
"top": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "block/inner_stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%",
|
||||
"side": "betterend:block/%name%",
|
||||
"top": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"parent": "block/outer_stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%",
|
||||
"side": "betterend:block/%name%",
|
||||
"top": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "block/outer_stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%",
|
||||
"side": "betterend:block/%name%",
|
||||
"top": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "block/pressure_plate_down",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "block/pressure_plate_down",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "block/pressure_plate_up",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "block/pressure_plate_up",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "betterend:block/%name%_small_tiles"
|
||||
}
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "betterend:block/%name%_small_tiles"
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"parent": "block/stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%",
|
||||
"side": "betterend:block/%name%",
|
||||
"top": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "block/stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%",
|
||||
"side": "betterend:block/%name%",
|
||||
"top": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "betterend:block/%name%_tile"
|
||||
}
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "betterend:block/%name%_tile"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:block/wall_inventory",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "minecraft:block/wall_inventory",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:block/template_wall_post",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "minecraft:block/template_wall_post",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:block/template_wall_side",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "minecraft:block/template_wall_side",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:block/template_wall_side_tall",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "minecraft:block/template_wall_side_tall",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "betterend:block/%name%"
|
||||
}
|
||||
}
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "betterend:block/%name%"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,15 +1,15 @@
|
|||
{
|
||||
"variants": {
|
||||
"type=bottom": {
|
||||
"model": "betterend:block/%name%_brick_half_slab"
|
||||
},
|
||||
"type=double": {
|
||||
"model": "betterend:block/%name%_bricks"
|
||||
},
|
||||
"type=top": {
|
||||
"model": "betterend:block/%name%_brick_half_slab",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
}
|
||||
}
|
||||
"variants": {
|
||||
"type=bottom": {
|
||||
"model": "betterend:block/%name%_brick_half_slab"
|
||||
},
|
||||
"type=double": {
|
||||
"model": "betterend:block/%name%_bricks"
|
||||
},
|
||||
"type=top": {
|
||||
"model": "betterend:block/%name%_brick_half_slab",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,209 +1,209 @@
|
|||
{
|
||||
"variants": {
|
||||
"facing=east,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=east,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs"
|
||||
},
|
||||
"facing=east,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=east,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs"
|
||||
},
|
||||
"facing=east,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs"
|
||||
},
|
||||
"facing=east,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=east,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=east,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=east,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=east,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=south,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs"
|
||||
},
|
||||
"facing=south,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs"
|
||||
},
|
||||
"facing=south,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=south,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=south,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=west,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=west,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
}
|
||||
}
|
||||
"variants": {
|
||||
"facing=east,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=east,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs"
|
||||
},
|
||||
"facing=east,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=east,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs"
|
||||
},
|
||||
"facing=east,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs"
|
||||
},
|
||||
"facing=east,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=east,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=east,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=east,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=east,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=south,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs"
|
||||
},
|
||||
"facing=south,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs"
|
||||
},
|
||||
"facing=south,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=south,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=south,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=west,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=west,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,90 +1,90 @@
|
|||
{
|
||||
"multipart": [
|
||||
{
|
||||
"when": {
|
||||
"up": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_post"
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side",
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"east": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side",
|
||||
"y": 90,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side",
|
||||
"y": 180,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side",
|
||||
"y": 270,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side_tall",
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"east": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side_tall",
|
||||
"y": 90,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side_tall",
|
||||
"y": 180,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side_tall",
|
||||
"y": 270,
|
||||
"uvlock": true
|
||||
}
|
||||
}
|
||||
]
|
||||
"multipart": [
|
||||
{
|
||||
"when": {
|
||||
"up": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_post"
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side",
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"east": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side",
|
||||
"y": 90,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side",
|
||||
"y": 180,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side",
|
||||
"y": 270,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side_tall",
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"east": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side_tall",
|
||||
"y": 90,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side_tall",
|
||||
"y": 180,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side_tall",
|
||||
"y": 270,
|
||||
"uvlock": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "betterend:block/%name%_bricks"
|
||||
}
|
||||
}
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "betterend:block/%name%_bricks"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,118 +1,118 @@
|
|||
{
|
||||
"variants": {
|
||||
"face=ceiling,facing=east,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"face=ceiling,facing=east,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"face=ceiling,facing=north,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"face=ceiling,facing=north,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"face=ceiling,facing=south,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"x": 180
|
||||
},
|
||||
"face=ceiling,facing=south,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"x": 180
|
||||
},
|
||||
"face=ceiling,facing=west,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"face=ceiling,facing=west,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"face=floor,facing=east,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"y": 90
|
||||
},
|
||||
"face=floor,facing=east,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"y": 90
|
||||
},
|
||||
"face=floor,facing=north,powered=false": {
|
||||
"model": "betterend:block/%name%_button"
|
||||
},
|
||||
"face=floor,facing=north,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed"
|
||||
},
|
||||
"face=floor,facing=south,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"y": 180
|
||||
},
|
||||
"face=floor,facing=south,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"y": 180
|
||||
},
|
||||
"face=floor,facing=west,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"y": 270
|
||||
},
|
||||
"face=floor,facing=west,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"y": 270
|
||||
},
|
||||
"face=wall,facing=east,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 90
|
||||
},
|
||||
"face=wall,facing=east,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 90
|
||||
},
|
||||
"face=wall,facing=north,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"uvlock": true,
|
||||
"x": 90
|
||||
},
|
||||
"face=wall,facing=north,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"uvlock": true,
|
||||
"x": 90
|
||||
},
|
||||
"face=wall,facing=south,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 180
|
||||
},
|
||||
"face=wall,facing=south,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 180
|
||||
},
|
||||
"face=wall,facing=west,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 270
|
||||
},
|
||||
"face=wall,facing=west,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
"variants": {
|
||||
"face=ceiling,facing=east,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"face=ceiling,facing=east,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"face=ceiling,facing=north,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"face=ceiling,facing=north,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"face=ceiling,facing=south,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"x": 180
|
||||
},
|
||||
"face=ceiling,facing=south,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"x": 180
|
||||
},
|
||||
"face=ceiling,facing=west,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"face=ceiling,facing=west,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"face=floor,facing=east,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"y": 90
|
||||
},
|
||||
"face=floor,facing=east,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"y": 90
|
||||
},
|
||||
"face=floor,facing=north,powered=false": {
|
||||
"model": "betterend:block/%name%_button"
|
||||
},
|
||||
"face=floor,facing=north,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed"
|
||||
},
|
||||
"face=floor,facing=south,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"y": 180
|
||||
},
|
||||
"face=floor,facing=south,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"y": 180
|
||||
},
|
||||
"face=floor,facing=west,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"y": 270
|
||||
},
|
||||
"face=floor,facing=west,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"y": 270
|
||||
},
|
||||
"face=wall,facing=east,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 90
|
||||
},
|
||||
"face=wall,facing=east,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 90
|
||||
},
|
||||
"face=wall,facing=north,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"uvlock": true,
|
||||
"x": 90
|
||||
},
|
||||
"face=wall,facing=north,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"uvlock": true,
|
||||
"x": 90
|
||||
},
|
||||
"face=wall,facing=south,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 180
|
||||
},
|
||||
"face=wall,facing=south,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 180
|
||||
},
|
||||
"face=wall,facing=west,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 270
|
||||
},
|
||||
"face=wall,facing=west,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,16 +1,7 @@
|
|||
{
|
||||
"variants": {
|
||||
"axis=x": {
|
||||
"model": "betterend:block/%name%_pillar",
|
||||
"x": 90,
|
||||
"y": 90
|
||||
},
|
||||
"axis=y": {
|
||||
"model": "betterend:block/%name%_pillar"
|
||||
},
|
||||
"axis=z": {
|
||||
"model": "betterend:block/%name%_pillar",
|
||||
"x": 90
|
||||
}
|
||||
}
|
||||
"variants": {
|
||||
"axis=x": { "model": "betterend:block/%name%_pillar", "x": 90, "y": 90 },
|
||||
"axis=y": { "model": "betterend:block/%name%_pillar" },
|
||||
"axis=z": { "model": "betterend:block/%name%_pillar", "x": 90 }
|
||||
}
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
"variants": {
|
||||
"powered=false": {
|
||||
"model": "betterend:block/%name%_pressure_plate_up"
|
||||
},
|
||||
"powered=true": {
|
||||
"model": "betterend:block/%name%_pressure_plate_down"
|
||||
}
|
||||
}
|
||||
"variants": {
|
||||
"powered=false": {
|
||||
"model": "betterend:block/%name%_pressure_plate_up"
|
||||
},
|
||||
"powered=true": {
|
||||
"model": "betterend:block/%name%_pressure_plate_down"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,15 +1,15 @@
|
|||
{
|
||||
"variants": {
|
||||
"type=bottom": {
|
||||
"model": "betterend:block/%name%_half_slab"
|
||||
},
|
||||
"type=double": {
|
||||
"model": "betterend:block/%name%"
|
||||
},
|
||||
"type=top": {
|
||||
"model": "betterend:block/%name%_half_slab",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
}
|
||||
}
|
||||
"variants": {
|
||||
"type=bottom": {
|
||||
"model": "betterend:block/%name%_half_slab"
|
||||
},
|
||||
"type=double": {
|
||||
"model": "betterend:block/%name%"
|
||||
},
|
||||
"type=top": {
|
||||
"model": "betterend:block/%name%_half_slab",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "betterend:block/%name%_small_tiles"
|
||||
}
|
||||
}
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "betterend:block/%name%_small_tiles"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,209 +1,209 @@
|
|||
{
|
||||
"variants": {
|
||||
"facing=east,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=east,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs"
|
||||
},
|
||||
"facing=east,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=east,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs"
|
||||
},
|
||||
"facing=east,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs"
|
||||
},
|
||||
"facing=east,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=east,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=east,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=east,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=east,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=south,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs"
|
||||
},
|
||||
"facing=south,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs"
|
||||
},
|
||||
"facing=south,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=south,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=south,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=west,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=west,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
}
|
||||
}
|
||||
"variants": {
|
||||
"facing=east,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=east,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs"
|
||||
},
|
||||
"facing=east,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=east,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs"
|
||||
},
|
||||
"facing=east,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs"
|
||||
},
|
||||
"facing=east,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=east,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=east,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=east,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=east,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=south,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs"
|
||||
},
|
||||
"facing=south,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs"
|
||||
},
|
||||
"facing=south,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=south,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=south,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=west,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=west,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "betterend:block/%name%_tile"
|
||||
}
|
||||
}
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "betterend:block/%name%_tile"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,90 +1,90 @@
|
|||
{
|
||||
"multipart": [
|
||||
{
|
||||
"when": {
|
||||
"up": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_post"
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side",
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"east": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side",
|
||||
"y": 90,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side",
|
||||
"y": 180,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side",
|
||||
"y": 270,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side_tall",
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"east": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side_tall",
|
||||
"y": 90,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side_tall",
|
||||
"y": 180,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side_tall",
|
||||
"y": 270,
|
||||
"uvlock": true
|
||||
}
|
||||
}
|
||||
]
|
||||
"multipart": [
|
||||
{
|
||||
"when": {
|
||||
"up": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_post"
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side",
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"east": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side",
|
||||
"y": 90,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side",
|
||||
"y": 180,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side",
|
||||
"y": 270,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side_tall",
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"east": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side_tall",
|
||||
"y": 90,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side_tall",
|
||||
"y": 180,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side_tall",
|
||||
"y": 270,
|
||||
"uvlock": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%"
|
||||
"parent": "betterend:block/%name%"
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_brick_half_slab"
|
||||
"parent": "betterend:block/%name%_brick_half_slab"
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_brick_stairs"
|
||||
"parent": "betterend:block/%name%_brick_stairs"
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_brick_wall_inventory"
|
||||
"parent": "betterend:block/%name%_brick_wall_inventory"
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_bricks"
|
||||
"parent": "betterend:block/%name%_bricks"
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_button_inventory"
|
||||
"parent": "betterend:block/%name%_button_inventory"
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_pillar"
|
||||
"parent": "betterend:block/%name%_pillar"
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_pressure_plate_up"
|
||||
"parent": "betterend:block/%name%_pressure_plate_up"
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_half_slab"
|
||||
"parent": "betterend:block/%name%_half_slab"
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_small_tiles"
|
||||
"parent": "betterend:block/%name%_small_tiles"
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_stairs"
|
||||
"parent": "betterend:block/%name%_stairs"
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_tile"
|
||||
"parent": "betterend:block/%name%_tile"
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_wall_inventory"
|
||||
"parent": "betterend:block/%name%_wall_inventory"
|
||||
}
|
|
@ -70,7 +70,7 @@ public class BetterEnd implements ModInitializer {
|
|||
public static String getStringId(String id) {
|
||||
return String.format("%s:%s", MOD_ID, id);
|
||||
}
|
||||
|
||||
|
||||
public static boolean isModId(ResourceLocation id) {
|
||||
return id.getNamespace().equals(MOD_ID);
|
||||
}
|
||||
|
|
|
@ -2,31 +2,27 @@ package ru.betterend.api;
|
|||
|
||||
public interface BetterEndPlugin {
|
||||
/**
|
||||
* Alloying recipes registration.
|
||||
* See AlloyingRecipe.Builder for details.
|
||||
* Alloying recipes registration.
|
||||
* See AlloyingRecipe.Builder for details.
|
||||
*/
|
||||
default void registerAlloyingRecipes() {
|
||||
}
|
||||
default void registerAlloyingRecipes() {}
|
||||
|
||||
/**
|
||||
* Smithing recipes registration.
|
||||
* See AnvilSmithingRecipe.Builder for details.
|
||||
* Smithing recipes registration.
|
||||
* See AnvilSmithingRecipe.Builder for details.
|
||||
*/
|
||||
default void registerSmithingRecipes() {
|
||||
}
|
||||
default void registerSmithingRecipes() {}
|
||||
|
||||
/**
|
||||
* Additional biomes registration.
|
||||
* See BiomeRegistry.registerBiome for details.
|
||||
* Additional biomes registration.
|
||||
* See BiomeRegistry.registerBiome for details.
|
||||
*/
|
||||
default void registerEndBiomes() {
|
||||
}
|
||||
default void registerEndBiomes() {}
|
||||
|
||||
/**
|
||||
* Register other mod stuff, for example, EndHammers.
|
||||
* Register other mod stuff, for example, EndHammers.
|
||||
*/
|
||||
default void registerOthers() {
|
||||
}
|
||||
default void registerOthers() {}
|
||||
|
||||
|
||||
public static void register(BetterEndPlugin plugin) {
|
||||
|
|
|
@ -9,14 +9,14 @@ import ru.betterend.registry.EndBlocks;
|
|||
import ru.betterend.registry.EndItems;
|
||||
|
||||
public class AeterniumAnvil extends EndAnvilBlock {
|
||||
|
||||
|
||||
protected final Item anvilItem;
|
||||
|
||||
|
||||
public AeterniumAnvil() {
|
||||
super(EndBlocks.AETERNIUM_BLOCK.defaultMaterialColor(), EndToolMaterial.AETERNIUM.getLevel());
|
||||
this.anvilItem = EndItems.registerEndItem("aeternuim_anvil_item", new EndAnvilItem(this));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IntegerProperty getDurability() {
|
||||
if (durability == null) {
|
||||
|
@ -25,7 +25,7 @@ public class AeterniumAnvil extends EndAnvilBlock {
|
|||
}
|
||||
return durability;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Item asItem() {
|
||||
return anvilItem;
|
||||
|
|
|
@ -12,11 +12,15 @@ import net.minecraft.world.level.material.MaterialColor;
|
|||
import ru.bclib.blocks.BaseBlock;
|
||||
|
||||
public class AeterniumBlock extends BaseBlock {
|
||||
|
||||
|
||||
public AeterniumBlock() {
|
||||
super(FabricBlockSettings.of(Material.METAL, MaterialColor.COLOR_GRAY).hardness(65F).resistance(1200F).requiresCorrectToolForDrops().sound(SoundType.NETHERITE_BLOCK));
|
||||
super(FabricBlockSettings.of(Material.METAL, MaterialColor.COLOR_GRAY)
|
||||
.hardness(65F)
|
||||
.resistance(1200F)
|
||||
.requiresCorrectToolForDrops()
|
||||
.sound(SoundType.NETHERITE_BLOCK));
|
||||
}
|
||||
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public int getColor(BlockState state, BlockGetter world, BlockPos pos) {
|
||||
return 0xFF657A7A;
|
||||
|
|
|
@ -12,7 +12,7 @@ public class AmaranitaHymenophoreBlock extends BaseBlock implements IRenderTyped
|
|||
public AmaranitaHymenophoreBlock() {
|
||||
super(FabricBlockSettings.of(Material.WOOD).breakByTool(FabricToolTags.AXES).sound(SoundType.WOOD));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BCLRenderLayer getRenderLayer() {
|
||||
return BCLRenderLayer.CUTOUT;
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -17,10 +21,6 @@ import ru.bclib.util.MHelper;
|
|||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndParticles;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class AncientEmeraldIceBlock extends BaseBlock {
|
||||
public AncientEmeraldIceBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.BLUE_ICE).randomTicks());
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||
import net.minecraft.client.color.block.BlockColor;
|
||||
|
@ -17,15 +20,13 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
import net.minecraft.world.level.material.Material;
|
||||
import net.minecraft.world.level.storage.loot.LootContext;
|
||||
import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
|
||||
import ru.bclib.api.TagAPI;
|
||||
import ru.bclib.client.render.BCLRenderLayer;
|
||||
import ru.bclib.interfaces.IColorProvider;
|
||||
import ru.bclib.interfaces.IRenderTyped;
|
||||
import ru.bclib.util.ColorUtil;
|
||||
import ru.bclib.util.MHelper;
|
||||
import ru.betterend.registry.EndItems;
|
||||
|
||||
import java.util.List;
|
||||
import ru.betterend.registry.EndTags;
|
||||
|
||||
public class AuroraCrystalBlock extends AbstractGlassBlock implements IRenderTyped, IColorProvider {
|
||||
public static final Vec3i[] COLORS;
|
||||
|
@ -33,16 +34,23 @@ public class AuroraCrystalBlock extends AbstractGlassBlock implements IRenderTyp
|
|||
private static final int MAX_DROP = 4;
|
||||
|
||||
public AuroraCrystalBlock() {
|
||||
super(FabricBlockSettings.of(Material.GLASS).breakByTool(FabricToolTags.PICKAXES).breakByTool(TagAPI.HAMMERS).hardness(1F).resistance(1F).luminance(15).noOcclusion().isSuffocating((state, world, pos) -> false).sound(SoundType.GLASS));
|
||||
super(FabricBlockSettings.of(Material.GLASS)
|
||||
.breakByTool(FabricToolTags.PICKAXES)
|
||||
.breakByTool(EndTags.HAMMERS)
|
||||
.hardness(1F)
|
||||
.resistance(1F)
|
||||
.luminance(15)
|
||||
.noOcclusion()
|
||||
.isSuffocating((state, world, pos) -> false)
|
||||
.sound(SoundType.GLASS));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockColor getProvider() {
|
||||
return (state, world, pos, tintIndex) -> {
|
||||
if (pos == null) {
|
||||
pos = BlockPos.ZERO;
|
||||
}
|
||||
;
|
||||
};
|
||||
|
||||
long i = (long) pos.getX() + (long) pos.getY() + (long) pos.getZ();
|
||||
double delta = i * 0.1;
|
||||
|
@ -61,14 +69,14 @@ public class AuroraCrystalBlock extends AbstractGlassBlock implements IRenderTyp
|
|||
return ColorUtil.color(r, g, b);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemColor getItemProvider() {
|
||||
return (stack, tintIndex) -> {
|
||||
return ColorUtil.color(COLORS[3].getX(), COLORS[3].getY(), COLORS[3].getZ());
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BCLRenderLayer getRenderLayer() {
|
||||
return BCLRenderLayer.TRANSLUCENT;
|
||||
|
@ -91,8 +99,7 @@ public class AuroraCrystalBlock extends AbstractGlassBlock implements IRenderTyp
|
|||
return Lists.newArrayList(new ItemStack(EndItems.CRYSTAL_SHARDS, max));
|
||||
}
|
||||
count = MHelper.randRange(min, max, MHelper.RANDOM);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
count = MHelper.randRange(MIN_DROP, MAX_DROP, MHelper.RANDOM);
|
||||
}
|
||||
return Lists.newArrayList(new ItemStack(EndItems.CRYSTAL_SHARDS, count));
|
||||
|
@ -101,6 +108,11 @@ public class AuroraCrystalBlock extends AbstractGlassBlock implements IRenderTyp
|
|||
}
|
||||
|
||||
static {
|
||||
COLORS = new Vec3i[]{new Vec3i(247, 77, 161), new Vec3i(120, 184, 255), new Vec3i(120, 255, 168), new Vec3i(243, 58, 255)};
|
||||
COLORS = new Vec3i[] {
|
||||
new Vec3i(247, 77, 161),
|
||||
new Vec3i(120, 184, 255),
|
||||
new Vec3i(120, 255, 168),
|
||||
new Vec3i(243, 58, 255)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
|
@ -12,8 +14,6 @@ import ru.betterend.blocks.basis.EndPlantWithAgeBlock;
|
|||
import ru.betterend.blocks.basis.FurBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlueVineSeedBlock extends EndPlantWithAgeBlock {
|
||||
@Override
|
||||
public void growAdult(WorldGenLevel world, Random random, BlockPos pos) {
|
||||
|
@ -32,7 +32,7 @@ public class BlueVineSeedBlock extends EndPlantWithAgeBlock {
|
|||
|
||||
private void placeLantern(WorldGenLevel world, BlockPos pos) {
|
||||
BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.BLUE_VINE_LANTERN.defaultBlockState().setValue(BlueVineLanternBlock.NATURAL, true));
|
||||
for (Direction dir : BlocksHelper.HORIZONTAL) {
|
||||
for (Direction dir: BlocksHelper.HORIZONTAL) {
|
||||
BlockPos p = pos.relative(dir);
|
||||
if (world.isEmptyBlock(p)) {
|
||||
BlocksHelper.setWithoutUpdate(world, p, EndBlocks.BLUE_VINE_FUR.defaultBlockState().setValue(FurBlock.FACING, dir));
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
|
@ -14,9 +18,6 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
|||
import ru.betterend.blocks.basis.EndPlantBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BoluxMushroomBlock extends EndPlantBlock {
|
||||
private static final VoxelShape SHAPE = Block.box(1, 0, 1, 15, 9, 15);
|
||||
|
||||
|
@ -33,7 +34,7 @@ public class BoluxMushroomBlock extends EndPlantBlock {
|
|||
public VoxelShape getShape(BlockState state, BlockGetter view, BlockPos pos, CollisionContext ePos) {
|
||||
return SHAPE;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockBehaviour.OffsetType getOffsetType() {
|
||||
return BlockBehaviour.OffsetType.NONE;
|
||||
|
@ -43,7 +44,7 @@ public class BoluxMushroomBlock extends EndPlantBlock {
|
|||
public boolean isValidBonemealTarget(BlockGetter world, BlockPos pos, BlockState state, boolean isClient) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isBonemealSuccess(Level world, Random random, BlockPos pos, BlockState state) {
|
||||
return false;
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.client.multiplayer.ClientLevel;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
@ -16,14 +20,11 @@ import net.minecraft.world.level.block.state.StateDefinition;
|
|||
import net.minecraft.world.level.block.state.properties.BooleanProperty;
|
||||
import net.minecraft.world.level.material.Fluids;
|
||||
import net.minecraft.world.level.material.MaterialColor;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import ru.bclib.blocks.BaseBlock;
|
||||
import ru.bclib.blocks.BlockProperties;
|
||||
import ru.bclib.util.BlocksHelper;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class BrimstoneBlock extends BaseBlock {
|
||||
public static final BooleanProperty ACTIVATED = BlockProperties.ACTIVE;
|
||||
|
||||
|
@ -36,7 +37,7 @@ public class BrimstoneBlock extends BaseBlock {
|
|||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> stateManager) {
|
||||
stateManager.add(ACTIVATED);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setPlacedBy(Level world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack) {
|
||||
if (world.isClientSide()) {
|
||||
|
@ -66,7 +67,7 @@ public class BrimstoneBlock extends BaseBlock {
|
|||
@Override
|
||||
public void tick(BlockState state, ServerLevel world, BlockPos pos, Random random) {
|
||||
boolean deactivate = true;
|
||||
for (Direction dir : BlocksHelper.DIRECTIONS) {
|
||||
for (Direction dir: BlocksHelper.DIRECTIONS) {
|
||||
if (world.getFluidState(pos.relative(dir)).getType().equals(Fluids.WATER)) {
|
||||
deactivate = false;
|
||||
break;
|
||||
|
@ -87,7 +88,10 @@ public class BrimstoneBlock extends BaseBlock {
|
|||
}
|
||||
}
|
||||
else if (sideState.getFluidState().getType() == Fluids.WATER) {
|
||||
BlockState crystal = EndBlocks.SULPHUR_CRYSTAL.defaultBlockState().setValue(SulphurCrystalBlock.FACING, dir).setValue(SulphurCrystalBlock.WATERLOGGED, true).setValue(SulphurCrystalBlock.AGE, 0);
|
||||
BlockState crystal = EndBlocks.SULPHUR_CRYSTAL.defaultBlockState()
|
||||
.setValue(SulphurCrystalBlock.FACING, dir)
|
||||
.setValue(SulphurCrystalBlock.WATERLOGGED, true)
|
||||
.setValue(SulphurCrystalBlock.AGE, 0);
|
||||
world.setBlockAndUpdate(side, crystal);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
@ -17,21 +19,23 @@ import net.minecraft.world.phys.shapes.CollisionContext;
|
|||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import ru.betterend.blocks.basis.EndUnderwaterPlantBlock;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class BubbleCoralBlock extends EndUnderwaterPlantBlock {
|
||||
|
||||
|
||||
private static final VoxelShape SHAPE = Block.box(0, 0, 0, 16, 14, 16);
|
||||
|
||||
public BubbleCoralBlock() {
|
||||
super(FabricBlockSettings.of(Material.WATER_PLANT).breakByTool(FabricToolTags.SHEARS).breakByHand(true).sound(SoundType.CORAL_BLOCK).noCollission());
|
||||
super(FabricBlockSettings.of(Material.WATER_PLANT)
|
||||
.breakByTool(FabricToolTags.SHEARS)
|
||||
.breakByHand(true)
|
||||
.sound(SoundType.CORAL_BLOCK)
|
||||
.noCollission());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockBehaviour.OffsetType getOffsetType() {
|
||||
return BlockBehaviour.OffsetType.NONE;
|
||||
}
|
||||
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public void animateTick(BlockState state, Level world, BlockPos pos, Random random) {
|
||||
double x = pos.getX() + random.nextDouble();
|
||||
|
@ -49,7 +53,7 @@ public class BubbleCoralBlock extends EndUnderwaterPlantBlock {
|
|||
public boolean isValidBonemealTarget(BlockGetter world, BlockPos pos, BlockState state, boolean isClient) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isBonemealSuccess(Level world, Random random, BlockPos pos, BlockState state) {
|
||||
return false;
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
|
@ -13,8 +16,6 @@ import ru.bclib.util.MHelper;
|
|||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndItems;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BulbVineBlock extends BaseVineBlock {
|
||||
public BulbVineBlock() {
|
||||
super(15, true);
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||
|
@ -16,7 +20,6 @@ import net.minecraft.world.level.material.Material;
|
|||
import net.minecraft.world.level.material.MaterialColor;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import ru.bclib.client.models.BlockModelProvider;
|
||||
import ru.bclib.client.models.ModelsHelper;
|
||||
import ru.bclib.client.render.BCLRenderLayer;
|
||||
|
@ -24,15 +27,19 @@ import ru.bclib.interfaces.IRenderTyped;
|
|||
import ru.betterend.blocks.basis.EndLanternBlock;
|
||||
import ru.betterend.client.models.Patterns;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
public class BulbVineLanternBlock extends EndLanternBlock implements IRenderTyped, BlockModelProvider {
|
||||
private static final VoxelShape SHAPE_CEIL = Block.box(4, 4, 4, 12, 16, 12);
|
||||
private static final VoxelShape SHAPE_FLOOR = Block.box(4, 0, 4, 12, 12, 12);
|
||||
|
||||
public BulbVineLanternBlock() {
|
||||
this(FabricBlockSettings.of(Material.METAL).hardness(1).resistance(1).breakByTool(FabricToolTags.PICKAXES).materialColor(MaterialColor.COLOR_LIGHT_GRAY).luminance(15).requiresCorrectToolForDrops().sound(SoundType.LANTERN));
|
||||
this(FabricBlockSettings.of(Material.METAL)
|
||||
.hardness(1)
|
||||
.resistance(1)
|
||||
.breakByTool(FabricToolTags.PICKAXES)
|
||||
.materialColor(MaterialColor.COLOR_LIGHT_GRAY)
|
||||
.luminance(15)
|
||||
.requiresCorrectToolForDrops()
|
||||
.sound(SoundType.LANTERN));
|
||||
}
|
||||
|
||||
public BulbVineLanternBlock(Properties settings) {
|
||||
|
@ -43,19 +50,20 @@ public class BulbVineLanternBlock extends EndLanternBlock implements IRenderType
|
|||
public VoxelShape getShape(BlockState state, BlockGetter view, BlockPos pos, CollisionContext ePos) {
|
||||
return state.getValue(IS_FLOOR) ? SHAPE_FLOOR : SHAPE_CEIL;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BCLRenderLayer getRenderLayer() {
|
||||
return BCLRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public @Nullable BlockModel getBlockModel(ResourceLocation resourceLocation, BlockState blockState) {
|
||||
Map<String, String> textures = Maps.newHashMap();
|
||||
textures.put("%glow%", getGlowTexture());
|
||||
textures.put("%metal%", getMetalTexture(resourceLocation));
|
||||
Optional<String> pattern = blockState.getValue(IS_FLOOR) ? Patterns.createJson(Patterns.BLOCK_BULB_LANTERN_FLOOR, textures) : Patterns.createJson(Patterns.BLOCK_BULB_LANTERN_CEIL, textures);
|
||||
Optional<String> pattern = blockState.getValue(IS_FLOOR) ?
|
||||
Patterns.createJson(Patterns.BLOCK_BULB_LANTERN_FLOOR, textures) :
|
||||
Patterns.createJson(Patterns.BLOCK_BULB_LANTERN_CEIL, textures);
|
||||
return ModelsHelper.fromPattern(pattern);
|
||||
}
|
||||
|
||||
|
@ -68,5 +76,5 @@ public class BulbVineLanternBlock extends EndLanternBlock implements IRenderType
|
|||
protected String getGlowTexture() {
|
||||
return "bulb_vine_lantern_bulb";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -11,12 +11,12 @@ public class BulbVineLanternColoredBlock extends BulbVineLanternBlock implements
|
|||
public BulbVineLanternColoredBlock(FabricBlockSettings settings) {
|
||||
super(settings);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockColor getProvider() {
|
||||
return (state, world, pos, tintIndex) -> getColor();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemColor getItemProvider() {
|
||||
return (stack, tintIndex) -> getColor();
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
|
@ -12,16 +14,14 @@ import ru.bclib.util.BlocksHelper;
|
|||
import ru.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class BulbVineSeedBlock extends EndPlantWithAgeBlock {
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
|
||||
BlockState up = world.getBlockState(pos.above());
|
||||
return up.is(TagAPI.GEN_TERRAIN) || up.is(BlockTags.LOGS) || up.is(BlockTags.LEAVES);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void growAdult(WorldGenLevel world, Random random, BlockPos pos) {
|
||||
int h = BlocksHelper.downRay(world, pos, random.nextInt(24)) - 1;
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
@ -19,9 +22,6 @@ import ru.bclib.client.render.BCLRenderLayer;
|
|||
import ru.bclib.interfaces.IRenderTyped;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class CavePumpkinBlock extends BaseBlockNotFull implements IRenderTyped {
|
||||
public static final BooleanProperty SMALL = BlockProperties.SMALL;
|
||||
private static final VoxelShape SHAPE_SMALL;
|
||||
|
@ -41,7 +41,7 @@ public class CavePumpkinBlock extends BaseBlockNotFull implements IRenderTyped {
|
|||
public BCLRenderLayer getRenderLayer() {
|
||||
return BCLRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) {
|
||||
return state.getValue(SMALL) ? SHAPE_SMALL : SHAPE_BIG;
|
||||
|
@ -58,7 +58,7 @@ public class CavePumpkinBlock extends BaseBlockNotFull implements IRenderTyped {
|
|||
VoxelShape top = Block.box(5, 15, 5, 11, 16, 11);
|
||||
SHAPE_BIG = Shapes.or(lantern, cap, top);
|
||||
|
||||
lantern = Block.box(5, 7, 5, 11, 13, 11);
|
||||
lantern = Block.box(1, 7, 1, 15, 13, 15);
|
||||
cap = Block.box(4, 12, 4, 12, 15, 12);
|
||||
top = Block.box(6, 15, 6, 10, 16, 10);
|
||||
SHAPE_SMALL = Shapes.or(lantern, cap, top);
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
|
@ -16,8 +18,6 @@ import ru.bclib.blocks.BlockProperties;
|
|||
import ru.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class CavePumpkinVineBlock extends EndPlantWithAgeBlock {
|
||||
private static final VoxelShape SHAPE = Block.box(4, 0, 4, 12, 16, 12);
|
||||
|
||||
|
@ -43,10 +43,9 @@ public class CavePumpkinVineBlock extends EndPlantWithAgeBlock {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void growAdult(WorldGenLevel world, Random random, BlockPos pos) {
|
||||
}
|
||||
public void growAdult(WorldGenLevel world, Random random, BlockPos pos) {}
|
||||
|
||||
@Override
|
||||
public BlockState updateShape(BlockState state, Direction facing, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) {
|
||||
|
@ -59,7 +58,7 @@ public class CavePumpkinVineBlock extends EndPlantWithAgeBlock {
|
|||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, BlockGetter view, BlockPos pos, CollisionContext ePos) {
|
||||
return SHAPE;
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.EnumMap;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||
import net.minecraft.client.resources.model.BlockModelRotation;
|
||||
|
@ -16,7 +21,6 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.Shapes;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import ru.bclib.blocks.BaseAttachedBlock;
|
||||
import ru.bclib.client.models.BlockModelProvider;
|
||||
import ru.bclib.client.models.ModelsHelper;
|
||||
|
@ -24,10 +28,6 @@ import ru.bclib.client.render.BCLRenderLayer;
|
|||
import ru.bclib.interfaces.IRenderTyped;
|
||||
import ru.betterend.client.models.Patterns;
|
||||
|
||||
import java.util.EnumMap;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
public class ChandelierBlock extends BaseAttachedBlock implements IRenderTyped, BlockModelProvider {
|
||||
private static final EnumMap<Direction, VoxelShape> BOUNDING_SHAPES = Maps.newEnumMap(Direction.class);
|
||||
|
||||
|
@ -44,15 +44,13 @@ public class ChandelierBlock extends BaseAttachedBlock implements IRenderTyped,
|
|||
public VoxelShape getShape(BlockState state, BlockGetter view, BlockPos pos, CollisionContext ePos) {
|
||||
return BOUNDING_SHAPES.get(state.getValue(FACING));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public BlockModel getItemModel(ResourceLocation blockId) {
|
||||
return ModelsHelper.createItemModel(blockId);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public @Nullable BlockModel getBlockModel(ResourceLocation resourceLocation, BlockState blockState) {
|
||||
Optional<String> pattern;
|
||||
switch (blockState.getValue(FACING)) {
|
||||
|
@ -67,9 +65,8 @@ public class ChandelierBlock extends BaseAttachedBlock implements IRenderTyped,
|
|||
}
|
||||
return ModelsHelper.fromPattern(pattern);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public UnbakedModel getModelVariant(ResourceLocation stateId, BlockState blockState, Map<ResourceLocation, UnbakedModel> modelCache) {
|
||||
String state = "_wall";
|
||||
BlockModelRotation rotation = BlockModelRotation.X0_Y0;
|
||||
|
@ -96,7 +93,7 @@ public class ChandelierBlock extends BaseAttachedBlock implements IRenderTyped,
|
|||
registerBlockModel(stateId, modelId, blockState, modelCache);
|
||||
return ModelsHelper.createMultiVariant(modelId, rotation.getRotation(), false);
|
||||
}
|
||||
|
||||
|
||||
static {
|
||||
BOUNDING_SHAPES.put(Direction.UP, Block.box(5, 0, 5, 11, 13, 11));
|
||||
BOUNDING_SHAPES.put(Direction.DOWN, Block.box(5, 3, 5, 11, 16, 11));
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.world.level.material.Fluids;
|
|||
import ru.betterend.blocks.basis.EndUnderwaterPlantBlock;
|
||||
|
||||
public class CharniaBlock extends EndUnderwaterPlantBlock {
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
|
||||
return canSupportCenter(world, pos.below(), Direction.UP) && world.getFluidState(pos).getType() == Fluids.WATER;
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.enchantment.EnchantmentHelper;
|
||||
|
@ -12,14 +15,11 @@ import ru.bclib.blocks.BaseBlock;
|
|||
import ru.bclib.client.render.BCLRenderLayer;
|
||||
import ru.bclib.interfaces.IRenderTyped;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class DenseEmeraldIceBlock extends BaseBlock implements IRenderTyped {
|
||||
public DenseEmeraldIceBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.PACKED_ICE));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BCLRenderLayer getRenderLayer() {
|
||||
return BCLRenderLayer.TRANSLUCENT;
|
||||
|
|
|
@ -2,19 +2,17 @@ package ru.betterend.blocks;
|
|||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.levelgen.feature.Feature;
|
||||
import ru.bclib.blocks.FeatureSaplingBlock;
|
||||
import ru.betterend.blocks.basis.PottableFeatureSapling;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndFeatures;
|
||||
|
||||
public class DragonTreeSaplingBlock extends PottableFeatureSapling {
|
||||
public class DragonTreeSaplingBlock extends FeatureSaplingBlock {
|
||||
public DragonTreeSaplingBlock() {
|
||||
super();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected Feature<?> getFeature() {
|
||||
return EndFeatures.DRAGON_TREE.getFeature();
|
||||
|
@ -24,9 +22,4 @@ public class DragonTreeSaplingBlock extends PottableFeatureSapling {
|
|||
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
|
||||
return world.getBlockState(pos.below()).is(EndBlocks.SHADOW_GRASS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlantOn(Block block) {
|
||||
return block == EndBlocks.SHADOW_GRASS;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
@ -20,25 +24,20 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
import net.minecraft.world.level.material.Material;
|
||||
import net.minecraft.world.level.storage.loot.LootContext;
|
||||
import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import ru.bclib.client.models.BlockModelProvider;
|
||||
import ru.bclib.client.render.BCLRenderLayer;
|
||||
import ru.bclib.interfaces.IRenderTyped;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class EmeraldIceBlock extends HalfTransparentBlock implements IRenderTyped, BlockModelProvider {
|
||||
public EmeraldIceBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.ICE));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BCLRenderLayer getRenderLayer() {
|
||||
return BCLRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void playerDestroy(Level world, Player player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack stack) {
|
||||
super.playerDestroy(world, player, pos, state, blockEntity, stack);
|
||||
|
@ -47,23 +46,23 @@ public class EmeraldIceBlock extends HalfTransparentBlock implements IRenderType
|
|||
world.removeBlock(pos, false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Material material = world.getBlockState(pos.below()).getMaterial();
|
||||
if (material.blocksMotion() || material.isLiquid()) {
|
||||
world.setBlockAndUpdate(pos, Blocks.WATER.defaultBlockState());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void randomTick(BlockState state, ServerLevel world, BlockPos pos, Random random) {
|
||||
if (world.getBrightness(LightLayer.BLOCK, pos) > 11 - state.getLightBlock(world, pos)) {
|
||||
this.melt(state, world, pos);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void melt(BlockState state, Level world, BlockPos pos) {
|
||||
if (world.dimensionType().ultraWarm()) {
|
||||
world.removeBlock(pos, false);
|
||||
|
@ -84,9 +83,8 @@ public class EmeraldIceBlock extends HalfTransparentBlock implements IRenderType
|
|||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public BlockModel getItemModel(ResourceLocation resourceLocation) {
|
||||
return getBlockModel(resourceLocation, defaultBlockState());
|
||||
}
|
||||
|
|
|
@ -12,21 +12,23 @@ public class EndBlockProperties extends BlockProperties {
|
|||
public static final EnumProperty<PedestalState> PEDESTAL_STATE = EnumProperty.create("state", PedestalState.class);
|
||||
public static final EnumProperty<CactusBottom> CACTUS_BOTTOM = EnumProperty.create("bottom", CactusBottom.class);
|
||||
|
||||
public static final IntegerProperty PORTAL = IntegerProperty.create("portal", 0, EndPortals.getCount());
|
||||
public static final IntegerProperty PLANT_ID = IntegerProperty.create("plant_id", 0, 63);
|
||||
public static final IntegerProperty SOIL_ID = IntegerProperty.create("soil_id", 0, 15);
|
||||
public static final IntegerProperty POT_LIGHT = IntegerProperty.create("pot_light", 0, 3);
|
||||
public static final BooleanProperty HAS_ITEM = BooleanProperty.create("has_item");
|
||||
public static final IntegerProperty PORTAL = IntegerProperty.create("portal", 0, EndPortals.getCount());
|
||||
|
||||
public enum PedestalState implements StringRepresentable {
|
||||
PEDESTAL_TOP("pedestal_top"), COLUMN_TOP("column_top"), BOTTOM("bottom"), PILLAR("pillar"), COLUMN("column"), DEFAULT("default");
|
||||
PEDESTAL_TOP("pedestal_top"),
|
||||
COLUMN_TOP("column_top"),
|
||||
BOTTOM("bottom"),
|
||||
PILLAR("pillar"),
|
||||
COLUMN("column"),
|
||||
DEFAULT("default");
|
||||
|
||||
private final String name;
|
||||
|
||||
PedestalState(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getSerializedName() {
|
||||
return this.name;
|
||||
|
@ -39,7 +41,12 @@ public class EndBlockProperties extends BlockProperties {
|
|||
}
|
||||
|
||||
public enum HydraluxShape implements StringRepresentable {
|
||||
FLOWER_BIG_BOTTOM("flower_big_bottom", true), FLOWER_BIG_TOP("flower_big_top", true), FLOWER_SMALL_BOTTOM("flower_small_bottom", true), FLOWER_SMALL_TOP("flower_small_top", true), VINE("vine", false), ROOTS("roots", false);
|
||||
FLOWER_BIG_BOTTOM("flower_big_bottom", true),
|
||||
FLOWER_BIG_TOP("flower_big_top", true),
|
||||
FLOWER_SMALL_BOTTOM("flower_small_bottom", true),
|
||||
FLOWER_SMALL_TOP("flower_small_top", true),
|
||||
VINE("vine", false),
|
||||
ROOTS("roots", false);
|
||||
|
||||
private final String name;
|
||||
private final boolean glow;
|
||||
|
@ -48,7 +55,7 @@ public class EndBlockProperties extends BlockProperties {
|
|||
this.name = name;
|
||||
this.glow = glow;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getSerializedName() {
|
||||
return name;
|
||||
|
@ -65,7 +72,13 @@ public class EndBlockProperties extends BlockProperties {
|
|||
}
|
||||
|
||||
public enum LumecornShape implements StringRepresentable {
|
||||
LIGHT_TOP("light_top", 15), LIGHT_TOP_MIDDLE("light_top_middle", 15), LIGHT_MIDDLE("light_middle", 15), LIGHT_BOTTOM("light_bottom", 15), MIDDLE("middle", 0), BOTTOM_BIG("bottom_big", 0), BOTTOM_SMALL("bottom_small", 0);
|
||||
LIGHT_TOP("light_top", 15),
|
||||
LIGHT_TOP_MIDDLE("light_top_middle", 15),
|
||||
LIGHT_MIDDLE("light_middle", 15),
|
||||
LIGHT_BOTTOM("light_bottom", 15),
|
||||
MIDDLE("middle", 0),
|
||||
BOTTOM_BIG("bottom_big", 0),
|
||||
BOTTOM_SMALL("bottom_small", 0);
|
||||
|
||||
private final String name;
|
||||
private final int light;
|
||||
|
@ -74,7 +87,7 @@ public class EndBlockProperties extends BlockProperties {
|
|||
this.name = name;
|
||||
this.light = light;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getSerializedName() {
|
||||
return name;
|
||||
|
@ -91,14 +104,16 @@ public class EndBlockProperties extends BlockProperties {
|
|||
}
|
||||
|
||||
public enum CactusBottom implements StringRepresentable {
|
||||
EMPTY("empty"), SAND("sand"), MOSS("moss");
|
||||
EMPTY("empty"),
|
||||
SAND("sand"),
|
||||
MOSS("moss");
|
||||
|
||||
private final String name;
|
||||
|
||||
CactusBottom(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getSerializedName() {
|
||||
return name;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
@ -32,17 +37,18 @@ import ru.betterend.blocks.basis.EndUnderwaterPlantBlock;
|
|||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndItems;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class EndLilyBlock extends EndUnderwaterPlantBlock {
|
||||
public static final EnumProperty<TripleShape> SHAPE = BlockProperties.TRIPLE_SHAPE;
|
||||
private static final VoxelShape SHAPE_BOTTOM = Block.box(4, 0, 4, 12, 16, 12);
|
||||
private static final VoxelShape SHAPE_TOP = Block.box(2, 0, 2, 14, 6, 14);
|
||||
|
||||
public EndLilyBlock() {
|
||||
super(FabricBlockSettings.of(Material.WATER_PLANT).breakByTool(FabricToolTags.SHEARS).breakByHand(true).sound(SoundType.WET_GRASS).lightLevel((state) -> state.getValue(SHAPE) == TripleShape.TOP ? 13 : 0).noCollission());
|
||||
super(FabricBlockSettings.of(Material.WATER_PLANT)
|
||||
.breakByTool(FabricToolTags.SHEARS)
|
||||
.breakByHand(true)
|
||||
.sound(SoundType.WET_GRASS)
|
||||
.lightLevel((state) -> state.getValue(SHAPE) == TripleShape.TOP ? 13 : 0)
|
||||
.noCollission());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -105,7 +111,7 @@ public class EndLilyBlock extends EndUnderwaterPlantBlock {
|
|||
public boolean isValidBonemealTarget(BlockGetter world, BlockPos pos, BlockState state, boolean isClient) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isBonemealSuccess(Level world, Random random, BlockPos pos, BlockState state) {
|
||||
return false;
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
@ -10,8 +12,6 @@ import ru.bclib.blocks.UnderwaterPlantWithAgeBlock;
|
|||
import ru.bclib.util.BlocksHelper;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class EndLilySeedBlock extends UnderwaterPlantWithAgeBlock {
|
||||
@Override
|
||||
public void grow(WorldGenLevel world, Random random, BlockPos pos) {
|
||||
|
@ -33,7 +33,7 @@ public class EndLilySeedBlock extends UnderwaterPlantWithAgeBlock {
|
|||
}
|
||||
return world.isEmptyBlock(up);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean isTerrain(BlockState state) {
|
||||
return state.is(TagAPI.END_GROUND);
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
@ -18,8 +21,6 @@ import ru.bclib.util.MHelper;
|
|||
import ru.betterend.blocks.basis.EndPlantBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class EndLotusFlowerBlock extends EndPlantBlock {
|
||||
private static final VoxelShape SHAPE_OUTLINE = Block.box(2, 0, 2, 14, 14, 14);
|
||||
private static final VoxelShape SHAPE_COLLISION = Block.box(0, 0, 0, 16, 2, 16);
|
||||
|
|
|
@ -57,7 +57,7 @@ public class EndLotusLeafBlock extends BaseBlockNotFull implements IRenderTyped
|
|||
public BlockState rotate(BlockState state, Rotation rotation) {
|
||||
return BlocksHelper.rotateHorizontal(state, rotation, HORIZONTAL_FACING);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockState mirror(BlockState state, Mirror mirror) {
|
||||
return BlocksHelper.mirrorHorizontal(state, mirror, HORIZONTAL_FACING);
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -12,8 +14,6 @@ import ru.bclib.blocks.UnderwaterPlantWithAgeBlock;
|
|||
import ru.bclib.util.BlocksHelper;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class EndLotusSeedBlock extends UnderwaterPlantWithAgeBlock {
|
||||
@Override
|
||||
public void grow(WorldGenLevel world, Random random, BlockPos pos) {
|
||||
|
@ -92,10 +92,10 @@ public class EndLotusSeedBlock extends UnderwaterPlantWithAgeBlock {
|
|||
MutableBlockPos p = new MutableBlockPos();
|
||||
BlockState leaf = EndBlocks.END_LOTUS_LEAF.defaultBlockState();
|
||||
BlocksHelper.setWithoutUpdate(world, pos, leaf.setValue(EndLotusLeafBlock.SHAPE, TripleShape.BOTTOM));
|
||||
for (Direction move : BlocksHelper.HORIZONTAL) {
|
||||
for (Direction move: BlocksHelper.HORIZONTAL) {
|
||||
BlocksHelper.setWithoutUpdate(world, p.set(pos).move(move), leaf.setValue(EndLotusLeafBlock.HORIZONTAL_FACING, move).setValue(EndLotusLeafBlock.SHAPE, TripleShape.MIDDLE));
|
||||
}
|
||||
for (int i = 0; i < 4; i++) {
|
||||
for (int i = 0; i < 4; i ++) {
|
||||
Direction d1 = BlocksHelper.HORIZONTAL[i];
|
||||
Direction d2 = BlocksHelper.HORIZONTAL[(i + 1) & 3];
|
||||
BlocksHelper.setWithoutUpdate(world, p.set(pos).move(d1).move(d2), leaf.setValue(EndLotusLeafBlock.HORIZONTAL_FACING, d1).setValue(EndLotusLeafBlock.SHAPE, TripleShape.TOP));
|
||||
|
@ -106,16 +106,17 @@ public class EndLotusSeedBlock extends UnderwaterPlantWithAgeBlock {
|
|||
MutableBlockPos p = new MutableBlockPos();
|
||||
p.setY(pos.getY());
|
||||
int count = 0;
|
||||
for (int x = -1; x < 2; x++) {
|
||||
for (int x = -1; x < 2; x ++) {
|
||||
p.setX(pos.getX() + x);
|
||||
for (int z = -1; z < 2; z++) {
|
||||
for (int z = -1; z < 2; z ++) {
|
||||
p.setZ(pos.getZ() + z);
|
||||
if (world.isEmptyBlock(p) && !world.getFluidState(p.below()).isEmpty()) count++;
|
||||
if (world.isEmptyBlock(p) && !world.getFluidState(p.below()).isEmpty())
|
||||
count ++;
|
||||
}
|
||||
}
|
||||
return count == 9;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean isTerrain(BlockState state) {
|
||||
return state.is(TagAPI.END_GROUND);
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -29,8 +32,6 @@ import ru.bclib.client.render.BCLRenderLayer;
|
|||
import ru.bclib.interfaces.IRenderTyped;
|
||||
import ru.bclib.util.BlocksHelper;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class EndLotusStemBlock extends BaseBlock implements SimpleWaterloggedBlock, IRenderTyped {
|
||||
public static final EnumProperty<Direction> FACING = BlockStateProperties.FACING;
|
||||
public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED;
|
||||
|
@ -57,7 +58,7 @@ public class EndLotusStemBlock extends BaseBlock implements SimpleWaterloggedBlo
|
|||
public FluidState getFluidState(BlockState state) {
|
||||
return state.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(state);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockPlaceContext ctx) {
|
||||
LevelAccessor worldAccess = ctx.getLevel();
|
||||
|
@ -69,12 +70,12 @@ public class EndLotusStemBlock extends BaseBlock implements SimpleWaterloggedBlo
|
|||
public BlockState rotate(BlockState state, Rotation rotation) {
|
||||
return BlocksHelper.rotateHorizontal(state, rotation, FACING);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockState mirror(BlockState state, Mirror mirror) {
|
||||
return BlocksHelper.mirrorHorizontal(state, mirror, FACING);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockState updateShape(BlockState state, Direction direction, BlockState newState, LevelAccessor world, BlockPos pos, BlockPos posFrom) {
|
||||
if (state.getValue(WATERLOGGED)) {
|
||||
|
|
|
@ -1,29 +1,28 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import ru.betterend.BetterEnd;
|
||||
import ru.betterend.blocks.basis.PedestalBlock;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class EndPedestal extends PedestalBlock {
|
||||
|
||||
|
||||
public EndPedestal(Block parent) {
|
||||
super(parent);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected Map<String, String> createTexturesMap() {
|
||||
ResourceLocation blockId = Registry.BLOCK.getKey(parent);
|
||||
String name = blockId.getPath();
|
||||
return new HashMap<String, String>() {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
{
|
||||
put("%mod%", BetterEnd.MOD_ID);
|
||||
put("%mod%", BetterEnd.MOD_ID );
|
||||
put("%top%", name + "_polished");
|
||||
put("%base%", name + "_polished");
|
||||
put("%pillar%", name + "_pillar_side");
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.Random;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
@ -36,17 +40,13 @@ import ru.betterend.registry.EndParticles;
|
|||
import ru.betterend.registry.EndPortals;
|
||||
import ru.betterend.rituals.EternalRitual;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.Random;
|
||||
|
||||
public class EndPortalBlock extends NetherPortalBlock implements IRenderTyped, IColorProvider {
|
||||
public static final IntegerProperty PORTAL = EndBlockProperties.PORTAL;
|
||||
|
||||
|
||||
public EndPortalBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.NETHER_PORTAL).resistance(Blocks.BEDROCK.getExplosionResistance()).luminance(15));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
|
||||
super.createBlockStateDefinition(builder);
|
||||
|
@ -59,24 +59,22 @@ public class EndPortalBlock extends NetherPortalBlock implements IRenderTyped, I
|
|||
if (random.nextInt(100) == 0) {
|
||||
world.playLocalSound(pos.getX() + 0.5D, pos.getY() + 0.5D, pos.getZ() + 0.5D, SoundEvents.PORTAL_AMBIENT, SoundSource.BLOCKS, 0.5F, random.nextFloat() * 0.4F + 0.8F, false);
|
||||
}
|
||||
|
||||
|
||||
double x = pos.getX() + random.nextDouble();
|
||||
double y = pos.getY() + random.nextDouble();
|
||||
double z = pos.getZ() + random.nextDouble();
|
||||
int k = random.nextInt(2) * 2 - 1;
|
||||
if (!world.getBlockState(pos.west()).is(this) && !world.getBlockState(pos.east()).is(this)) {
|
||||
x = pos.getX() + 0.5D + 0.25D * k;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
z = pos.getZ() + 0.5D + 0.25D * k;
|
||||
}
|
||||
|
||||
|
||||
world.addParticle(EndParticles.PORTAL_SPHERE, x, y, z, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void randomTick(BlockState state, ServerLevel world, BlockPos pos, Random random) {
|
||||
}
|
||||
public void randomTick(BlockState state, ServerLevel world, BlockPos pos, Random random) {}
|
||||
|
||||
@Override
|
||||
public BlockState updateShape(BlockState state, Direction direction, BlockState newState, LevelAccessor world, BlockPos pos, BlockPos posFrom) {
|
||||
|
@ -95,17 +93,18 @@ public class EndPortalBlock extends NetherPortalBlock implements IRenderTyped, I
|
|||
BlockPos exitPos = findExitPos(currentWorld, destination, pos, entity);
|
||||
if (exitPos == null) return;
|
||||
if (entity instanceof ServerPlayer && ((ServerPlayer) entity).isCreative()) {
|
||||
((ServerPlayer) entity).teleportTo(destination, exitPos.getX() + 0.5, exitPos.getY(), exitPos.getZ() + 0.5, entity.getYRot(), entity.getXRot());
|
||||
}
|
||||
else {
|
||||
((ServerPlayer) entity).teleportTo(destination, exitPos.getX() + 0.5, exitPos.getY(),
|
||||
exitPos.getZ() + 0.5, entity.yRot, entity.xRot);
|
||||
} else {
|
||||
((TeleportingEntity) entity).be_setExitPos(exitPos);
|
||||
Optional<Entity> teleported = Optional.ofNullable(entity.changeDimension(destination));
|
||||
teleported.ifPresent(Entity::setPortalCooldown);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private boolean validate(Entity entity) {
|
||||
return !entity.isPassenger() && !entity.isVehicle() && entity.canChangeDimensions() && !entity.isOnPortalCooldown();
|
||||
return !entity.isPassenger() && !entity.isVehicle() &&
|
||||
entity.canChangeDimensions() && !entity.isOnPortalCooldown();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -115,7 +114,7 @@ public class EndPortalBlock extends NetherPortalBlock implements IRenderTyped, I
|
|||
|
||||
private BlockPos findExitPos(ServerLevel currentWorld, ServerLevel targetWorld, BlockPos currentPos, Entity entity) {
|
||||
if (targetWorld == null) return null;
|
||||
Registry<DimensionType> registry = targetWorld.registryAccess().registryOrThrow(Registry.DIMENSION_TYPE_REGISTRY);
|
||||
Registry<DimensionType> registry = targetWorld.registryAccess().dimensionTypes();
|
||||
ResourceLocation targetWorldId = targetWorld.dimension().location();
|
||||
ResourceLocation currentWorldId = currentWorld.dimension().location();
|
||||
double targetMultiplier = Objects.requireNonNull(registry.get(targetWorldId)).coordinateScale();
|
||||
|
@ -125,7 +124,8 @@ public class EndPortalBlock extends NetherPortalBlock implements IRenderTyped, I
|
|||
MutableBlockPos checkPos = basePos.mutable();
|
||||
BlockState currentState = currentWorld.getBlockState(currentPos);
|
||||
int radius = (EternalRitual.SEARCH_RADIUS >> 4) + 1;
|
||||
checkPos = EternalRitual.findBlockPos(targetWorld, checkPos, radius, this, state -> state.is(this) && state.getValue(PORTAL).equals(currentState.getValue(PORTAL)));
|
||||
checkPos = EternalRitual.findBlockPos(targetWorld, checkPos, radius, this, state -> state.is(this) &&
|
||||
state.getValue(PORTAL).equals(currentState.getValue(PORTAL)));
|
||||
if (checkPos != null) {
|
||||
BlockState checkState = targetWorld.getBlockState(checkPos);
|
||||
Axis axis = checkState.getValue(AXIS);
|
||||
|
@ -159,24 +159,21 @@ public class EndPortalBlock extends NetherPortalBlock implements IRenderTyped, I
|
|||
BlockState down = world.getBlockState(pos.below());
|
||||
if (down.is(this)) {
|
||||
return findCenter(world, pos.move(Direction.DOWN), axis, step);
|
||||
}
|
||||
else if (right.is(this) && left.is(this)) {
|
||||
} else if (right.is(this) && left.is(this)) {
|
||||
return pos;
|
||||
}
|
||||
else if (right.is(this)) {
|
||||
} else if (right.is(this)) {
|
||||
return findCenter(world, pos.move(rightDir), axis, ++step);
|
||||
}
|
||||
else if (left.is(this)) {
|
||||
} else if (left.is(this)) {
|
||||
return findCenter(world, pos.move(leftDir), axis, ++step);
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockColor getProvider() {
|
||||
return (state, world, pos, tintIndex) -> EndPortals.getColor(state.getValue(PORTAL));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemColor getItemProvider() {
|
||||
return (stack, tintIndex) -> EndPortals.getColor(0);
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
@ -15,6 +19,7 @@ import net.minecraft.world.entity.player.Player;
|
|||
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
|
||||
|
@ -23,8 +28,6 @@ import net.minecraft.world.level.block.RenderShape;
|
|||
import net.minecraft.world.level.block.Rotation;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityTicker;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.StateDefinition;
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||
|
@ -35,34 +38,34 @@ import net.minecraft.world.level.material.MaterialColor;
|
|||
import net.minecraft.world.level.storage.loot.LootContext;
|
||||
import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
|
||||
import net.minecraft.world.phys.BlockHitResult;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import ru.bclib.blocks.BaseBlockWithEntity;
|
||||
import ru.betterend.blocks.entities.EndStoneSmelterBlockEntity;
|
||||
import ru.betterend.registry.EndBlockEntities;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class EndStoneSmelter extends BaseBlockWithEntity {
|
||||
public static final DirectionProperty FACING = HorizontalDirectionalBlock.FACING;
|
||||
public static final BooleanProperty LIT = BlockStateProperties.LIT;
|
||||
public static final String ID = "end_stone_smelter";
|
||||
|
||||
|
||||
public EndStoneSmelter() {
|
||||
super(FabricBlockSettings.of(Material.STONE, MaterialColor.COLOR_GRAY).luminance(state -> state.getValue(LIT) ? 15 : 0).hardness(4F).resistance(100F).requiresCorrectToolForDrops().sound(SoundType.STONE));
|
||||
registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(LIT, false));
|
||||
super(FabricBlockSettings.of(Material.STONE, MaterialColor.COLOR_GRAY)
|
||||
.hardness(4F)
|
||||
.resistance(100F)
|
||||
.requiresCorrectToolForDrops()
|
||||
.sound(SoundType.STONE));
|
||||
this.registerDefaultState(this.stateDefinition.any()
|
||||
.setValue(FACING, Direction.NORTH)
|
||||
.setValue(LIT, false));
|
||||
}
|
||||
|
||||
public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) {
|
||||
if (world.isClientSide) {
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
this.openScreen(world, pos, player);
|
||||
return InteractionResult.CONSUME;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void openScreen(Level world, BlockPos pos, Player player) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity instanceof EndStoneSmelterBlockEntity) {
|
||||
|
@ -72,12 +75,12 @@ public class EndStoneSmelter extends BaseBlockWithEntity {
|
|||
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockPlaceContext ctx) {
|
||||
return defaultBlockState().setValue(FACING, ctx.getHorizontalDirection().getOpposite());
|
||||
return this.defaultBlockState().setValue(FACING, ctx.getHorizontalDirection().getOpposite());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) {
|
||||
return new EndStoneSmelterBlockEntity(blockPos, blockState);
|
||||
public BlockEntity newBlockEntity(BlockGetter world) {
|
||||
return new EndStoneSmelterBlockEntity();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -95,33 +98,33 @@ public class EndStoneSmelter extends BaseBlockWithEntity {
|
|||
}
|
||||
return drop;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean hasAnalogOutputSignal(BlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getAnalogOutputSignal(BlockState state, Level world, BlockPos pos) {
|
||||
//TODO
|
||||
return AbstractContainerMenu.getRedstoneSignalFromBlockEntity(world.getBlockEntity(pos));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public RenderShape getRenderShape(BlockState state) {
|
||||
return RenderShape.MODEL;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockState rotate(BlockState state, Rotation rotation) {
|
||||
return state.setValue(FACING, rotation.rotate(state.getValue(FACING)));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockState mirror(BlockState state, Mirror mirror) {
|
||||
return state.rotate(mirror.getRotation(state.getValue(FACING)));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
|
||||
builder.add(FACING, LIT);
|
||||
|
@ -134,9 +137,9 @@ public class EndStoneSmelter extends BaseBlockWithEntity {
|
|||
double y = pos.getY();
|
||||
double z = pos.getZ() + 0.5D;
|
||||
if (random.nextDouble() < 0.1D) {
|
||||
world.playLocalSound(x, y, z, SoundEvents.BLASTFURNACE_FIRE_CRACKLE, SoundSource.BLOCKS, 1.0F, 1.0F, false);
|
||||
world.playLocalSound(x, y, z, SoundEvents.BLASTFURNACE_FIRE_CRACKLE, SoundSource.BLOCKS, 1.0F, 1.0F, false);
|
||||
}
|
||||
|
||||
|
||||
Direction direction = state.getValue(FACING);
|
||||
Direction.Axis axis = direction.getAxis();
|
||||
double defOffset = random.nextDouble() * 0.6D - 0.3D;
|
||||
|
@ -146,11 +149,4 @@ public class EndStoneSmelter extends BaseBlockWithEntity {
|
|||
world.addParticle(ParticleTypes.SMOKE, x + offX, y + offY, z + offZ, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level level, BlockState blockState, BlockEntityType<T> blockEntityType) {
|
||||
return level.isClientSide() ? null : createTickerHelper(blockEntityType, EndBlockEntities.END_STONE_SMELTER, EndStoneSmelterBlockEntity::tick);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,11 +12,15 @@ import net.minecraft.world.level.material.MaterialColor;
|
|||
import ru.bclib.blocks.BaseBlock;
|
||||
|
||||
public class EnderBlock extends BaseBlock {
|
||||
|
||||
|
||||
public EnderBlock() {
|
||||
super(FabricBlockSettings.of(Material.STONE, MaterialColor.WARPED_WART_BLOCK).hardness(5F).resistance(6F).requiresCorrectToolForDrops().sound(SoundType.STONE));
|
||||
super(FabricBlockSettings.of(Material.STONE, MaterialColor.WARPED_WART_BLOCK)
|
||||
.hardness(5F)
|
||||
.resistance(6F)
|
||||
.requiresCorrectToolForDrops()
|
||||
.sound(SoundType.STONE));
|
||||
}
|
||||
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public int getColor(BlockState state, BlockGetter world, BlockPos pos) {
|
||||
return 0xFF005548;
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
@ -13,22 +16,21 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
import net.minecraft.world.level.storage.loot.LootContext;
|
||||
import ru.bclib.util.ColorUtil;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class EndstoneDustBlock extends FallingBlock {
|
||||
@Environment(EnvType.CLIENT)
|
||||
private static final int COLOR = ColorUtil.color(226, 239, 168);
|
||||
|
||||
public EndstoneDustBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.SAND).breakByTool(FabricToolTags.SHOVELS).materialColor(Blocks.END_STONE.defaultMaterialColor()));
|
||||
super(FabricBlockSettings.copyOf(Blocks.SAND)
|
||||
.breakByTool(FabricToolTags.SHOVELS)
|
||||
.materialColor(Blocks.END_STONE.defaultMaterialColor()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||
return Collections.singletonList(new ItemStack(this));
|
||||
}
|
||||
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public int getDustColor(BlockState state, BlockGetter world, BlockPos pos) {
|
||||
return COLOR;
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Registry;
|
||||
|
@ -25,8 +28,6 @@ import ru.betterend.registry.EndBlocks;
|
|||
import ru.betterend.registry.EndPortals;
|
||||
import ru.betterend.rituals.EternalRitual;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class EternalPedestal extends PedestalBlock {
|
||||
public static final BooleanProperty ACTIVATED = EndBlockProperties.ACTIVE;
|
||||
|
||||
|
@ -49,24 +50,21 @@ public class EternalPedestal extends PedestalBlock {
|
|||
int portalId;
|
||||
if (targetWorld != null) {
|
||||
portalId = EndPortals.getPortalIdByWorld(targetWorld);
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
portalId = EndPortals.getPortalIdByWorld(EndPortals.OVERWORLD_ID);
|
||||
}
|
||||
ritual.disablePortal(portalId);
|
||||
}
|
||||
}
|
||||
world.setBlockAndUpdate(pos, updatedState.setValue(ACTIVATED, false).setValue(HAS_LIGHT, false));
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
ItemStack itemStack = pedestal.getItem(0);
|
||||
ResourceLocation id = Registry.ITEM.getKey(itemStack.getItem());
|
||||
if (EndPortals.isAvailableItem(id)) {
|
||||
world.setBlockAndUpdate(pos, updatedState.setValue(ACTIVATED, true).setValue(HAS_LIGHT, true));
|
||||
if (pedestal.hasRitual()) {
|
||||
pedestal.getRitual().checkStructure();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
EternalRitual ritual = new EternalRitual(world, pos);
|
||||
ritual.checkStructure();
|
||||
}
|
||||
|
@ -126,12 +124,12 @@ public class EternalPedestal extends PedestalBlock {
|
|||
super.createBlockStateDefinition(stateManager);
|
||||
stateManager.add(ACTIVATED);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) {
|
||||
return new EternalPedestalEntity(blockPos, blockState);
|
||||
public BlockEntity newBlockEntity(BlockGetter world) {
|
||||
return new EternalPedestalEntity();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean hasUniqueEntity() {
|
||||
return true;
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.EnumMap;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
@ -16,15 +19,13 @@ import ru.bclib.blocks.BaseAttachedBlock;
|
|||
import ru.bclib.client.render.BCLRenderLayer;
|
||||
import ru.bclib.interfaces.IRenderTyped;
|
||||
|
||||
import java.util.EnumMap;
|
||||
|
||||
public class FilaluxWingsBlock extends BaseAttachedBlock implements IRenderTyped {
|
||||
private static final EnumMap<Direction, VoxelShape> BOUNDING_SHAPES = Maps.newEnumMap(Direction.class);
|
||||
|
||||
public FilaluxWingsBlock() {
|
||||
super(FabricBlockSettings.of(Material.PLANT).breakByTool(FabricToolTags.SHEARS).sound(SoundType.WET_GRASS).noCollission());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BCLRenderLayer getRenderLayer() {
|
||||
return BCLRenderLayer.CUTOUT;
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
@ -15,16 +18,17 @@ import net.minecraft.world.level.material.Material;
|
|||
import net.minecraft.world.level.storage.loot.LootContext;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import ru.bclib.interfaces.ISpetialItem;
|
||||
import ru.betterend.blocks.basis.EndPlantBlock;
|
||||
|
||||
import java.util.List;
|
||||
import ru.betterend.interfaces.ISpetialItem;
|
||||
|
||||
public class FlamaeaBlock extends EndPlantBlock implements ISpetialItem {
|
||||
private static final VoxelShape SHAPE = Block.box(0, 0, 0, 16, 1, 16);
|
||||
|
||||
public FlamaeaBlock() {
|
||||
super(FabricBlockSettings.of(Material.PLANT).breakByTool(FabricToolTags.SHEARS).breakByHand(true).sound(SoundType.WET_GRASS));
|
||||
super(FabricBlockSettings.of(Material.PLANT)
|
||||
.breakByTool(FabricToolTags.SHEARS)
|
||||
.breakByHand(true)
|
||||
.sound(SoundType.WET_GRASS));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -36,7 +40,7 @@ public class FlamaeaBlock extends EndPlantBlock implements ISpetialItem {
|
|||
public VoxelShape getShape(BlockState state, BlockGetter view, BlockPos pos, CollisionContext ePos) {
|
||||
return SHAPE;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockBehaviour.OffsetType getOffsetType() {
|
||||
return BlockBehaviour.OffsetType.NONE;
|
||||
|
@ -46,19 +50,14 @@ public class FlamaeaBlock extends EndPlantBlock implements ISpetialItem {
|
|||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||
return Lists.newArrayList(new ItemStack(this));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getStackSize() {
|
||||
return 64;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canPlaceOnWater() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addToPot() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,391 +0,0 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.mojang.math.Transformation;
|
||||
import com.mojang.math.Vector3f;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.fabricmc.fabric.mixin.object.builder.AbstractBlockAccessor;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.client.resources.model.UnbakedModel;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.LevelAccessor;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.SaplingBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.StateDefinition;
|
||||
import net.minecraft.world.level.block.state.properties.IntegerProperty;
|
||||
import net.minecraft.world.level.storage.loot.LootContext.Builder;
|
||||
import net.minecraft.world.phys.BlockHitResult;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.Shapes;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import ru.bclib.blocks.BaseBlockNotFull;
|
||||
import ru.bclib.client.models.BasePatterns;
|
||||
import ru.bclib.client.models.ModelsHelper;
|
||||
import ru.bclib.client.models.ModelsHelper.MultiPartBuilder;
|
||||
import ru.bclib.client.models.PatternsHelper;
|
||||
import ru.bclib.client.render.BCLRenderLayer;
|
||||
import ru.bclib.interfaces.IPostInit;
|
||||
import ru.bclib.interfaces.IRenderTyped;
|
||||
import ru.bclib.util.BlocksHelper;
|
||||
import ru.bclib.util.JsonFactory;
|
||||
import ru.betterend.BetterEnd;
|
||||
import ru.betterend.blocks.basis.PottableLeavesBlock;
|
||||
import ru.betterend.client.models.Patterns;
|
||||
import ru.betterend.config.Configs;
|
||||
import ru.betterend.interfaces.PottablePlant;
|
||||
import ru.betterend.interfaces.PottableTerrain;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
public class FlowerPotBlock extends BaseBlockNotFull implements IRenderTyped, IPostInit {
|
||||
private static final IntegerProperty PLANT_ID = EndBlockProperties.PLANT_ID;
|
||||
private static final IntegerProperty SOIL_ID = EndBlockProperties.SOIL_ID;
|
||||
private static final IntegerProperty POT_LIGHT = EndBlockProperties.POT_LIGHT;
|
||||
private static final VoxelShape SHAPE_EMPTY;
|
||||
private static final VoxelShape SHAPE_FULL;
|
||||
private static Block[] plants;
|
||||
private static Block[] soils;
|
||||
|
||||
public FlowerPotBlock(Block source) {
|
||||
super(FabricBlockSettings.copyOf(source).luminance(state -> state.getValue(POT_LIGHT) * 5));
|
||||
this.registerDefaultState(this.defaultBlockState().setValue(PLANT_ID, 0).setValue(SOIL_ID, 0).setValue(POT_LIGHT, 0));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
|
||||
super.createBlockStateDefinition(builder);
|
||||
builder.add(PLANT_ID, SOIL_ID, POT_LIGHT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDrops(BlockState state, Builder builder) {
|
||||
List<ItemStack> drop = Lists.newArrayList(new ItemStack(this));
|
||||
int id = state.getValue(SOIL_ID) - 1;
|
||||
if (id >= 0 && id < soils.length && soils[id] != null) {
|
||||
drop.add(new ItemStack(soils[id]));
|
||||
}
|
||||
id = state.getValue(PLANT_ID) - 1;
|
||||
if (id >= 0 && id < plants.length && plants[id] != null) {
|
||||
drop.add(new ItemStack(plants[id]));
|
||||
}
|
||||
return drop;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState updateShape(BlockState state, Direction facing, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) {
|
||||
int plantID = state.getValue(PLANT_ID);
|
||||
if (plantID < 1 || plantID > plants.length || plants[plantID - 1] == null) {
|
||||
return state.getValue(POT_LIGHT) > 0 ? state.setValue(POT_LIGHT, 0) : state;
|
||||
}
|
||||
int light = plants[plantID - 1].defaultBlockState().getLightEmission() / 5;
|
||||
if (state.getValue(POT_LIGHT) != light) {
|
||||
state = state.setValue(POT_LIGHT, light);
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit() {
|
||||
if (FlowerPotBlock.plants != null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Block[] plants = new Block[128];
|
||||
Block[] soils = new Block[16];
|
||||
|
||||
Map<String, Integer> reservedPlantsIDs = Maps.newHashMap();
|
||||
Map<String, Integer> reservedSoilIDs = Maps.newHashMap();
|
||||
|
||||
JsonObject obj = JsonFactory.getJsonObject(new File(FabricLoader.getInstance().getConfigDir().toFile(), BetterEnd.MOD_ID + "/blocks.json"));
|
||||
if (obj.get("flower_pots") != null) {
|
||||
JsonElement plantsObj = obj.get("flower_pots").getAsJsonObject().get("plants");
|
||||
JsonElement soilsObj = obj.get("flower_pots").getAsJsonObject().get("soils");
|
||||
if (plantsObj != null) {
|
||||
plantsObj.getAsJsonObject().entrySet().forEach(entry -> {
|
||||
String name = entry.getKey().substring(0, entry.getKey().indexOf(' '));
|
||||
reservedPlantsIDs.put(name, entry.getValue().getAsInt());
|
||||
});
|
||||
}
|
||||
if (soilsObj != null) {
|
||||
soilsObj.getAsJsonObject().entrySet().forEach(entry -> {
|
||||
String name = entry.getKey().substring(0, entry.getKey().indexOf(' '));
|
||||
reservedSoilIDs.put(name, entry.getValue().getAsInt());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
EndBlocks.getModBlocks().forEach(block -> {
|
||||
if (block instanceof PottablePlant && ((PottablePlant) block).addToPot()) {//&& canBeAdded(block)) {
|
||||
processBlock(plants, block, "flower_pots.plants", reservedPlantsIDs);
|
||||
}
|
||||
else if (block instanceof PottableTerrain) {
|
||||
processBlock(soils, block, "flower_pots.soils", reservedSoilIDs);
|
||||
}
|
||||
});
|
||||
Configs.BLOCK_CONFIG.saveChanges();
|
||||
|
||||
FlowerPotBlock.plants = new Block[maxNotNull(plants) + 1];
|
||||
System.arraycopy(plants, 0, FlowerPotBlock.plants, 0, FlowerPotBlock.plants.length);
|
||||
|
||||
FlowerPotBlock.soils = new Block[maxNotNull(soils) + 1];
|
||||
System.arraycopy(soils, 0, FlowerPotBlock.soils, 0, FlowerPotBlock.soils.length);
|
||||
|
||||
if (PLANT_ID.getValue(Integer.toString(FlowerPotBlock.plants.length)).isEmpty()) {
|
||||
throw new RuntimeException("There are too much plant ID values!");
|
||||
}
|
||||
if (SOIL_ID.getValue(Integer.toString(FlowerPotBlock.soils.length)).isEmpty()) {
|
||||
throw new RuntimeException("There are too much soil ID values!");
|
||||
}
|
||||
}
|
||||
|
||||
private int maxNotNull(Block[] array) {
|
||||
int max = 0;
|
||||
for (int i = 0; i < array.length; i++) {
|
||||
if (array[i] != null) {
|
||||
max = i;
|
||||
}
|
||||
}
|
||||
return max;
|
||||
}
|
||||
|
||||
private void processBlock(Block[] target, Block block, String path, Map<String, Integer> idMap) {
|
||||
ResourceLocation location = Registry.BLOCK.getKey(block);
|
||||
if (idMap.containsKey(location.getPath())) {
|
||||
target[idMap.get(location.getPath())] = block;
|
||||
}
|
||||
else {
|
||||
for (int i = 0; i < target.length; i++) {
|
||||
if (!idMap.values().contains(i)) {
|
||||
target[i] = block;
|
||||
idMap.put(location.getPath(), i);
|
||||
Configs.BLOCK_CONFIG.getInt(path, location.getPath(), i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public InteractionResult use(BlockState state, Level level, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) {
|
||||
if (level.isClientSide) {
|
||||
return InteractionResult.CONSUME;
|
||||
}
|
||||
ItemStack itemStack = player.getItemInHand(hand);
|
||||
int soilID = state.getValue(SOIL_ID);
|
||||
if (soilID == 0 || soilID > soils.length || soils[soilID - 1] == null) {
|
||||
if (!(itemStack.getItem() instanceof BlockItem)) {
|
||||
return InteractionResult.PASS;
|
||||
}
|
||||
Block block = ((BlockItem) itemStack.getItem()).getBlock();
|
||||
for (int i = 0; i < soils.length; i++) {
|
||||
if (block == soils[i]) {
|
||||
BlocksHelper.setWithUpdate(level, pos, state.setValue(SOIL_ID, i + 1));
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
}
|
||||
return InteractionResult.PASS;
|
||||
}
|
||||
|
||||
int plantID = state.getValue(PLANT_ID);
|
||||
if (itemStack.isEmpty()) {
|
||||
if (plantID > 0 && plantID <= plants.length && plants[plantID - 1] != null) {
|
||||
BlocksHelper.setWithUpdate(level, pos, state.setValue(PLANT_ID, 0).setValue(POT_LIGHT, 0));
|
||||
player.addItem(new ItemStack(plants[plantID - 1]));
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
if (soilID > 0 && soilID <= soils.length && soils[soilID - 1] != null) {
|
||||
BlocksHelper.setWithUpdate(level, pos, state.setValue(SOIL_ID, 0));
|
||||
player.addItem(new ItemStack(soils[soilID - 1]));
|
||||
}
|
||||
return InteractionResult.PASS;
|
||||
}
|
||||
if (!(itemStack.getItem() instanceof BlockItem)) {
|
||||
return InteractionResult.PASS;
|
||||
}
|
||||
BlockItem item = (BlockItem) itemStack.getItem();
|
||||
for (int i = 0; i < plants.length; i++) {
|
||||
if (item.getBlock() == plants[i]) {
|
||||
if (!((PottablePlant) plants[i]).canPlantOn(soils[soilID - 1])) {
|
||||
return InteractionResult.PASS;
|
||||
}
|
||||
int light = plants[i].defaultBlockState().getLightEmission() / 5;
|
||||
BlocksHelper.setWithUpdate(level, pos, state.setValue(PLANT_ID, i + 1).setValue(POT_LIGHT, light));
|
||||
level.playLocalSound(pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, SoundEvents.HOE_TILL, SoundSource.BLOCKS, 1, 1, false);
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
}
|
||||
return InteractionResult.PASS;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public BlockModel getItemModel(ResourceLocation blockId) {
|
||||
Optional<String> pattern = PatternsHelper.createJson(Patterns.BLOCK_FLOWER_POT, blockId);
|
||||
return ModelsHelper.fromPattern(pattern);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public UnbakedModel getModelVariant(ResourceLocation stateId, BlockState blockState, Map<ResourceLocation, UnbakedModel> modelCache) {
|
||||
MultiPartBuilder model = MultiPartBuilder.create(stateDefinition);
|
||||
model.part(new ModelResourceLocation(stateId.getNamespace(), stateId.getPath(), "inventory")).add();
|
||||
Transformation offset = new Transformation(new Vector3f(0, 7.5F / 16F, 0), null, null, null);
|
||||
|
||||
for (int i = 0; i < plants.length; i++) {
|
||||
if (plants[i] == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
final int compareID = i + 1;
|
||||
ResourceLocation modelPath = Registry.BLOCK.getKey(plants[i]);
|
||||
ResourceLocation objSource = new ResourceLocation(modelPath.getNamespace(), "models/block/" + modelPath.getPath() + "_potted.json");
|
||||
|
||||
if (Minecraft.getInstance().getResourceManager().hasResource(objSource)) {
|
||||
objSource = new ResourceLocation(modelPath.getNamespace(), "block/" + modelPath.getPath() + "_potted");
|
||||
model.part(objSource).setTransformation(offset).setCondition(state -> state.getValue(PLANT_ID) == compareID).add();
|
||||
continue;
|
||||
}
|
||||
|
||||
else if (plants[i] instanceof SaplingBlock) {
|
||||
ResourceLocation loc = Registry.BLOCK.getKey(plants[i]);
|
||||
modelPath = new ResourceLocation(loc.getNamespace(), "block/" + loc.getPath() + "_potted");
|
||||
Map<String, String> textures = Maps.newHashMap();
|
||||
textures.put("%modid%", loc.getNamespace());
|
||||
textures.put("%texture%", loc.getPath());
|
||||
Optional<String> pattern = Patterns.createJson(BasePatterns.BLOCK_CROSS, textures);
|
||||
UnbakedModel unbakedModel = ModelsHelper.fromPattern(pattern);
|
||||
modelCache.put(modelPath, unbakedModel);
|
||||
model.part(modelPath).setTransformation(offset).setCondition(state -> state.getValue(PLANT_ID) == compareID).add();
|
||||
continue;
|
||||
}
|
||||
else if (plants[i] instanceof PottableLeavesBlock) {
|
||||
ResourceLocation loc = Registry.BLOCK.getKey(plants[i]);
|
||||
modelPath = new ResourceLocation(loc.getNamespace(), "block/" + loc.getPath() + "_potted");
|
||||
Map<String, String> textures = Maps.newHashMap();
|
||||
textures.put("%leaves%", loc.getPath().contains("lucernia") ? loc.getPath() + "_1" : loc.getPath());
|
||||
textures.put("%stem%", loc.getPath().replace("_leaves", "_log_side"));
|
||||
Optional<String> pattern = Patterns.createJson(Patterns.BLOCK_POTTED_LEAVES, textures);
|
||||
UnbakedModel unbakedModel = ModelsHelper.fromPattern(pattern);
|
||||
modelCache.put(modelPath, unbakedModel);
|
||||
model.part(modelPath).setTransformation(offset).setCondition(state -> state.getValue(PLANT_ID) == compareID).add();
|
||||
continue;
|
||||
}
|
||||
|
||||
objSource = new ResourceLocation(modelPath.getNamespace(), "blockstates/" + modelPath.getPath() + ".json");
|
||||
JsonObject obj = JsonFactory.getJsonObject(objSource);
|
||||
if (obj != null) {
|
||||
JsonElement variants = obj.get("variants");
|
||||
JsonElement list = null;
|
||||
String path = null;
|
||||
|
||||
if (variants == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (variants.isJsonArray()) {
|
||||
list = variants.getAsJsonArray().get(0);
|
||||
}
|
||||
else if (variants.isJsonObject()) {
|
||||
list = variants.getAsJsonObject().get(((PottablePlant) plants[i]).getPottedState());
|
||||
}
|
||||
|
||||
if (list == null) {
|
||||
BetterEnd.LOGGER.warning("Incorrect json for pot plant " + objSource + ", no matching variants");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (list.isJsonArray()) {
|
||||
path = list.getAsJsonArray().get(0).getAsJsonObject().get("model").getAsString();
|
||||
}
|
||||
else {
|
||||
path = list.getAsJsonObject().get("model").getAsString();
|
||||
}
|
||||
|
||||
if (path == null) {
|
||||
BetterEnd.LOGGER.warning("Incorrect json for pot plant " + objSource + ", no matching variants");
|
||||
continue;
|
||||
}
|
||||
|
||||
model.part(new ResourceLocation(path)).setTransformation(offset).setCondition(state -> state.getValue(PLANT_ID) == compareID).add();
|
||||
}
|
||||
else {
|
||||
for (ResourceLocation location: modelCache.keySet()) {
|
||||
if (location.getPath().equals(modelPath.getPath())) {
|
||||
model.part(location).setTransformation(offset).setCondition(state -> state.getValue(PLANT_ID) == compareID).add();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < soils.length; i++) {
|
||||
if (soils[i] == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ResourceLocation soilLoc = BetterEnd.makeID("flower_pot_soil_" + i);
|
||||
if (!modelCache.containsKey(soilLoc)) {
|
||||
String texture = Registry.BLOCK.getKey(soils[i]).getPath() + "_top";
|
||||
if (texture.contains("rutiscus")) {
|
||||
texture += "_1";
|
||||
}
|
||||
Optional<String> pattern = Patterns.createJson(Patterns.BLOCK_FLOWER_POT_SOIL, texture);
|
||||
UnbakedModel soil = ModelsHelper.fromPattern(pattern);
|
||||
modelCache.put(soilLoc, soil);
|
||||
}
|
||||
final int compareID = i + 1;
|
||||
model.part(soilLoc).setCondition(state -> state.getValue(SOIL_ID) == compareID).add();
|
||||
}
|
||||
|
||||
UnbakedModel result = model.build();
|
||||
modelCache.put(stateId, result);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, BlockGetter view, BlockPos pos, CollisionContext ePos) {
|
||||
int id = state.getValue(PLANT_ID);
|
||||
return id > 0 && id <= plants.length ? SHAPE_FULL : SHAPE_EMPTY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getCollisionShape(BlockState state, BlockGetter view, BlockPos pos, CollisionContext ePos) {
|
||||
return SHAPE_EMPTY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BCLRenderLayer getRenderLayer() {
|
||||
return BCLRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
static {
|
||||
SHAPE_EMPTY = Shapes.or(Block.box(4, 1, 4, 12, 8, 12), Block.box(5, 0, 5, 11, 1, 11));
|
||||
SHAPE_FULL = Shapes.or(SHAPE_EMPTY, Block.box(3, 8, 3, 13, 16, 13));
|
||||
}
|
||||
}
|
|
@ -19,12 +19,12 @@ public class GlowingMossBlock extends EndPlantBlock {
|
|||
}
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public boolean hasEmissiveLighting(BlockGetter world, BlockPos pos) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public float getAmbientOcclusionLightLevel(BlockGetter world, BlockPos pos) {
|
||||
return 1F;
|
||||
}
|
||||
public boolean hasEmissiveLighting(BlockGetter world, BlockPos pos) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public float getAmbientOcclusionLightLevel(BlockGetter world, BlockPos pos) {
|
||||
return 1F;
|
||||
}
|
||||
}
|
|
@ -21,7 +21,12 @@ public class GlowingPillarLuminophorBlock extends BaseBlock {
|
|||
public static final BooleanProperty NATURAL = EndBlockProperties.NATURAL;
|
||||
|
||||
public GlowingPillarLuminophorBlock() {
|
||||
super(FabricBlockSettings.of(Material.LEAVES).materialColor(MaterialColor.COLOR_ORANGE).breakByTool(FabricToolTags.SHEARS).strength(0.2F).luminance(15).sound(SoundType.GRASS));
|
||||
super(FabricBlockSettings.of(Material.LEAVES)
|
||||
.materialColor(MaterialColor.COLOR_ORANGE)
|
||||
.breakByTool(FabricToolTags.SHEARS)
|
||||
.strength(0.2F)
|
||||
.luminance(15)
|
||||
.sound(SoundType.GRASS));
|
||||
this.registerDefaultState(this.stateDefinition.any().setValue(NATURAL, false));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
@ -18,12 +20,16 @@ import ru.bclib.util.MHelper;
|
|||
import ru.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class GlowingPillarSeedBlock extends EndPlantWithAgeBlock {
|
||||
|
||||
|
||||
public GlowingPillarSeedBlock() {
|
||||
super(FabricBlockSettings.of(Material.PLANT).breakByTool(FabricToolTags.SHEARS).breakByHand(true).sound(SoundType.GRASS).lightLevel(state -> state.getValue(AGE) * 3 + 3).randomTicks().noCollission());
|
||||
super(FabricBlockSettings.of(Material.PLANT)
|
||||
.breakByTool(FabricToolTags.SHEARS)
|
||||
.breakByHand(true)
|
||||
.sound(SoundType.GRASS)
|
||||
.lightLevel(state -> state.getValue(AGE) * 3 + 3)
|
||||
.randomTicks()
|
||||
.noCollission());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -38,15 +44,14 @@ public class GlowingPillarSeedBlock extends EndPlantWithAgeBlock {
|
|||
BlockState roots = EndBlocks.GLOWING_PILLAR_ROOTS.defaultBlockState();
|
||||
if (height < 2) {
|
||||
BlocksHelper.setWithUpdate(world, mut, roots.setValue(BlockProperties.TRIPLE_SHAPE, TripleShape.MIDDLE));
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
BlocksHelper.setWithUpdate(world, mut, roots.setValue(BlockProperties.TRIPLE_SHAPE, TripleShape.BOTTOM));
|
||||
mut.move(Direction.UP);
|
||||
BlocksHelper.setWithUpdate(world, mut, roots.setValue(BlockProperties.TRIPLE_SHAPE, TripleShape.TOP));
|
||||
}
|
||||
mut.move(Direction.UP);
|
||||
BlocksHelper.setWithUpdate(world, mut, EndBlocks.GLOWING_PILLAR_LUMINOPHOR.defaultBlockState().setValue(BlueVineLanternBlock.NATURAL, true));
|
||||
for (Direction dir : BlocksHelper.DIRECTIONS) {
|
||||
for (Direction dir: BlocksHelper.DIRECTIONS) {
|
||||
pos = mut.relative(dir);
|
||||
if (world.isEmptyBlock(pos)) {
|
||||
BlocksHelper.setWithUpdate(world, pos, EndBlocks.GLOWING_PILLAR_LEAVES.defaultBlockState().setValue(BlockStateProperties.FACING, dir));
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||
import net.minecraft.client.color.block.BlockColor;
|
||||
|
@ -26,29 +30,31 @@ import ru.bclib.util.MHelper;
|
|||
import ru.betterend.noise.OpenSimplexNoise;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class HelixTreeLeavesBlock extends BaseBlock implements IColorProvider {
|
||||
public static final IntegerProperty COLOR = EndBlockProperties.COLOR;
|
||||
private static final OpenSimplexNoise NOISE = new OpenSimplexNoise(0);
|
||||
|
||||
public HelixTreeLeavesBlock() {
|
||||
super(FabricBlockSettings.of(Material.LEAVES).materialColor(MaterialColor.COLOR_ORANGE).breakByTool(FabricToolTags.SHEARS).sound(SoundType.WART_BLOCK).sound(SoundType.GRASS).strength(0.2F));
|
||||
super(FabricBlockSettings.of(Material.LEAVES)
|
||||
.materialColor(MaterialColor.COLOR_ORANGE)
|
||||
.breakByTool(FabricToolTags.SHEARS)
|
||||
.sound(SoundType.WART_BLOCK)
|
||||
.sound(SoundType.GRASS)
|
||||
.strength(0.2F));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> stateManager) {
|
||||
stateManager.add(COLOR);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockColor getProvider() {
|
||||
return (state, world, pos, tintIndex) -> {
|
||||
return ColorUtil.color(237, getGreen(state.getValue(COLOR)), 20);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemColor getItemProvider() {
|
||||
return (stack, tintIndex) -> {
|
||||
|
@ -73,7 +79,7 @@ public class HelixTreeLeavesBlock extends BaseBlock implements IColorProvider {
|
|||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||
ItemStack tool = builder.getParameter(LootContextParams.TOOL);
|
||||
if (tool != null) {
|
||||
if (tool.is(FabricToolTags.SHEARS) || tool.isCorrectToolForDrops(state) || EnchantmentHelper.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, tool) > 0) {
|
||||
if (tool.getItem().is(FabricToolTags.SHEARS) || tool.isCorrectToolForDrops(state) || EnchantmentHelper.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, tool) > 0) {
|
||||
return Collections.singletonList(new ItemStack(this));
|
||||
}
|
||||
int fortune = EnchantmentHelper.getItemEnchantmentLevel(Enchantments.BLOCK_FORTUNE, tool);
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue