Compare commits
358 commits
Author | SHA1 | Date | |
---|---|---|---|
|
5d765d3877 | ||
|
dc271f08a5 | ||
|
6b27fba242 | ||
|
a345be1b3e | ||
|
417350db2d | ||
|
5bd0fc4f4c | ||
|
2c5f4287d3 | ||
|
57641fe02c | ||
|
789f1ccabd | ||
|
d0f2e6cd59 | ||
|
25f4dc0ed5 | ||
|
023708f72f | ||
|
2f701885f4 | ||
|
30046b25c8 | ||
|
1ae6d0d63e | ||
|
87c37f1cef | ||
|
ce11929d5a | ||
|
a307cb7dc5 | ||
|
f668a3b0ef | ||
|
b6e87d9103 | ||
|
bf493330ec | ||
|
7ab1d6917f | ||
|
a5e203acb3 | ||
|
a25a02592a | ||
|
c81e072b20 | ||
|
a4ec4522cf | ||
|
35f9cd8769 | ||
|
54258d38e3 | ||
|
affd63646a | ||
|
d0b23a9c9f | ||
|
6bd2a08726 | ||
|
2c819071a5 | ||
|
800bf72faf | ||
|
5f516ac2a0 | ||
|
064c8509e2 | ||
|
5585d8952c | ||
|
2f490fa75c | ||
|
1c43af9025 | ||
|
1300e1a09b | ||
|
6840225f1d | ||
|
c2ab690d37 | ||
|
58310d020c | ||
|
91e7bab993 | ||
|
4256e954ca | ||
|
ce88ec23f7 | ||
|
c515c3c367 | ||
|
fb19abdc45 | ||
|
934efc9aed | ||
|
5460ccba2b | ||
|
e4d534d1c6 | ||
|
dd1ef90f7e | ||
|
b624693b88 | ||
|
e019dc2031 | ||
|
ae755a6d11 | ||
|
784834aef8 | ||
|
19b48a87a4 | ||
|
1593e7dc41 | ||
|
71ecd6d17e | ||
|
65dd58d86f | ||
|
ce727b2633 | ||
|
70e7071021 | ||
|
d11dc97fd9 | ||
|
f731351a6c | ||
|
a27f3e35e2 | ||
|
ef02d0ee5f | ||
|
33d8fe86fd | ||
|
520fca63c3 | ||
|
514749d121 | ||
|
ef025d05dd | ||
|
2a0f58a729 | ||
|
633c5ad553 | ||
|
5c12813b3e | ||
|
338aee76e9 | ||
|
e8a40246b4 | ||
|
1c79354e13 | ||
|
2c5c030f29 | ||
|
df6845642f | ||
|
5affe912be | ||
|
b5b8963da4 | ||
|
396eb27175 | ||
|
4ff84c5e86 | ||
|
a966671e45 | ||
|
fb422d07be | ||
|
6b63be32b0 | ||
|
6c89c76c26 | ||
|
108d2bd710 | ||
|
78cc82932f | ||
|
dca9f84ccf | ||
|
6097311ca6 | ||
|
6a8ad29a70 | ||
|
016a3048bd | ||
|
96c65b7bb2 | ||
|
64de980cab | ||
|
6a6f29bf99 | ||
|
823108aa62 | ||
|
2367b5d5be | ||
|
c2ca3f396b | ||
|
6671b43cac | ||
|
f16f116b7f | ||
|
c88745c7fe | ||
|
f6657f91fb | ||
|
a4f26e843d | ||
|
2f9c131ca9 | ||
|
191c907e24 | ||
|
1ce74f64bf | ||
|
a06427c060 | ||
|
9fb0bc9d67 | ||
|
1448336709 | ||
|
5386d2e0f2 | ||
|
eca922058f | ||
|
e276f5af0b | ||
|
3413fb5c4e | ||
|
0392fd4059 | ||
|
c90540c33e | ||
|
ae615748b3 | ||
|
7bc0f9d63d | ||
|
0235a524bb | ||
|
acec6a2213 | ||
|
a55cbe67de | ||
|
1cf6cb3880 | ||
|
d8bad90731 | ||
|
ae0efb1f52 | ||
|
9d9d640d7d | ||
|
4fddd1d258 | ||
|
3c19dad176 | ||
|
360f57feed | ||
|
2f047e7132 | ||
|
a76646b029 | ||
|
8aac1b5b8d | ||
|
82c5485b58 | ||
|
1ca8ffca7c | ||
|
2afb62d6c8 | ||
|
5bed4993c3 | ||
|
eccaa7625e | ||
|
0f04d151c7 | ||
|
379789d74f | ||
|
76ddb1fab2 | ||
|
c4230de3c0 | ||
|
a9d1082ed2 | ||
|
1d333071dc | ||
|
337b608ee8 | ||
|
0aa814c4f2 | ||
|
653a76d86b | ||
|
f11e5d3e88 | ||
|
0f8b7d683c | ||
|
3662820fa9 | ||
|
8973944b2d | ||
|
5fd0595a78 | ||
|
ce7a8fc70a | ||
|
3b570cd80e | ||
|
9c1c1edb12 | ||
|
8a1490f00e | ||
|
0cb8a94be3 | ||
|
74188554f5 | ||
|
039a599f31 | ||
|
15c78e8f1a | ||
|
ee692399be | ||
|
2ab04e9ac0 | ||
|
effe958017 | ||
|
da8813ba06 | ||
|
1d81c16451 | ||
|
14ddd13ed2 | ||
|
6ed8e3f68d | ||
|
6f867a0455 | ||
|
2e61a58e26 | ||
|
83b6c84f7d | ||
|
c0ab96453a | ||
|
b713e2f4d6 | ||
|
6148bdc451 | ||
|
3c3a9c299f | ||
|
61c7604641 | ||
|
61547a1518 | ||
|
64038e94fa | ||
|
19aee44357 | ||
|
f0e9303869 | ||
|
121332920f | ||
|
79aa3397f6 | ||
|
8bea55a8d2 | ||
|
708c4d6fa2 | ||
|
3e6bcd2bc6 | ||
|
57191936dc | ||
|
bfbaebe7b2 | ||
|
73b617e8b0 | ||
|
9c8de4a70a | ||
|
bc887e8cd7 | ||
|
d0661b94f1 | ||
|
a8fcf0fce7 | ||
|
b6e4608ef2 | ||
|
71cdc55a60 | ||
|
16b652cc76 | ||
|
919ed868da | ||
|
533dd7c92c | ||
|
757ed82817 | ||
|
aee9a88003 | ||
|
b6cf041fc4 | ||
|
4b4d4bd5ae | ||
|
da8237c359 | ||
|
a151132478 | ||
|
e5fde106fc | ||
|
6c24a2022b | ||
|
e32c6c76cb | ||
|
80590c1a7e | ||
|
a390486d5b | ||
|
92a392cffe | ||
|
253e192f1b | ||
|
a3d2b2458a | ||
|
b2bb33d644 | ||
|
b2431153dc | ||
|
1a52251af0 | ||
|
4793a072c3 | ||
|
663163a816 | ||
|
5e3848326b | ||
|
957c785c7d | ||
|
55f7a858a6 | ||
|
1342326e70 | ||
|
193fc41fb7 | ||
|
a07f271866 | ||
|
fbdb4559c1 | ||
|
8cce3303eb | ||
|
4684b80fc9 | ||
|
b49dfb45b0 | ||
|
f072f22605 | ||
|
4b047f771a | ||
|
c61b90bd2a | ||
|
f6d4684427 | ||
|
c6a6ccfa32 | ||
|
868e983282 | ||
|
7ba38c4b27 | ||
|
01238800ed | ||
|
5341daf326 | ||
|
eeb05a7797 | ||
|
797db9d2d4 | ||
|
e41fd592c7 | ||
|
13e5e9e088 | ||
|
287e25bbcf | ||
|
4040597a6d | ||
|
71148f4af5 | ||
|
2c8862a37b | ||
|
607d46f2f4 | ||
|
cc7b992f11 | ||
|
c473068e2d | ||
|
461333650a | ||
|
ba7ea67f0c | ||
|
60f07ab437 | ||
|
ccfc3adce0 | ||
|
a2aacd79b7 | ||
|
b5f3a4f511 | ||
|
2ea71cf8d6 | ||
|
92f6f47058 | ||
|
5fe4439096 | ||
|
9bd38a9629 | ||
|
910e2304ae | ||
|
b05f2fcf57 | ||
|
df64b5e3ce | ||
|
9ad0c3c417 | ||
|
4a8108f8e1 | ||
|
ea9b3c72a4 | ||
|
a8ace0005b | ||
|
2f88ac5358 | ||
|
7e7dad084e | ||
|
4e1dcac17e | ||
|
cca7d9d3b2 | ||
|
86a37e5770 | ||
|
3086f6181b | ||
|
fc3b6ea5b2 | ||
|
ef3b286103 | ||
|
dbfaa09b5b | ||
|
e9e39f7152 | ||
|
93ca944472 | ||
|
c623da26ed | ||
|
80918ea7e4 | ||
|
44962e18b6 | ||
|
9d604b2d25 | ||
|
2d93ac3853 | ||
|
43e127bf75 | ||
|
2591cb1555 | ||
|
5a7a00ddd5 | ||
|
c98186fefa | ||
|
62ba56eee6 | ||
|
e2030c2598 | ||
|
c52f80242a | ||
|
9b92ad3967 | ||
|
18bc3a9664 | ||
|
885a72486d | ||
|
9db7f4d940 | ||
|
18d78acd07 | ||
|
8c1f9567a5 | ||
|
e28dcf1ee4 | ||
|
3f225c59a1 | ||
|
2b71f7782a | ||
|
3386f1c6b0 | ||
|
9a28623230 | ||
|
2ba7ed4ec8 | ||
|
ab6d015c98 | ||
|
b6c4e73481 | ||
|
c5fb156042 | ||
|
e7c85c8148 | ||
|
13e169c458 | ||
|
ea62902ee8 | ||
|
2aa6243f40 | ||
|
770f12ee20 | ||
|
3d6f0adc56 | ||
|
fb645f8f58 | ||
|
90f865d1af | ||
|
daefcc4dbf | ||
|
42b436e408 | ||
|
e25ab5698d | ||
|
e104752c6d | ||
|
072e8b47db | ||
|
49386dc7e1 | ||
|
aa1b0d87bb | ||
|
63b524af62 | ||
|
2d130fac96 | ||
|
539a574cca | ||
|
5089a44a39 | ||
|
3fbacddf3c | ||
|
78bf62bdca | ||
|
aca43764ad | ||
|
371d491e5f | ||
|
10a9a81725 | ||
|
fdd61262c5 | ||
|
20859ae133 | ||
|
05f59b4856 | ||
|
a82f30b95d | ||
|
4bf09362be | ||
|
f6cbb15917 | ||
|
8555931932 | ||
|
32f9bf288e | ||
|
036d594012 | ||
|
8531be7b94 | ||
|
e03c8433db | ||
|
df8eb8f040 | ||
|
fb29dd75f7 | ||
|
b0ecc1152c | ||
|
813880aa19 | ||
|
fd062bf9a9 | ||
|
e5bf933758 | ||
|
d6696feb16 | ||
|
6e9d8e8b49 | ||
|
d8383121e3 | ||
|
9372ecf28f | ||
|
e541763ada | ||
|
4f053c161a | ||
|
cfa765437c | ||
|
0ac3814cd5 | ||
|
08fc14439a | ||
|
09a19845a4 | ||
|
30204a2aee | ||
|
262b249654 | ||
|
37394eba11 | ||
|
4dce2d5d7e | ||
|
684f3073ca | ||
|
bed07d2ad7 | ||
|
ff3194fedf | ||
|
b0922d967f | ||
|
2461df6674 | ||
|
772e6b38e3 | ||
|
49814fea0f |
1780 changed files with 23295 additions and 13479 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
@ -27,5 +27,9 @@ bin/
|
|||
# fabric
|
||||
|
||||
run/
|
||||
run-client/
|
||||
output/
|
||||
*.log
|
||||
*.getBlock("log")
|
||||
Convert.class
|
||||
ModelPart.class
|
||||
libs/
|
||||
|
|
161
Convert.java
Normal file
161
Convert.java
Normal file
|
@ -0,0 +1,161 @@
|
|||
class ModelPart {
|
||||
static java.util.ArrayList<ModelPart> parts = new java.util.ArrayList<>(20);
|
||||
final String name;
|
||||
ModelPart parent = null;
|
||||
boolean mirror = false;
|
||||
|
||||
float x = 0, y = 0, z = 0, rx = 0, ry = 0, rz = 0;
|
||||
int u = 0, v = 0;
|
||||
float bx = 0, by = 0, bz = 0, ba = 0, bb = 0, bc = 0;
|
||||
float scale = 1;
|
||||
static int wd = 64;
|
||||
static int hg = 32;
|
||||
|
||||
|
||||
boolean hadBox = false;
|
||||
|
||||
ModelPart(Convert c, String name) {
|
||||
this(c, 0, 0, name);
|
||||
|
||||
}
|
||||
|
||||
ModelPart(Convert c, int u, int v, String name) {
|
||||
this.name = name;
|
||||
this.u = u;
|
||||
this.v = v;
|
||||
parts.add(this);
|
||||
}
|
||||
|
||||
ModelPart(int wd, int hg, int u, int v, String name) {
|
||||
this.name = name;
|
||||
this.u = u;
|
||||
this.v = v;
|
||||
ModelPart.wd = wd;
|
||||
ModelPart.hg = hg;
|
||||
parts.add(this);
|
||||
}
|
||||
|
||||
ModelPart setPos(float x, float y, float z) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
return this;
|
||||
}
|
||||
|
||||
ModelPart setRotationAngle(float x, float y, float z) {
|
||||
this.rx = x;
|
||||
this.ry = y;
|
||||
this.rz = z;
|
||||
return this;
|
||||
}
|
||||
|
||||
ModelPart addChild(ModelPart p) {
|
||||
p.parent = this;
|
||||
return this;
|
||||
}
|
||||
|
||||
ModelPart texOffs(int u, int v) {
|
||||
this.u = u;
|
||||
this.v = v;
|
||||
return this;
|
||||
}
|
||||
|
||||
ModelPart addBox(float x, float y, float z, float a, float b, float c) {
|
||||
return addBox(x, y, z, a, b, c, 1);
|
||||
}
|
||||
|
||||
ModelPart addBox(float x, float y, float z, float a, float b, float c, float _d) {
|
||||
bx = x;
|
||||
by = y;
|
||||
bz = z;
|
||||
ba = a;
|
||||
bb = b;
|
||||
bc = c;
|
||||
scale = _d;
|
||||
hadBox = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
ModelPart addBox(float x, float y, float z, float a, float b, float c, float _d, boolean mirror) {
|
||||
this.mirror = mirror;
|
||||
bx = x;
|
||||
by = y;
|
||||
bz = z;
|
||||
ba = a;
|
||||
bb = b;
|
||||
bc = c;
|
||||
hadBox = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
String s = "";
|
||||
String pName = parent == null ? "modelPartData" : parent.name;
|
||||
if (scale != 1) {
|
||||
s += "CubeDeformation deformation_" + name + " = new CubeDeformation(" + scale + "f);\n";
|
||||
}
|
||||
s += "PartDefinition " + name + " = ";
|
||||
s += pName + ".addOrReplaceChild(\"" + name + "\", CubeListBuilder.create()\n";
|
||||
if (this.mirror) s += ".mirror()\n";
|
||||
s += ".texOffs(" + u + ", " + v + ")";
|
||||
if (this.hadBox) {
|
||||
s += "\n";
|
||||
if (scale != 1)
|
||||
s += ".addBox(" + bx + "f, " + by + "f, " + bz + "f, " + ba + "f, " + bb + "f, " + bc + "f, deformation_" + name + "),\n";
|
||||
else s += ".addBox(" + bx + "f, " + by + "f, " + bz + "f, " + ba + "f, " + bb + "f, " + bc + "f),\n";
|
||||
}
|
||||
else {
|
||||
s += ",\n";
|
||||
}
|
||||
|
||||
if (x == 0 && y == 0 && z == 0 && rx == 0 && ry == 0 && rz == 0) {
|
||||
s += "PartPose.ZERO";
|
||||
}
|
||||
else if (rx == 0 && ry == 0 && rz == 0) {
|
||||
s += "PartPose.offset(" + x + "f, " + y + "f, " + z + "f)";
|
||||
}
|
||||
else {
|
||||
s += "PartPose.offsetAndRotation(" + x + "f, " + y + "f, " + z + "f, \n" + rx + "f, " + ry + "f, " + rz + "f)";
|
||||
}
|
||||
s += ");";
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
public static void print() {
|
||||
System.out.println("public static LayerDefinition getTexturedModelData() {");
|
||||
System.out.println(" MeshDefinition modelData = new MeshDefinition();");
|
||||
System.out.println(" PartDefinition modelPartData = modelData.getRoot();");
|
||||
for (ModelPart p : parts) {
|
||||
System.out.println(p);
|
||||
System.out.println();
|
||||
}
|
||||
System.out.println("return LayerDefinition.create(modelData, " + wd + ", " + hg + ");");
|
||||
System.out.println("}");
|
||||
|
||||
System.out.println();
|
||||
System.out.println();
|
||||
|
||||
for (ModelPart p : parts) {
|
||||
String pName = p.parent == null ? "modelPart" : p.parent.name;
|
||||
System.out.println(p.name + " = " + pName + ".getChild(\"" + p.name + "\");");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ModelPart.print();
|
||||
}
|
||||
void setRotationAngle(ModelPart p, float x, float y, float z){
|
||||
p.setRotationAngle(x, y, z);
|
||||
}
|
||||
public void c (){
|
||||
float scale = 1;
|
||||
ModelPart[] SHARDS = new ModelPart[4];
|
||||
SHARDS[0] = new ModelPart(16, 16, 2, 4, "SHARDS[0]").addBox(-5.0F, 1.0F, -3.0F, 2.0F, 8.0F, 2.0F);
|
||||
SHARDS[1] = new ModelPart(16, 16, 2, 4, "SHARDS[1]").addBox(3.0F, -1.0F, -1.0F, 2.0F, 8.0F, 2.0F);
|
||||
SHARDS[2] = new ModelPart(16, 16, 2, 4, "SHARDS[2]").addBox(-1.0F, 0.0F, -5.0F, 2.0F, 4.0F, 2.0F);
|
||||
SHARDS[3] = new ModelPart(16, 16, 2, 4, "SHARDS[3]").addBox(0.0F, 3.0F, 4.0F, 2.0F, 6.0F, 2.0F);
|
||||
ModelPart CORE = new ModelPart(16, 16, 0, 0, "CORE");
|
||||
CORE.addBox(-2.0F, -2.0F, -2.0F, 4.0F, 12.0F, 4.0F);
|
||||
}
|
||||
}
|
10
README.md
10
README.md
|
@ -1,17 +1,19 @@
|
|||
[](https://jitpack.io/#paulevsGitch/BetterEnd)
|
||||
|
||||
# Better End
|
||||
Better End Mod for Fabric, MC 1.16.4
|
||||
|
||||
Better End Mod for Fabric, MC 1.18
|
||||
|
||||
Importing:
|
||||
|
||||
* Clone repo
|
||||
* Edit gradle.properties if necessary
|
||||
* Run command line in folder: gradlew genSources eclipse (or Another-IDE-Name)
|
||||
* Run command line in folder: gradlew genSources idea (or eclipse)
|
||||
* Import project to IDE
|
||||
|
||||
Building:
|
||||
|
||||
* Clone repo
|
||||
* Run command line in folder: gradlew build
|
||||
* Mod .jar will be in ./build/libs
|
||||
|
||||
Mappings:
|
||||
* https://modmuss50.me/fabric.html?&version=1.16.4
|
||||
|
|
173
build.gradle
173
build.gradle
|
@ -1,114 +1,135 @@
|
|||
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.7-SNAPSHOT'
|
||||
id 'maven-publish'
|
||||
id 'idea'
|
||||
id 'eclipse'
|
||||
id 'fabric-loom' version "${loom_version}"
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = project.mod_version
|
||||
group = project.maven_group
|
||||
def local_bclib = findProject(':BCLib') != null
|
||||
|
||||
repositories {
|
||||
maven { url "https://maven.dblsaiko.net/" }
|
||||
maven { url "https://server.bbkr.space:8081/artifactory/libs-release/" }
|
||||
maven { url "https://maven.fabricmc.net/" }
|
||||
maven { url 'https://maven.blamejared.com' }
|
||||
maven { url "https://maven.shedaniel.me/" }
|
||||
maven { url 'https://jitpack.io' }
|
||||
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.terraformersmc.com/releases' }
|
||||
flatDir {
|
||||
dirs 'libs'
|
||||
}
|
||||
}
|
||||
|
||||
loom {
|
||||
accessWidenerPath = file("src/main/resources/betterend.accesswidener")
|
||||
}
|
||||
|
||||
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}"
|
||||
|
||||
useApi "vazkii.patchouli:Patchouli:1.16.4-${project.patchouli_version}"
|
||||
useApi "com.github.paulevsGitch:BCLib:${project.bclib_version}"
|
||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||
mappings loom.officialMojangMappings()
|
||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||
|
||||
useOptional "me.shedaniel:RoughlyEnoughItems:${project.rei_version}"
|
||||
useOptional "me.shedaniel:RoughlyEnoughItems-api:${project.rei_version}"
|
||||
//useOptional "grondag:canvas-mc116:${project.canvas_version}"
|
||||
// useApi "vazkii.patchouli:Patchouli:1.17-${project.patchouli_version}"
|
||||
println "Using local BCLib: ${local_bclib}"
|
||||
if (local_bclib){
|
||||
implementation( project(path:":BCLib", configuration: 'dev') )
|
||||
} else {
|
||||
modImplementation "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}"
|
||||
}
|
||||
|
||||
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"
|
||||
}
|
||||
}
|
||||
dependencies.modCompileOnly (dep) {
|
||||
exclude group: "net.fabricmc.fabric-api"
|
||||
exclude group: "net.fabricmc"
|
||||
if (!dep.contains("me.shedaniel")) {
|
||||
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"
|
||||
}
|
||||
}
|
||||
dependencies.modApi(dep) {
|
||||
exclude group: 'net.fabricmc.fabric-api'
|
||||
exclude group: 'net.fabricmc'
|
||||
exclude group: 'com.terraformersmc'
|
||||
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"
|
||||
}
|
||||
}
|
||||
|
||||
// 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()
|
||||
|
@ -117,24 +138,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
|
||||
|
@ -155,4 +176,4 @@ task release(dependsOn: [remapJar, sourcesJar, javadocJar]) {
|
|||
// // uncomment to publish to the local maven
|
||||
// // mavenLocal()
|
||||
// }
|
||||
//}
|
||||
//}
|
|
@ -1,21 +1,24 @@
|
|||
# Done to increase the memory available to gradle.
|
||||
org.gradle.jvmargs=-Xmx2G
|
||||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/use
|
||||
minecraft_version=1.16.5
|
||||
yarn_mappings=6
|
||||
loader_version=0.11.3
|
||||
|
||||
# Mod Properties
|
||||
mod_version = 0.9.8-pre
|
||||
maven_group = ru.betterend
|
||||
archives_base_name = better-end
|
||||
|
||||
# Dependencies
|
||||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
||||
patchouli_version = 50-FABRIC
|
||||
fabric_version = 0.32.9+1.16
|
||||
canvas_version = 1.0.+
|
||||
bclib_version = 0.1.38
|
||||
rei_version = 5.8.10
|
||||
# Done to increase the memory available to gradle.
|
||||
org.gradle.jvmargs=-Xmx2G
|
||||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/use
|
||||
minecraft_version=1.18.1
|
||||
fabric_version = 0.44.0+1.18
|
||||
loader_version=0.12.12
|
||||
|
||||
#Loom
|
||||
loom_version=0.10-SNAPSHOT
|
||||
|
||||
# Mod Properties
|
||||
mod_version=1.0.1
|
||||
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
|
||||
bclib_version = 1.2.5
|
||||
rei_version = 7.0.343
|
||||
canvas_version = 1.0.+
|
||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
269
gradlew
vendored
269
gradlew
vendored
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env sh
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
@ -17,78 +17,113 @@
|
|||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
APP_BASE_NAME=${0##*/}
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
@ -97,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the
|
|||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
|
@ -105,79 +140,95 @@ location of your Java installation."
|
|||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
|
22
gradlew.bat
vendored
22
gradlew.bat
vendored
|
@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
|
|||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
@ -54,7 +54,7 @@ goto fail
|
|||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
|
@ -64,28 +64,14 @@ echo location of your Java installation.
|
|||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
|
|
6
jitpack.yml
Normal file
6
jitpack.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
# From https://github.com/jitpack/jitpack.io/issues/4506#issuecomment-864562270
|
||||
before_install:
|
||||
- source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||
- sdk update
|
||||
- sdk install java 17.0.1-tem
|
||||
- sdk use java 17.0.1-tem
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"parent": "block/slab",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%_bricks",
|
||||
"side": "betterend:block/%name%_bricks",
|
||||
"top": "betterend:block/%name%_bricks"
|
||||
}
|
||||
"parent": "block/slab",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%_bricks",
|
||||
"side": "betterend:block/%name%_bricks",
|
||||
"top": "betterend:block/%name%_bricks"
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"parent": "block/inner_stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%_bricks",
|
||||
"side": "betterend:block/%name%_bricks",
|
||||
"top": "betterend:block/%name%_bricks"
|
||||
}
|
||||
"parent": "block/inner_stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%_bricks",
|
||||
"side": "betterend:block/%name%_bricks",
|
||||
"top": "betterend:block/%name%_bricks"
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"parent": "block/outer_stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%_bricks",
|
||||
"side": "betterend:block/%name%_bricks",
|
||||
"top": "betterend:block/%name%_bricks"
|
||||
}
|
||||
"parent": "block/outer_stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%_bricks",
|
||||
"side": "betterend:block/%name%_bricks",
|
||||
"top": "betterend:block/%name%_bricks"
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"parent": "block/stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%_bricks",
|
||||
"side": "betterend:block/%name%_bricks",
|
||||
"top": "betterend:block/%name%_bricks"
|
||||
}
|
||||
"parent": "block/stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%_bricks",
|
||||
"side": "betterend:block/%name%_bricks",
|
||||
"top": "betterend:block/%name%_bricks"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:block/wall_inventory",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%_bricks"
|
||||
}
|
||||
"parent": "minecraft:block/wall_inventory",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%_bricks"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:block/template_wall_post",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%_bricks"
|
||||
}
|
||||
"parent": "minecraft:block/template_wall_post",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%_bricks"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:block/template_wall_side",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%_bricks"
|
||||
}
|
||||
"parent": "minecraft:block/template_wall_side",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%_bricks"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:block/template_wall_side_tall",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%_bricks"
|
||||
}
|
||||
"parent": "minecraft:block/template_wall_side_tall",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%_bricks"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "betterend:block/%name%_bricks"
|
||||
}
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "betterend:block/%name%_bricks"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "block/button",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "block/button",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "block/button_inventory",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "block/button_inventory",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "block/button_pressed",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "block/button_pressed",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"parent": "block/slab",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%",
|
||||
"side": "betterend:block/%name%",
|
||||
"top": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "block/slab",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%",
|
||||
"side": "betterend:block/%name%",
|
||||
"top": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"parent": "block/inner_stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%",
|
||||
"side": "betterend:block/%name%",
|
||||
"top": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "block/inner_stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%",
|
||||
"side": "betterend:block/%name%",
|
||||
"top": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"parent": "block/outer_stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%",
|
||||
"side": "betterend:block/%name%",
|
||||
"top": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "block/outer_stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%",
|
||||
"side": "betterend:block/%name%",
|
||||
"top": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "block/pressure_plate_down",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "block/pressure_plate_down",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "block/pressure_plate_up",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "block/pressure_plate_up",
|
||||
"textures": {
|
||||
"texture": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "betterend:block/%name%_small_tiles"
|
||||
}
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "betterend:block/%name%_small_tiles"
|
||||
}
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"parent": "block/stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%",
|
||||
"side": "betterend:block/%name%",
|
||||
"top": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "block/stairs",
|
||||
"textures": {
|
||||
"bottom": "betterend:block/%name%",
|
||||
"side": "betterend:block/%name%",
|
||||
"top": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "betterend:block/%name%_tile"
|
||||
}
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "betterend:block/%name%_tile"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:block/wall_inventory",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "minecraft:block/wall_inventory",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:block/template_wall_post",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "minecraft:block/template_wall_post",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:block/template_wall_side",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "minecraft:block/template_wall_side",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:block/template_wall_side_tall",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%"
|
||||
}
|
||||
"parent": "minecraft:block/template_wall_side_tall",
|
||||
"textures": {
|
||||
"wall": "betterend:block/%name%"
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "betterend:block/%name%"
|
||||
}
|
||||
}
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "betterend:block/%name%"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,15 +1,15 @@
|
|||
{
|
||||
"variants": {
|
||||
"type=bottom": {
|
||||
"model": "betterend:block/%name%_brick_half_slab"
|
||||
},
|
||||
"type=double": {
|
||||
"model": "betterend:block/%name%_bricks"
|
||||
},
|
||||
"type=top": {
|
||||
"model": "betterend:block/%name%_brick_half_slab",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
}
|
||||
}
|
||||
"variants": {
|
||||
"type=bottom": {
|
||||
"model": "betterend:block/%name%_brick_half_slab"
|
||||
},
|
||||
"type=double": {
|
||||
"model": "betterend:block/%name%_bricks"
|
||||
},
|
||||
"type=top": {
|
||||
"model": "betterend:block/%name%_brick_half_slab",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,209 +1,209 @@
|
|||
{
|
||||
"variants": {
|
||||
"facing=east,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=east,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs"
|
||||
},
|
||||
"facing=east,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=east,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs"
|
||||
},
|
||||
"facing=east,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs"
|
||||
},
|
||||
"facing=east,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=east,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=east,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=east,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=east,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=south,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs"
|
||||
},
|
||||
"facing=south,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs"
|
||||
},
|
||||
"facing=south,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=south,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=south,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=west,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=west,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
}
|
||||
}
|
||||
"variants": {
|
||||
"facing=east,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=east,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs"
|
||||
},
|
||||
"facing=east,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=east,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs"
|
||||
},
|
||||
"facing=east,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs"
|
||||
},
|
||||
"facing=east,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=east,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=east,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=east,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=east,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=south,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs"
|
||||
},
|
||||
"facing=south,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs"
|
||||
},
|
||||
"facing=south,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=south,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=south,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_brick_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=west,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_brick_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=west,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_brick_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,90 +1,90 @@
|
|||
{
|
||||
"multipart": [
|
||||
{
|
||||
"when": {
|
||||
"up": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_post"
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side",
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"east": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side",
|
||||
"y": 90,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side",
|
||||
"y": 180,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side",
|
||||
"y": 270,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side_tall",
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"east": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side_tall",
|
||||
"y": 90,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side_tall",
|
||||
"y": 180,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side_tall",
|
||||
"y": 270,
|
||||
"uvlock": true
|
||||
}
|
||||
}
|
||||
]
|
||||
"multipart": [
|
||||
{
|
||||
"when": {
|
||||
"up": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_post"
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side",
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"east": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side",
|
||||
"y": 90,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side",
|
||||
"y": 180,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side",
|
||||
"y": 270,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side_tall",
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"east": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side_tall",
|
||||
"y": 90,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side_tall",
|
||||
"y": 180,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_brick_wall_side_tall",
|
||||
"y": 270,
|
||||
"uvlock": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "betterend:block/%name%_bricks"
|
||||
}
|
||||
}
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "betterend:block/%name%_bricks"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,118 +1,118 @@
|
|||
{
|
||||
"variants": {
|
||||
"face=ceiling,facing=east,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"face=ceiling,facing=east,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"face=ceiling,facing=north,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"face=ceiling,facing=north,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"face=ceiling,facing=south,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"x": 180
|
||||
},
|
||||
"face=ceiling,facing=south,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"x": 180
|
||||
},
|
||||
"face=ceiling,facing=west,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"face=ceiling,facing=west,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"face=floor,facing=east,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"y": 90
|
||||
},
|
||||
"face=floor,facing=east,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"y": 90
|
||||
},
|
||||
"face=floor,facing=north,powered=false": {
|
||||
"model": "betterend:block/%name%_button"
|
||||
},
|
||||
"face=floor,facing=north,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed"
|
||||
},
|
||||
"face=floor,facing=south,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"y": 180
|
||||
},
|
||||
"face=floor,facing=south,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"y": 180
|
||||
},
|
||||
"face=floor,facing=west,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"y": 270
|
||||
},
|
||||
"face=floor,facing=west,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"y": 270
|
||||
},
|
||||
"face=wall,facing=east,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 90
|
||||
},
|
||||
"face=wall,facing=east,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 90
|
||||
},
|
||||
"face=wall,facing=north,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"uvlock": true,
|
||||
"x": 90
|
||||
},
|
||||
"face=wall,facing=north,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"uvlock": true,
|
||||
"x": 90
|
||||
},
|
||||
"face=wall,facing=south,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 180
|
||||
},
|
||||
"face=wall,facing=south,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 180
|
||||
},
|
||||
"face=wall,facing=west,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 270
|
||||
},
|
||||
"face=wall,facing=west,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
"variants": {
|
||||
"face=ceiling,facing=east,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"face=ceiling,facing=east,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"face=ceiling,facing=north,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"face=ceiling,facing=north,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"face=ceiling,facing=south,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"x": 180
|
||||
},
|
||||
"face=ceiling,facing=south,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"x": 180
|
||||
},
|
||||
"face=ceiling,facing=west,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"face=ceiling,facing=west,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"face=floor,facing=east,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"y": 90
|
||||
},
|
||||
"face=floor,facing=east,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"y": 90
|
||||
},
|
||||
"face=floor,facing=north,powered=false": {
|
||||
"model": "betterend:block/%name%_button"
|
||||
},
|
||||
"face=floor,facing=north,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed"
|
||||
},
|
||||
"face=floor,facing=south,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"y": 180
|
||||
},
|
||||
"face=floor,facing=south,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"y": 180
|
||||
},
|
||||
"face=floor,facing=west,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"y": 270
|
||||
},
|
||||
"face=floor,facing=west,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"y": 270
|
||||
},
|
||||
"face=wall,facing=east,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 90
|
||||
},
|
||||
"face=wall,facing=east,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 90
|
||||
},
|
||||
"face=wall,facing=north,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"uvlock": true,
|
||||
"x": 90
|
||||
},
|
||||
"face=wall,facing=north,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"uvlock": true,
|
||||
"x": 90
|
||||
},
|
||||
"face=wall,facing=south,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 180
|
||||
},
|
||||
"face=wall,facing=south,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 180
|
||||
},
|
||||
"face=wall,facing=west,powered=false": {
|
||||
"model": "betterend:block/%name%_button",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 270
|
||||
},
|
||||
"face=wall,facing=west,powered=true": {
|
||||
"model": "betterend:block/%name%_button_pressed",
|
||||
"uvlock": true,
|
||||
"x": 90,
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,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
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
"variants": {
|
||||
"powered=false": {
|
||||
"model": "betterend:block/%name%_pressure_plate_up"
|
||||
},
|
||||
"powered=true": {
|
||||
"model": "betterend:block/%name%_pressure_plate_down"
|
||||
}
|
||||
}
|
||||
"variants": {
|
||||
"powered=false": {
|
||||
"model": "betterend:block/%name%_pressure_plate_up"
|
||||
},
|
||||
"powered=true": {
|
||||
"model": "betterend:block/%name%_pressure_plate_down"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,15 +1,15 @@
|
|||
{
|
||||
"variants": {
|
||||
"type=bottom": {
|
||||
"model": "betterend:block/%name%_half_slab"
|
||||
},
|
||||
"type=double": {
|
||||
"model": "betterend:block/%name%"
|
||||
},
|
||||
"type=top": {
|
||||
"model": "betterend:block/%name%_half_slab",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
}
|
||||
}
|
||||
"variants": {
|
||||
"type=bottom": {
|
||||
"model": "betterend:block/%name%_half_slab"
|
||||
},
|
||||
"type=double": {
|
||||
"model": "betterend:block/%name%"
|
||||
},
|
||||
"type=top": {
|
||||
"model": "betterend:block/%name%_half_slab",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "betterend:block/%name%_small_tiles"
|
||||
}
|
||||
}
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "betterend:block/%name%_small_tiles"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,209 +1,209 @@
|
|||
{
|
||||
"variants": {
|
||||
"facing=east,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=east,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs"
|
||||
},
|
||||
"facing=east,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=east,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs"
|
||||
},
|
||||
"facing=east,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs"
|
||||
},
|
||||
"facing=east,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=east,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=east,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=east,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=east,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=south,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs"
|
||||
},
|
||||
"facing=south,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs"
|
||||
},
|
||||
"facing=south,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=south,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=south,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=west,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=west,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
}
|
||||
}
|
||||
"variants": {
|
||||
"facing=east,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=east,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs"
|
||||
},
|
||||
"facing=east,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=east,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs"
|
||||
},
|
||||
"facing=east,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs"
|
||||
},
|
||||
"facing=east,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=east,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=east,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=east,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=east,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=north,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=north,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180
|
||||
},
|
||||
"facing=north,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=south,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs"
|
||||
},
|
||||
"facing=south,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs"
|
||||
},
|
||||
"facing=south,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=south,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=south,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=south,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=bottom,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 90
|
||||
},
|
||||
"facing=west,half=bottom,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=bottom,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=inner_left": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=inner_right": {
|
||||
"model": "betterend:block/%name%_inner_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=west,half=top,shape=outer_left": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
},
|
||||
"facing=west,half=top,shape=outer_right": {
|
||||
"model": "betterend:block/%name%_outer_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 270
|
||||
},
|
||||
"facing=west,half=top,shape=straight": {
|
||||
"model": "betterend:block/%name%_stairs",
|
||||
"uvlock": true,
|
||||
"x": 180,
|
||||
"y": 180
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "betterend:block/%name%_tile"
|
||||
}
|
||||
}
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "betterend:block/%name%_tile"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,90 +1,90 @@
|
|||
{
|
||||
"multipart": [
|
||||
{
|
||||
"when": {
|
||||
"up": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_post"
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side",
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"east": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side",
|
||||
"y": 90,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side",
|
||||
"y": 180,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side",
|
||||
"y": 270,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side_tall",
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"east": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side_tall",
|
||||
"y": 90,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side_tall",
|
||||
"y": 180,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side_tall",
|
||||
"y": 270,
|
||||
"uvlock": true
|
||||
}
|
||||
}
|
||||
]
|
||||
"multipart": [
|
||||
{
|
||||
"when": {
|
||||
"up": "true"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_post"
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side",
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"east": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side",
|
||||
"y": 90,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side",
|
||||
"y": 180,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "low"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side",
|
||||
"y": 270,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"north": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side_tall",
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"east": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side_tall",
|
||||
"y": 90,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"south": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side_tall",
|
||||
"y": 180,
|
||||
"uvlock": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"when": {
|
||||
"west": "tall"
|
||||
},
|
||||
"apply": {
|
||||
"model": "betterend:block/%name%_wall_side_tall",
|
||||
"y": 270,
|
||||
"uvlock": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%"
|
||||
"parent": "betterend:block/%name%"
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_brick_half_slab"
|
||||
"parent": "betterend:block/%name%_brick_half_slab"
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_brick_stairs"
|
||||
"parent": "betterend:block/%name%_brick_stairs"
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_brick_wall_inventory"
|
||||
"parent": "betterend:block/%name%_brick_wall_inventory"
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_bricks"
|
||||
"parent": "betterend:block/%name%_bricks"
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_button_inventory"
|
||||
"parent": "betterend:block/%name%_button_inventory"
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_pillar"
|
||||
"parent": "betterend:block/%name%_pillar"
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_pressure_plate_up"
|
||||
"parent": "betterend:block/%name%_pressure_plate_up"
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_half_slab"
|
||||
"parent": "betterend:block/%name%_half_slab"
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_small_tiles"
|
||||
"parent": "betterend:block/%name%_small_tiles"
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_stairs"
|
||||
"parent": "betterend:block/%name%_stairs"
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_tile"
|
||||
"parent": "betterend:block/%name%_tile"
|
||||
}
|
|
@ -1,3 +1,3 @@
|
|||
{
|
||||
"parent": "betterend:block/%name%_wall_inventory"
|
||||
"parent": "betterend:block/%name%_wall_inventory"
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
pluginManagement {
|
||||
repositories {
|
||||
jcenter()
|
||||
maven {
|
||||
name = 'Fabric'
|
||||
url = 'https://maven.fabricmc.net/'
|
||||
|
@ -7,3 +8,39 @@ pluginManagement {
|
|||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
// #### Custom Settings ####
|
||||
|
||||
//Change the next line to disable local BCLib loading
|
||||
def allowLocalLibUse = true
|
||||
|
||||
//When true, the local BCLib is also used in commandline builds
|
||||
def allowLocalLibInConsoleMode = true
|
||||
|
||||
//The path were to look for the local BCLib
|
||||
def BCLibPath = '../BCLib'
|
||||
|
||||
|
||||
// #### Logic ####
|
||||
def isIDE = properties.containsKey('android.injected.invoked.from.ide')
|
||||
|| (System.getenv("XPC_SERVICE_NAME") ?: "").contains("intellij")
|
||||
|| (System.getenv("XPC_SERVICE_NAME") ?: "").contains(".idea")
|
||||
|| System.getenv("IDEA_INITIAL_DIRECTORY") != null
|
||||
|
||||
println "IntelliJ: ${isIDE}"
|
||||
|
||||
def BCLibFolder = new File( BCLibPath )
|
||||
if( allowLocalLibUse && (isIDE || allowLocalLibInConsoleMode) && BCLibFolder.exists() ) {
|
||||
println "Using local BCLib from '${BCLibFolder}' in IntelliJ"
|
||||
println "If you do not want to load the local version of BClib"
|
||||
println "either rename the Folder containing BCLib to something"
|
||||
println "else, or set 'allowLocalLibUse' in settings.gradle"
|
||||
println "to false."
|
||||
println ""
|
||||
println "If you receive version-errors when launching minecraft"
|
||||
println "in IntelliJ, make sure you have set up gradle instead"
|
||||
println "of IntelliJ to compile and run."
|
||||
|
||||
include ':BCLib'
|
||||
project(":BCLib").projectDir = BCLibFolder
|
||||
project(':BCLib').buildFileName = './bclib-composit.gradle'
|
||||
}
|
||||
|
|
|
@ -3,11 +3,12 @@ package ru.betterend;
|
|||
import net.fabricmc.api.ModInitializer;
|
||||
import net.fabricmc.loader.api.FabricLoader;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.level.biome.Biomes;
|
||||
import ru.bclib.api.WorldDataAPI;
|
||||
import ru.bclib.api.biomes.BiomeAPI;
|
||||
import ru.bclib.util.Logger;
|
||||
import ru.betterend.api.BetterEndPlugin;
|
||||
import ru.betterend.config.Configs;
|
||||
import ru.betterend.effects.EndEnchantments;
|
||||
import ru.betterend.effects.EndPotions;
|
||||
import ru.betterend.integration.Integrations;
|
||||
import ru.betterend.recipe.AlloyingRecipes;
|
||||
|
@ -18,6 +19,7 @@ import ru.betterend.recipe.InfusionRecipes;
|
|||
import ru.betterend.recipe.SmithingRecipes;
|
||||
import ru.betterend.registry.EndBiomes;
|
||||
import ru.betterend.registry.EndBlockEntities;
|
||||
import ru.betterend.registry.EndEnchantments;
|
||||
import ru.betterend.registry.EndEntities;
|
||||
import ru.betterend.registry.EndFeatures;
|
||||
import ru.betterend.registry.EndPortals;
|
||||
|
@ -26,14 +28,14 @@ import ru.betterend.registry.EndStructures;
|
|||
import ru.betterend.registry.EndTags;
|
||||
import ru.betterend.util.BonemealPlants;
|
||||
import ru.betterend.util.LootTableUtil;
|
||||
import ru.betterend.world.generator.BetterEndBiomeSource;
|
||||
import ru.betterend.world.generator.GeneratorOptions;
|
||||
import ru.betterend.world.surface.SurfaceBuilders;
|
||||
import ru.betterend.world.generator.TerrainGenerator;
|
||||
|
||||
public class BetterEnd implements ModInitializer {
|
||||
public static final String MOD_ID = "betterend";
|
||||
public static final Logger LOGGER = new Logger(MOD_ID);
|
||||
|
||||
public static final boolean RUNS_FALL_FLYING_LIB = FabricLoader.getInstance().getModContainer("fallflyinglib").isPresent();
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
WorldDataAPI.registerModCache(MOD_ID);
|
||||
|
@ -42,9 +44,7 @@ public class BetterEnd implements ModInitializer {
|
|||
EndBlockEntities.register();
|
||||
EndFeatures.register();
|
||||
EndEntities.register();
|
||||
SurfaceBuilders.register();
|
||||
EndBiomes.register();
|
||||
BetterEndBiomeSource.register();
|
||||
EndTags.register();
|
||||
EndEnchantments.register();
|
||||
EndPotions.register();
|
||||
|
@ -61,17 +61,22 @@ public class BetterEnd implements ModInitializer {
|
|||
FabricLoader.getInstance().getEntrypoints("betterend", BetterEndPlugin.class).forEach(BetterEndPlugin::register);
|
||||
Integrations.init();
|
||||
Configs.saveConfigs();
|
||||
|
||||
if (GeneratorOptions.useNewGenerator()) {
|
||||
ru.bclib.world.generator.GeneratorOptions.setFarEndBiomes(GeneratorOptions.getIslandDistBlock());
|
||||
ru.bclib.world.generator.GeneratorOptions.setEndLandFunction((pos) -> TerrainGenerator.isLand(pos.x, pos.y));
|
||||
}
|
||||
|
||||
BiomeAPI.registerEndBiomeModification((biomeID, biome) -> {
|
||||
if (!biomeID.equals(Biomes.THE_VOID.location())) {
|
||||
EndStructures.addBiomeStructures(biomeID, biome);
|
||||
EndFeatures.addBiomeFeatures(biomeID, biome);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public static ResourceLocation makeID(String path) {
|
||||
return new ResourceLocation(MOD_ID, path);
|
||||
}
|
||||
|
||||
public static String getStringId(String id) {
|
||||
return String.format("%s:%s", MOD_ID, id);
|
||||
}
|
||||
|
||||
public static boolean isModId(ResourceLocation id) {
|
||||
return id.getNamespace().equals(MOD_ID);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,27 +2,31 @@ package ru.betterend.api;
|
|||
|
||||
public interface BetterEndPlugin {
|
||||
/**
|
||||
* Alloying recipes registration.
|
||||
* See AlloyingRecipe.Builder for details.
|
||||
* Alloying recipes registration.
|
||||
* See AlloyingRecipe.Builder for details.
|
||||
*/
|
||||
default void registerAlloyingRecipes() {}
|
||||
default void registerAlloyingRecipes() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Smithing recipes registration.
|
||||
* See AnvilSmithingRecipe.Builder for details.
|
||||
* Smithing recipes registration.
|
||||
* See AnvilSmithingRecipe.Builder for details.
|
||||
*/
|
||||
default void registerSmithingRecipes() {}
|
||||
default void registerSmithingRecipes() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Additional biomes registration.
|
||||
* See BiomeRegistry.registerBiome for details.
|
||||
* Additional biomes registration.
|
||||
* See BiomeRegistry.registerBiome for details.
|
||||
*/
|
||||
default void registerEndBiomes() {}
|
||||
default void registerEndBiomes() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Register other mod stuff, for example, EndHammers.
|
||||
* Register other mod stuff, for example, EndITEM_HAMMERS.
|
||||
*/
|
||||
default void registerOthers() {}
|
||||
default void registerOthers() {
|
||||
}
|
||||
|
||||
|
||||
public static void register(BetterEndPlugin plugin) {
|
||||
|
|
|
@ -1,33 +1,16 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.level.block.state.properties.IntegerProperty;
|
||||
import ru.betterend.blocks.basis.EndAnvilBlock;
|
||||
import ru.betterend.item.EndAnvilItem;
|
||||
import ru.betterend.item.material.EndToolMaterial;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndItems;
|
||||
|
||||
public class AeterniumAnvil extends EndAnvilBlock {
|
||||
|
||||
protected final Item anvilItem;
|
||||
|
||||
public AeterniumAnvil() {
|
||||
super(EndBlocks.AETERNIUM_BLOCK.defaultMaterialColor(), EndToolMaterial.AETERNIUM.getLevel());
|
||||
this.anvilItem = EndItems.registerEndItem("aeternuim_anvil_item", new EndAnvilItem(this));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public IntegerProperty getDurability() {
|
||||
if (durability == null) {
|
||||
this.maxDurability = 8;
|
||||
this.durability = IntegerProperty.create("durability", 0, maxDurability);
|
||||
}
|
||||
return durability;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item asItem() {
|
||||
return anvilItem;
|
||||
public int getMaxDurability() {
|
||||
return 8;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,15 +12,15 @@ import net.minecraft.world.level.material.MaterialColor;
|
|||
import ru.bclib.blocks.BaseBlock;
|
||||
|
||||
public class AeterniumBlock extends BaseBlock {
|
||||
|
||||
|
||||
public AeterniumBlock() {
|
||||
super(FabricBlockSettings.of(Material.METAL, MaterialColor.COLOR_GRAY)
|
||||
.hardness(65F)
|
||||
.resistance(1200F)
|
||||
.requiresCorrectToolForDrops()
|
||||
.sound(SoundType.NETHERITE_BLOCK));
|
||||
.hardness(65F)
|
||||
.resistance(1200F)
|
||||
.requiresCorrectToolForDrops()
|
||||
.sound(SoundType.NETHERITE_BLOCK));
|
||||
}
|
||||
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public int getColor(BlockState state, BlockGetter world, BlockPos pos) {
|
||||
return 0xFF657A7A;
|
||||
|
|
|
@ -6,13 +6,13 @@ import net.minecraft.world.level.block.SoundType;
|
|||
import net.minecraft.world.level.material.Material;
|
||||
import ru.bclib.blocks.BaseBlock;
|
||||
import ru.bclib.client.render.BCLRenderLayer;
|
||||
import ru.bclib.interfaces.IRenderTyped;
|
||||
import ru.bclib.interfaces.RenderLayerProvider;
|
||||
|
||||
public class AmaranitaHymenophoreBlock extends BaseBlock implements IRenderTyped {
|
||||
public class AmaranitaHymenophoreBlock extends BaseBlock implements RenderLayerProvider {
|
||||
public AmaranitaHymenophoreBlock() {
|
||||
super(FabricBlockSettings.of(Material.WOOD).breakByTool(FabricToolTags.AXES).sound(SoundType.WOOD));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BCLRenderLayer getRenderLayer() {
|
||||
return BCLRenderLayer.CUTOUT;
|
||||
|
|
|
@ -7,6 +7,6 @@ import ru.bclib.blocks.BaseRotatedPillarBlock;
|
|||
|
||||
public class AmaranitaStemBlock extends BaseRotatedPillarBlock {
|
||||
public AmaranitaStemBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.OAK_PLANKS).materialColor(MaterialColor.COLOR_LIGHT_GREEN));
|
||||
super(FabricBlockSettings.copyOf(Blocks.OAK_PLANKS).mapColor(MaterialColor.COLOR_LIGHT_GREEN));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,6 @@ import ru.bclib.blocks.BaseBlock;
|
|||
|
||||
public class AmberBlock extends BaseBlock {
|
||||
public AmberBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.DIAMOND_BLOCK).materialColor(MaterialColor.COLOR_YELLOW));
|
||||
super(FabricBlockSettings.copyOf(Blocks.DIAMOND_BLOCK).mapColor(MaterialColor.COLOR_YELLOW));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.world.item.enchantment.Enchantments;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.storage.loot.LootContext;
|
||||
|
@ -21,12 +19,17 @@ import ru.bclib.util.MHelper;
|
|||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndParticles;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class AncientEmeraldIceBlock extends BaseBlock {
|
||||
public AncientEmeraldIceBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.BLUE_ICE).randomTicks());
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void randomTick(BlockState state, ServerLevel world, BlockPos pos, Random random) {
|
||||
Direction dir = BlocksHelper.randomDirection(random);
|
||||
|
||||
|
@ -54,7 +57,17 @@ public class AncientEmeraldIceBlock extends BaseBlock {
|
|||
}
|
||||
|
||||
private void makeParticles(ServerLevel world, BlockPos pos, Random random) {
|
||||
world.sendParticles(EndParticles.SNOWFLAKE, pos.getX() + 0.5, pos.getY() + 0.5, pos.getZ() + 0.5, 20, 0.5, 0.5, 0.5, 0);
|
||||
world.sendParticles(
|
||||
EndParticles.SNOWFLAKE,
|
||||
pos.getX() + 0.5,
|
||||
pos.getY() + 0.5,
|
||||
pos.getZ() + 0.5,
|
||||
20,
|
||||
0.5,
|
||||
0.5,
|
||||
0.5,
|
||||
0
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -67,4 +80,10 @@ public class AncientEmeraldIceBlock extends BaseBlock {
|
|||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void stepOn(Level level, BlockPos blockPos, BlockState blockState, Entity entity) {
|
||||
super.stepOn(level, blockPos, blockState, entity);
|
||||
entity.setIsInPowderSnow(true);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||
import net.minecraft.client.color.block.BlockColor;
|
||||
|
@ -14,43 +11,56 @@ import net.minecraft.util.Mth;
|
|||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.world.item.enchantment.Enchantments;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.block.AbstractGlassBlock;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.material.Material;
|
||||
import net.minecraft.world.level.storage.loot.LootContext;
|
||||
import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import ru.bclib.api.TagAPI;
|
||||
import ru.bclib.client.render.BCLRenderLayer;
|
||||
import ru.bclib.interfaces.IColorProvider;
|
||||
import ru.bclib.interfaces.IRenderTyped;
|
||||
import ru.bclib.interfaces.CustomColorProvider;
|
||||
import ru.bclib.interfaces.RenderLayerProvider;
|
||||
import ru.bclib.util.ColorUtil;
|
||||
import ru.bclib.util.MHelper;
|
||||
import ru.betterend.registry.EndItems;
|
||||
import ru.betterend.registry.EndTags;
|
||||
|
||||
public class AuroraCrystalBlock extends AbstractGlassBlock implements IRenderTyped, IColorProvider {
|
||||
import java.util.List;
|
||||
|
||||
public class AuroraCrystalBlock extends AbstractGlassBlock implements RenderLayerProvider, CustomColorProvider {
|
||||
public static final Vec3i[] COLORS;
|
||||
private static final int MIN_DROP = 1;
|
||||
private static final int MAX_DROP = 4;
|
||||
|
||||
public AuroraCrystalBlock() {
|
||||
super(FabricBlockSettings.of(Material.GLASS)
|
||||
.breakByTool(FabricToolTags.PICKAXES)
|
||||
.breakByTool(EndTags.HAMMERS)
|
||||
.hardness(1F)
|
||||
.resistance(1F)
|
||||
.luminance(15)
|
||||
.noOcclusion()
|
||||
.isSuffocating((state, world, pos) -> false)
|
||||
.sound(SoundType.GLASS));
|
||||
super(FabricBlockSettings
|
||||
.of(Material.GLASS)
|
||||
.breakByTool(FabricToolTags.PICKAXES)
|
||||
.breakByTool(TagAPI.ITEM_HAMMERS)
|
||||
.hardness(1F)
|
||||
.resistance(1F)
|
||||
.luminance(15)
|
||||
.noOcclusion()
|
||||
.isSuffocating((state, world, pos) -> false)
|
||||
.sound(SoundType.GLASS));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public VoxelShape getVisualShape(BlockState blockState, BlockGetter blockGetter, BlockPos blockPos, CollisionContext collisionContext) {
|
||||
return this.getCollisionShape(blockState, blockGetter, blockPos, collisionContext);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockColor getProvider() {
|
||||
return (state, world, pos, tintIndex) -> {
|
||||
if (pos == null) {
|
||||
pos = BlockPos.ZERO;
|
||||
};
|
||||
}
|
||||
;
|
||||
|
||||
long i = (long) pos.getX() + (long) pos.getY() + (long) pos.getZ();
|
||||
double delta = i * 0.1;
|
||||
|
@ -69,20 +79,21 @@ public class AuroraCrystalBlock extends AbstractGlassBlock implements IRenderTyp
|
|||
return ColorUtil.color(r, g, b);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemColor getItemProvider() {
|
||||
return (stack, tintIndex) -> {
|
||||
return ColorUtil.color(COLORS[3].getX(), COLORS[3].getY(), COLORS[3].getZ());
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BCLRenderLayer getRenderLayer() {
|
||||
return BCLRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||
ItemStack tool = builder.getParameter(LootContextParams.TOOL);
|
||||
if (tool != null && tool.isCorrectToolForDrops(state)) {
|
||||
|
@ -99,7 +110,8 @@ public class AuroraCrystalBlock extends AbstractGlassBlock implements IRenderTyp
|
|||
return Lists.newArrayList(new ItemStack(EndItems.CRYSTAL_SHARDS, max));
|
||||
}
|
||||
count = MHelper.randRange(min, max, MHelper.RANDOM);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
count = MHelper.randRange(MIN_DROP, MAX_DROP, MHelper.RANDOM);
|
||||
}
|
||||
return Lists.newArrayList(new ItemStack(EndItems.CRYSTAL_SHARDS, count));
|
||||
|
@ -109,10 +121,10 @@ public class AuroraCrystalBlock extends AbstractGlassBlock implements IRenderTyp
|
|||
|
||||
static {
|
||||
COLORS = new Vec3i[] {
|
||||
new Vec3i(247, 77, 161),
|
||||
new Vec3i(247, 77, 161),
|
||||
new Vec3i(120, 184, 255),
|
||||
new Vec3i(120, 255, 168),
|
||||
new Vec3i(243, 58, 255)
|
||||
new Vec3i(243, 58, 255)
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,16 +21,21 @@ public class BlueVineLanternBlock extends BaseBlock {
|
|||
public static final BooleanProperty NATURAL = BlockProperties.NATURAL;
|
||||
|
||||
public BlueVineLanternBlock() {
|
||||
super(FabricBlockSettings.of(Material.WOOD).breakByTool(FabricToolTags.AXES).luminance(15).sound(SoundType.WART_BLOCK));
|
||||
super(FabricBlockSettings.of(Material.WOOD)
|
||||
.breakByTool(FabricToolTags.AXES)
|
||||
.luminance(15)
|
||||
.sound(SoundType.WART_BLOCK));
|
||||
this.registerDefaultState(this.stateDefinition.any().setValue(NATURAL, false));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
|
||||
return !state.getValue(NATURAL) || world.getBlockState(pos.below()).getBlock() == EndBlocks.BLUE_VINE;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public BlockState updateShape(BlockState state, Direction facing, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) {
|
||||
if (!canSurvive(state, world, pos)) {
|
||||
return Blocks.AIR.defaultBlockState();
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
|
@ -14,6 +12,8 @@ import ru.betterend.blocks.basis.EndPlantWithAgeBlock;
|
|||
import ru.betterend.blocks.basis.FurBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class BlueVineSeedBlock extends EndPlantWithAgeBlock {
|
||||
@Override
|
||||
public void growAdult(WorldGenLevel world, Random random, BlockPos pos) {
|
||||
|
@ -22,24 +22,51 @@ public class BlueVineSeedBlock extends EndPlantWithAgeBlock {
|
|||
if (h < height + 1) {
|
||||
return;
|
||||
}
|
||||
BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.BLUE_VINE.defaultBlockState().setValue(BlockProperties.TRIPLE_SHAPE, BlockProperties.TripleShape.BOTTOM));
|
||||
BlocksHelper.setWithoutUpdate(
|
||||
world,
|
||||
pos,
|
||||
EndBlocks.BLUE_VINE.defaultBlockState()
|
||||
.setValue(BlockProperties.TRIPLE_SHAPE, BlockProperties.TripleShape.BOTTOM)
|
||||
);
|
||||
for (int i = 1; i < height; i++) {
|
||||
BlocksHelper.setWithoutUpdate(world, pos.above(i), EndBlocks.BLUE_VINE.defaultBlockState().setValue(BlockProperties.TRIPLE_SHAPE, BlockProperties.TripleShape.MIDDLE));
|
||||
BlocksHelper.setWithoutUpdate(
|
||||
world,
|
||||
pos.above(i),
|
||||
EndBlocks.BLUE_VINE.defaultBlockState()
|
||||
.setValue(BlockProperties.TRIPLE_SHAPE, BlockProperties.TripleShape.MIDDLE)
|
||||
);
|
||||
}
|
||||
BlocksHelper.setWithoutUpdate(world, pos.above(height), EndBlocks.BLUE_VINE.defaultBlockState().setValue(BlockProperties.TRIPLE_SHAPE, BlockProperties.TripleShape.TOP));
|
||||
BlocksHelper.setWithoutUpdate(
|
||||
world,
|
||||
pos.above(height),
|
||||
EndBlocks.BLUE_VINE.defaultBlockState()
|
||||
.setValue(BlockProperties.TRIPLE_SHAPE, BlockProperties.TripleShape.TOP)
|
||||
);
|
||||
placeLantern(world, pos.above(height + 1));
|
||||
}
|
||||
|
||||
private void placeLantern(WorldGenLevel world, BlockPos pos) {
|
||||
BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.BLUE_VINE_LANTERN.defaultBlockState().setValue(BlueVineLanternBlock.NATURAL, true));
|
||||
for (Direction dir: BlocksHelper.HORIZONTAL) {
|
||||
BlocksHelper.setWithoutUpdate(
|
||||
world,
|
||||
pos,
|
||||
EndBlocks.BLUE_VINE_LANTERN.defaultBlockState().setValue(BlueVineLanternBlock.NATURAL, true)
|
||||
);
|
||||
for (Direction dir : BlocksHelper.HORIZONTAL) {
|
||||
BlockPos p = pos.relative(dir);
|
||||
if (world.isEmptyBlock(p)) {
|
||||
BlocksHelper.setWithoutUpdate(world, p, EndBlocks.BLUE_VINE_FUR.defaultBlockState().setValue(FurBlock.FACING, dir));
|
||||
BlocksHelper.setWithoutUpdate(
|
||||
world,
|
||||
p,
|
||||
EndBlocks.BLUE_VINE_FUR.defaultBlockState().setValue(FurBlock.FACING, dir)
|
||||
);
|
||||
}
|
||||
}
|
||||
if (world.isEmptyBlock(pos.above())) {
|
||||
BlocksHelper.setWithoutUpdate(world, pos.above(), EndBlocks.BLUE_VINE_FUR.defaultBlockState().setValue(FurBlock.FACING, Direction.UP));
|
||||
BlocksHelper.setWithoutUpdate(
|
||||
world,
|
||||
pos.above(),
|
||||
EndBlocks.BLUE_VINE_FUR.defaultBlockState().setValue(FurBlock.FACING, Direction.UP)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
|
@ -18,6 +14,9 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
|||
import ru.betterend.blocks.basis.EndPlantBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class BoluxMushroomBlock extends EndPlantBlock {
|
||||
private static final VoxelShape SHAPE = Block.box(1, 0, 1, 15, 9, 15);
|
||||
|
||||
|
@ -34,7 +33,7 @@ public class BoluxMushroomBlock extends EndPlantBlock {
|
|||
public VoxelShape getShape(BlockState state, BlockGetter view, BlockPos pos, CollisionContext ePos) {
|
||||
return SHAPE;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockBehaviour.OffsetType getOffsetType() {
|
||||
return BlockBehaviour.OffsetType.NONE;
|
||||
|
@ -44,7 +43,7 @@ public class BoluxMushroomBlock extends EndPlantBlock {
|
|||
public boolean isValidBonemealTarget(BlockGetter world, BlockPos pos, BlockState state, boolean isClient) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isBonemealSuccess(Level world, Random random, BlockPos pos, BlockState state) {
|
||||
return false;
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.client.multiplayer.ClientLevel;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
@ -20,16 +16,19 @@ import net.minecraft.world.level.block.state.StateDefinition;
|
|||
import net.minecraft.world.level.block.state.properties.BooleanProperty;
|
||||
import net.minecraft.world.level.material.Fluids;
|
||||
import net.minecraft.world.level.material.MaterialColor;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import ru.bclib.blocks.BaseBlock;
|
||||
import ru.bclib.blocks.BlockProperties;
|
||||
import ru.bclib.util.BlocksHelper;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class BrimstoneBlock extends BaseBlock {
|
||||
public static final BooleanProperty ACTIVATED = BlockProperties.ACTIVE;
|
||||
|
||||
public BrimstoneBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.END_STONE).materialColor(MaterialColor.COLOR_BROWN).randomTicks());
|
||||
super(FabricBlockSettings.copyOf(Blocks.END_STONE).mapColor(MaterialColor.COLOR_BROWN).randomTicks());
|
||||
registerDefaultState(stateDefinition.any().setValue(ACTIVATED, false));
|
||||
}
|
||||
|
||||
|
@ -37,7 +36,7 @@ public class BrimstoneBlock extends BaseBlock {
|
|||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> stateManager) {
|
||||
stateManager.add(ACTIVATED);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setPlacedBy(Level world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack itemStack) {
|
||||
if (world.isClientSide()) {
|
||||
|
@ -65,9 +64,10 @@ public class BrimstoneBlock extends BaseBlock {
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void tick(BlockState state, ServerLevel world, BlockPos pos, Random random) {
|
||||
boolean deactivate = true;
|
||||
for (Direction dir: BlocksHelper.DIRECTIONS) {
|
||||
for (Direction dir : BlocksHelper.DIRECTIONS) {
|
||||
if (world.getFluidState(pos.relative(dir)).getType().equals(Fluids.WATER)) {
|
||||
deactivate = false;
|
||||
break;
|
||||
|
@ -89,9 +89,9 @@ 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);
|
||||
.setValue(SulphurCrystalBlock.FACING, dir)
|
||||
.setValue(SulphurCrystalBlock.WATERLOGGED, true)
|
||||
.setValue(SulphurCrystalBlock.AGE, 0);
|
||||
world.setBlockAndUpdate(side, crystal);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
@ -19,23 +17,25 @@ import net.minecraft.world.phys.shapes.CollisionContext;
|
|||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import ru.betterend.blocks.basis.EndUnderwaterPlantBlock;
|
||||
|
||||
public class BubbleCoralBlock extends EndUnderwaterPlantBlock {
|
||||
import java.util.Random;
|
||||
|
||||
public class BubbleCoralBlock extends EndUnderwaterPlantBlock {
|
||||
|
||||
private static final VoxelShape SHAPE = Block.box(0, 0, 0, 16, 14, 16);
|
||||
|
||||
public BubbleCoralBlock() {
|
||||
super(FabricBlockSettings.of(Material.WATER_PLANT)
|
||||
.breakByTool(FabricToolTags.SHEARS)
|
||||
.breakByHand(true)
|
||||
.sound(SoundType.CORAL_BLOCK)
|
||||
.noCollission());
|
||||
.breakByTool(FabricToolTags.SHEARS)
|
||||
.breakByHand(true)
|
||||
.sound(SoundType.CORAL_BLOCK)
|
||||
.noCollission());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockBehaviour.OffsetType getOffsetType() {
|
||||
return BlockBehaviour.OffsetType.NONE;
|
||||
}
|
||||
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public void animateTick(BlockState state, Level world, BlockPos pos, Random random) {
|
||||
double x = pos.getX() + random.nextDouble();
|
||||
|
@ -53,7 +53,7 @@ public class BubbleCoralBlock extends EndUnderwaterPlantBlock {
|
|||
public boolean isValidBonemealTarget(BlockGetter world, BlockPos pos, BlockState state, boolean isClient) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isBonemealSuccess(Level world, Random random, BlockPos pos, BlockState state) {
|
||||
return false;
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
|
@ -16,6 +13,8 @@ import ru.bclib.util.MHelper;
|
|||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndItems;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BulbVineBlock extends BaseVineBlock {
|
||||
public BulbVineBlock() {
|
||||
super(15, true);
|
||||
|
@ -42,6 +41,7 @@ public class BulbVineBlock extends BaseVineBlock {
|
|||
@Override
|
||||
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
|
||||
boolean canPlace = super.canSurvive(state, world, pos);
|
||||
return (state.is(this) && state.getValue(SHAPE) == TripleShape.BOTTOM) ? canPlace : canPlace && world.getBlockState(pos.below()).is(this);
|
||||
return (state.is(this) && state.getValue(SHAPE) == TripleShape.BOTTOM) ? canPlace : canPlace && world.getBlockState(
|
||||
pos.below()).is(this);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
|
||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||
|
@ -20,26 +16,30 @@ import net.minecraft.world.level.material.Material;
|
|||
import net.minecraft.world.level.material.MaterialColor;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import ru.bclib.client.models.BlockModelProvider;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import ru.bclib.client.models.ModelsHelper;
|
||||
import ru.bclib.client.render.BCLRenderLayer;
|
||||
import ru.bclib.interfaces.IRenderTyped;
|
||||
import ru.bclib.interfaces.BlockModelProvider;
|
||||
import ru.bclib.interfaces.RenderLayerProvider;
|
||||
import ru.betterend.blocks.basis.EndLanternBlock;
|
||||
import ru.betterend.client.models.Patterns;
|
||||
|
||||
public class BulbVineLanternBlock extends EndLanternBlock implements IRenderTyped, BlockModelProvider {
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
public class BulbVineLanternBlock extends EndLanternBlock implements RenderLayerProvider, BlockModelProvider {
|
||||
private static final VoxelShape SHAPE_CEIL = Block.box(4, 4, 4, 12, 16, 12);
|
||||
private static final VoxelShape SHAPE_FLOOR = Block.box(4, 0, 4, 12, 12, 12);
|
||||
|
||||
public BulbVineLanternBlock() {
|
||||
this(FabricBlockSettings.of(Material.METAL)
|
||||
.hardness(1)
|
||||
.resistance(1)
|
||||
.breakByTool(FabricToolTags.PICKAXES)
|
||||
.materialColor(MaterialColor.COLOR_LIGHT_GRAY)
|
||||
.luminance(15)
|
||||
.requiresCorrectToolForDrops()
|
||||
.sound(SoundType.LANTERN));
|
||||
.hardness(1)
|
||||
.resistance(1)
|
||||
.breakByTool(FabricToolTags.PICKAXES)
|
||||
.mapColor(MaterialColor.COLOR_LIGHT_GRAY)
|
||||
.luminance(15)
|
||||
.requiresCorrectToolForDrops()
|
||||
.sound(SoundType.LANTERN));
|
||||
}
|
||||
|
||||
public BulbVineLanternBlock(Properties settings) {
|
||||
|
@ -47,23 +47,26 @@ public class BulbVineLanternBlock extends EndLanternBlock implements IRenderType
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public VoxelShape getShape(BlockState state, BlockGetter view, BlockPos pos, CollisionContext ePos) {
|
||||
return state.getValue(IS_FLOOR) ? SHAPE_FLOOR : SHAPE_CEIL;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BCLRenderLayer getRenderLayer() {
|
||||
return BCLRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public @Nullable BlockModel getBlockModel(ResourceLocation resourceLocation, BlockState blockState) {
|
||||
Map<String, String> textures = Maps.newHashMap();
|
||||
textures.put("%glow%", getGlowTexture());
|
||||
textures.put("%metal%", getMetalTexture(resourceLocation));
|
||||
Optional<String> pattern = blockState.getValue(IS_FLOOR) ?
|
||||
Patterns.createJson(Patterns.BLOCK_BULB_LANTERN_FLOOR, textures) :
|
||||
Patterns.createJson(Patterns.BLOCK_BULB_LANTERN_CEIL, textures);
|
||||
Optional<String> pattern = blockState.getValue(IS_FLOOR) ? Patterns.createJson(
|
||||
Patterns.BLOCK_BULB_LANTERN_FLOOR,
|
||||
textures
|
||||
) : Patterns.createJson(Patterns.BLOCK_BULB_LANTERN_CEIL, textures);
|
||||
return ModelsHelper.fromPattern(pattern);
|
||||
}
|
||||
|
||||
|
@ -76,5 +79,5 @@ public class BulbVineLanternBlock extends EndLanternBlock implements IRenderType
|
|||
protected String getGlowTexture() {
|
||||
return "bulb_vine_lantern_bulb";
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -3,20 +3,20 @@ package ru.betterend.blocks;
|
|||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.client.color.block.BlockColor;
|
||||
import net.minecraft.client.color.item.ItemColor;
|
||||
import ru.bclib.interfaces.IColorProvider;
|
||||
import ru.bclib.interfaces.CustomColorProvider;
|
||||
import ru.bclib.util.BlocksHelper;
|
||||
import ru.bclib.util.ColorUtil;
|
||||
|
||||
public class BulbVineLanternColoredBlock extends BulbVineLanternBlock implements IColorProvider {
|
||||
public class BulbVineLanternColoredBlock extends BulbVineLanternBlock implements CustomColorProvider {
|
||||
public BulbVineLanternColoredBlock(FabricBlockSettings settings) {
|
||||
super(settings);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockColor getProvider() {
|
||||
return (state, world, pos, tintIndex) -> getColor();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemColor getItemProvider() {
|
||||
return (stack, tintIndex) -> getColor();
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
|
@ -14,23 +12,37 @@ import ru.bclib.util.BlocksHelper;
|
|||
import ru.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
public class BulbVineSeedBlock extends EndPlantWithAgeBlock {
|
||||
import java.util.Random;
|
||||
|
||||
public class BulbVineSeedBlock extends EndPlantWithAgeBlock {
|
||||
|
||||
@Override
|
||||
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
|
||||
BlockState up = world.getBlockState(pos.above());
|
||||
return up.is(TagAPI.GEN_TERRAIN) || up.is(BlockTags.LOGS) || up.is(BlockTags.LEAVES);
|
||||
return up.is(TagAPI.BLOCK_GEN_TERRAIN) || up.is(BlockTags.LOGS) || up.is(BlockTags.LEAVES);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void growAdult(WorldGenLevel world, Random random, BlockPos pos) {
|
||||
int h = BlocksHelper.downRay(world, pos, random.nextInt(24)) - 1;
|
||||
if (h > 2) {
|
||||
BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.BULB_VINE.defaultBlockState().setValue(BlockProperties.TRIPLE_SHAPE, TripleShape.TOP));
|
||||
BlocksHelper.setWithoutUpdate(
|
||||
world,
|
||||
pos,
|
||||
EndBlocks.BULB_VINE.defaultBlockState().setValue(BlockProperties.TRIPLE_SHAPE, TripleShape.TOP)
|
||||
);
|
||||
for (int i = 1; i < h; i++) {
|
||||
BlocksHelper.setWithoutUpdate(world, pos.below(i), EndBlocks.BULB_VINE.defaultBlockState().setValue(BlockProperties.TRIPLE_SHAPE, TripleShape.MIDDLE));
|
||||
BlocksHelper.setWithoutUpdate(
|
||||
world,
|
||||
pos.below(i),
|
||||
EndBlocks.BULB_VINE.defaultBlockState().setValue(BlockProperties.TRIPLE_SHAPE, TripleShape.MIDDLE)
|
||||
);
|
||||
}
|
||||
BlocksHelper.setWithoutUpdate(world, pos.below(h), EndBlocks.BULB_VINE.defaultBlockState().setValue(BlockProperties.TRIPLE_SHAPE, TripleShape.BOTTOM));
|
||||
BlocksHelper.setWithoutUpdate(
|
||||
world,
|
||||
pos.below(h),
|
||||
EndBlocks.BULB_VINE.defaultBlockState().setValue(BlockProperties.TRIPLE_SHAPE, TripleShape.BOTTOM)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
@ -19,10 +16,13 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
|||
import ru.bclib.blocks.BaseBlockNotFull;
|
||||
import ru.bclib.blocks.BlockProperties;
|
||||
import ru.bclib.client.render.BCLRenderLayer;
|
||||
import ru.bclib.interfaces.IRenderTyped;
|
||||
import ru.bclib.interfaces.RenderLayerProvider;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
public class CavePumpkinBlock extends BaseBlockNotFull implements IRenderTyped {
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class CavePumpkinBlock extends BaseBlockNotFull implements RenderLayerProvider {
|
||||
public static final BooleanProperty SMALL = BlockProperties.SMALL;
|
||||
private static final VoxelShape SHAPE_SMALL;
|
||||
private static final VoxelShape SHAPE_BIG;
|
||||
|
@ -41,15 +41,17 @@ public class CavePumpkinBlock extends BaseBlockNotFull implements IRenderTyped {
|
|||
public BCLRenderLayer getRenderLayer() {
|
||||
return BCLRenderLayer.CUTOUT;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) {
|
||||
return state.getValue(SMALL) ? SHAPE_SMALL : SHAPE_BIG;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||
return state.getValue(SMALL) ? Collections.singletonList(new ItemStack(EndBlocks.CAVE_PUMPKIN_SEED)) : Collections.singletonList(new ItemStack(this));
|
||||
return state.getValue(SMALL) ? Collections.singletonList(new ItemStack(EndBlocks.CAVE_PUMPKIN_SEED)) : Collections
|
||||
.singletonList(new ItemStack(this));
|
||||
}
|
||||
|
||||
static {
|
||||
|
@ -58,7 +60,7 @@ public class CavePumpkinBlock extends BaseBlockNotFull implements IRenderTyped {
|
|||
VoxelShape top = Block.box(5, 15, 5, 11, 16, 11);
|
||||
SHAPE_BIG = Shapes.or(lantern, cap, top);
|
||||
|
||||
lantern = Block.box(1, 7, 1, 15, 13, 15);
|
||||
lantern = Block.box(5, 7, 5, 11, 13, 11);
|
||||
cap = Block.box(4, 12, 4, 12, 15, 12);
|
||||
top = Block.box(6, 15, 6, 10, 16, 10);
|
||||
SHAPE_SMALL = Shapes.or(lantern, cap, top);
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
|
@ -18,6 +16,8 @@ import ru.bclib.blocks.BlockProperties;
|
|||
import ru.betterend.blocks.basis.EndPlantWithAgeBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class CavePumpkinVineBlock extends EndPlantWithAgeBlock {
|
||||
private static final VoxelShape SHAPE = Block.box(4, 0, 4, 12, 16, 12);
|
||||
|
||||
|
@ -31,21 +31,26 @@ public class CavePumpkinVineBlock extends EndPlantWithAgeBlock {
|
|||
public void performBonemeal(ServerLevel world, Random random, BlockPos pos, BlockState state) {
|
||||
int age = state.getValue(AGE);
|
||||
BlockState down = world.getBlockState(pos.below());
|
||||
if (down.getMaterial().isReplaceable() || (down.is(EndBlocks.CAVE_PUMPKIN) && down.getValue(BlockProperties.SMALL))) {
|
||||
if (down.getMaterial()
|
||||
.isReplaceable() || (down.is(EndBlocks.CAVE_PUMPKIN) && down.getValue(BlockProperties.SMALL))) {
|
||||
if (age < 3) {
|
||||
world.setBlockAndUpdate(pos, state.setValue(AGE, age + 1));
|
||||
}
|
||||
if (age == 2) {
|
||||
world.setBlockAndUpdate(pos.below(), EndBlocks.CAVE_PUMPKIN.defaultBlockState().setValue(BlockProperties.SMALL, true));
|
||||
world.setBlockAndUpdate(
|
||||
pos.below(),
|
||||
EndBlocks.CAVE_PUMPKIN.defaultBlockState().setValue(BlockProperties.SMALL, true)
|
||||
);
|
||||
}
|
||||
else if (age == 3) {
|
||||
world.setBlockAndUpdate(pos.below(), EndBlocks.CAVE_PUMPKIN.defaultBlockState());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void growAdult(WorldGenLevel world, Random random, BlockPos pos) {}
|
||||
public void growAdult(WorldGenLevel world, Random random, BlockPos pos) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState updateShape(BlockState state, Direction facing, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) {
|
||||
|
@ -58,7 +63,7 @@ public class CavePumpkinVineBlock extends EndPlantWithAgeBlock {
|
|||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public VoxelShape getShape(BlockState state, BlockGetter view, BlockPos pos, CollisionContext ePos) {
|
||||
return SHAPE;
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.EnumMap;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||
import net.minecraft.client.resources.model.BlockModelRotation;
|
||||
|
@ -21,18 +16,27 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.shapes.Shapes;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import ru.bclib.blocks.BaseAttachedBlock;
|
||||
import ru.bclib.client.models.BlockModelProvider;
|
||||
import ru.bclib.client.models.ModelsHelper;
|
||||
import ru.bclib.client.render.BCLRenderLayer;
|
||||
import ru.bclib.interfaces.IRenderTyped;
|
||||
import ru.bclib.interfaces.BlockModelProvider;
|
||||
import ru.bclib.interfaces.RenderLayerProvider;
|
||||
import ru.betterend.client.models.Patterns;
|
||||
|
||||
public class ChandelierBlock extends BaseAttachedBlock implements IRenderTyped, BlockModelProvider {
|
||||
import java.util.EnumMap;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
public class ChandelierBlock extends BaseAttachedBlock implements RenderLayerProvider, BlockModelProvider {
|
||||
private static final EnumMap<Direction, VoxelShape> BOUNDING_SHAPES = Maps.newEnumMap(Direction.class);
|
||||
|
||||
public ChandelierBlock(Block source) {
|
||||
super(FabricBlockSettings.copyOf(source).luminance(15).noCollission().noOcclusion().requiresCorrectToolForDrops());
|
||||
super(FabricBlockSettings.copyOf(source)
|
||||
.luminance(15)
|
||||
.noCollission()
|
||||
.noOcclusion()
|
||||
.requiresCorrectToolForDrops());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -41,16 +45,19 @@ public class ChandelierBlock extends BaseAttachedBlock implements IRenderTyped,
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public VoxelShape getShape(BlockState state, BlockGetter view, BlockPos pos, CollisionContext ePos) {
|
||||
return BOUNDING_SHAPES.get(state.getValue(FACING));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public BlockModel getItemModel(ResourceLocation blockId) {
|
||||
return ModelsHelper.createItemModel(blockId);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public @Nullable BlockModel getBlockModel(ResourceLocation resourceLocation, BlockState blockState) {
|
||||
Optional<String> pattern;
|
||||
switch (blockState.getValue(FACING)) {
|
||||
|
@ -65,8 +72,9 @@ public class ChandelierBlock extends BaseAttachedBlock implements IRenderTyped,
|
|||
}
|
||||
return ModelsHelper.fromPattern(pattern);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public UnbakedModel getModelVariant(ResourceLocation stateId, BlockState blockState, Map<ResourceLocation, UnbakedModel> modelCache) {
|
||||
String state = "_wall";
|
||||
BlockModelRotation rotation = BlockModelRotation.X0_Y0;
|
||||
|
@ -93,7 +101,7 @@ public class ChandelierBlock extends BaseAttachedBlock implements IRenderTyped,
|
|||
registerBlockModel(stateId, modelId, blockState, modelCache);
|
||||
return ModelsHelper.createMultiVariant(modelId, rotation.getRotation(), false);
|
||||
}
|
||||
|
||||
|
||||
static {
|
||||
BOUNDING_SHAPES.put(Direction.UP, Block.box(5, 0, 5, 11, 13, 11));
|
||||
BOUNDING_SHAPES.put(Direction.DOWN, Block.box(5, 3, 5, 11, 16, 11));
|
||||
|
|
|
@ -8,7 +8,7 @@ import net.minecraft.world.level.material.Fluids;
|
|||
import ru.betterend.blocks.basis.EndUnderwaterPlantBlock;
|
||||
|
||||
public class CharniaBlock extends EndUnderwaterPlantBlock {
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
|
||||
return canSupportCenter(world, pos.below(), Direction.UP) && world.getFluidState(pos).getType() == Fluids.WATER;
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.enchantment.EnchantmentHelper;
|
||||
|
@ -13,13 +10,16 @@ import net.minecraft.world.level.storage.loot.LootContext;
|
|||
import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
|
||||
import ru.bclib.blocks.BaseBlock;
|
||||
import ru.bclib.client.render.BCLRenderLayer;
|
||||
import ru.bclib.interfaces.IRenderTyped;
|
||||
import ru.bclib.interfaces.RenderLayerProvider;
|
||||
|
||||
public class DenseEmeraldIceBlock extends BaseBlock implements IRenderTyped {
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class DenseEmeraldIceBlock extends BaseBlock implements RenderLayerProvider {
|
||||
public DenseEmeraldIceBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.PACKED_ICE));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BCLRenderLayer getRenderLayer() {
|
||||
return BCLRenderLayer.TRANSLUCENT;
|
||||
|
|
|
@ -2,24 +2,24 @@ 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();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Feature<?> getFeature() {
|
||||
return EndFeatures.DRAGON_TREE.getFeature();
|
||||
super((state)->EndFeatures.DRAGON_TREE.getFeature());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
|
||||
return world.getBlockState(pos.below()).is(EndBlocks.SHADOW_GRASS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlantOn(Block block) {
|
||||
return block == EndBlocks.SHADOW_GRASS;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.client.renderer.block.model.BlockModel;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
@ -24,20 +20,25 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
import net.minecraft.world.level.material.Material;
|
||||
import net.minecraft.world.level.storage.loot.LootContext;
|
||||
import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
|
||||
import ru.bclib.client.models.BlockModelProvider;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import ru.bclib.client.render.BCLRenderLayer;
|
||||
import ru.bclib.interfaces.IRenderTyped;
|
||||
import ru.bclib.interfaces.BlockModelProvider;
|
||||
import ru.bclib.interfaces.RenderLayerProvider;
|
||||
|
||||
public class EmeraldIceBlock extends HalfTransparentBlock implements IRenderTyped, BlockModelProvider {
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class EmeraldIceBlock extends HalfTransparentBlock implements RenderLayerProvider, BlockModelProvider {
|
||||
public EmeraldIceBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.ICE));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BCLRenderLayer getRenderLayer() {
|
||||
return BCLRenderLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void playerDestroy(Level world, Player player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack stack) {
|
||||
super.playerDestroy(world, player, pos, state, blockEntity, stack);
|
||||
|
@ -46,23 +47,24 @@ public class EmeraldIceBlock extends HalfTransparentBlock implements IRenderType
|
|||
world.removeBlock(pos, false);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Material material = world.getBlockState(pos.below()).getMaterial();
|
||||
if (material.blocksMotion() || material.isLiquid()) {
|
||||
world.setBlockAndUpdate(pos, Blocks.WATER.defaultBlockState());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void randomTick(BlockState state, ServerLevel world, BlockPos pos, Random random) {
|
||||
if (world.getBrightness(LightLayer.BLOCK, pos) > 11 - state.getLightBlock(world, pos)) {
|
||||
this.melt(state, world, pos);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected void melt(BlockState state, Level world, BlockPos pos) {
|
||||
if (world.dimensionType().ultraWarm()) {
|
||||
world.removeBlock(pos, false);
|
||||
|
@ -74,6 +76,7 @@ public class EmeraldIceBlock extends HalfTransparentBlock implements IRenderType
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||
ItemStack tool = builder.getOptionalParameter(LootContextParams.TOOL);
|
||||
if (tool != null && EnchantmentHelper.getItemEnchantmentLevel(Enchantments.SILK_TOUCH, tool) != 0) {
|
||||
|
@ -83,8 +86,9 @@ public class EmeraldIceBlock extends HalfTransparentBlock implements IRenderType
|
|||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public BlockModel getItemModel(ResourceLocation resourceLocation) {
|
||||
return getBlockModel(resourceLocation, defaultBlockState());
|
||||
}
|
||||
|
|
|
@ -12,8 +12,11 @@ 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, 16);
|
||||
public static final IntegerProperty POT_LIGHT = IntegerProperty.create("pot_light", 0, 3);
|
||||
public static final BooleanProperty HAS_ITEM = BooleanProperty.create("has_item");
|
||||
|
||||
public enum PedestalState implements StringRepresentable {
|
||||
PEDESTAL_TOP("pedestal_top"),
|
||||
|
@ -28,7 +31,7 @@ public class EndBlockProperties extends BlockProperties {
|
|||
PedestalState(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getSerializedName() {
|
||||
return this.name;
|
||||
|
@ -55,7 +58,7 @@ public class EndBlockProperties extends BlockProperties {
|
|||
this.name = name;
|
||||
this.glow = glow;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getSerializedName() {
|
||||
return name;
|
||||
|
@ -87,7 +90,7 @@ public class EndBlockProperties extends BlockProperties {
|
|||
this.name = name;
|
||||
this.light = light;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getSerializedName() {
|
||||
return name;
|
||||
|
@ -113,7 +116,7 @@ public class EndBlockProperties extends BlockProperties {
|
|||
CactusBottom(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getSerializedName() {
|
||||
return name;
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
@ -37,6 +32,10 @@ import ru.betterend.blocks.basis.EndUnderwaterPlantBlock;
|
|||
import ru.betterend.registry.EndBlocks;
|
||||
import ru.betterend.registry.EndItems;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class EndLilyBlock extends EndUnderwaterPlantBlock {
|
||||
public static final EnumProperty<TripleShape> SHAPE = BlockProperties.TRIPLE_SHAPE;
|
||||
private static final VoxelShape SHAPE_BOTTOM = Block.box(4, 0, 4, 12, 16, 12);
|
||||
|
@ -44,11 +43,11 @@ public class EndLilyBlock extends EndUnderwaterPlantBlock {
|
|||
|
||||
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());
|
||||
.breakByTool(FabricToolTags.SHEARS)
|
||||
.breakByHand(true)
|
||||
.sound(SoundType.WET_GRASS)
|
||||
.lightLevel((state) -> state.getValue(SHAPE) == TripleShape.TOP ? 13 : 0)
|
||||
.noCollission());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -75,7 +74,8 @@ public class EndLilyBlock extends EndUnderwaterPlantBlock {
|
|||
|
||||
@Override
|
||||
public FluidState getFluidState(BlockState state) {
|
||||
return state.getValue(SHAPE) == TripleShape.TOP ? Fluids.EMPTY.defaultFluidState() : Fluids.WATER.getSource(false);
|
||||
return state.getValue(SHAPE) == TripleShape.TOP ? Fluids.EMPTY.defaultFluidState() : Fluids.WATER.getSource(
|
||||
false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -96,7 +96,10 @@ public class EndLilyBlock extends EndUnderwaterPlantBlock {
|
|||
@Override
|
||||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||
if (state.getValue(SHAPE) == TripleShape.TOP) {
|
||||
return Lists.newArrayList(new ItemStack(EndItems.END_LILY_LEAF, MHelper.randRange(1, 2, MHelper.RANDOM)), new ItemStack(EndBlocks.END_LILY_SEED, MHelper.randRange(1, 2, MHelper.RANDOM)));
|
||||
return Lists.newArrayList(
|
||||
new ItemStack(EndItems.END_LILY_LEAF, MHelper.randRange(1, 2, MHelper.RANDOM)),
|
||||
new ItemStack(EndBlocks.END_LILY_SEED, MHelper.randRange(1, 2, MHelper.RANDOM))
|
||||
);
|
||||
}
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
@ -111,7 +114,7 @@ public class EndLilyBlock extends EndUnderwaterPlantBlock {
|
|||
public boolean isValidBonemealTarget(BlockGetter world, BlockPos pos, BlockState state, boolean isClient) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isBonemealSuccess(Level world, Random random, BlockPos pos, BlockState state) {
|
||||
return false;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.world.level.WorldGenLevel;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
|
@ -12,17 +10,31 @@ import ru.bclib.blocks.UnderwaterPlantWithAgeBlock;
|
|||
import ru.bclib.util.BlocksHelper;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class EndLilySeedBlock extends UnderwaterPlantWithAgeBlock {
|
||||
@Override
|
||||
public void grow(WorldGenLevel world, Random random, BlockPos pos) {
|
||||
if (canGrow(world, pos)) {
|
||||
BlocksHelper.setWithoutUpdate(world, pos, EndBlocks.END_LILY.defaultBlockState().setValue(EndLilyBlock.SHAPE, TripleShape.BOTTOM));
|
||||
BlocksHelper.setWithoutUpdate(
|
||||
world,
|
||||
pos,
|
||||
EndBlocks.END_LILY.defaultBlockState().setValue(EndLilyBlock.SHAPE, TripleShape.BOTTOM)
|
||||
);
|
||||
BlockPos up = pos.above();
|
||||
while (world.getFluidState(up).isSource()) {
|
||||
BlocksHelper.setWithoutUpdate(world, up, EndBlocks.END_LILY.defaultBlockState().setValue(EndLilyBlock.SHAPE, TripleShape.MIDDLE));
|
||||
BlocksHelper.setWithoutUpdate(
|
||||
world,
|
||||
up,
|
||||
EndBlocks.END_LILY.defaultBlockState().setValue(EndLilyBlock.SHAPE, TripleShape.MIDDLE)
|
||||
);
|
||||
up = up.above();
|
||||
}
|
||||
BlocksHelper.setWithoutUpdate(world, up, EndBlocks.END_LILY.defaultBlockState().setValue(EndLilyBlock.SHAPE, TripleShape.TOP));
|
||||
BlocksHelper.setWithoutUpdate(
|
||||
world,
|
||||
up,
|
||||
EndBlocks.END_LILY.defaultBlockState().setValue(EndLilyBlock.SHAPE, TripleShape.TOP)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,9 +45,9 @@ public class EndLilySeedBlock extends UnderwaterPlantWithAgeBlock {
|
|||
}
|
||||
return world.isEmptyBlock(up);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean isTerrain(BlockState state) {
|
||||
return state.is(TagAPI.END_GROUND);
|
||||
return state.is(TagAPI.BLOCK_END_GROUND);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
@ -21,6 +18,8 @@ import ru.bclib.util.MHelper;
|
|||
import ru.betterend.blocks.basis.EndPlantBlock;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class EndLotusFlowerBlock extends EndPlantBlock {
|
||||
private static final VoxelShape SHAPE_OUTLINE = Block.box(2, 0, 2, 14, 14, 14);
|
||||
private static final VoxelShape SHAPE_COLLISION = Block.box(0, 0, 0, 16, 2, 16);
|
||||
|
@ -45,6 +44,7 @@ public class EndLotusFlowerBlock extends EndPlantBlock {
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public VoxelShape getCollisionShape(BlockState state, BlockGetter view, BlockPos pos, CollisionContext ePos) {
|
||||
return SHAPE_COLLISION;
|
||||
}
|
||||
|
|
|
@ -24,11 +24,11 @@ import ru.bclib.blocks.BaseBlockNotFull;
|
|||
import ru.bclib.blocks.BlockProperties;
|
||||
import ru.bclib.blocks.BlockProperties.TripleShape;
|
||||
import ru.bclib.client.render.BCLRenderLayer;
|
||||
import ru.bclib.interfaces.IRenderTyped;
|
||||
import ru.bclib.interfaces.RenderLayerProvider;
|
||||
import ru.bclib.util.BlocksHelper;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
public class EndLotusLeafBlock extends BaseBlockNotFull implements IRenderTyped {
|
||||
public class EndLotusLeafBlock extends BaseBlockNotFull implements RenderLayerProvider {
|
||||
public static final EnumProperty<Direction> HORIZONTAL_FACING = BlockStateProperties.HORIZONTAL_FACING;
|
||||
public static final EnumProperty<TripleShape> SHAPE = BlockProperties.TRIPLE_SHAPE;
|
||||
private static final VoxelShape VSHAPE = Block.box(0, 0, 0, 16, 1, 16);
|
||||
|
@ -38,6 +38,7 @@ public class EndLotusLeafBlock extends BaseBlockNotFull implements IRenderTyped
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean canSurvive(BlockState state, LevelReader world, BlockPos pos) {
|
||||
BlockState down = world.getBlockState(pos.below());
|
||||
return !down.getFluidState().isEmpty() && down.getFluidState().getType() instanceof WaterFluid;
|
||||
|
@ -49,16 +50,19 @@ public class EndLotusLeafBlock extends BaseBlockNotFull implements IRenderTyped
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public VoxelShape getShape(BlockState state, BlockGetter view, BlockPos pos, CollisionContext ePos) {
|
||||
return VSHAPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public BlockState rotate(BlockState state, Rotation rotation) {
|
||||
return BlocksHelper.rotateHorizontal(state, rotation, HORIZONTAL_FACING);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public BlockState mirror(BlockState state, Mirror mirror) {
|
||||
return BlocksHelper.mirrorHorizontal(state, mirror, HORIZONTAL_FACING);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -14,12 +12,16 @@ import ru.bclib.blocks.UnderwaterPlantWithAgeBlock;
|
|||
import ru.bclib.util.BlocksHelper;
|
||||
import ru.betterend.registry.EndBlocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class EndLotusSeedBlock extends UnderwaterPlantWithAgeBlock {
|
||||
@Override
|
||||
public void grow(WorldGenLevel world, Random random, BlockPos pos) {
|
||||
if (canGrow(world, pos)) {
|
||||
BlockState startLeaf = EndBlocks.END_LOTUS_STEM.defaultBlockState().setValue(EndLotusStemBlock.LEAF, true);
|
||||
BlockState roots = EndBlocks.END_LOTUS_STEM.defaultBlockState().setValue(EndLotusStemBlock.SHAPE, TripleShape.BOTTOM).setValue(EndLotusStemBlock.WATERLOGGED, true);
|
||||
BlockState roots = EndBlocks.END_LOTUS_STEM.defaultBlockState()
|
||||
.setValue(EndLotusStemBlock.SHAPE, TripleShape.BOTTOM)
|
||||
.setValue(EndLotusStemBlock.WATERLOGGED, true);
|
||||
BlockState stem = EndBlocks.END_LOTUS_STEM.defaultBlockState();
|
||||
BlockState flower = EndBlocks.END_LOTUS_FLOWER.defaultBlockState();
|
||||
|
||||
|
@ -37,7 +39,11 @@ public class EndLotusSeedBlock extends UnderwaterPlantWithAgeBlock {
|
|||
BlockPos leafCenter = bpos.immutable().relative(dir);
|
||||
if (hasLeaf(world, leafCenter)) {
|
||||
generateLeaf(world, leafCenter);
|
||||
BlocksHelper.setWithoutUpdate(world, bpos, startLeaf.setValue(EndLotusStemBlock.SHAPE, shape).setValue(EndLotusStemBlock.FACING, dir));
|
||||
BlocksHelper.setWithoutUpdate(
|
||||
world,
|
||||
bpos,
|
||||
startLeaf.setValue(EndLotusStemBlock.SHAPE, shape).setValue(EndLotusStemBlock.FACING, dir)
|
||||
);
|
||||
}
|
||||
else {
|
||||
BlocksHelper.setWithoutUpdate(world, bpos, stem.setValue(EndLotusStemBlock.SHAPE, shape));
|
||||
|
@ -92,13 +98,23 @@ public class EndLotusSeedBlock extends UnderwaterPlantWithAgeBlock {
|
|||
MutableBlockPos p = new MutableBlockPos();
|
||||
BlockState leaf = EndBlocks.END_LOTUS_LEAF.defaultBlockState();
|
||||
BlocksHelper.setWithoutUpdate(world, pos, leaf.setValue(EndLotusLeafBlock.SHAPE, TripleShape.BOTTOM));
|
||||
for (Direction move: BlocksHelper.HORIZONTAL) {
|
||||
BlocksHelper.setWithoutUpdate(world, p.set(pos).move(move), leaf.setValue(EndLotusLeafBlock.HORIZONTAL_FACING, move).setValue(EndLotusLeafBlock.SHAPE, TripleShape.MIDDLE));
|
||||
for (Direction move : BlocksHelper.HORIZONTAL) {
|
||||
BlocksHelper.setWithoutUpdate(
|
||||
world,
|
||||
p.set(pos).move(move),
|
||||
leaf.setValue(EndLotusLeafBlock.HORIZONTAL_FACING, move)
|
||||
.setValue(EndLotusLeafBlock.SHAPE, TripleShape.MIDDLE)
|
||||
);
|
||||
}
|
||||
for (int i = 0; i < 4; i ++) {
|
||||
for (int i = 0; i < 4; i++) {
|
||||
Direction d1 = BlocksHelper.HORIZONTAL[i];
|
||||
Direction d2 = BlocksHelper.HORIZONTAL[(i + 1) & 3];
|
||||
BlocksHelper.setWithoutUpdate(world, p.set(pos).move(d1).move(d2), leaf.setValue(EndLotusLeafBlock.HORIZONTAL_FACING, d1).setValue(EndLotusLeafBlock.SHAPE, TripleShape.TOP));
|
||||
BlocksHelper.setWithoutUpdate(
|
||||
world,
|
||||
p.set(pos).move(d1).move(d2),
|
||||
leaf.setValue(EndLotusLeafBlock.HORIZONTAL_FACING, d1)
|
||||
.setValue(EndLotusLeafBlock.SHAPE, TripleShape.TOP)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -106,19 +122,18 @@ public class EndLotusSeedBlock extends UnderwaterPlantWithAgeBlock {
|
|||
MutableBlockPos p = new MutableBlockPos();
|
||||
p.setY(pos.getY());
|
||||
int count = 0;
|
||||
for (int x = -1; x < 2; x ++) {
|
||||
for (int x = -1; x < 2; x++) {
|
||||
p.setX(pos.getX() + x);
|
||||
for (int z = -1; z < 2; z ++) {
|
||||
for (int z = -1; z < 2; z++) {
|
||||
p.setZ(pos.getZ() + z);
|
||||
if (world.isEmptyBlock(p) && !world.getFluidState(p.below()).isEmpty())
|
||||
count ++;
|
||||
if (world.isEmptyBlock(p) && !world.getFluidState(p.below()).isEmpty()) count++;
|
||||
}
|
||||
}
|
||||
return count == 9;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean isTerrain(BlockState state) {
|
||||
return state.is(TagAPI.END_GROUND);
|
||||
return state.is(TagAPI.BLOCK_END_GROUND);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
|
@ -29,10 +26,12 @@ import ru.bclib.blocks.BaseBlock;
|
|||
import ru.bclib.blocks.BlockProperties;
|
||||
import ru.bclib.blocks.BlockProperties.TripleShape;
|
||||
import ru.bclib.client.render.BCLRenderLayer;
|
||||
import ru.bclib.interfaces.IRenderTyped;
|
||||
import ru.bclib.interfaces.RenderLayerProvider;
|
||||
import ru.bclib.util.BlocksHelper;
|
||||
|
||||
public class EndLotusStemBlock extends BaseBlock implements SimpleWaterloggedBlock, IRenderTyped {
|
||||
import java.util.Map;
|
||||
|
||||
public class EndLotusStemBlock extends BaseBlock implements SimpleWaterloggedBlock, RenderLayerProvider {
|
||||
public static final EnumProperty<Direction> FACING = BlockStateProperties.FACING;
|
||||
public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED;
|
||||
public static final BooleanProperty LEAF = BooleanProperty.create("leaf");
|
||||
|
@ -41,10 +40,14 @@ public class EndLotusStemBlock extends BaseBlock implements SimpleWaterloggedBlo
|
|||
|
||||
public EndLotusStemBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.OAK_PLANKS));
|
||||
this.registerDefaultState(defaultBlockState().setValue(WATERLOGGED, false).setValue(SHAPE, TripleShape.MIDDLE).setValue(LEAF, false).setValue(FACING, Direction.UP));
|
||||
this.registerDefaultState(defaultBlockState().setValue(WATERLOGGED, false)
|
||||
.setValue(SHAPE, TripleShape.MIDDLE)
|
||||
.setValue(LEAF, false)
|
||||
.setValue(FACING, Direction.UP));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public VoxelShape getShape(BlockState state, BlockGetter view, BlockPos pos, CollisionContext ePos) {
|
||||
return state.getValue(LEAF) ? SHAPES.get(Axis.Y) : SHAPES.get(state.getValue(FACING).getAxis());
|
||||
}
|
||||
|
@ -55,31 +58,37 @@ public class EndLotusStemBlock extends BaseBlock implements SimpleWaterloggedBlo
|
|||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public FluidState getFluidState(BlockState state) {
|
||||
return state.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(state);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockPlaceContext ctx) {
|
||||
LevelAccessor worldAccess = ctx.getLevel();
|
||||
BlockPos blockPos = ctx.getClickedPos();
|
||||
return this.defaultBlockState().setValue(WATERLOGGED, worldAccess.getFluidState(blockPos).getType() == Fluids.WATER).setValue(FACING, ctx.getClickedFace());
|
||||
return this.defaultBlockState()
|
||||
.setValue(WATERLOGGED, worldAccess.getFluidState(blockPos).getType() == Fluids.WATER)
|
||||
.setValue(FACING, ctx.getClickedFace());
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public BlockState rotate(BlockState state, Rotation rotation) {
|
||||
return BlocksHelper.rotateHorizontal(state, rotation, FACING);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public BlockState mirror(BlockState state, Mirror mirror) {
|
||||
return BlocksHelper.mirrorHorizontal(state, mirror, FACING);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public BlockState updateShape(BlockState state, Direction direction, BlockState newState, LevelAccessor world, BlockPos pos, BlockPos posFrom) {
|
||||
if (state.getValue(WATERLOGGED)) {
|
||||
world.getLiquidTicks().scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world));
|
||||
world.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world));
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
|
|
@ -1,33 +1,30 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import ru.betterend.BetterEnd;
|
||||
import ru.betterend.blocks.basis.PedestalBlock;
|
||||
|
||||
public class EndPedestal extends PedestalBlock {
|
||||
import java.util.Map;
|
||||
|
||||
public class EndPedestal extends PedestalBlock {
|
||||
|
||||
public EndPedestal(Block parent) {
|
||||
super(parent);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected Map<String, String> createTexturesMap() {
|
||||
ResourceLocation blockId = Registry.BLOCK.getKey(parent);
|
||||
String name = blockId.getPath();
|
||||
return new HashMap<String, String>() {
|
||||
private static final long serialVersionUID = 1L;
|
||||
{
|
||||
put("%mod%", BetterEnd.MOD_ID );
|
||||
put("%top%", name + "_polished");
|
||||
put("%base%", name + "_polished");
|
||||
put("%pillar%", name + "_pillar_side");
|
||||
put("%bottom%", name + "_polished");
|
||||
}
|
||||
};
|
||||
Map<String, String> textures = Maps.newHashMap();
|
||||
textures.put("%mod%", BetterEnd.MOD_ID);
|
||||
textures.put("%top%", name + "_polished");
|
||||
textures.put("%base%", name + "_polished");
|
||||
textures.put("%pillar%", name + "_pillar_side");
|
||||
textures.put("%bottom%", name + "_polished");
|
||||
return textures;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.Random;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
@ -33,20 +29,26 @@ import net.minecraft.world.level.block.state.StateDefinition;
|
|||
import net.minecraft.world.level.block.state.properties.IntegerProperty;
|
||||
import net.minecraft.world.level.dimension.DimensionType;
|
||||
import ru.bclib.client.render.BCLRenderLayer;
|
||||
import ru.bclib.interfaces.IColorProvider;
|
||||
import ru.bclib.interfaces.IRenderTyped;
|
||||
import ru.bclib.interfaces.CustomColorProvider;
|
||||
import ru.bclib.interfaces.RenderLayerProvider;
|
||||
import ru.betterend.interfaces.TeleportingEntity;
|
||||
import ru.betterend.registry.EndParticles;
|
||||
import ru.betterend.registry.EndPortals;
|
||||
import ru.betterend.rituals.EternalRitual;
|
||||
|
||||
public class EndPortalBlock extends NetherPortalBlock implements IRenderTyped, IColorProvider {
|
||||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.Random;
|
||||
|
||||
public class EndPortalBlock extends NetherPortalBlock implements RenderLayerProvider, CustomColorProvider {
|
||||
public static final IntegerProperty PORTAL = EndBlockProperties.PORTAL;
|
||||
|
||||
|
||||
public EndPortalBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.NETHER_PORTAL).resistance(Blocks.BEDROCK.getExplosionResistance()).luminance(15));
|
||||
super(FabricBlockSettings.copyOf(Blocks.NETHER_PORTAL)
|
||||
.resistance(Blocks.BEDROCK.getExplosionResistance())
|
||||
.luminance(15));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
|
||||
super.createBlockStateDefinition(builder);
|
||||
|
@ -57,24 +59,35 @@ public class EndPortalBlock extends NetherPortalBlock implements IRenderTyped, I
|
|||
@Environment(EnvType.CLIENT)
|
||||
public void animateTick(BlockState state, Level world, BlockPos pos, Random random) {
|
||||
if (random.nextInt(100) == 0) {
|
||||
world.playLocalSound(pos.getX() + 0.5D, pos.getY() + 0.5D, pos.getZ() + 0.5D, SoundEvents.PORTAL_AMBIENT, SoundSource.BLOCKS, 0.5F, random.nextFloat() * 0.4F + 0.8F, false);
|
||||
world.playLocalSound(
|
||||
pos.getX() + 0.5D,
|
||||
pos.getY() + 0.5D,
|
||||
pos.getZ() + 0.5D,
|
||||
SoundEvents.PORTAL_AMBIENT,
|
||||
SoundSource.BLOCKS,
|
||||
0.5F,
|
||||
random.nextFloat() * 0.4F + 0.8F,
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
double x = pos.getX() + random.nextDouble();
|
||||
double y = pos.getY() + random.nextDouble();
|
||||
double z = pos.getZ() + random.nextDouble();
|
||||
int k = random.nextInt(2) * 2 - 1;
|
||||
if (!world.getBlockState(pos.west()).is(this) && !world.getBlockState(pos.east()).is(this)) {
|
||||
x = pos.getX() + 0.5D + 0.25D * k;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
z = pos.getZ() + 0.5D + 0.25D * k;
|
||||
}
|
||||
|
||||
|
||||
world.addParticle(EndParticles.PORTAL_SPHERE, x, y, z, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void randomTick(BlockState state, ServerLevel world, BlockPos pos, Random random) {}
|
||||
public void randomTick(BlockState state, ServerLevel world, BlockPos pos, Random random) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState updateShape(BlockState state, Direction direction, BlockState newState, LevelAccessor world, BlockPos pos, BlockPos posFrom) {
|
||||
|
@ -93,18 +106,24 @@ 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.yRot, entity.xRot);
|
||||
} else {
|
||||
((ServerPlayer) entity).teleportTo(
|
||||
destination,
|
||||
exitPos.getX() + 0.5,
|
||||
exitPos.getY(),
|
||||
exitPos.getZ() + 0.5,
|
||||
entity.getYRot(),
|
||||
entity.getXRot()
|
||||
);
|
||||
}
|
||||
else {
|
||||
((TeleportingEntity) entity).be_setExitPos(exitPos);
|
||||
Optional<Entity> teleported = Optional.ofNullable(entity.changeDimension(destination));
|
||||
teleported.ifPresent(Entity::setPortalCooldown);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private boolean validate(Entity entity) {
|
||||
return !entity.isPassenger() && !entity.isVehicle() &&
|
||||
entity.canChangeDimensions() && !entity.isOnPortalCooldown();
|
||||
return !entity.isPassenger() && !entity.isVehicle() && entity.canChangeDimensions() && !entity.isOnPortalCooldown();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -114,18 +133,28 @@ public class EndPortalBlock extends NetherPortalBlock implements IRenderTyped, I
|
|||
|
||||
private BlockPos findExitPos(ServerLevel currentWorld, ServerLevel targetWorld, BlockPos currentPos, Entity entity) {
|
||||
if (targetWorld == null) return null;
|
||||
Registry<DimensionType> registry = targetWorld.registryAccess().dimensionTypes();
|
||||
Registry<DimensionType> registry = targetWorld.registryAccess()
|
||||
.registryOrThrow(Registry.DIMENSION_TYPE_REGISTRY);
|
||||
ResourceLocation targetWorldId = targetWorld.dimension().location();
|
||||
ResourceLocation currentWorldId = currentWorld.dimension().location();
|
||||
double targetMultiplier = Objects.requireNonNull(registry.get(targetWorldId)).coordinateScale();
|
||||
double currentMultiplier = Objects.requireNonNull(registry.get(currentWorldId)).coordinateScale();
|
||||
double multiplier = targetMultiplier > currentMultiplier ? 1.0 / targetMultiplier : currentMultiplier;
|
||||
MutableBlockPos basePos = currentPos.mutable().set(currentPos.getX() * multiplier, currentPos.getY(), currentPos.getZ() * multiplier);
|
||||
MutableBlockPos basePos = currentPos.mutable()
|
||||
.set(currentPos.getX() * multiplier,
|
||||
currentPos.getY(),
|
||||
currentPos.getZ() * multiplier
|
||||
);
|
||||
MutableBlockPos checkPos = basePos.mutable();
|
||||
BlockState currentState = currentWorld.getBlockState(currentPos);
|
||||
int radius = (EternalRitual.SEARCH_RADIUS >> 4) + 1;
|
||||
checkPos = EternalRitual.findBlockPos(targetWorld, checkPos, radius, this, state -> state.is(this) &&
|
||||
state.getValue(PORTAL).equals(currentState.getValue(PORTAL)));
|
||||
checkPos = EternalRitual.findBlockPos(
|
||||
targetWorld,
|
||||
checkPos,
|
||||
radius,
|
||||
this,
|
||||
state -> state.is(this) && state.getValue(PORTAL).equals(currentState.getValue(PORTAL))
|
||||
);
|
||||
if (checkPos != null) {
|
||||
BlockState checkState = targetWorld.getBlockState(checkPos);
|
||||
Axis axis = checkState.getValue(AXIS);
|
||||
|
@ -159,21 +188,24 @@ public class EndPortalBlock extends NetherPortalBlock implements IRenderTyped, I
|
|||
BlockState down = world.getBlockState(pos.below());
|
||||
if (down.is(this)) {
|
||||
return findCenter(world, pos.move(Direction.DOWN), axis, step);
|
||||
} else if (right.is(this) && left.is(this)) {
|
||||
}
|
||||
else if (right.is(this) && left.is(this)) {
|
||||
return pos;
|
||||
} else if (right.is(this)) {
|
||||
}
|
||||
else if (right.is(this)) {
|
||||
return findCenter(world, pos.move(rightDir), axis, ++step);
|
||||
} else if (left.is(this)) {
|
||||
}
|
||||
else if (left.is(this)) {
|
||||
return findCenter(world, pos.move(leftDir), axis, ++step);
|
||||
}
|
||||
return pos;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockColor getProvider() {
|
||||
return (state, world, pos, tintIndex) -> EndPortals.getColor(state.getValue(PORTAL));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ItemColor getItemProvider() {
|
||||
return (stack, tintIndex) -> EndPortals.getColor(0);
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
@ -19,7 +15,6 @@ import net.minecraft.world.entity.player.Player;
|
|||
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
|
||||
|
@ -28,6 +23,8 @@ import net.minecraft.world.level.block.RenderShape;
|
|||
import net.minecraft.world.level.block.Rotation;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityTicker;
|
||||
import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.StateDefinition;
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||
|
@ -38,34 +35,40 @@ import net.minecraft.world.level.material.MaterialColor;
|
|||
import net.minecraft.world.level.storage.loot.LootContext;
|
||||
import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
|
||||
import net.minecraft.world.phys.BlockHitResult;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import ru.bclib.blocks.BaseBlockWithEntity;
|
||||
import ru.betterend.blocks.entities.EndStoneSmelterBlockEntity;
|
||||
import ru.betterend.registry.EndBlockEntities;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class EndStoneSmelter extends BaseBlockWithEntity {
|
||||
public static final DirectionProperty FACING = HorizontalDirectionalBlock.FACING;
|
||||
public static final BooleanProperty LIT = BlockStateProperties.LIT;
|
||||
public static final String ID = "end_stone_smelter";
|
||||
|
||||
|
||||
public EndStoneSmelter() {
|
||||
super(FabricBlockSettings.of(Material.STONE, MaterialColor.COLOR_GRAY)
|
||||
.hardness(4F)
|
||||
.resistance(100F)
|
||||
.requiresCorrectToolForDrops()
|
||||
.sound(SoundType.STONE));
|
||||
this.registerDefaultState(this.stateDefinition.any()
|
||||
.setValue(FACING, Direction.NORTH)
|
||||
.setValue(LIT, false));
|
||||
.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));
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) {
|
||||
if (world.isClientSide) {
|
||||
return InteractionResult.SUCCESS;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
this.openScreen(world, pos, player);
|
||||
return InteractionResult.CONSUME;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void openScreen(Level world, BlockPos pos, Player player) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity instanceof EndStoneSmelterBlockEntity) {
|
||||
|
@ -75,12 +78,12 @@ public class EndStoneSmelter extends BaseBlockWithEntity {
|
|||
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockPlaceContext ctx) {
|
||||
return this.defaultBlockState().setValue(FACING, ctx.getHorizontalDirection().getOpposite());
|
||||
return defaultBlockState().setValue(FACING, ctx.getHorizontalDirection().getOpposite());
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntity newBlockEntity(BlockGetter world) {
|
||||
return new EndStoneSmelterBlockEntity();
|
||||
public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) {
|
||||
return new EndStoneSmelterBlockEntity(blockPos, blockState);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -98,33 +101,37 @@ public class EndStoneSmelter extends BaseBlockWithEntity {
|
|||
}
|
||||
return drop;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean hasAnalogOutputSignal(BlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public int getAnalogOutputSignal(BlockState state, Level world, BlockPos pos) {
|
||||
//TODO
|
||||
return AbstractContainerMenu.getRedstoneSignalFromBlockEntity(world.getBlockEntity(pos));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public RenderShape getRenderShape(BlockState state) {
|
||||
return RenderShape.MODEL;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public BlockState rotate(BlockState state, Rotation rotation) {
|
||||
return state.setValue(FACING, rotation.rotate(state.getValue(FACING)));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public BlockState mirror(BlockState state, Mirror mirror) {
|
||||
return state.rotate(mirror.getRotation(state.getValue(FACING)));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
|
||||
builder.add(FACING, LIT);
|
||||
|
@ -137,9 +144,18 @@ public class EndStoneSmelter extends BaseBlockWithEntity {
|
|||
double y = pos.getY();
|
||||
double z = pos.getZ() + 0.5D;
|
||||
if (random.nextDouble() < 0.1D) {
|
||||
world.playLocalSound(x, y, z, SoundEvents.BLASTFURNACE_FIRE_CRACKLE, SoundSource.BLOCKS, 1.0F, 1.0F, false);
|
||||
world.playLocalSound(
|
||||
x,
|
||||
y,
|
||||
z,
|
||||
SoundEvents.BLASTFURNACE_FIRE_CRACKLE,
|
||||
SoundSource.BLOCKS,
|
||||
1.0F,
|
||||
1.0F,
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Direction direction = state.getValue(FACING);
|
||||
Direction.Axis axis = direction.getAxis();
|
||||
double defOffset = random.nextDouble() * 0.6D - 0.3D;
|
||||
|
@ -149,4 +165,15 @@ public class EndStoneSmelter extends BaseBlockWithEntity {
|
|||
world.addParticle(ParticleTypes.SMOKE, x + offX, y + offY, z + offZ, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level level, BlockState blockState, BlockEntityType<T> blockEntityType) {
|
||||
return level.isClientSide() ? null : createTickerHelper(
|
||||
blockEntityType,
|
||||
EndBlockEntities.END_STONE_SMELTER,
|
||||
EndStoneSmelterBlockEntity::tick
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,15 +12,15 @@ import net.minecraft.world.level.material.MaterialColor;
|
|||
import ru.bclib.blocks.BaseBlock;
|
||||
|
||||
public class EnderBlock extends BaseBlock {
|
||||
|
||||
|
||||
public EnderBlock() {
|
||||
super(FabricBlockSettings.of(Material.STONE, MaterialColor.WARPED_WART_BLOCK)
|
||||
.hardness(5F)
|
||||
.resistance(6F)
|
||||
.requiresCorrectToolForDrops()
|
||||
.sound(SoundType.STONE));
|
||||
.hardness(5F)
|
||||
.resistance(6F)
|
||||
.requiresCorrectToolForDrops()
|
||||
.sound(SoundType.STONE));
|
||||
}
|
||||
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public int getColor(BlockState state, BlockGetter world, BlockPos pos) {
|
||||
return 0xFF005548;
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
|
@ -16,21 +13,27 @@ import net.minecraft.world.level.block.state.BlockState;
|
|||
import net.minecraft.world.level.storage.loot.LootContext;
|
||||
import ru.bclib.util.ColorUtil;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class EndstoneDustBlock extends FallingBlock {
|
||||
@Environment(EnvType.CLIENT)
|
||||
private static final int COLOR = ColorUtil.color(226, 239, 168);
|
||||
|
||||
public EndstoneDustBlock() {
|
||||
super(FabricBlockSettings.copyOf(Blocks.SAND)
|
||||
.breakByTool(FabricToolTags.SHOVELS)
|
||||
.materialColor(Blocks.END_STONE.defaultMaterialColor()));
|
||||
super(FabricBlockSettings
|
||||
.copyOf(Blocks.SAND)
|
||||
.breakByTool(FabricToolTags.SHOVELS)
|
||||
.mapColor(Blocks.END_STONE.defaultMaterialColor())
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||
return Collections.singletonList(new ItemStack(this));
|
||||
}
|
||||
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public int getDustColor(BlockState state, BlockGetter world, BlockPos pos) {
|
||||
return COLOR;
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
package ru.betterend.blocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Registry;
|
||||
|
@ -28,6 +25,8 @@ import ru.betterend.registry.EndBlocks;
|
|||
import ru.betterend.registry.EndPortals;
|
||||
import ru.betterend.rituals.EternalRitual;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class EternalPedestal extends PedestalBlock {
|
||||
public static final BooleanProperty ACTIVATED = EndBlockProperties.ACTIVE;
|
||||
|
||||
|
@ -50,21 +49,24 @@ public class EternalPedestal extends PedestalBlock {
|
|||
int portalId;
|
||||
if (targetWorld != null) {
|
||||
portalId = EndPortals.getPortalIdByWorld(targetWorld);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
portalId = EndPortals.getPortalIdByWorld(EndPortals.OVERWORLD_ID);
|
||||
}
|
||||
ritual.disablePortal(portalId);
|
||||
}
|
||||
}
|
||||
world.setBlockAndUpdate(pos, updatedState.setValue(ACTIVATED, false).setValue(HAS_LIGHT, false));
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
ItemStack itemStack = pedestal.getItem(0);
|
||||
ResourceLocation id = Registry.ITEM.getKey(itemStack.getItem());
|
||||
if (EndPortals.isAvailableItem(id)) {
|
||||
world.setBlockAndUpdate(pos, updatedState.setValue(ACTIVATED, true).setValue(HAS_LIGHT, true));
|
||||
if (pedestal.hasRitual()) {
|
||||
pedestal.getRitual().checkStructure();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
EternalRitual ritual = new EternalRitual(world, pos);
|
||||
ritual.checkStructure();
|
||||
}
|
||||
|
@ -124,12 +126,12 @@ public class EternalPedestal extends PedestalBlock {
|
|||
super.createBlockStateDefinition(stateManager);
|
||||
stateManager.add(ACTIVATED);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public BlockEntity newBlockEntity(BlockGetter world) {
|
||||
return new EternalPedestalEntity();
|
||||
public BlockEntity newBlockEntity(BlockPos blockPos, BlockState blockState) {
|
||||
return new EternalPedestalEntity(blockPos, blockState);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean hasUniqueEntity() {
|
||||
return true;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue