Merge pull request #239 from paulevsGitch/1.17

Pots update
This commit is contained in:
paulevsGitch 2021-07-12 09:48:40 +03:00 committed by GitHub
commit f6d4684427
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
533 changed files with 7457 additions and 7570 deletions

View file

@ -1,157 +1,164 @@
class ModelPart {
static java.util.ArrayList<ModelPart> parts = new java.util.ArrayList<>(20);
final String name;
ModelPart parent = null;
boolean mirror = false;
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;
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);
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(Convert c, int u, int v, String name) {
this.name = name;
this.u = u;
this.v = v;
parts.add(this);
}
ModelPart setPos(float x, float y, float z){
this.x=x;
this.y=y;
this.z=z;
return 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 setRotationAngle(float x, float y, float z){
this.rx=x;
this.ry=y;
this.rz=z;
return this;
}
ModelPart setPos(float x, float y, float z) {
this.x = x;
this.y = y;
this.z = z;
return this;
}
ModelPart addChild(ModelPart p){
p.parent = this;
return this;
}
ModelPart setRotationAngle(float x, float y, float z) {
this.rx = x;
this.ry = y;
this.rz = z;
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 addChild(ModelPart p) {
p.parent = this;
return this;
}
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;
}
ModelPart texOffs(int u, int v) {
this.u = u;
this.v = v;
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";
}
ModelPart addBox(float x, float y, float z, float a, float b, float c) {
return addBox(x, y, z, a, b, c, 1);
}
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 +=");";
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;
}
return s;
}
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 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("}");
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";
}
System.out.println();
System.out.println();
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 += ");";
for(ModelPart p : parts){
String pName = p.parent==null?"modelPart":p.parent.name;
System.out.println(p.name +" = "+pName+".getChild(\""+p.name+"\");");
}
}
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 + "\");");
}
}
}
public class Convert {
public static void main(String[] args){
new Convert().c();
ModelPart.print();
}
void setRotationAngle(ModelPart p, float x, float y, float z){
p.setRotationAngle(x, y, z);
}
public void c (){
float scale = 1;
ModelPart partC = new ModelPart(64, 64, 0, 19, "partC");
public class Convert {
public static void main(String[] args) {
new Convert().c();
ModelPart.print();
}
void setRotationAngle(ModelPart p, float x, float y, float z) {
p.setRotationAngle(x, y, z);
}
public void c() {
float scale = 1;
ModelPart partC = new ModelPart(64, 64, 0, 19, "partC");
partC.addBox(1.0F, 0.0F, 1.0F, 14.0F, 9.0F, 14.0F, 0.0F);
ModelPart partA = new ModelPart(64, 64, 0, 0,"partA");
ModelPart partA = new ModelPart(64, 64, 0, 0, "partA");
partA.addBox(1.0F, 0.0F, 0.0F, 14.0F, 5.0F, 14.0F, 0.0F);
partA.y = 9.0F;
partA.z = 1.0F;
@ -176,5 +183,5 @@ public class Convert {
ModelPart partLeftB = new ModelPart(64, 64, 0, 0, "partLeftB");
partLeftB.addBox(0.0F, -1.0F, 15.0F, 1.0F, 4.0F, 1.0F, 0.0F);
partLeftB.y = 8.0F;
}
}
}

View file

@ -1,14 +1,18 @@
[![](https://jitpack.io/v/paulevsGitch/BetterEnd.svg)](https://jitpack.io/#paulevsGitch/BetterEnd)
# Better End
Better End Mod for Fabric, MC 1.17.1
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

View file

@ -1,14 +1,14 @@
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.8-SNAPSHOT'
id 'maven-publish'
}
sourceCompatibility = JavaVersion.VERSION_16
@ -20,101 +20,101 @@ 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://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.17-${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-fabric:${project.rei_version}"
useOptional "me.shedaniel:RoughlyEnoughItems-api-fabric:${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.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'
}
}
}
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.cloth'
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) {
include "fabric.mod.json"
expand "version": project.version
}
from(sourceSets.main.resources.srcDirs) {
exclude "fabric.mod.json"
}
from(sourceSets.main.resources.srcDirs) {
exclude "fabric.mod.json"
}
}
// 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 +123,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

View file

@ -1,21 +1,18 @@
# 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
yarn_mappings= 6
loader_version= 0.11.6
minecraft_version=1.17.1
yarn_mappings=6
loader_version=0.11.6
# Mod Properties
mod_version = 0.10.2-pre
maven_group = ru.betterend
archives_base_name = better-end
mod_version=0.10.3-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.0
rei_version = 6.0.262-alpha
canvas_version = 1.0.+
patchouli_version=55-FABRIC-SNAPSHOT
fabric_version=0.36.1+1.17
bclib_version=0.2.1
rei_version=6.0.262-alpha
canvas_version=1.0.+

View file

@ -1,6 +1,6 @@
{
"parent": "block/cube_all",
"textures": {
"all": "betterend:block/%name%"
}
"parent": "block/cube_all",
"textures": {
"all": "betterend:block/%name%"
}
}

View file

@ -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"
}
}

View file

@ -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"
}
}

View file

@ -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"
}
}

View file

@ -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"
}
}

View file

@ -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"
}
}

View file

@ -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"
}
}

View file

@ -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"
}
}

View file

@ -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"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "block/cube_all",
"textures": {
"all": "betterend:block/%name%_bricks"
}
"parent": "block/cube_all",
"textures": {
"all": "betterend:block/%name%_bricks"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "block/button",
"textures": {
"texture": "betterend:block/%name%"
}
"parent": "block/button",
"textures": {
"texture": "betterend:block/%name%"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "block/button_inventory",
"textures": {
"texture": "betterend:block/%name%"
}
"parent": "block/button_inventory",
"textures": {
"texture": "betterend:block/%name%"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "block/button_pressed",
"textures": {
"texture": "betterend:block/%name%"
}
"parent": "block/button_pressed",
"textures": {
"texture": "betterend:block/%name%"
}
}

View file

@ -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%"
}
}

View file

@ -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%"
}
}

View file

@ -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%"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "block/pressure_plate_down",
"textures": {
"texture": "betterend:block/%name%"
}
"parent": "block/pressure_plate_down",
"textures": {
"texture": "betterend:block/%name%"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "block/pressure_plate_up",
"textures": {
"texture": "betterend:block/%name%"
}
"parent": "block/pressure_plate_up",
"textures": {
"texture": "betterend:block/%name%"
}
}

View file

@ -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"
}
}

View file

@ -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%"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "block/cube_all",
"textures": {
"all": "betterend:block/%name%_tile"
}
"parent": "block/cube_all",
"textures": {
"all": "betterend:block/%name%_tile"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:block/wall_inventory",
"textures": {
"wall": "betterend:block/%name%"
}
"parent": "minecraft:block/wall_inventory",
"textures": {
"wall": "betterend:block/%name%"
}
}

View file

@ -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%"
}
}

View file

@ -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%"
}
}

View file

@ -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%"
}
}

View file

@ -1,7 +1,7 @@
{
"variants": {
"": {
"model": "betterend:block/%name%"
}
}
"variants": {
"": {
"model": "betterend:block/%name%"
}
}
}

View file

@ -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
}
}
}

View file

@ -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
}
}
}

View file

@ -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
}
}
]
}

View file

@ -1,7 +1,7 @@
{
"variants": {
"": {
"model": "betterend:block/%name%_bricks"
}
}
"variants": {
"": {
"model": "betterend:block/%name%_bricks"
}
}
}

View file

@ -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
}
}
}

View file

@ -1,7 +1,16 @@
{
"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
}
}
}

View file

@ -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"
}
}
}

View file

@ -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
}
}
}

View file

@ -1,7 +1,7 @@
{
"variants": {
"": {
"model": "betterend:block/%name%_small_tiles"
}
}
"variants": {
"": {
"model": "betterend:block/%name%_small_tiles"
}
}
}

View file

@ -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
}
}
}

View file

@ -1,7 +1,7 @@
{
"variants": {
"": {
"model": "betterend:block/%name%_tile"
}
}
"variants": {
"": {
"model": "betterend:block/%name%_tile"
}
}
}

View file

@ -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
}
}
]
}

View file

@ -1,3 +1,3 @@
{
"parent": "betterend:block/%name%"
"parent": "betterend:block/%name%"
}

View file

@ -1,3 +1,3 @@
{
"parent": "betterend:block/%name%_brick_half_slab"
"parent": "betterend:block/%name%_brick_half_slab"
}

View file

@ -1,3 +1,3 @@
{
"parent": "betterend:block/%name%_brick_stairs"
"parent": "betterend:block/%name%_brick_stairs"
}

View file

@ -1,3 +1,3 @@
{
"parent": "betterend:block/%name%_brick_wall_inventory"
"parent": "betterend:block/%name%_brick_wall_inventory"
}

View file

@ -1,3 +1,3 @@
{
"parent": "betterend:block/%name%_bricks"
"parent": "betterend:block/%name%_bricks"
}

View file

@ -1,3 +1,3 @@
{
"parent": "betterend:block/%name%_button_inventory"
"parent": "betterend:block/%name%_button_inventory"
}

View file

@ -1,3 +1,3 @@
{
"parent": "betterend:block/%name%_pillar"
"parent": "betterend:block/%name%_pillar"
}

View file

@ -1,3 +1,3 @@
{
"parent": "betterend:block/%name%_pressure_plate_up"
"parent": "betterend:block/%name%_pressure_plate_up"
}

View file

@ -1,3 +1,3 @@
{
"parent": "betterend:block/%name%_half_slab"
"parent": "betterend:block/%name%_half_slab"
}

View file

@ -1,3 +1,3 @@
{
"parent": "betterend:block/%name%_small_tiles"
"parent": "betterend:block/%name%_small_tiles"
}

View file

@ -1,3 +1,3 @@
{
"parent": "betterend:block/%name%_stairs"
"parent": "betterend:block/%name%_stairs"
}

View file

@ -1,3 +1,3 @@
{
"parent": "betterend:block/%name%_tile"
"parent": "betterend:block/%name%_tile"
}

View file

@ -1,3 +1,3 @@
{
"parent": "betterend:block/%name%_wall_inventory"
"parent": "betterend:block/%name%_wall_inventory"
}

View file

@ -14,11 +14,7 @@ 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)

View file

@ -33,15 +33,7 @@ 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(TagAPI.HAMMERS).hardness(1F).resistance(1F).luminance(15).noOcclusion().isSuffocating((state, world, pos) -> false).sound(SoundType.GLASS));
}
@Override
@ -109,11 +101,6 @@ 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)};
}
}

View file

@ -87,10 +87,7 @@ 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);
}
}

View file

@ -24,11 +24,7 @@ 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

View file

@ -32,14 +32,7 @@ public class BulbVineLanternBlock extends EndLanternBlock implements IRenderType
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) {
@ -62,9 +55,7 @@ public class BulbVineLanternBlock extends EndLanternBlock implements IRenderType
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);
}

View file

@ -2,13 +2,15 @@ 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 FeatureSaplingBlock {
public class DragonTreeSaplingBlock extends PottableFeatureSapling {
public DragonTreeSaplingBlock() {
super();
}
@ -22,4 +24,9 @@ public class DragonTreeSaplingBlock extends FeatureSaplingBlock {
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;
}
}

View file

@ -12,16 +12,13 @@ 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 BooleanProperty HAS_ITEM = BooleanProperty.create("has_item");
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 BooleanProperty HAS_ITEM = BooleanProperty.create("has_item");
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;
@ -41,12 +38,7 @@ 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;
@ -72,13 +64,7 @@ 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;
@ -104,9 +90,7 @@ 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;

View file

@ -42,12 +42,7 @@ public class EndLilyBlock extends EndUnderwaterPlantBlock {
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

View file

@ -110,8 +110,7 @@ public class EndLotusSeedBlock extends UnderwaterPlantWithAgeBlock {
p.setX(pos.getX() + x);
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;

View file

@ -95,8 +95,7 @@ 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());
((ServerPlayer) entity).teleportTo(destination, exitPos.getX() + 0.5, exitPos.getY(), exitPos.getZ() + 0.5, entity.getYRot(), entity.getXRot());
}
else {
((TeleportingEntity) entity).be_setExitPos(exitPos);
@ -106,8 +105,7 @@ public class EndPortalBlock extends NetherPortalBlock implements IRenderTyped, I
}
private boolean validate(Entity entity) {
return !entity.isPassenger() && !entity.isVehicle() &&
entity.canChangeDimensions() && !entity.isOnPortalCooldown();
return !entity.isPassenger() && !entity.isVehicle() && entity.canChangeDimensions() && !entity.isOnPortalCooldown();
}
@Override
@ -127,8 +125,7 @@ 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);

View file

@ -49,12 +49,7 @@ public class EndStoneSmelter extends BaseBlockWithEntity {
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));
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));
}

View file

@ -14,11 +14,7 @@ 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)

View file

@ -21,9 +21,7 @@ public class EndstoneDustBlock extends FallingBlock {
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

View file

@ -24,10 +24,7 @@ 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
@ -59,4 +56,9 @@ public class FlamaeaBlock extends EndPlantBlock implements ISpetialItem {
public boolean canPlaceOnWater() {
return true;
}
@Override
public boolean addToPot() {
return false;
}
}

View file

@ -0,0 +1,355 @@
package ru.betterend.blocks;
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.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.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.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.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.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 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));
this.registerDefaultState(this.defaultBlockState().setValue(PLANT_ID, 0));
}
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
builder.add(PLANT_ID, SOIL_ID);
}
@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));
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;
}
BlocksHelper.setWithUpdate(level, pos, state.setValue(PLANT_ID, i + 1));
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));
}
}

View file

@ -21,12 +21,7 @@ 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));
}

View file

@ -23,13 +23,7 @@ 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

View file

@ -34,12 +34,7 @@ public class HelixTreeLeavesBlock extends BaseBlock implements IColorProvider {
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

View file

@ -1,12 +1,28 @@
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 HelixTreeSaplingBlock extends FeatureSaplingBlock {
public class HelixTreeSaplingBlock extends PottableFeatureSapling {
@Override
protected Feature<?> getFeature() {
return EndFeatures.HELIX_TREE.getFeature();
}
@Override
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
return world.getBlockState(pos.below()).is(EndBlocks.AMBER_MOSS);
}
@Override
public boolean canPlantOn(Block block) {
return block == EndBlocks.AMBER_MOSS;
}
}

View file

@ -33,12 +33,7 @@ public class HydraluxBlock extends UnderwaterPlantBlock {
public static final EnumProperty<HydraluxShape> SHAPE = EndBlockProperties.HYDRALUX_SHAPE;
public HydraluxBlock() {
super(FabricBlockSettings.of(Material.WATER_PLANT)
.breakByTool(FabricToolTags.SHEARS)
.breakByHand(true)
.sound(SoundType.WET_GRASS)
.lightLevel((state) -> state.getValue(SHAPE).hasGlow() ? 15 : 0)
.noCollission());
super(FabricBlockSettings.of(Material.WATER_PLANT).breakByTool(FabricToolTags.SHEARS).breakByHand(true).sound(SoundType.WET_GRASS).lightLevel((state) -> state.getValue(SHAPE).hasGlow() ? 15 : 0).noCollission());
}
@Override

View file

@ -13,13 +13,7 @@ import ru.bclib.blocks.BaseBlock;
public class HydraluxPetalBlock extends BaseBlock {
public HydraluxPetalBlock() {
this(FabricBlockSettings.of(Material.PLANT)
.breakByTool(FabricToolTags.AXES)
.breakByHand(true)
.hardness(1)
.resistance(1)
.materialColor(MaterialColor.PODZOL)
.sound(SoundType.WART_BLOCK));
this(FabricBlockSettings.of(Material.PLANT).breakByTool(FabricToolTags.AXES).breakByHand(true).hardness(1).resistance(1).materialColor(MaterialColor.PODZOL).sound(SoundType.WART_BLOCK));
}
public HydraluxPetalBlock(Properties settings) {

View file

@ -40,7 +40,6 @@ import ru.bclib.blocks.BlockProperties;
import ru.bclib.util.BlocksHelper;
import ru.betterend.blocks.entities.BlockEntityHydrothermalVent;
import ru.betterend.registry.EndBlocks;
import ru.betterend.registry.EndParticles;
import java.util.Random;
@ -51,11 +50,7 @@ public class HydrothermalVentBlock extends BaseBlockNotFull implements EntityBlo
private static final VoxelShape SHAPE = Block.box(1, 1, 1, 15, 16, 15);
public HydrothermalVentBlock() {
super(FabricBlockSettings.of(Material.STONE)
.breakByTool(FabricToolTags.PICKAXES)
.sound(SoundType.STONE)
.noCollission()
.requiresCorrectToolForDrops());
super(FabricBlockSettings.of(Material.STONE).breakByTool(FabricToolTags.PICKAXES).sound(SoundType.STONE).noCollission().requiresCorrectToolForDrops());
this.registerDefaultState(defaultBlockState().setValue(WATERLOGGED, true).setValue(ACTIVATED, false));
}

View file

@ -15,7 +15,6 @@ import net.minecraft.world.phys.shapes.VoxelShape;
import org.jetbrains.annotations.Nullable;
import ru.betterend.blocks.basis.PedestalBlock;
import ru.betterend.blocks.entities.InfusionPedestalEntity;
import ru.betterend.blocks.entities.PedestalBlockEntity;
import ru.betterend.rituals.InfusionRitual;
@SuppressWarnings("deprecation")

View file

@ -2,13 +2,15 @@ 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 LacugroveSaplingBlock extends FeatureSaplingBlock {
public class LacugroveSaplingBlock extends PottableFeatureSapling {
public LacugroveSaplingBlock() {
super();
}
@ -22,4 +24,9 @@ public class LacugroveSaplingBlock extends FeatureSaplingBlock {
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
return world.getBlockState(pos.below()).is(EndBlocks.END_MOSS) || world.getBlockState(pos.below()).is(EndBlocks.ENDSTONE_DUST);
}
@Override
public boolean canPlantOn(Block block) {
return block == EndBlocks.END_MOSS;
}
}

View file

@ -28,11 +28,7 @@ public class LargeAmaranitaBlock extends EndPlantBlock {
private static final VoxelShape SHAPE_TOP = Shapes.or(Block.box(1, 3, 1, 15, 16, 15), SHAPE_BOTTOM);
public LargeAmaranitaBlock() {
super(FabricBlockSettings.of(Material.PLANT)
.breakByTool(FabricToolTags.SHEARS)
.breakByHand(true)
.sound(SoundType.GRASS)
.lightLevel((state) -> (state.getValue(SHAPE) == TripleShape.TOP) ? 15 : 0));
super(FabricBlockSettings.of(Material.PLANT).breakByTool(FabricToolTags.SHEARS).breakByHand(true).sound(SoundType.GRASS).lightLevel((state) -> (state.getValue(SHAPE) == TripleShape.TOP) ? 15 : 0));
}
@Override

View file

@ -2,13 +2,15 @@ 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 LucerniaSaplingBlock extends FeatureSaplingBlock {
public class LucerniaSaplingBlock extends PottableFeatureSapling {
public LucerniaSaplingBlock() {
super();
}
@ -22,4 +24,9 @@ public class LucerniaSaplingBlock extends FeatureSaplingBlock {
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
return world.getBlockState(pos.below()).is(EndBlocks.RUTISCUS);
}
@Override
public boolean canPlantOn(Block block) {
return block == EndBlocks.RUTISCUS;
}
}

View file

@ -38,10 +38,7 @@ public class LumecornBlock extends BaseBlockNotFull implements IRenderTyped {
private static final VoxelShape SHAPE_TOP = Block.box(6, 0, 6, 10, 8, 10);
public LumecornBlock() {
super(FabricBlockSettings.of(Material.WOOD)
.breakByTool(FabricToolTags.AXES)
.hardness(0.5F)
.luminance(state -> state.getValue(SHAPE).getLight()));
super(FabricBlockSettings.of(Material.WOOD).breakByTool(FabricToolTags.AXES).hardness(0.5F).luminance(state -> state.getValue(SHAPE).getLight()));
}
@Override

View file

@ -2,14 +2,15 @@ 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 MossyGlowshroomSaplingBlock extends FeatureSaplingBlock {
public class MossyGlowshroomSaplingBlock extends PottableFeatureSapling {
public MossyGlowshroomSaplingBlock() {
super(7);
}
@ -23,4 +24,9 @@ public class MossyGlowshroomSaplingBlock extends FeatureSaplingBlock {
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
return world.getBlockState(pos.below()).is(EndBlocks.END_MOSS) || world.getBlockState(pos.below()).is(EndBlocks.END_MYCELIUM);
}
@Override
public boolean canPlantOn(Block block) {
return block == EndBlocks.END_MOSS || block == EndBlocks.END_MYCELIUM;
}
}

View file

@ -2,6 +2,8 @@ package ru.betterend.blocks;
import com.google.common.collect.Lists;
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.core.BlockPos;
import net.minecraft.core.BlockPos.MutableBlockPos;
@ -41,6 +43,7 @@ import ru.bclib.interfaces.IRenderTyped;
import ru.bclib.util.BlocksHelper;
import ru.bclib.util.MHelper;
import ru.betterend.blocks.EndBlockProperties.CactusBottom;
import ru.betterend.interfaces.PottablePlant;
import ru.betterend.registry.EndBlocks;
import java.util.EnumMap;
@ -48,7 +51,7 @@ import java.util.List;
import java.util.Random;
@SuppressWarnings("deprecation")
public class NeonCactusPlantBlock extends BaseBlockNotFull implements SimpleWaterloggedBlock, IRenderTyped {
public class NeonCactusPlantBlock extends BaseBlockNotFull implements SimpleWaterloggedBlock, IRenderTyped, PottablePlant {
public static final EnumProperty<TripleShape> SHAPE = BlockProperties.TRIPLE_SHAPE;
public static final EnumProperty<CactusBottom> CACTUS_BOTTOM = EndBlockProperties.CACTUS_BOTTOM;
public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED;
@ -395,4 +398,15 @@ public class NeonCactusPlantBlock extends BaseBlockNotFull implements SimpleWate
SMALL_SHAPES_OPEN.put(Direction.WEST, Block.box(4, 4, 4, 16, 12, 12));
SMALL_SHAPES_OPEN.put(Direction.EAST, Block.box(0, 4, 4, 12, 12, 12));
}
@Override
public boolean canPlantOn(Block block) {
return true;
}
@Override
@Environment(EnvType.CLIENT)
public String getPottedState() {
return "bottom=moss,shape=top,facing=up";
}
}

View file

@ -23,12 +23,7 @@ public class PondAnemoneBlock extends EndUnderwaterPlantBlock {
private static final VoxelShape SHAPE = Block.box(2, 0, 2, 14, 14, 14);
public PondAnemoneBlock() {
super(FabricBlockSettings.of(Material.WATER_PLANT)
.breakByTool(FabricToolTags.SHEARS)
.breakByHand(true)
.luminance(13)
.sound(SoundType.CORAL_BLOCK)
.noCollission());
super(FabricBlockSettings.of(Material.WATER_PLANT).breakByTool(FabricToolTags.SHEARS).breakByHand(true).luminance(13).sound(SoundType.CORAL_BLOCK).noCollission());
}
@Override

View file

@ -2,13 +2,15 @@ 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 PythadendronSaplingBlock extends FeatureSaplingBlock {
public class PythadendronSaplingBlock extends PottableFeatureSapling {
public PythadendronSaplingBlock() {
super();
}
@ -22,4 +24,9 @@ public class PythadendronSaplingBlock extends FeatureSaplingBlock {
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
return world.getBlockState(pos.below()).is(EndBlocks.CHORUS_NYLIUM);
}
@Override
public boolean canPlantOn(Block block) {
return block == EndBlocks.CHORUS_NYLIUM;
}
}

View file

@ -21,13 +21,9 @@ public class RunedFlavolite extends BaseBlock {
public static final BooleanProperty ACTIVATED = BlockProperties.ACTIVE;
public RunedFlavolite(boolean unbreakable) {
super(FabricBlockSettings.copyOf(EndBlocks.FLAVOLITE.polished)
.strength(
unbreakable ? -1 : 1,
unbreakable ? Blocks.BEDROCK.getExplosionResistance() : Blocks.OBSIDIAN.getExplosionResistance()
).luminance(state -> {
return state.getValue(ACTIVATED) ? 8 : 0;
}));
super(FabricBlockSettings.copyOf(EndBlocks.FLAVOLITE.polished).strength(unbreakable ? -1 : 1, unbreakable ? Blocks.BEDROCK.getExplosionResistance() : Blocks.OBSIDIAN.getExplosionResistance()).luminance(state -> {
return state.getValue(ACTIVATED) ? 8 : 0;
}));
this.registerDefaultState(stateDefinition.any().setValue(ACTIVATED, false));
}

View file

@ -6,11 +6,11 @@ import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.VoxelShape;
import ru.bclib.blocks.BaseCropBlock;
import ru.betterend.blocks.basis.PottableCropBlock;
import ru.betterend.registry.EndBlocks;
import ru.betterend.registry.EndItems;
public class ShadowBerryBlock extends BaseCropBlock {
public class ShadowBerryBlock extends PottableCropBlock {
private static final VoxelShape SHAPE = Block.box(1, 0, 1, 15, 8, 15);
public ShadowBerryBlock() {

View file

@ -60,10 +60,7 @@ public class SmallAmaranitaBlock extends EndPlantBlock {
}
private boolean checkFrame(ServerLevel world, BlockPos pos) {
return world.getBlockState(pos).is(this) &&
world.getBlockState(pos.south()).is(this) &&
world.getBlockState(pos.east()).is(this) &&
world.getBlockState(pos.south().east()).is(this);
return world.getBlockState(pos).is(this) && world.getBlockState(pos.south()).is(this) && world.getBlockState(pos.east()).is(this) && world.getBlockState(pos.south().east()).is(this);
}
private void replaceMushroom(ServerLevel world, BlockPos pos) {

View file

@ -2,6 +2,8 @@ package ru.betterend.blocks;
import com.google.common.collect.Lists;
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.core.BlockPos;
@ -30,21 +32,18 @@ import ru.bclib.blocks.BaseAttachedBlock;
import ru.bclib.client.render.BCLRenderLayer;
import ru.bclib.interfaces.IRenderTyped;
import ru.bclib.util.BlocksHelper;
import ru.betterend.interfaces.PottablePlant;
import ru.betterend.registry.EndFeatures;
import java.util.EnumMap;
import java.util.List;
import java.util.Random;
public class SmallJellyshroomBlock extends BaseAttachedBlock implements IRenderTyped, BonemealableBlock {
public class SmallJellyshroomBlock extends BaseAttachedBlock implements IRenderTyped, BonemealableBlock, PottablePlant {
private static final EnumMap<Direction, VoxelShape> BOUNDING_SHAPES = Maps.newEnumMap(Direction.class);
public SmallJellyshroomBlock() {
super(FabricBlockSettings.of(Material.PLANT)
.breakByTool(FabricToolTags.SHEARS)
.breakByHand(true)
.sound(SoundType.NETHER_WART)
.noCollission());
super(FabricBlockSettings.of(Material.PLANT).breakByTool(FabricToolTags.SHEARS).breakByHand(true).sound(SoundType.NETHER_WART).noCollission());
}
@Override
@ -101,4 +100,15 @@ public class SmallJellyshroomBlock extends BaseAttachedBlock implements IRenderT
BlocksHelper.setWithUpdate(world, pos, Blocks.AIR);
EndFeatures.JELLYSHROOM.getFeature().place(new FeaturePlaceContext<>(world, null, random, pos, null));
}
@Override
public boolean canPlantOn(Block block) {
return true;
}
@Override
@Environment(EnvType.CLIENT)
public String getPottedState() {
return "facing=up";
}
}

View file

@ -8,12 +8,6 @@ import ru.betterend.blocks.basis.LitPillarBlock;
public class SmaragdantCrystalBlock extends LitPillarBlock {
public SmaragdantCrystalBlock() {
super(FabricBlockSettings.of(Material.GLASS)
.breakByTool(FabricToolTags.PICKAXES)
.luminance(15)
.hardness(1F)
.resistance(1F)
.noOcclusion()
.sound(SoundType.AMETHYST));
super(FabricBlockSettings.of(Material.GLASS).breakByTool(FabricToolTags.PICKAXES).luminance(15).hardness(1F).resistance(1F).noOcclusion().sound(SoundType.AMETHYST));
}
}

View file

@ -37,13 +37,7 @@ public class SmaragdantCrystalShardBlock extends BaseAttachedBlock implements IR
public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED;
public SmaragdantCrystalShardBlock() {
super(FabricBlockSettings.of(Material.STONE)
.materialColor(MaterialColor.COLOR_GREEN)
.breakByTool(FabricToolTags.PICKAXES)
.luminance(15)
.sound(SoundType.AMETHYST_CLUSTER)
.requiresCorrectToolForDrops()
.noCollission());
super(FabricBlockSettings.of(Material.STONE).materialColor(MaterialColor.COLOR_GREEN).breakByTool(FabricToolTags.PICKAXES).luminance(15).sound(SoundType.AMETHYST_CLUSTER).requiresCorrectToolForDrops().noCollission());
}
@Override

View file

@ -47,12 +47,7 @@ public class SulphurCrystalBlock extends BaseAttachedBlock implements IRenderTyp
public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED;
public SulphurCrystalBlock() {
super(FabricBlockSettings.of(Material.STONE)
.materialColor(MaterialColor.COLOR_YELLOW)
.breakByTool(FabricToolTags.PICKAXES)
.sound(SoundType.GLASS)
.requiresCorrectToolForDrops()
.noCollission());
super(FabricBlockSettings.of(Material.STONE).materialColor(MaterialColor.COLOR_YELLOW).breakByTool(FabricToolTags.PICKAXES).sound(SoundType.GLASS).requiresCorrectToolForDrops().noCollission());
}
@Override

View file

@ -73,11 +73,6 @@ public class TenaneaFlowersBlock extends BaseVineBlock implements IColorProvider
}
static {
COLORS = new Vec3i[]{
new Vec3i(250, 111, 222),
new Vec3i(167, 89, 255),
new Vec3i(120, 207, 239),
new Vec3i(255, 87, 182)
};
COLORS = new Vec3i[]{new Vec3i(250, 111, 222), new Vec3i(167, 89, 255), new Vec3i(120, 207, 239), new Vec3i(255, 87, 182)};
}
}

View file

@ -2,13 +2,15 @@ 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 TenaneaSaplingBlock extends FeatureSaplingBlock {
public class TenaneaSaplingBlock extends PottableFeatureSapling {
public TenaneaSaplingBlock() {
super();
}
@ -22,4 +24,9 @@ public class TenaneaSaplingBlock extends FeatureSaplingBlock {
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
return world.getBlockState(pos.below()).is(EndBlocks.PINK_MOSS);
}
@Override
public boolean canPlantOn(Block block) {
return block == EndBlocks.PINK_MOSS;
}
}

View file

@ -27,9 +27,7 @@ public class UmbrellaTreeClusterBlock extends BaseBlock {
public static final BooleanProperty NATURAL = BlockProperties.NATURAL;
public UmbrellaTreeClusterBlock() {
super(FabricBlockSettings.copyOf(Blocks.NETHER_WART_BLOCK)
.materialColor(MaterialColor.COLOR_PURPLE)
.luminance(15));
super(FabricBlockSettings.copyOf(Blocks.NETHER_WART_BLOCK).materialColor(MaterialColor.COLOR_PURPLE).luminance(15));
registerDefaultState(stateDefinition.any().setValue(NATURAL, false));
}

View file

@ -19,9 +19,7 @@ public class UmbrellaTreeClusterEmptyBlock extends BaseBlock {
public static final BooleanProperty NATURAL = EndBlockProperties.NATURAL;
public UmbrellaTreeClusterEmptyBlock() {
super(FabricBlockSettings.copyOf(Blocks.NETHER_WART_BLOCK)
.materialColor(MaterialColor.COLOR_PURPLE)
.randomTicks());
super(FabricBlockSettings.copyOf(Blocks.NETHER_WART_BLOCK).materialColor(MaterialColor.COLOR_PURPLE).randomTicks());
registerDefaultState(stateDefinition.any().setValue(NATURAL, false));
}

View file

@ -2,14 +2,16 @@ 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.bclib.client.render.BCLRenderLayer;
import ru.betterend.blocks.basis.PottableFeatureSapling;
import ru.betterend.registry.EndBlocks;
import ru.betterend.registry.EndFeatures;
public class UmbrellaTreeSaplingBlock extends FeatureSaplingBlock {
public class UmbrellaTreeSaplingBlock extends PottableFeatureSapling {
public UmbrellaTreeSaplingBlock() {
super();
}
@ -28,4 +30,9 @@ public class UmbrellaTreeSaplingBlock extends FeatureSaplingBlock {
public BCLRenderLayer getRenderLayer() {
return BCLRenderLayer.TRANSLUCENT;
}
@Override
public boolean canPlantOn(Block block) {
return block == EndBlocks.JUNGLE_MOSS;
}
}

View file

@ -130,8 +130,7 @@ public class EndLanternBlock extends BaseBlockNotFull implements SimpleWaterlogg
@Environment(EnvType.CLIENT)
public UnbakedModel getModelVariant(ResourceLocation stateId, BlockState blockState, Map<ResourceLocation, UnbakedModel> modelCache) {
String floor = blockState.getValue(IS_FLOOR) ? "_floor" : "";
ResourceLocation modelId = new ResourceLocation(stateId.getNamespace(),
"block/" + stateId.getPath() + floor);
ResourceLocation modelId = new ResourceLocation(stateId.getNamespace(), "block/" + stateId.getPath() + floor);
registerBlockModel(stateId, modelId, blockState, modelCache);
return ModelsHelper.createBlockSimple(modelId);
}

View file

@ -1,11 +1,12 @@
package ru.betterend.blocks.basis;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import ru.bclib.api.TagAPI;
import ru.bclib.blocks.BasePlantBlock;
import ru.betterend.interfaces.PottablePlant;
public class EndPlantBlock extends BasePlantBlock {
public class EndPlantBlock extends BasePlantBlock implements PottablePlant {
public EndPlantBlock() {
this(false);
}
@ -30,4 +31,14 @@ public class EndPlantBlock extends BasePlantBlock {
protected boolean isTerrain(BlockState state) {
return state.is(TagAPI.END_GROUND);
}
@Override
public boolean canPlantOn(Block block) {
return isTerrain(block.defaultBlockState());
}
@Override
public boolean addToPot() {
return getStateDefinition().getProperties().isEmpty();
}
}

Some files were not shown because too many files have changed in this diff Show more