Compare commits
6 Commits
72b9c7dece
...
1.21.4
Author | SHA1 | Date | |
---|---|---|---|
06db4df2cb | |||
0c744ef52b | |||
4c5dea1756 | |||
0079c721cc | |||
7e299caed0 | |||
0338c7c5ef |
613
.classpath
613
.classpath
@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<classpath>
|
<classpath>
|
||||||
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
|
|
||||||
<classpathentry kind="src" output="bin/main" path="src/main/java">
|
<classpathentry kind="src" output="bin/main" path="src/main/java">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="gradle_scope" value="main"/>
|
<attribute name="gradle_scope" value="main"/>
|
||||||
@ -13,615 +12,7 @@
|
|||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
<attribute name="gradle_used_by_scope" value="main,test"/>
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21/"/>
|
||||||
<attributes>
|
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
|
||||||
<attribute name="module" value="true"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/24.1.0/7af6a669488450c4a07c2c3254e2151df42d7d04/annotations-24.1.0.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/24.1.0/d90a405211798b013b8ee3d54f70edc0913a28b0/annotations-24.1.0-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value=""/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm/9.6/aa205cf0a06dbd8e04ece91c0b37c3f5d567546a/asm-9.6.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm/9.6/d55087ece3c6a82ef0d6acb9d853886d7af9445d/asm-9.6-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-analysis/9.6/9ce6c7b174bd997fc2552dff47964546bd7a5ec3/asm-analysis-9.6.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-analysis/9.6/2a0c33a19c1b594fee4eb539e3cd51eb3dd80903/asm-analysis-9.6-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-commons/9.6/f1a9e5508eff490744144565c47326c8648be309/asm-commons-9.6.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-commons/9.6/446c8ca5fffad2e50b5a7ab4c25fc901c7f38ab9/asm-commons-9.6-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-tree/9.6/c0cdda9d211e965d2a4448aa3fd86110f2f8c2de/asm-tree-9.6.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-tree/9.6/ea2ff719db7976655f5c95469a98eac7671a119/asm-tree-9.6-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-util/9.6/f77caf84eb93786a749b2baa40865b9613e3eaee/asm-util-9.6.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm-util/9.6/7113c3476982c7b982f16b45d24dd86e2ffca46a/asm-util-9.6-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/net.fabricmc/sponge-mixin/0.13.3+mixin.0.8.5/9527e6b0d2449408958fd1302594dc65ec5ade9c/sponge-mixin-0.13.3+mixin.0.8.5.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/net.fabricmc/sponge-mixin/0.13.3+mixin.0.8.5/728bb250347f7d817d0fb733180e8c7ea485b0a/sponge-mixin-0.13.3+mixin.0.8.5-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/io.github.llamalad7/mixinextras-fabric/0.3.5/3b577be20ea942610b3045e4f0cd909fa415a9d3/mixinextras-fabric-0.3.5.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/io.github.llamalad7/mixinextras-fabric/0.3.5/86a7826b6f561dab8643e92a6b62a513da9fba60/mixinextras-fabric-0.3.5-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/net.fabricmc/yarn/1.21+build.2/2ad14aed781c4a73ed4dbb421966d408a0a06686/yarn-1.21+build.2-constants.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/net.fabricmc/yarn/1.21+build.2/ce51544996d8a3cd4f6a1a4ba3a54dc142c92ea7/yarn-1.21+build.2-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value=""/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/com.github.oshi/oshi-core/6.4.10/b1d8ab82d11d92fd639b56d639f8f46f739dd5fa/oshi-core-6.4.10.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/com.github.oshi/oshi-core/6.4.10/4ed9e291040b618d12880f00fe77f13777dfa7cb/oshi-core-6.4.10-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/com.google.code.gson/gson/2.10.1/b3add478d4382b78ea20b1671390a858002feb6c/gson-2.10.1.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/com.google.code.gson/gson/2.10.1/982a90132e942f302e6fe79d6e78c4bc2e998569/gson-2.10.1-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/com.google.guava/failureaccess/1.0.1/1dcf1de382a0bf95a3d8b0849546c88bac1292c9/failureaccess-1.0.1.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/com.google.guava/failureaccess/1.0.1/1d064e61aad6c51cc77f9b59dc2cccc78e792f5a/failureaccess-1.0.1-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/32.1.2-jre/5e64ec7e056456bef3a4bc4c6fdaef71e8ab6318/guava-32.1.2-jre.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/32.1.2-jre/e1911d4544f426600132fbd450a7ccab8a3ce8dc/guava-32.1.2-jre-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/com.ibm.icu/icu4j/73.2/61ad4ef7f9131fcf6d25c34b817f90d6da06c9e9/icu4j-73.2.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/com.ibm.icu/icu4j/73.2/824467d920134624effab17374434d00fe7b3b40/icu4j-73.2-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/com.mojang/authlib/6.0.54/de8bc95660e1b2fe8793fd427a7a10dcec5b3ea7/authlib-6.0.54.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/com.mojang/authlib/6.0.54/1e11f447b3029c31afa41291f02d0da3701af827/authlib-6.0.54-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/com.mojang/blocklist/1.0.10/5c685c5ffa94c4cd39496c7184c1d122e515ecef/blocklist-1.0.10.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/com.mojang/blocklist/1.0.10/ef44852fa1707a833bfa8e8518659ab18f368d25/blocklist-1.0.10-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/com.mojang/brigadier/1.2.9/73e324f2ee541493a5179abf367237faa782ed21/brigadier-1.2.9.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/com.mojang/brigadier/1.2.9/b81375eb6ee3fccbda1841a5620a61798655beb/brigadier-1.2.9-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/com.mojang/datafixerupper/8.0.16/67d4de6d7f95d89bcf5862995fb854ebaec02a34/datafixerupper-8.0.16.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/com.mojang/datafixerupper/8.0.16/1482506562a012761c60594c23f6bcbeb0d354a3/datafixerupper-8.0.16-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/com.mojang/logging/1.2.7/24cb95ffb0e3433fd6e844c04e68009e504ca1c0/logging-1.2.7.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/com.mojang/logging/1.2.7/3913c421c4f6b914a15fa267e6dbab44c989690f/logging-1.2.7-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/com.mojang/patchy/2.2.10/da05971b07cbb379d002cf7eaec6a2048211fefc/patchy-2.2.10.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/com.mojang/text2speech/1.17.9/3cad216e3a7f0c19b4b394388bc9ffc446f13b14/text2speech-1.17.9.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/com.mojang/text2speech/1.17.9/1898fbfd00a552b7f9a3cc0438623845a91e74ed/text2speech-1.17.9-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/commons-codec/commons-codec/1.16.0/4e3eb3d79888d76b54e28b350915b5dc3919c9de/commons-codec-1.16.0.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/commons-codec/commons-codec/1.16.0/57c67a979689051a455570196d0f48134db9909e/commons-codec-1.16.0-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/commons-io/commons-io/2.15.1/f11560da189ab563a5c8e351941415430e9304ea/commons-io-2.15.1.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/commons-io/commons-io/2.15.1/f23737700ceaddc75169d994c7d9c9a2e5dddf39/commons-io-2.15.1-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/commons-logging/commons-logging/1.2/4bfc12adfe4842bf07b657f0369c4cb522955686/commons-logging-1.2.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/commons-logging/commons-logging/1.2/ecf26c7507d67782a3bbd148d170b31dfad001aa/commons-logging-1.2-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/io.netty/netty-buffer/4.1.97.Final/f8f3d8644afa5e6e1a40a3a6aeb9d9aa970ecb4f/netty-buffer-4.1.97.Final.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/io.netty/netty-buffer/4.1.97.Final/5d2c3a0c097b4fd07fe87c35ad6ad125a683cf05/netty-buffer-4.1.97.Final-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/io.netty/netty-codec/4.1.97.Final/384ba4d75670befbedb45c4d3b497a93639c206d/netty-codec-4.1.97.Final.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/io.netty/netty-codec/4.1.97.Final/ec4abd65dbbb57b39e4e7ca40d8883e052038862/netty-codec-4.1.97.Final-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/io.netty/netty-common/4.1.97.Final/7cceacaf11df8dc63f23d0fb58e9d4640fc88404/netty-common-4.1.97.Final.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/io.netty/netty-common/4.1.97.Final/6602f651718b461cd2d17244d95cc87d58c3169a/netty-common-4.1.97.Final-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/io.netty/netty-handler/4.1.97.Final/abb86c6906bf512bf2b797a41cd7d2e8d3cd7c36/netty-handler-4.1.97.Final.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/io.netty/netty-handler/4.1.97.Final/badecb27f6b39814c8932d2ba8d5c3ce2a8dffe/netty-handler-4.1.97.Final-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/io.netty/netty-resolver/4.1.97.Final/cec8348108dc76c47cf87c669d514be52c922144/netty-resolver-4.1.97.Final.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/io.netty/netty-resolver/4.1.97.Final/79dbdd5bddcb4f901c18337b367db354df56fca1/netty-resolver-4.1.97.Final-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/io.netty/netty-transport-classes-epoll/4.1.97.Final/795da37ded759e862457a82d9d92c4d39ce8ecee/netty-transport-classes-epoll-4.1.97.Final.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/io.netty/netty-transport-classes-epoll/4.1.97.Final/c4c9f444bc376a359b3159d45947ffc510d77d38/netty-transport-classes-epoll-4.1.97.Final-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/io.netty/netty-transport-native-epoll/4.1.97.Final/5514744c588190ffda076b35a9b8c9f24946a960/netty-transport-native-epoll-4.1.97.Final-linux-aarch_64.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/io.netty/netty-transport-native-epoll/4.1.97.Final/88dc2589ab3fdf0199ec0bd1b7c094ae9bab31fb/netty-transport-native-epoll-4.1.97.Final-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/io.netty/netty-transport-native-epoll/4.1.97.Final/54188f271e388e7f313aea995e82f58ce2cdb809/netty-transport-native-epoll-4.1.97.Final-linux-x86_64.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/io.netty/netty-transport-native-epoll/4.1.97.Final/88dc2589ab3fdf0199ec0bd1b7c094ae9bab31fb/netty-transport-native-epoll-4.1.97.Final-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/io.netty/netty-transport-native-unix-common/4.1.97.Final/d469d84265ab70095b01b40886cabdd433b6e664/netty-transport-native-unix-common-4.1.97.Final.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/io.netty/netty-transport-native-unix-common/4.1.97.Final/d9bcfe2c9bc55a77973fc4bb7e4d6c1a298ac9e9/netty-transport-native-unix-common-4.1.97.Final-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/io.netty/netty-transport/4.1.97.Final/f37380d23c9bb079bc702910833b2fd532c9abd0/netty-transport-4.1.97.Final.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/io.netty/netty-transport/4.1.97.Final/80452a42374b6c4e1a3596ce09f337b4ff4f4efb/netty-transport-4.1.97.Final-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/it.unimi.dsi/fastutil/8.5.12/c24946d46824bd528054bface3231d2ecb7e95e8/fastutil-8.5.12.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/it.unimi.dsi/fastutil/8.5.12/a57be04c180ac69159c5dc2e9902deebc25780bd/fastutil-8.5.12-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/net.java.dev.jna/jna-platform/5.14.0/28934d48aed814f11e4c584da55c49fa7032b31b/jna-platform-5.14.0.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/net.java.dev.jna/jna-platform/5.14.0/cefe3d258159eb44f4369ff5d8e12602a340bd15/jna-platform-5.14.0-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/net.java.dev.jna/jna/5.14.0/67bf3eaea4f0718cb376a181a629e5f88fa1c9dd/jna-5.14.0.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/net.java.dev.jna/jna/5.14.0/13bda98796cf4739f5d40cb825578cfaa8463c6e/jna-5.14.0-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/net.sf.jopt-simple/jopt-simple/5.0.4/4fdac2fbe92dfad86aa6e9301736f6b4342a3f5c/jopt-simple-5.0.4.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/net.sf.jopt-simple/jopt-simple/5.0.4/950831646d014c9162999019a3cb17d5fc01ac0d/jopt-simple-5.0.4-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-compress/1.26.0/659feffdd12280201c8aacb8f7be94f9a883c824/commons-compress-1.26.0.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-compress/1.26.0/35d0a3e49b7c2321c8445a375adc6df9d148c132/commons-compress-1.26.0-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-lang3/3.14.0/1ed471194b02f2c6cb734a0cd6f6f107c673afae/commons-lang3-3.14.0.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.apache.commons/commons-lang3/3.14.0/9ef3e18356f4ac30b15bfa48c02a7f54b51af382/commons-lang3-3.14.0-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.5.13/e5f6cae5ca7ecaac1ec2827a9e2d65ae2869cada/httpclient-4.5.13.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.5.13/9654e91a61d7662c36be6710ef8e720c0e3f9807/httpclient-4.5.13-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.4.16/51cf043c87253c9f58b539c9f7e44c8894223850/httpcore-4.4.16.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.4.16/229e4c0eae80465381ae02adf61bca5558360777/httpcore-4.4.16-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-api/2.22.1/bea6fede6328fabafd7e68363161a7ea6605abd1/log4j-api-2.22.1.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-api/2.22.1/a56be5b0028ef8f3e2d6f3b057e8d19794fc5116/log4j-api-2.22.1-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-core/2.22.1/7183a25510a02ad00cc6a95d3b3d2a7d3c5a8dc4/log4j-core-2.22.1.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-core/2.22.1/594b6169e6bba2c964282fd657672f8893304f97/log4j-core-2.22.1-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-slf4j2-impl/2.22.1/d7e6693c2606cb7e7335047d7bb96dec52db5665/log4j-slf4j2-impl-2.22.1.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-slf4j2-impl/2.22.1/81724a054d0618d7a15cf217ede478c0d08e421/log4j-slf4j2-impl-2.22.1-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.jcraft/jorbis/0.0.17/8872d22b293e8f5d7d56ff92be966e6dc28ebdc6/jorbis-0.0.17.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.jcraft/jorbis/0.0.17/5446be5d62e4c6b347c8e6cd28dc00a936417ba2/jorbis-0.0.17-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.joml/joml/1.10.5/22566d58af70ad3d72308bab63b8339906deb649/joml-1.10.5.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.joml/joml/1.10.5/c1f2266a7d0386d7643879ed1b93f51d29126180/joml-1.10.5-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-freetype/3.3.3/a0db6c84a8becc8ca05f9dbfa985edc348a824c7/lwjgl-freetype-3.3.3.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-freetype/3.3.3/d9fba96328a80677edbab28a843f33b847cf1e57/lwjgl-freetype-3.3.3-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-glfw/3.3.3/efa1eb78c5ccd840e9f329717109b5e892d72f8e/lwjgl-glfw-3.3.3.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-glfw/3.3.3/fa2c760452674d3eaf336123539b0dd9a83041a4/lwjgl-glfw-3.3.3-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-jemalloc/3.3.3/b543467b7ff3c6920539a88ee602d34098628be5/lwjgl-jemalloc-3.3.3.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-jemalloc/3.3.3/6a4ea7a9095e1684a9c6adb2c49d28daae2b6e45/lwjgl-jemalloc-3.3.3-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-openal/3.3.3/daada81ceb5fc0c291fbfdd4433cb8d9423577f2/lwjgl-openal-3.3.3.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-openal/3.3.3/60a4ce24d71b3376ce53b50cfe3eaaf3277dd727/lwjgl-openal-3.3.3-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-opengl/3.3.3/2f6b0147078396a58979125a4c947664e98293a/lwjgl-opengl-3.3.3.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-opengl/3.3.3/3353d0b2cac91b84088b01711d33cc403893450b/lwjgl-opengl-3.3.3-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-stb/3.3.3/25dd6161988d7e65f71d5065c99902402ee32746/lwjgl-stb-3.3.3.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-stb/3.3.3/37c2b604ec4a5ee356dd734dc8167a193e8874ed/lwjgl-stb-3.3.3-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-tinyfd/3.3.3/82d755ca94b102e9ca77283b9e2dc46d1b15fbe5/lwjgl-tinyfd-3.3.3.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-tinyfd/3.3.3/dcda55223f2f940654d222bf4371baa969c60bb9/lwjgl-tinyfd-3.3.3-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl/3.3.3/29589b5f87ed335a6c7e7ee6a5775f81f97ecb84/lwjgl-3.3.3.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl/3.3.3/e5949c7bbf4f839afe6d1a631e9b75f63c559e0/lwjgl-3.3.3-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lz4/lz4-java/1.8.0/4b986a99445e49ea5fbf5d149c4b63f6ed6c6780/lz4-java-1.8.0.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lz4/lz4-java/1.8.0/7609c362f37f0c0bd3743bc1976df2daa28ad19e/lz4-java-1.8.0-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/2.0.9/7cf2726fdcfbc8610f9a71fb3ed639871f315340/slf4j-api-2.0.9.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/2.0.9/97e46b94d70f47892145e09d685461245584d596/slf4j-api-2.0.9-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/minecraftMaven/net/minecraft/minecraft-merged-4eb0fe4bb6/1.21-net.fabricmc.yarn.1_21.1.21+build.2-v2/minecraft-merged-4eb0fe4bb6-1.21-net.fabricmc.yarn.1_21.1.21+build.2-v2.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/minecraftMaven/net/minecraft/minecraft-merged-4eb0fe4bb6/1.21-net.fabricmc.yarn.1_21.1.21+build.2-v2/minecraft-merged-4eb0fe4bb6-1.21-net.fabricmc.yarn.1_21.1.21+build.2-v2-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/net.fabricmc/fabric-loader/0.15.11/9c2be53d84ec5c4fb58bb5b8d9c8a629047c9ee9/fabric-loader-0.15.11.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/net.fabricmc/fabric-loader/0.15.11/ee8baabf67a4b0489227a2c2bf8618295ec1d401/fabric-loader-0.15.11-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-api/0.100.0+1.21/fabric-api-0.100.0+1.21.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-api/0.100.0+1.21/fabric-api-0.100.0+1.21-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-transfer-api-v1/5.1.12+b55973447c/fabric-transfer-api-v1-5.1.12+b55973447c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-transfer-api-v1/5.1.12+b55973447c/fabric-transfer-api-v1-5.1.12+b55973447c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-api-lookup-api-v1/1.6.65+b55973447c/fabric-api-lookup-api-v1-1.6.65+b55973447c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-api-lookup-api-v1/1.6.65+b55973447c/fabric-api-lookup-api-v1-1.6.65+b55973447c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-blockrenderlayer-v1/1.1.52+0af3f5a77c/fabric-blockrenderlayer-v1-1.1.52+0af3f5a77c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-blockrenderlayer-v1/1.1.52+0af3f5a77c/fabric-blockrenderlayer-v1-1.1.52+0af3f5a77c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-client-tags-api-v1/1.1.15+6573ed8c7c/fabric-client-tags-api-v1-1.1.15+6573ed8c7c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-client-tags-api-v1/1.1.15+6573ed8c7c/fabric-client-tags-api-v1-1.1.15+6573ed8c7c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-command-api-v1/1.2.48+f71b366f7c/fabric-command-api-v1-1.2.48+f71b366f7c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-command-api-v1/1.2.48+f71b366f7c/fabric-command-api-v1-1.2.48+f71b366f7c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-commands-v0/0.2.65+df3654b37c/fabric-commands-v0-0.2.65+df3654b37c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-commands-v0/0.2.65+df3654b37c/fabric-commands-v0-0.2.65+df3654b37c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-command-api-v2/2.2.27+6a6dfa197c/fabric-command-api-v2-2.2.27+6a6dfa197c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-command-api-v2/2.2.27+6a6dfa197c/fabric-command-api-v2-2.2.27+6a6dfa197c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-content-registries-v0/8.0.11+b55973447c/fabric-content-registries-v0-8.0.11+b55973447c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-content-registries-v0/8.0.11+b55973447c/fabric-content-registries-v0-8.0.11+b55973447c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-data-generation-api-v1/20.2.5+16c4ae257c/fabric-data-generation-api-v1-20.2.5+16c4ae257c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-data-generation-api-v1/20.2.5+16c4ae257c/fabric-data-generation-api-v1-20.2.5+16c4ae257c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-convention-tags-v1/2.0.11+7f945d5b7c/fabric-convention-tags-v1-2.0.11+7f945d5b7c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-convention-tags-v1/2.0.11+7f945d5b7c/fabric-convention-tags-v1-2.0.11+7f945d5b7c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-convention-tags-v2/2.2.0+bf2c39087c/fabric-convention-tags-v2-2.2.0+bf2c39087c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-convention-tags-v2/2.2.0+bf2c39087c/fabric-convention-tags-v2-2.2.0+bf2c39087c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-data-attachment-api-v1/1.1.22+6a6dfa197c/fabric-data-attachment-api-v1-1.1.22+6a6dfa197c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-data-attachment-api-v1/1.1.22+6a6dfa197c/fabric-data-attachment-api-v1-1.1.22+6a6dfa197c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-entity-events-v1/1.6.12+6fc22b997c/fabric-entity-events-v1-1.6.12+6fc22b997c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-entity-events-v1/1.6.12+6fc22b997c/fabric-entity-events-v1-1.6.12+6fc22b997c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-events-interaction-v0/0.7.10+e633f8837c/fabric-events-interaction-v0-0.7.10+e633f8837c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-events-interaction-v0/0.7.10+e633f8837c/fabric-events-interaction-v0-0.7.10+e633f8837c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-gametest-api-v1/2.0.0+6fc22b997c/fabric-gametest-api-v1-2.0.0+6fc22b997c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-gametest-api-v1/2.0.0+6fc22b997c/fabric-gametest-api-v1-2.0.0+6fc22b997c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-item-api-v1/11.0.0+afdfc9217c/fabric-item-api-v1-11.0.0+afdfc9217c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-item-api-v1/11.0.0+afdfc9217c/fabric-item-api-v1-11.0.0+afdfc9217c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-item-group-api-v1/4.1.0+00ab0a637c/fabric-item-group-api-v1-4.1.0+00ab0a637c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-item-group-api-v1/4.1.0+00ab0a637c/fabric-item-group-api-v1-4.1.0+00ab0a637c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-lifecycle-events-v1/2.3.9+98a7dbbb7c/fabric-lifecycle-events-v1-2.3.9+98a7dbbb7c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-lifecycle-events-v1/2.3.9+98a7dbbb7c/fabric-lifecycle-events-v1-2.3.9+98a7dbbb7c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-loot-api-v2/3.0.9+6573ed8c7c/fabric-loot-api-v2-3.0.9+6573ed8c7c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-loot-api-v2/3.0.9+6573ed8c7c/fabric-loot-api-v2-3.0.9+6573ed8c7c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-message-api-v1/6.0.13+6573ed8c7c/fabric-message-api-v1-6.0.13+6573ed8c7c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-message-api-v1/6.0.13+6573ed8c7c/fabric-message-api-v1-6.0.13+6573ed8c7c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-model-loading-api-v1/2.0.0+fe474d6b7c/fabric-model-loading-api-v1-2.0.0+fe474d6b7c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-model-loading-api-v1/2.0.0+fe474d6b7c/fabric-model-loading-api-v1-2.0.0+fe474d6b7c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-recipe-api-v1/5.0.8+6573ed8c7c/fabric-recipe-api-v1-5.0.8+6573ed8c7c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-recipe-api-v1/5.0.8+6573ed8c7c/fabric-recipe-api-v1-5.0.8+6573ed8c7c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-screen-handler-api-v1/1.3.78+b55973447c/fabric-screen-handler-api-v1-1.3.78+b55973447c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-screen-handler-api-v1/1.3.78+b55973447c/fabric-screen-handler-api-v1-1.3.78+b55973447c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-registry-sync-v0/5.0.21+b9828ba37c/fabric-registry-sync-v0-5.0.21+b9828ba37c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-registry-sync-v0/5.0.21+b9828ba37c/fabric-registry-sync-v0-5.0.21+b9828ba37c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-networking-api-v1/4.1.0+686dcdce7c/fabric-networking-api-v1-4.1.0+686dcdce7c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-networking-api-v1/4.1.0+686dcdce7c/fabric-networking-api-v1-4.1.0+686dcdce7c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-object-builder-api-v1/15.1.10+d13210767c/fabric-object-builder-api-v1-15.1.10+d13210767c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-object-builder-api-v1/15.1.10+d13210767c/fabric-object-builder-api-v1-15.1.10+d13210767c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-particles-v1/4.0.2+6573ed8c7c/fabric-particles-v1-4.0.2+6573ed8c7c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-particles-v1/4.0.2+6573ed8c7c/fabric-particles-v1-4.0.2+6573ed8c7c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-renderer-indigo/1.6.3+cc9f121a7c/fabric-renderer-indigo-1.6.3+cc9f121a7c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-renderer-indigo/1.6.3+cc9f121a7c/fabric-renderer-indigo-1.6.3+cc9f121a7c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-renderer-api-v1/3.2.16+fe474d6b7c/fabric-renderer-api-v1-3.2.16+fe474d6b7c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-renderer-api-v1/3.2.16+fe474d6b7c/fabric-renderer-api-v1-3.2.16+fe474d6b7c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-rendering-fluids-v1/3.1.6+b55973447c/fabric-rendering-fluids-v1-3.1.6+b55973447c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-rendering-fluids-v1/3.1.6+b55973447c/fabric-rendering-fluids-v1-3.1.6+b55973447c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-renderer-registries-v1/3.2.66+df3654b37c/fabric-renderer-registries-v1-3.2.66+df3654b37c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-renderer-registries-v1/3.2.66+df3654b37c/fabric-renderer-registries-v1-3.2.66+df3654b37c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-rendering-v0/1.1.69+df3654b37c/fabric-rendering-v0-1.1.69+df3654b37c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-rendering-v0/1.1.69+df3654b37c/fabric-rendering-v0-1.1.69+df3654b37c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-rendering-v1/5.0.3+d13210767c/fabric-rendering-v1-5.0.3+d13210767c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-rendering-v1/5.0.3+d13210767c/fabric-rendering-v1-5.0.3+d13210767c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-screen-api-v1/2.0.24+b55973447c/fabric-screen-api-v1-2.0.24+b55973447c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-screen-api-v1/2.0.24+b55973447c/fabric-screen-api-v1-2.0.24+b55973447c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-api-base/0.4.42+6573ed8c7c/fabric-api-base-0.4.42+6573ed8c7c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-api-base/0.4.42+6573ed8c7c/fabric-api-base-0.4.42+6573ed8c7c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-biome-api-v1/13.0.28+6fc22b997c/fabric-biome-api-v1-13.0.28+6fc22b997c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-biome-api-v1/13.0.28+6fc22b997c/fabric-biome-api-v1-13.0.28+6fc22b997c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-block-api-v1/1.0.22+0af3f5a77c/fabric-block-api-v1-1.0.22+0af3f5a77c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-block-api-v1/1.0.22+0af3f5a77c/fabric-block-api-v1-1.0.22+0af3f5a77c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-rendering-data-attachment-v1/0.3.48+73761d2e7c/fabric-rendering-data-attachment-v1-0.3.48+73761d2e7c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-rendering-data-attachment-v1/0.3.48+73761d2e7c/fabric-rendering-data-attachment-v1-0.3.48+73761d2e7c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-block-view-api-v2/1.0.10+6573ed8c7c/fabric-block-view-api-v2-1.0.10+6573ed8c7c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-block-view-api-v2/1.0.10+6573ed8c7c/fabric-block-view-api-v2-1.0.10+6573ed8c7c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-crash-report-info-v1/0.2.29+0af3f5a77c/fabric-crash-report-info-v1-0.2.29+0af3f5a77c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-crash-report-info-v1/0.2.29+0af3f5a77c/fabric-crash-report-info-v1-0.2.29+0af3f5a77c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-dimensions-v1/4.0.0+6fc22b997c/fabric-dimensions-v1-4.0.0+6fc22b997c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-dimensions-v1/4.0.0+6fc22b997c/fabric-dimensions-v1-4.0.0+6fc22b997c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-game-rule-api-v1/1.0.52+6573ed8c7c/fabric-game-rule-api-v1-1.0.52+6573ed8c7c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-game-rule-api-v1/1.0.52+6573ed8c7c/fabric-game-rule-api-v1-1.0.52+6573ed8c7c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-keybindings-v0/0.2.45+df3654b37c/fabric-keybindings-v0-0.2.45+df3654b37c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-keybindings-v0/0.2.45+df3654b37c/fabric-keybindings-v0-0.2.45+df3654b37c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-key-binding-api-v1/1.0.47+0af3f5a77c/fabric-key-binding-api-v1-1.0.47+0af3f5a77c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-key-binding-api-v1/1.0.47+0af3f5a77c/fabric-key-binding-api-v1-1.0.47+0af3f5a77c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-resource-conditions-api-v1/4.2.1+6573ed8c7c/fabric-resource-conditions-api-v1-4.2.1+6573ed8c7c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-resource-conditions-api-v1/4.2.1+6573ed8c7c/fabric-resource-conditions-api-v1-4.2.1+6573ed8c7c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-resource-loader-v0/1.1.3+b55973447c/fabric-resource-loader-v0-1.1.3+b55973447c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-resource-loader-v0/1.1.3+b55973447c/fabric-resource-loader-v0-1.1.3+b55973447c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-sound-api-v1/1.0.23+6573ed8c7c/fabric-sound-api-v1-1.0.23+6573ed8c7c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-sound-api-v1/1.0.23+6573ed8c7c/fabric-sound-api-v1-1.0.23+6573ed8c7c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-transitive-access-wideners-v1/6.0.12+6573ed8c7c/fabric-transitive-access-wideners-v1-6.0.12+6573ed8c7c.jar" sourcepath="/home/jotty/Entwicklung/git/quickiemod/.gradle/loom-cache/remapped_mods/net_fabricmc_yarn_1_21_1_21_build_2_v2/net/fabricmc/fabric-api/fabric-transitive-access-wideners-v1/6.0.12+6573ed8c7c/fabric-transitive-access-wideners-v1-6.0.12+6573ed8c7c-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/net.fabricmc/dev-launch-injector/0.2.1+build.8/da8bef7e6e2f952da707f282bdb46882a0fce5e3/dev-launch-injector-0.2.1+build.8.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/net.minecrell/terminalconsoleappender/1.3.0/b562e9bb61235c9520e26282cdee71f8f802d1fc/terminalconsoleappender-1.3.0.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/net.minecrell/terminalconsoleappender/1.3.0/2fd4d796402a408af0d26c848e02ec8f91dceae7/terminalconsoleappender-1.3.0-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-freetype/3.3.3/149070a5480900347071b7074779531f25a6e3dc/lwjgl-freetype-3.3.3-natives-linux.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-freetype/3.3.3/d9fba96328a80677edbab28a843f33b847cf1e57/lwjgl-freetype-3.3.3-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-glfw/3.3.3/a03684c5e4b1b1dbbe0d29dbbdc27b985b6840f2/lwjgl-glfw-3.3.3-natives-linux.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-glfw/3.3.3/fa2c760452674d3eaf336123539b0dd9a83041a4/lwjgl-glfw-3.3.3-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-jemalloc/3.3.3/4f86728bf449b1dd61251c4e0ac01df1389cb51e/lwjgl-jemalloc-3.3.3-natives-linux.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-jemalloc/3.3.3/6a4ea7a9095e1684a9c6adb2c49d28daae2b6e45/lwjgl-jemalloc-3.3.3-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-openal/3.3.3/3037360cc4595079bea240af250b6d1a527e0905/lwjgl-openal-3.3.3-natives-linux.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-openal/3.3.3/60a4ce24d71b3376ce53b50cfe3eaaf3277dd727/lwjgl-openal-3.3.3-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-opengl/3.3.3/62c70a4b00ca5391882b0f4b787c1588d24f1c86/lwjgl-opengl-3.3.3-natives-linux.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-opengl/3.3.3/3353d0b2cac91b84088b01711d33cc403893450b/lwjgl-opengl-3.3.3-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-stb/3.3.3/fd1271ccd9d85eff2fa31f3fd543e02ccfaf5041/lwjgl-stb-3.3.3-natives-linux.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-stb/3.3.3/37c2b604ec4a5ee356dd734dc8167a193e8874ed/lwjgl-stb-3.3.3-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-tinyfd/3.3.3/d8d58daa0c3e5fd906fee96f5fddbcbc07cc308b/lwjgl-tinyfd-3.3.3-natives-linux.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl-tinyfd/3.3.3/dcda55223f2f940654d222bf4371baa969c60bb9/lwjgl-tinyfd-3.3.3-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl/3.3.3/1713758e3660ba66e1e954396fd18126038b33c0/lwjgl-3.3.3-natives-linux.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.lwjgl/lwjgl/3.3.3/e5949c7bbf4f839afe6d1a631e9b75f63c559e0/lwjgl-3.3.3-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.jline/jline-reader/3.20.0/8f15415b022a25b473e8e16c28ae913186ffb9c4/jline-reader-3.20.0.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.jline/jline-reader/3.20.0/94a832964241f634f3b4a872e55241678227f28b/jline-reader-3.20.0-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/modules-2/files-2.1/org.jline/jline-terminal/3.20.0/d0ddcc708ddf527a3454c941b7b9225cc83a15ff/jline-terminal-3.20.0.jar" sourcepath="/home/jotty/.gradle/caches/modules-2/files-2.1/org.jline/jline-terminal/3.20.0/2ca86e8c3a4ba5d6a3cb629afd9180c58076609/jline-terminal-3.20.0-sources.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="lib" path="/home/jotty/.gradle/caches/fabric-loom/1.21/net.fabricmc.yarn.1_21.1.21+build.2-v2/mappings.jar">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="gradle_used_by_scope" value="main,test"/>
|
|
||||||
</attributes>
|
|
||||||
</classpathentry>
|
|
||||||
<classpathentry kind="output" path="bin/default"/>
|
<classpathentry kind="output" path="bin/default"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
27
.project
27
.project
@ -2,21 +2,22 @@
|
|||||||
<projectDescription>
|
<projectDescription>
|
||||||
<name>quickiemod</name>
|
<name>quickiemod</name>
|
||||||
<comment></comment>
|
<comment></comment>
|
||||||
<projects/>
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
<natures>
|
<natures>
|
||||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
|
||||||
</natures>
|
</natures>
|
||||||
<buildSpec>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
|
||||||
<arguments/>
|
|
||||||
</buildCommand>
|
|
||||||
<buildCommand>
|
|
||||||
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
|
|
||||||
<arguments/>
|
|
||||||
</buildCommand>
|
|
||||||
</buildSpec>
|
|
||||||
<linkedResources/>
|
|
||||||
<filteredResources/>
|
|
||||||
</projectDescription>
|
</projectDescription>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
#Sat Jun 15 13:57:14 CEST 2024
|
#Mon Jun 24 21:17:32 CEST 2024
|
||||||
eclipse.preferences.version=1
|
eclipse.preferences.version=1
|
||||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'fabric-loom' version '1.6-SNAPSHOT'
|
id 'fabric-loom' version '1.9-SNAPSHOT'
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,14 +4,14 @@ org.gradle.parallel=true
|
|||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://fabricmc.net/develop
|
# check these on https://fabricmc.net/develop
|
||||||
minecraft_version=1.21
|
minecraft_version=1.21.4
|
||||||
yarn_mappings=1.21+build.2
|
yarn_mappings=1.21.4+build.1
|
||||||
loader_version=0.15.11
|
loader_version=0.16.9
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version=1.21.0.1
|
mod_version=1.21.4.0
|
||||||
maven_group=de.jottyfan.quickiemod
|
maven_group=de.jottyfan.quickiemod
|
||||||
archives_base_name=quickiemod
|
archives_base_name=quickiemod
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
fabric_version=0.100.0+1.21
|
fabric_version=0.110.5+1.21.4
|
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
7
gradlew
vendored
7
gradlew
vendored
@ -15,6 +15,8 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
@ -55,7 +57,7 @@
|
|||||||
# Darwin, MinGW, and NonStop.
|
# Darwin, MinGW, and NonStop.
|
||||||
#
|
#
|
||||||
# (3) This script is generated from the Groovy template
|
# (3) This script is generated from the Groovy template
|
||||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
# within the Gradle project.
|
# within the Gradle project.
|
||||||
#
|
#
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
@ -84,7 +86,8 @@ done
|
|||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||||
|
' "$PWD" ) || exit
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
|
2
gradlew.bat
vendored
2
gradlew.bat
vendored
@ -13,6 +13,8 @@
|
|||||||
@rem See the License for the specific language governing permissions and
|
@rem See the License for the specific language governing permissions and
|
||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
|
@rem SPDX-License-Identifier: Apache-2.0
|
||||||
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%"=="" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.init.RegistryManager;
|
|
||||||
import net.fabricmc.api.ModInitializer;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class QuickieMod implements ModInitializer {
|
|
||||||
public static final String MODID = "quickiemod";
|
|
||||||
|
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(MODID);
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onInitialize() {
|
|
||||||
LOGGER.info("loading {}", MODID);
|
|
||||||
RegistryManager.registerBlockEntityTypes();
|
|
||||||
RegistryManager.registerItems();
|
|
||||||
RegistryManager.registerEvents();
|
|
||||||
RegistryManager.registerBlocks();
|
|
||||||
RegistryManager.registerFeatures();
|
|
||||||
RegistryManager.registerItemGroup();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod;
|
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.blocks.QuickieBlocks;
|
|
||||||
import net.fabricmc.api.ClientModInitializer;
|
|
||||||
import net.fabricmc.api.EnvType;
|
|
||||||
import net.fabricmc.api.Environment;
|
|
||||||
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
|
|
||||||
import net.minecraft.client.render.RenderLayer;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
@Environment(EnvType.CLIENT)
|
|
||||||
public class QuickieModClient implements ClientModInitializer {
|
|
||||||
@Override
|
|
||||||
public void onInitializeClient() {
|
|
||||||
BlockRenderLayerMap.INSTANCE.putBlock(QuickieBlocks.COTTONPLANT.getBlock(), RenderLayer.getCutout());
|
|
||||||
BlockRenderLayerMap.INSTANCE.putBlock(QuickieBlocks.CANOLAPLANT.getBlock(), RenderLayer.getCutout());
|
|
||||||
}
|
|
||||||
}
|
|
73
src/main/java/de/jottyfan/quickiemod/Quickiemod.java
Normal file
73
src/main/java/de/jottyfan/quickiemod/Quickiemod.java
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
package de.jottyfan.quickiemod;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import de.jottyfan.quickiemod.block.ModBlocks;
|
||||||
|
import de.jottyfan.quickiemod.blockentity.ModBlockentity;
|
||||||
|
import de.jottyfan.quickiemod.event.EventBlockBreak;
|
||||||
|
import de.jottyfan.quickiemod.feature.ModFeatures;
|
||||||
|
import de.jottyfan.quickiemod.item.ModItems;
|
||||||
|
import de.jottyfan.quickiemod.itemgroup.ModItemGroup;
|
||||||
|
import net.fabricmc.api.ModInitializer;
|
||||||
|
import net.fabricmc.fabric.api.event.player.PlayerBlockBreakEvents;
|
||||||
|
import net.fabricmc.fabric.api.loot.v3.LootTableEvents;
|
||||||
|
import net.fabricmc.fabric.api.registry.CompostingChanceRegistry;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.Items;
|
||||||
|
import net.minecraft.loot.LootPool;
|
||||||
|
import net.minecraft.loot.condition.SurvivesExplosionLootCondition;
|
||||||
|
import net.minecraft.loot.entry.ItemEntry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class Quickiemod implements ModInitializer {
|
||||||
|
public static final String MOD_ID = "quickiemod";
|
||||||
|
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
|
||||||
|
|
||||||
|
private void registerComposterItems() {
|
||||||
|
CompostingChanceRegistry.INSTANCE.add(ModItems.ITEM_COTTONSEED, 0.5f);
|
||||||
|
CompostingChanceRegistry.INSTANCE.add(ModItems.ITEM_COTTON, 0.75f);
|
||||||
|
CompostingChanceRegistry.INSTANCE.add(ModItems.ITEM_CANOLASEED, 0.5f);
|
||||||
|
CompostingChanceRegistry.INSTANCE.add(ModItems.ITEM_CANOLA, 0.75f);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void registerLootTableChanges() {
|
||||||
|
LootTableEvents.MODIFY.register((key, tableBuilder, source, registries) -> {
|
||||||
|
if (source.isBuiltin()) {
|
||||||
|
if ("minecraft:blocks/short_grass".equals(key.getValue().toString())) {
|
||||||
|
tableBuilder.pool(LootPool.builder()
|
||||||
|
.with(ItemEntry.builder(ModItems.ITEM_COTTONSEED).weight(1))
|
||||||
|
.with(ItemEntry.builder(Items.AIR).weight(4))
|
||||||
|
.conditionally(SurvivesExplosionLootCondition.builder()));
|
||||||
|
} else if ("minecraft:blocks/tall_grass".equals(key.getValue().toString())) {
|
||||||
|
tableBuilder.pool(LootPool.builder()
|
||||||
|
.with(ItemEntry.builder(ModItems.ITEM_CANOLASEED).weight(1))
|
||||||
|
.with(ItemEntry.builder(Items.AIR).weight(7))
|
||||||
|
.conditionally(SurvivesExplosionLootCondition.builder()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onInitialize() {
|
||||||
|
ModBlockentity.registerModBlockentities();
|
||||||
|
List<Item> items = ModItems.registerModItems();
|
||||||
|
List<Block> blocks = ModBlocks.registerModBlocks();
|
||||||
|
ModFeatures.registerFeatures();
|
||||||
|
registerComposterItems();
|
||||||
|
registerLootTableChanges();
|
||||||
|
ModItemGroup.registerItemGroup(items, blocks);
|
||||||
|
PlayerBlockBreakEvents.AFTER.register((world, player, pos, state, blockEntity) -> {
|
||||||
|
Block oldBlock = state.getBlock();
|
||||||
|
new EventBlockBreak().doBreakBlock(world, pos, state, player, oldBlock);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
20
src/main/java/de/jottyfan/quickiemod/QuickiemodClient.java
Normal file
20
src/main/java/de/jottyfan/quickiemod/QuickiemodClient.java
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
package de.jottyfan.quickiemod;
|
||||||
|
|
||||||
|
import de.jottyfan.quickiemod.block.ModBlocks;
|
||||||
|
import net.fabricmc.api.ClientModInitializer;
|
||||||
|
import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
|
||||||
|
import net.minecraft.client.render.RenderLayer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class QuickiemodClient implements ClientModInitializer {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onInitializeClient() {
|
||||||
|
BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.BLOCK_COTTONPLANT, RenderLayer.getCutout());
|
||||||
|
BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.BLOCK_CANOLAPLANT, RenderLayer.getCutout());
|
||||||
|
}
|
||||||
|
}
|
@ -1,8 +1,5 @@
|
|||||||
package de.jottyfan.quickiemod;
|
package de.jottyfan.quickiemod;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint;
|
import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint;
|
||||||
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator;
|
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator;
|
||||||
|
|
||||||
@ -11,13 +8,10 @@ import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator;
|
|||||||
* @author jotty
|
* @author jotty
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class QuickieModDataGenerator implements DataGeneratorEntrypoint {
|
public class QuickiemodDataGenerator implements DataGeneratorEntrypoint {
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(QuickieMod.MODID);
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onInitializeDataGenerator(FabricDataGenerator fabricDataGenerator) {
|
public void onInitializeDataGenerator(FabricDataGenerator fabricDataGenerator) {
|
||||||
// TODO: implement
|
|
||||||
LOGGER.debug("initializing data generator");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,84 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.api;
|
|
||||||
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.function.BiFunction;
|
|
||||||
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class Neighborhood {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* find the same blocks that is next to the current position pos
|
|
||||||
*
|
|
||||||
* @param world the world to look for the blocks
|
|
||||||
* @param pos the starting position
|
|
||||||
* @param seekLimit the limit of seek operations
|
|
||||||
* @param checkLambda check functionality
|
|
||||||
* @return a set of found block positions
|
|
||||||
*/
|
|
||||||
public static final Set<BlockPos> findEqualBlock(World world, BlockPos pos, int seekLimit,
|
|
||||||
BiFunction<World, BlockPos, Boolean> checkLambda) {
|
|
||||||
Set<NeighborhoodBean> found = new HashSet<>();
|
|
||||||
found.add(new NeighborhoodBean(pos, true));
|
|
||||||
|
|
||||||
while (pos != null && found.size() < seekLimit) {
|
|
||||||
findNewNeihgbor(world, pos.east(), found, checkLambda);
|
|
||||||
findNewNeihgbor(world, pos.south(), found, checkLambda);
|
|
||||||
findNewNeihgbor(world, pos.west(), found, checkLambda);
|
|
||||||
findNewNeihgbor(world, pos.north(), found, checkLambda);
|
|
||||||
pos = findNextUncheckedField(found);
|
|
||||||
}
|
|
||||||
|
|
||||||
Set<BlockPos> finals = new HashSet<>();
|
|
||||||
for (NeighborhoodBean bean : found) {
|
|
||||||
finals.add(bean.getPos());
|
|
||||||
}
|
|
||||||
return finals;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final BlockPos findNextUncheckedField(Set<NeighborhoodBean> found) {
|
|
||||||
Iterator<NeighborhoodBean> i = found.iterator();
|
|
||||||
while (i.hasNext()) {
|
|
||||||
NeighborhoodBean bean = i.next();
|
|
||||||
if (!bean.isChecked()) {
|
|
||||||
bean.setChecked(true);
|
|
||||||
return bean.getPos();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* find new neighbor at pos
|
|
||||||
*
|
|
||||||
* @param world the world
|
|
||||||
* @param pos the position
|
|
||||||
* @param found the set with all already found positions
|
|
||||||
* @return true or false
|
|
||||||
*/
|
|
||||||
private static final boolean findNewNeihgbor(World world, BlockPos pos, Set<NeighborhoodBean> found,
|
|
||||||
BiFunction<World, BlockPos, Boolean> checkLambda) {
|
|
||||||
NeighborhoodBean bean = new NeighborhoodBean(pos);
|
|
||||||
if (found.contains(bean) || found.contains(bean.over()) || found.contains(bean.below())) {
|
|
||||||
return false;
|
|
||||||
} else if (checkLambda.apply(world, pos).booleanValue()) {
|
|
||||||
found.add(bean);
|
|
||||||
return true;
|
|
||||||
} else if (checkLambda.apply(world, pos.up()).booleanValue()) {
|
|
||||||
found.add(new NeighborhoodBean(pos.up()));
|
|
||||||
return true;
|
|
||||||
} else if (checkLambda.apply(world, pos.down()).booleanValue()) {
|
|
||||||
found.add(new NeighborhoodBean(pos.down()));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,77 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.api;
|
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class NeighborhoodBean {
|
|
||||||
private final BlockPos pos;
|
|
||||||
private boolean checked;
|
|
||||||
|
|
||||||
public NeighborhoodBean(BlockPos pos, boolean checked) {
|
|
||||||
super();
|
|
||||||
this.pos = pos;
|
|
||||||
this.checked = checked;
|
|
||||||
}
|
|
||||||
|
|
||||||
public NeighborhoodBean(BlockPos pos) {
|
|
||||||
super();
|
|
||||||
this.pos = pos;
|
|
||||||
this.checked = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public NeighborhoodBean over() {
|
|
||||||
return new NeighborhoodBean(pos.up(), checked);
|
|
||||||
}
|
|
||||||
|
|
||||||
public NeighborhoodBean below() {
|
|
||||||
return new NeighborhoodBean(pos.down(), checked);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int hashCode() {
|
|
||||||
return Objects.hash(pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean equals(Object obj) {
|
|
||||||
Boolean result = null;
|
|
||||||
if (this == obj) {
|
|
||||||
result = true;
|
|
||||||
} else if (obj == null) {
|
|
||||||
result = false;
|
|
||||||
} else if (getClass() != obj.getClass()) {
|
|
||||||
result = false;
|
|
||||||
} else {
|
|
||||||
NeighborhoodBean other = (NeighborhoodBean) obj;
|
|
||||||
result = Objects.equals(pos, other.pos);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the checked
|
|
||||||
*/
|
|
||||||
public boolean isChecked() {
|
|
||||||
return checked;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param checked the checked to set
|
|
||||||
*/
|
|
||||||
public void setChecked(boolean checked) {
|
|
||||||
this.checked = checked;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the pos
|
|
||||||
*/
|
|
||||||
public BlockPos getPos() {
|
|
||||||
return pos;
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,25 @@
|
|||||||
|
package de.jottyfan.quickiemod.block;
|
||||||
|
|
||||||
|
import net.minecraft.block.AbstractBlock;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public abstract class AbstractIdentifiedBlock extends Block {
|
||||||
|
|
||||||
|
public AbstractIdentifiedBlock(Identifier identifier) {
|
||||||
|
super(AbstractBlock.Settings.create().registryKey(RegistryKey.of(RegistryKeys.BLOCK, identifier)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public AbstractIdentifiedBlock(Identifier identifier, float strength, float hardness) {
|
||||||
|
super(AbstractBlock.Settings.create().strength(strength).hardness(hardness).requiresTool()
|
||||||
|
.registryKey(RegistryKey.of(RegistryKeys.BLOCK, identifier)));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,16 +1,15 @@
|
|||||||
package de.jottyfan.quickiemod.blocks;
|
package de.jottyfan.quickiemod.block;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.mojang.serialization.MapCodec;
|
import com.mojang.serialization.MapCodec;
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.items.QuickieItems;
|
|
||||||
import net.minecraft.block.AbstractBlock;
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.FallingBlock;
|
import net.minecraft.block.FallingBlock;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
import net.minecraft.loot.context.LootWorldContext.Builder;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.world.explosion.Explosion;
|
import net.minecraft.world.explosion.Explosion;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -18,15 +17,19 @@ import net.minecraft.world.explosion.Explosion;
|
|||||||
* @author jotty
|
* @author jotty
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class BlockSpeedpowder extends FallingBlock {
|
public class BlockBreakByTool extends AbstractIdentifiedBlock {
|
||||||
|
|
||||||
public BlockSpeedpowder() {
|
private final ItemStack[] drops;
|
||||||
super(AbstractBlock.Settings.create().luminance(state -> 12));
|
|
||||||
|
public BlockBreakByTool(Identifier identifier, float strength, float hardness, ItemStack[] drops) {
|
||||||
|
super(identifier, strength, hardness);
|
||||||
|
|
||||||
|
this.drops = drops;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
||||||
return Arrays.asList(new ItemStack[] { new ItemStack(QuickieItems.SPEEDPOWDER.getItem(), 9) });
|
return Arrays.asList(drops);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.quickiemod.blocks;
|
package de.jottyfan.quickiemod.block;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -6,14 +6,17 @@ import java.util.Random;
|
|||||||
|
|
||||||
import com.mojang.serialization.MapCodec;
|
import com.mojang.serialization.MapCodec;
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.items.QuickieItems;
|
import de.jottyfan.quickiemod.item.ModItems;
|
||||||
import net.minecraft.block.AbstractBlock;
|
import net.minecraft.block.AbstractBlock;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.Blocks;
|
import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.block.FallingBlock;
|
import net.minecraft.block.FallingBlock;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.Items;
|
import net.minecraft.item.Items;
|
||||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
import net.minecraft.loot.context.LootWorldContext.Builder;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -22,8 +25,8 @@ import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
|||||||
*/
|
*/
|
||||||
public class BlockDirtSalpeter extends FallingBlock {
|
public class BlockDirtSalpeter extends FallingBlock {
|
||||||
|
|
||||||
public BlockDirtSalpeter() {
|
public BlockDirtSalpeter(Identifier identifier) {
|
||||||
super(AbstractBlock.Settings.create().hardness(3.1f));
|
super(AbstractBlock.Settings.create().hardness(3.1f).registryKey(RegistryKey.of(RegistryKeys.BLOCK, identifier)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -31,7 +34,7 @@ public class BlockDirtSalpeter extends FallingBlock {
|
|||||||
Integer count = (Double.valueOf(new Random().nextDouble() * 10).intValue() / 4) + 1;
|
Integer count = (Double.valueOf(new Random().nextDouble() * 10).intValue() / 4) + 1;
|
||||||
boolean spawnBoneMeal = new Random().nextDouble() > 0.5f;
|
boolean spawnBoneMeal = new Random().nextDouble() > 0.5f;
|
||||||
ItemStack boneMealStack = new ItemStack(Items.BONE_MEAL);
|
ItemStack boneMealStack = new ItemStack(Items.BONE_MEAL);
|
||||||
ItemStack salpeterStack = new ItemStack(QuickieItems.SALPETER.getItem(), count);
|
ItemStack salpeterStack = new ItemStack(ModItems.ITEM_SALPETER, count);
|
||||||
ItemStack dirtStack = new ItemStack(Blocks.DIRT);
|
ItemStack dirtStack = new ItemStack(Blocks.DIRT);
|
||||||
ItemStack[] spawnies = spawnBoneMeal ? new ItemStack[] { boneMealStack, salpeterStack, dirtStack }
|
ItemStack[] spawnies = spawnBoneMeal ? new ItemStack[] { boneMealStack, salpeterStack, dirtStack }
|
||||||
: new ItemStack[] { salpeterStack, dirtStack };
|
: new ItemStack[] { salpeterStack, dirtStack };
|
||||||
@ -40,7 +43,6 @@ public class BlockDirtSalpeter extends FallingBlock {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected MapCodec<? extends FallingBlock> getCodec() {
|
protected MapCodec<? extends FallingBlock> getCodec() {
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
112
src/main/java/de/jottyfan/quickiemod/block/BlockDrill.java
Normal file
112
src/main/java/de/jottyfan/quickiemod/block/BlockDrill.java
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
package de.jottyfan.quickiemod.block;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.mojang.serialization.MapCodec;
|
||||||
|
|
||||||
|
import de.jottyfan.quickiemod.blockentity.DrillBlockEntity;
|
||||||
|
import de.jottyfan.quickiemod.item.ModItems;
|
||||||
|
import net.minecraft.block.AbstractBlock;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockEntityProvider;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.FallingBlock;
|
||||||
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
|
import net.minecraft.block.entity.BlockEntityTicker;
|
||||||
|
import net.minecraft.block.entity.BlockEntityType;
|
||||||
|
import net.minecraft.entity.ItemEntity;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.item.Items;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.state.StateManager.Builder;
|
||||||
|
import net.minecraft.state.property.EnumProperty;
|
||||||
|
import net.minecraft.state.property.IntProperty;
|
||||||
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.util.ActionResult;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
import net.minecraft.util.hit.BlockHitResult;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.Direction;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class BlockDrill extends FallingBlock implements BlockEntityProvider {
|
||||||
|
private static final Integer MAX_FUEL = 255;
|
||||||
|
public static final IntProperty FUEL = IntProperty.of("fuel", 0, MAX_FUEL);
|
||||||
|
public static final EnumProperty<Direction> DIRECTION = EnumProperty.of("direction", Direction.class, Direction.values());
|
||||||
|
|
||||||
|
public BlockDrill(Identifier identifier, Direction direction) {
|
||||||
|
super(AbstractBlock.Settings.create().hardness(2.5f).registryKey(RegistryKey.of(RegistryKeys.BLOCK, identifier)));
|
||||||
|
setDefaultState(getDefaultState().with(FUEL, 0).with(DIRECTION, direction));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockEntity createBlockEntity(BlockPos pos, BlockState blockState) {
|
||||||
|
return new DrillBlockEntity(pos, blockState);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state,
|
||||||
|
BlockEntityType<T> type) {
|
||||||
|
return (world1, pos, state1, be) -> DrillBlockEntity.tick(world1, pos, state1, be);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected MapCodec<? extends FallingBlock> getCodec() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockState onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) {
|
||||||
|
Integer fuelLeft = state.get(FUEL);
|
||||||
|
world.spawnEntity(
|
||||||
|
new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(ModItems.ITEM_CANOLABOTTLE, fuelLeft)));
|
||||||
|
return super.onBreak(world, pos, state, player);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void appendProperties(Builder<Block, BlockState> builder) {
|
||||||
|
builder.add(FUEL).add(DIRECTION);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) {
|
||||||
|
Map<Item, Integer> loadings = new HashMap<>();
|
||||||
|
loadings.put(ModItems.ITEM_CANOLABOTTLE, 8);
|
||||||
|
loadings.put(ModItems.ITEM_CANOLABOTTLESTACK, 72);
|
||||||
|
ItemStack stack = player.getStackInHand(player.getActiveHand());
|
||||||
|
Item item = stack.getItem();
|
||||||
|
if (stack.isEmpty() || !loadings.containsKey(item)) {
|
||||||
|
if (world.isClient()) {
|
||||||
|
player.sendMessage(Text.translatable("msg.drill.fuelinfo", state.get(FUEL)), false);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Integer fuelWeight = loadings.get(item);
|
||||||
|
if (fuelWeight != null) {
|
||||||
|
Integer load = MAX_FUEL - state.get(FUEL);
|
||||||
|
if (load < fuelWeight) {
|
||||||
|
fuelWeight = load;
|
||||||
|
}
|
||||||
|
world.setBlockState(pos, state.with(FUEL, state.get(FUEL) + fuelWeight));
|
||||||
|
if (item.equals(ModItems.ITEM_CANOLABOTTLE)) {
|
||||||
|
world.spawnEntity(
|
||||||
|
new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.GLASS_BOTTLE, 1)));
|
||||||
|
} else if (item.equals(ModItems.ITEM_CANOLABOTTLESTACK)) {
|
||||||
|
world.spawnEntity(
|
||||||
|
new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.GLASS_BOTTLE, 9)));
|
||||||
|
}
|
||||||
|
stack.decrement(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ActionResult.PASS;
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.quickiemod.blocks;
|
package de.jottyfan.quickiemod.block;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
@ -6,50 +6,57 @@ import java.util.List;
|
|||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.blockentity.EmptyLavaHoarderBlockEntity;
|
|
||||||
import net.minecraft.block.AbstractBlock;
|
import net.minecraft.block.AbstractBlock;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockEntityProvider;
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.Blocks;
|
import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
|
||||||
import net.minecraft.block.entity.BlockEntityTicker;
|
|
||||||
import net.minecraft.block.entity.BlockEntityType;
|
|
||||||
import net.minecraft.entity.ExperienceOrbEntity;
|
import net.minecraft.entity.ExperienceOrbEntity;
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
import net.minecraft.loot.context.LootWorldContext.Builder;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.server.world.ServerWorld;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.tick.OrderedTick;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author jotty
|
* @author jotty
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class BlockEmptyLavahoarder extends Block implements BlockEntityProvider {
|
public class BlockEmptyLavahoarder extends Block {
|
||||||
|
|
||||||
public BlockEmptyLavahoarder() {
|
public BlockEmptyLavahoarder(Identifier identifier) {
|
||||||
super(AbstractBlock.Settings.create().hardness(2.5f));
|
super(AbstractBlock.Settings.create().hardness(2.5f).registryKey(RegistryKey.of(RegistryKeys.BLOCK, identifier)));
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockEntity createBlockEntity(BlockPos pos, BlockState blockState) {
|
|
||||||
return new EmptyLavaHoarderBlockEntity(pos, blockState);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type){
|
|
||||||
return (world1, pos, state1, be) -> EmptyLavaHoarderBlockEntity.tick(world1, pos, state1, be);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
||||||
List<ItemStack> list = new ArrayList<>();
|
List<ItemStack> list = new ArrayList<>();
|
||||||
list.add(new ItemStack(QuickieBlocks.EMPTYLAVAHOARDER.getBlock()));
|
list.add(new ItemStack(ModBlocks.BLOCK_EMPTYLAVAHOARDER));
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void scheduledTick(BlockState state, ServerWorld world, BlockPos pos,
|
||||||
|
net.minecraft.util.math.random.Random random) {
|
||||||
|
boolean found = BlockLavahoarder.suckLava(world, pos.north());
|
||||||
|
found = found || BlockLavahoarder.suckLava(world, pos.south());
|
||||||
|
found = found || BlockLavahoarder.suckLava(world, pos.east());
|
||||||
|
found = found || BlockLavahoarder.suckLava(world, pos.west());
|
||||||
|
found = found || BlockLavahoarder.suckLava(world, pos.up());
|
||||||
|
found = found || BlockLavahoarder.suckLava(world, pos.down());
|
||||||
|
if (found) {
|
||||||
|
world.setBlockState(pos, ModBlocks.BLOCK_LAVAHOARDER.getDefaultState());
|
||||||
|
world.getBlockTickScheduler().scheduleTick(OrderedTick.create(ModBlocks.BLOCK_LAVAHOARDER, pos));
|
||||||
|
} else {
|
||||||
|
world.getBlockTickScheduler().scheduleTick(OrderedTick.create(this, pos));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static final String stringOf(BlockPos pos) {
|
private static final String stringOf(BlockPos pos) {
|
||||||
StringBuilder buf = new StringBuilder();
|
StringBuilder buf = new StringBuilder();
|
||||||
buf.append(pos.getX()).append(":");
|
buf.append(pos.getX()).append(":");
|
||||||
@ -106,7 +113,8 @@ public class BlockEmptyLavahoarder extends Block implements BlockEntityProvider
|
|||||||
world.setBlockState(blockPosOf(p), Blocks.AIR.getDefaultState());
|
world.setBlockState(blockPosOf(p), Blocks.AIR.getDefaultState());
|
||||||
}
|
}
|
||||||
if (amount > 0) {
|
if (amount > 0) {
|
||||||
world.setBlockState(pos, QuickieBlocks.LAVAHOARDER.getBlock().getDefaultState());
|
world.setBlockState(pos, ModBlocks.BLOCK_LAVAHOARDER.getDefaultState());
|
||||||
|
world.getBlockTickScheduler().scheduleTick(OrderedTick.create(ModBlocks.BLOCK_LAVAHOARDER, pos));
|
||||||
int count = 0;
|
int count = 0;
|
||||||
Random random = new Random();
|
Random random = new Random();
|
||||||
for (int i = 0; i < amount; i++) {
|
for (int i = 0; i < amount; i++) {
|
||||||
@ -116,9 +124,12 @@ public class BlockEmptyLavahoarder extends Block implements BlockEntityProvider
|
|||||||
}
|
}
|
||||||
BlockPos up = pos.up();
|
BlockPos up = pos.up();
|
||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
EmptyLavaHoarderBlockEntity.spawnRandomItems(world, up, count);
|
BlockLavahoarder.spawnRandomItems(world, up, count);
|
||||||
world.spawnEntity(new ExperienceOrbEntity(world, (double) pos.getX() + 0.5D, (double) pos.getY() + 0.5D, (double) pos.getZ() + 0.5D, count));
|
world.spawnEntity(new ExperienceOrbEntity(world, (double) pos.getX() + 0.5D, (double) pos.getY() + 0.5D,
|
||||||
}
|
(double) pos.getZ() + 0.5D, count));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
world.getBlockTickScheduler().scheduleTick(OrderedTick.create(this, pos));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.quickiemod.blocks;
|
package de.jottyfan.quickiemod.block;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -16,11 +16,14 @@ import net.minecraft.block.entity.BlockEntityTicker;
|
|||||||
import net.minecraft.block.entity.BlockEntityType;
|
import net.minecraft.block.entity.BlockEntityType;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
import net.minecraft.loot.context.LootWorldContext.Builder;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
import net.minecraft.text.Style;
|
import net.minecraft.text.Style;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.ActionResult;
|
import net.minecraft.util.ActionResult;
|
||||||
import net.minecraft.util.Formatting;
|
import net.minecraft.util.Formatting;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.ItemScatterer;
|
import net.minecraft.util.ItemScatterer;
|
||||||
import net.minecraft.util.hit.BlockHitResult;
|
import net.minecraft.util.hit.BlockHitResult;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
@ -33,8 +36,8 @@ import net.minecraft.world.World;
|
|||||||
*/
|
*/
|
||||||
public class BlockItemhoarder extends Block implements BlockEntityProvider {
|
public class BlockItemhoarder extends Block implements BlockEntityProvider {
|
||||||
|
|
||||||
public BlockItemhoarder() {
|
public BlockItemhoarder(Identifier identifier) {
|
||||||
super(AbstractBlock.Settings.create().hardness(2.5f));
|
super(AbstractBlock.Settings.create().hardness(2.5f).registryKey(RegistryKey.of(RegistryKeys.BLOCK, identifier)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -56,7 +59,7 @@ public class BlockItemhoarder extends Block implements BlockEntityProvider {
|
|||||||
@Override
|
@Override
|
||||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
||||||
List<ItemStack> list = new ArrayList<>();
|
List<ItemStack> list = new ArrayList<>();
|
||||||
list.add(new ItemStack(QuickieBlocks.ITEMHOARDER.getBlock()));
|
list.add(new ItemStack(ModBlocks.BLOCK_ITEMHOARDER));
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
135
src/main/java/de/jottyfan/quickiemod/block/BlockLavahoarder.java
Normal file
135
src/main/java/de/jottyfan/quickiemod/block/BlockLavahoarder.java
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
package de.jottyfan.quickiemod.block;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
import de.jottyfan.quickiemod.item.ModItems;
|
||||||
|
import net.minecraft.block.AbstractBlock;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.Blocks;
|
||||||
|
import net.minecraft.entity.ItemEntity;
|
||||||
|
import net.minecraft.entity.LivingEntity;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.item.Items;
|
||||||
|
import net.minecraft.loot.context.LootWorldContext.Builder;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.server.world.ServerWorld;
|
||||||
|
import net.minecraft.util.ActionResult;
|
||||||
|
import net.minecraft.util.Hand;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
import net.minecraft.util.hit.BlockHitResult;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.tick.OrderedTick;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class BlockLavahoarder extends Block {
|
||||||
|
|
||||||
|
public BlockLavahoarder(Identifier identifier) {
|
||||||
|
super(AbstractBlock.Settings.create().hardness(2.5f).luminance(state -> 15)
|
||||||
|
.registryKey(RegistryKey.of(RegistryKeys.BLOCK, identifier)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
||||||
|
List<ItemStack> list = new ArrayList<>();
|
||||||
|
list.add(new ItemStack(ModBlocks.BLOCK_LAVAHOARDER));
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final void spawnRandomItems(World world, BlockPos pos, Integer count) {
|
||||||
|
Integer which = new Random().nextInt(10);
|
||||||
|
if (which < 1) {
|
||||||
|
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(),
|
||||||
|
new ItemStack(Items.DIAMOND, new Random().nextInt(count + 2))));
|
||||||
|
} else if (which < 2) {
|
||||||
|
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(),
|
||||||
|
new ItemStack(Items.EMERALD, new Random().nextInt(count + 1))));
|
||||||
|
} else if (which < 3) {
|
||||||
|
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(),
|
||||||
|
new ItemStack(Items.RAW_GOLD, new Random().nextInt(count))));
|
||||||
|
} else if (which < 4) {
|
||||||
|
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(),
|
||||||
|
new ItemStack(Items.RAW_IRON, new Random().nextInt(count + 1))));
|
||||||
|
} else if (which < 5) {
|
||||||
|
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(),
|
||||||
|
new ItemStack(Items.RAW_COPPER, new Random().nextInt(count + 2))));
|
||||||
|
} else if (which < 6) {
|
||||||
|
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.OBSIDIAN)));
|
||||||
|
} else if (which < 7) {
|
||||||
|
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.LAPIS_LAZULI)));
|
||||||
|
} else if (which < 8) {
|
||||||
|
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(ModItems.ITEM_SULFOR)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* sucks the lava that touches the block
|
||||||
|
*
|
||||||
|
* @param world the world
|
||||||
|
* @param pos the pos
|
||||||
|
* @return true if lava was found
|
||||||
|
*/
|
||||||
|
public static final boolean suckLava(World world, BlockPos pos) {
|
||||||
|
if (world == null) {
|
||||||
|
return false;
|
||||||
|
} else if (Blocks.LAVA.equals(world.getBlockState(pos).getBlock())) {
|
||||||
|
world.setBlockState(pos, Blocks.AIR.getDefaultState());
|
||||||
|
BlockPos up = pos.up();
|
||||||
|
Random random = new Random();
|
||||||
|
if (random.nextFloat() > 0.9f) {
|
||||||
|
spawnRandomItems(world, up, 2);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void scheduledTick(BlockState state, ServerWorld world, BlockPos pos,
|
||||||
|
net.minecraft.util.math.random.Random random) {
|
||||||
|
suckLava(world, pos.north());
|
||||||
|
suckLava(world, pos.south());
|
||||||
|
suckLava(world, pos.east());
|
||||||
|
suckLava(world, pos.west());
|
||||||
|
suckLava(world, pos.up());
|
||||||
|
suckLava(world, pos.down());
|
||||||
|
world.getBlockTickScheduler().scheduleTick(OrderedTick.create(this, pos));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) {
|
||||||
|
if (!world.isClient) {
|
||||||
|
Hand hand = player.getActiveHand();
|
||||||
|
ItemStack handStack = player.getStackInHand(hand);
|
||||||
|
if (handStack != null && Items.BUCKET.equals(handStack.getItem())) {
|
||||||
|
Integer amount = handStack.getCount();
|
||||||
|
ItemStack lavaBucketStack = new ItemStack(Items.LAVA_BUCKET, 1);
|
||||||
|
ItemStack emptyBucketStack = new ItemStack(Items.BUCKET, amount - 1);
|
||||||
|
if (emptyBucketStack.getCount() < 1) {
|
||||||
|
player.setStackInHand(hand, lavaBucketStack);
|
||||||
|
} else {
|
||||||
|
player.setStackInHand(hand, emptyBucketStack);
|
||||||
|
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), lavaBucketStack));
|
||||||
|
}
|
||||||
|
spawnRandomItems(world, pos, 2);
|
||||||
|
world.setBlockState(pos, ModBlocks.BLOCK_EMPTYLAVAHOARDER.getDefaultState());
|
||||||
|
world.getBlockTickScheduler().scheduleTick(OrderedTick.create(ModBlocks.BLOCK_EMPTYLAVAHOARDER, pos));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ActionResult.SUCCESS; // forbid to empty the just filled lava bucket
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) {
|
||||||
|
world.getBlockTickScheduler().scheduleTick(OrderedTick.create(this, pos));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,89 @@
|
|||||||
|
package de.jottyfan.quickiemod.block;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.block.AbstractBlock;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.LivingEntity;
|
||||||
|
import net.minecraft.entity.mob.HostileEntity;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.server.world.ServerWorld;
|
||||||
|
import net.minecraft.sound.SoundCategory;
|
||||||
|
import net.minecraft.sound.SoundEvents;
|
||||||
|
import net.minecraft.state.StateManager.Builder;
|
||||||
|
import net.minecraft.state.property.IntProperty;
|
||||||
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.util.ActionResult;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
import net.minecraft.util.hit.BlockHitResult;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.Box;
|
||||||
|
import net.minecraft.util.math.random.Random;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.tick.OrderedTick;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class BlockMonsterhoarder extends Block {
|
||||||
|
|
||||||
|
private static final IntProperty SUCKRADIUS = IntProperty.of("suckradius", 1, 15);
|
||||||
|
|
||||||
|
public BlockMonsterhoarder(Identifier identifier) {
|
||||||
|
super(AbstractBlock.Settings.create().hardness(2.5f).luminance(state -> state.get(BlockMonsterhoarder.SUCKRADIUS))
|
||||||
|
.registryKey(RegistryKey.of(RegistryKeys.BLOCK, identifier)));
|
||||||
|
setDefaultState(getDefaultState().with(SUCKRADIUS, 8));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void appendProperties(Builder<Block, BlockState> builder) {
|
||||||
|
builder.add(SUCKRADIUS);
|
||||||
|
super.appendProperties(builder);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) {
|
||||||
|
if (!world.isClient()) {
|
||||||
|
world.setBlockState(pos, state.cycle(SUCKRADIUS));
|
||||||
|
} else {
|
||||||
|
player.sendMessage(Text.translatable("msg.monsterhoarder.size", state.get(SUCKRADIUS)), false);
|
||||||
|
}
|
||||||
|
return ActionResult.SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void scheduledTick(BlockState state, ServerWorld world, BlockPos pos, Random random) {
|
||||||
|
if (!world.isClient) {
|
||||||
|
Box box = new Box(pos).expand(Double.valueOf(state.get(SUCKRADIUS)));
|
||||||
|
List<Entity> entities = world.getOtherEntities(null, box);
|
||||||
|
for (Entity entity : entities) {
|
||||||
|
if (entity instanceof HostileEntity hostile) {
|
||||||
|
if (hostile.isFireImmune()) {
|
||||||
|
if (world instanceof ServerWorld serverWorld) {
|
||||||
|
hostile.kill(serverWorld);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
hostile.setOnFireFor(90);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
world.getBlockTickScheduler().scheduleTick(OrderedTick.create(this, pos));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) {
|
||||||
|
if (!world.isClient) {
|
||||||
|
world.getBlockTickScheduler().scheduleTick(OrderedTick.create(this, pos));
|
||||||
|
world.playSound(null, pos, SoundEvents.UI_TOAST_CHALLENGE_COMPLETE, SoundCategory.PLAYERS, 1f, 1f);
|
||||||
|
}
|
||||||
|
super.onPlaced(world, pos, state, placer, itemStack);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package de.jottyfan.quickiemod.block;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import de.jottyfan.quickiemod.block.help.IntProviderHelper;
|
||||||
|
import de.jottyfan.quickiemod.item.ModItems;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.ExperienceDroppingBlock;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.loot.context.LootWorldContext.Builder;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.sound.BlockSoundGroup;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class BlockOreDeepslateSulphor extends ExperienceDroppingBlock {
|
||||||
|
|
||||||
|
public BlockOreDeepslateSulphor(Identifier identifier) {
|
||||||
|
super(IntProviderHelper.of(0, 2), Settings.create().strength(2.5f).hardness(1.9f).sounds(BlockSoundGroup.SOUL_SAND)
|
||||||
|
.requiresTool().registryKey(RegistryKey.of(RegistryKeys.BLOCK, identifier)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
||||||
|
return Arrays.asList(new ItemStack[] { new ItemStack(ModItems.ITEM_SULFOR, 4) });
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package de.jottyfan.quickiemod.block;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import de.jottyfan.quickiemod.block.help.IntProviderHelper;
|
||||||
|
import de.jottyfan.quickiemod.item.ModItems;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.ExperienceDroppingBlock;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.loot.context.LootWorldContext.Builder;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.sound.BlockSoundGroup;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class BlockOreNetherSulphor extends ExperienceDroppingBlock {
|
||||||
|
|
||||||
|
public BlockOreNetherSulphor(Identifier identifier) {
|
||||||
|
super(IntProviderHelper.of(0, 2), Settings.create().strength(2.5f).hardness(2.1f).sounds(BlockSoundGroup.SOUL_SAND)
|
||||||
|
.requiresTool().registryKey(RegistryKey.of(RegistryKeys.BLOCK, identifier)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
||||||
|
return Arrays.asList(new ItemStack[] { new ItemStack(ModItems.ITEM_SULFOR) });
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
package de.jottyfan.quickiemod.block;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import de.jottyfan.quickiemod.block.help.IntProviderHelper;
|
||||||
|
import de.jottyfan.quickiemod.item.ModItems;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.ExperienceDroppingBlock;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.loot.context.LootWorldContext.Builder;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.sound.BlockSoundGroup;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
import net.minecraft.util.math.random.Random;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class BlockOreSalpeter extends ExperienceDroppingBlock {
|
||||||
|
|
||||||
|
public BlockOreSalpeter(Identifier identifier) {
|
||||||
|
super(IntProviderHelper.of(0, 2), Settings.create().strength(2.5f).hardness(3.1f).sounds(BlockSoundGroup.SOUL_SAND)
|
||||||
|
.requiresTool().registryKey(RegistryKey.of(RegistryKeys.BLOCK, identifier)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
||||||
|
return Arrays.asList(new ItemStack[] { new ItemStack(ModItems.ITEM_SALPETER, 2 + Random.create().nextInt(3)) });
|
||||||
|
}
|
||||||
|
}
|
@ -1,16 +1,19 @@
|
|||||||
package de.jottyfan.quickiemod.blocks;
|
package de.jottyfan.quickiemod.block;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.blocks.help.IntProviderHelper;
|
import de.jottyfan.quickiemod.block.help.IntProviderHelper;
|
||||||
import de.jottyfan.quickiemod.items.QuickieItems;
|
import de.jottyfan.quickiemod.item.ModItems;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.Blocks;
|
import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.block.ExperienceDroppingBlock;
|
import net.minecraft.block.ExperienceDroppingBlock;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
import net.minecraft.loot.context.LootWorldContext.Builder;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
import net.minecraft.sound.BlockSoundGroup;
|
import net.minecraft.sound.BlockSoundGroup;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.math.random.Random;
|
import net.minecraft.util.math.random.Random;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -20,12 +23,12 @@ import net.minecraft.util.math.random.Random;
|
|||||||
*/
|
*/
|
||||||
public class BlockOreSandSalpeter extends ExperienceDroppingBlock {
|
public class BlockOreSandSalpeter extends ExperienceDroppingBlock {
|
||||||
|
|
||||||
public BlockOreSandSalpeter() {
|
public BlockOreSandSalpeter(Identifier identifier) {
|
||||||
super(IntProviderHelper.of(0, 2), Settings.create().strength(2.5f).hardness(2.9f).sounds(BlockSoundGroup.SOUL_SAND).requiresTool());
|
super(IntProviderHelper.of(0, 2), Settings.create().strength(2.5f).hardness(2.9f).sounds(BlockSoundGroup.SOUL_SAND).requiresTool().registryKey(RegistryKey.of(RegistryKeys.BLOCK, identifier)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
||||||
return Arrays.asList(new ItemStack[] { new ItemStack(QuickieItems.SALPETER.getItem(), 7 + Random.create().nextInt(4)), new ItemStack(Blocks.SAND) });
|
return Arrays.asList(new ItemStack[] { new ItemStack(ModItems.ITEM_SALPETER, 7 + Random.create().nextInt(4)), new ItemStack(Blocks.SAND) });
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
package de.jottyfan.quickiemod.block;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import de.jottyfan.quickiemod.block.help.IntProviderHelper;
|
||||||
|
import de.jottyfan.quickiemod.item.ModItems;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.ExperienceDroppingBlock;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.loot.context.LootWorldContext.Builder;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.sound.BlockSoundGroup;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class BlockOreSulphor extends ExperienceDroppingBlock {
|
||||||
|
|
||||||
|
public BlockOreSulphor(Identifier identifier) {
|
||||||
|
super(IntProviderHelper.of(0, 2), Settings.create().strength(2.5f).hardness(1.9f).sounds(BlockSoundGroup.SOUL_SAND)
|
||||||
|
.requiresTool().registryKey(RegistryKey.of(RegistryKeys.BLOCK, identifier)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
||||||
|
return Arrays.asList(new ItemStack[] { new ItemStack(ModItems.ITEM_SULFOR) });
|
||||||
|
}
|
||||||
|
}
|
@ -1,28 +1,41 @@
|
|||||||
package de.jottyfan.quickiemod.blocks;
|
package de.jottyfan.quickiemod.block;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.items.QuickieItems;
|
|
||||||
import net.minecraft.block.AbstractBlock;
|
import net.minecraft.block.AbstractBlock;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.Blocks;
|
import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.block.CropBlock;
|
import net.minecraft.block.CropBlock;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemConvertible;
|
import net.minecraft.item.ItemConvertible;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
import net.minecraft.loot.context.LootWorldContext.Builder;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
import net.minecraft.util.ActionResult;
|
import net.minecraft.util.ActionResult;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.ItemScatterer;
|
import net.minecraft.util.ItemScatterer;
|
||||||
import net.minecraft.util.collection.DefaultedList;
|
import net.minecraft.util.collection.DefaultedList;
|
||||||
import net.minecraft.util.hit.BlockHitResult;
|
import net.minecraft.util.hit.BlockHitResult;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class BlockCottonplant extends CropBlock {
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class BlockPlant extends CropBlock {
|
||||||
|
|
||||||
public BlockCottonplant() {
|
private Item seed;
|
||||||
super(AbstractBlock.Settings.copy(Blocks.WHEAT));
|
private Item fruit;
|
||||||
|
|
||||||
|
public BlockPlant(Identifier identifier, Item seed, Item fruit) {
|
||||||
|
super(AbstractBlock.Settings.copy(Blocks.WHEAT).registryKey(RegistryKey.of(RegistryKeys.BLOCK, identifier)));
|
||||||
|
this.seed = seed;
|
||||||
|
this.fruit = fruit;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -31,7 +44,7 @@ public class BlockCottonplant extends CropBlock {
|
|||||||
list.add(new ItemStack(getSeedsItem())); // the one from the seed
|
list.add(new ItemStack(getSeedsItem())); // the one from the seed
|
||||||
if (isMature(state)) {
|
if (isMature(state)) {
|
||||||
list.add(new ItemStack(getSeedsItem(), new Random().nextInt(2)));
|
list.add(new ItemStack(getSeedsItem(), new Random().nextInt(2)));
|
||||||
list.add(new ItemStack(QuickieItems.COTTON.getItem(), new Random().nextFloat() > 0.9f ? 2 : 1));
|
list.add(new ItemStack(fruit, new Random().nextFloat() > 0.9f ? 2 : 1));
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
@ -52,7 +65,7 @@ public class BlockCottonplant extends CropBlock {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected ItemConvertible getSeedsItem() {
|
protected ItemConvertible getSeedsItem() {
|
||||||
return QuickieItems.COTTONSEED.getItem();
|
return seed;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
@ -1,16 +1,18 @@
|
|||||||
package de.jottyfan.quickiemod.blocks;
|
package de.jottyfan.quickiemod.block;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.mojang.serialization.MapCodec;
|
import com.mojang.serialization.MapCodec;
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.items.QuickieItems;
|
|
||||||
import net.minecraft.block.AbstractBlock;
|
import net.minecraft.block.AbstractBlock;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.FallingBlock;
|
import net.minecraft.block.FallingBlock;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
import net.minecraft.loot.context.LootWorldContext.Builder;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.world.explosion.Explosion;
|
import net.minecraft.world.explosion.Explosion;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -18,15 +20,18 @@ import net.minecraft.world.explosion.Explosion;
|
|||||||
* @author jotty
|
* @author jotty
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class BlockQuickiepowder extends FallingBlock {
|
public class BlockPowder extends FallingBlock {
|
||||||
|
|
||||||
public BlockQuickiepowder() {
|
private final ItemStack[] drops;
|
||||||
super(AbstractBlock.Settings.create().luminance(state -> 12));
|
|
||||||
|
public BlockPowder(Identifier identifier, ItemStack[] drops) {
|
||||||
|
super(AbstractBlock.Settings.create().luminance(state -> 12).registryKey(RegistryKey.of(RegistryKeys.BLOCK, identifier)));
|
||||||
|
this.drops = drops;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
||||||
return Arrays.asList(new ItemStack[] { new ItemStack(QuickieItems.QUICKIEPOWDER.getItem(), 9) });
|
return Arrays.asList(drops);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
@ -1,17 +1,20 @@
|
|||||||
package de.jottyfan.quickiemod.blocks;
|
package de.jottyfan.quickiemod.block;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.mojang.serialization.MapCodec;
|
import com.mojang.serialization.MapCodec;
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.items.QuickieItems;
|
import de.jottyfan.quickiemod.item.ModItems;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.Blocks;
|
import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.block.FallingBlock;
|
import net.minecraft.block.FallingBlock;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
import net.minecraft.loot.context.LootWorldContext.Builder;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
import net.minecraft.sound.BlockSoundGroup;
|
import net.minecraft.sound.BlockSoundGroup;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.math.random.Random;
|
import net.minecraft.util.math.random.Random;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -21,13 +24,15 @@ import net.minecraft.util.math.random.Random;
|
|||||||
*/
|
*/
|
||||||
public class BlockSandSalpeter extends FallingBlock {
|
public class BlockSandSalpeter extends FallingBlock {
|
||||||
|
|
||||||
public BlockSandSalpeter() {
|
public BlockSandSalpeter(Identifier identifier) {
|
||||||
super(Settings.create().strength(2.5f).hardness(3.1f).sounds(BlockSoundGroup.SOUL_SAND).requiresTool());
|
super(Settings.create().strength(2.5f).hardness(3.1f).sounds(BlockSoundGroup.SOUL_SAND).requiresTool()
|
||||||
|
.registryKey(RegistryKey.of(RegistryKeys.BLOCK, identifier)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
||||||
return Arrays.asList(new ItemStack[] { new ItemStack(QuickieItems.SALPETER.getItem(), 3 + Random.create().nextInt(2)), new ItemStack(Blocks.SAND) });
|
return Arrays.asList(new ItemStack[] { new ItemStack(ModItems.ITEM_SALPETER, 3 + Random.create().nextInt(2)),
|
||||||
|
new ItemStack(Blocks.SAND) });
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
@ -0,0 +1,22 @@
|
|||||||
|
package de.jottyfan.quickiemod.block;
|
||||||
|
|
||||||
|
import net.minecraft.block.AbstractBlock;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.sound.BlockSoundGroup;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class BlockSlippery extends Block {
|
||||||
|
|
||||||
|
public BlockSlippery(Identifier identifier, float hardness, float slipperiness, BlockSoundGroup soundGroup) {
|
||||||
|
super(AbstractBlock.Settings.create().hardness(hardness).slipperiness(slipperiness).breakInstantly()
|
||||||
|
.sounds(soundGroup).registryKey(RegistryKey.of(RegistryKeys.BLOCK, identifier)));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
117
src/main/java/de/jottyfan/quickiemod/block/BlockStacker.java
Normal file
117
src/main/java/de/jottyfan/quickiemod/block/BlockStacker.java
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
package de.jottyfan.quickiemod.block;
|
||||||
|
|
||||||
|
import com.mojang.serialization.MapCodec;
|
||||||
|
|
||||||
|
import de.jottyfan.quickiemod.blockentity.BlockStackerEntity;
|
||||||
|
import de.jottyfan.quickiemod.blockentity.ModBlockentity;
|
||||||
|
import net.minecraft.block.AbstractBlock;
|
||||||
|
import net.minecraft.block.BlockEntityProvider;
|
||||||
|
import net.minecraft.block.BlockRenderType;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.BlockWithEntity;
|
||||||
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
|
import net.minecraft.block.entity.BlockEntityTicker;
|
||||||
|
import net.minecraft.block.entity.BlockEntityType;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.screen.ScreenHandler;
|
||||||
|
import net.minecraft.util.ActionResult;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
import net.minecraft.util.ItemScatterer;
|
||||||
|
import net.minecraft.util.hit.BlockHitResult;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.Direction;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class BlockStacker extends BlockWithEntity implements BlockEntityProvider {
|
||||||
|
|
||||||
|
private final Direction source;
|
||||||
|
private final Direction dest;
|
||||||
|
|
||||||
|
public BlockStacker(Identifier identifier, Direction source, Direction dest) {
|
||||||
|
super(AbstractBlock.Settings.create().hardness(2.5f).registryKey(RegistryKey.of(RegistryKeys.BLOCK, identifier)));
|
||||||
|
this.source = source;
|
||||||
|
this.dest = dest;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockRenderType getRenderType(BlockState state) {
|
||||||
|
return BlockRenderType.MODEL;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* define the source offset
|
||||||
|
*
|
||||||
|
* @return the direction of the source offset (1 block beside)
|
||||||
|
*/
|
||||||
|
public Direction getSourceOffset() {
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* define the dest offset
|
||||||
|
*
|
||||||
|
* @return the direction of the dest offset (1 block beside)
|
||||||
|
*/
|
||||||
|
public Direction getDestOffset() {
|
||||||
|
return dest;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockEntity createBlockEntity(BlockPos pos, BlockState state) {
|
||||||
|
return new BlockStackerEntity(pos, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected MapCodec<? extends BlockWithEntity> getCodec() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state,
|
||||||
|
BlockEntityType<T> type) {
|
||||||
|
return validateTicker(type, ModBlockentity.BLOCKSTACKER_BLOCKENTITY,
|
||||||
|
(world1, pos, state1, be) -> BlockStackerEntity.tick(world1, pos, state1, be));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) {
|
||||||
|
// if (!world.isClient) {
|
||||||
|
// NamedScreenHandlerFactory screenHandlerFactory = state.createScreenHandlerFactory(world, pos);
|
||||||
|
// if (screenHandlerFactory != null) {
|
||||||
|
// player.openHandledScreen(screenHandlerFactory);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
return ActionResult.SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onStateReplaced(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {
|
||||||
|
if (state.getBlock() != newState.getBlock()) {
|
||||||
|
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||||
|
if (blockEntity instanceof BlockStackerEntity) {
|
||||||
|
ItemScatterer.spawn(world, pos, (BlockStackerEntity) blockEntity);
|
||||||
|
// update comparators
|
||||||
|
world.updateComparators(pos, this);
|
||||||
|
}
|
||||||
|
super.onStateReplaced(state, world, pos, newState, moved);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasComparatorOutput(BlockState state) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getComparatorOutput(BlockState state, World world, BlockPos pos) {
|
||||||
|
return ScreenHandler.calculateComparatorOutput(world.getBlockEntity(pos));
|
||||||
|
}
|
||||||
|
}
|
132
src/main/java/de/jottyfan/quickiemod/block/ModBlocks.java
Normal file
132
src/main/java/de/jottyfan/quickiemod/block/ModBlocks.java
Normal file
@ -0,0 +1,132 @@
|
|||||||
|
package de.jottyfan.quickiemod.block;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import de.jottyfan.quickiemod.Quickiemod;
|
||||||
|
import de.jottyfan.quickiemod.identifier.ModIdentifiers;
|
||||||
|
import de.jottyfan.quickiemod.item.ModItems;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.item.BlockItem;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.registry.Registries;
|
||||||
|
import net.minecraft.registry.Registry;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.sound.BlockSoundGroup;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
import net.minecraft.util.math.Direction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ModBlocks {
|
||||||
|
|
||||||
|
public static final Block BLOCK_QUICKIEPOWDER = registerBlock(ModIdentifiers.BLOCK_QUICKIEPOWDER, new BlockPowder(
|
||||||
|
ModIdentifiers.BLOCK_QUICKIEPOWDER, new ItemStack[] { new ItemStack(ModItems.ITEM_QUICKIEPOWDER, 9) }));
|
||||||
|
public static final Block BLOCK_SPEEDPOWDER = registerBlock(ModIdentifiers.BLOCK_SPEEDPOWDER, new BlockPowder(
|
||||||
|
ModIdentifiers.BLOCK_SPEEDPOWDER, new ItemStack[] { new ItemStack(ModItems.ITEM_SPEEDPOWDER, 9) }));
|
||||||
|
public static final Block BLOCK_SALPETER = registerBlock(ModIdentifiers.BLOCK_SALPETER, new BlockBreakByTool(
|
||||||
|
ModIdentifiers.BLOCK_SALPETER, 1.5f, 1.5f, new ItemStack[] { new ItemStack(ModItems.ITEM_SALPETER, 9) }));
|
||||||
|
public static final Block BLOCK_SULFOR = registerBlock(ModIdentifiers.BLOCK_SULFOR, new BlockBreakByTool(
|
||||||
|
ModIdentifiers.BLOCK_SULFOR, 1.5f, 1.5f, new ItemStack[] { new ItemStack(ModItems.ITEM_SULFOR, 9) }));
|
||||||
|
public static final Block BLOCK_MONSTERHOARDER = registerBlock(ModIdentifiers.BLOCK_MONSTERHOARDER,
|
||||||
|
new BlockMonsterhoarder(ModIdentifiers.BLOCK_MONSTERHOARDER));
|
||||||
|
public static final Block BLOCK_LAVAHOARDER = registerBlock(ModIdentifiers.BLOCK_LAVAHOARDER,
|
||||||
|
new BlockLavahoarder(ModIdentifiers.BLOCK_LAVAHOARDER));
|
||||||
|
public static final Block BLOCK_EMPTYLAVAHOARDER = registerBlock(ModIdentifiers.BLOCK_EMPTYLAVAHOARDER,
|
||||||
|
new BlockEmptyLavahoarder(ModIdentifiers.BLOCK_EMPTYLAVAHOARDER));
|
||||||
|
public static final Block BLOCK_ITEMHOARDER = registerBlock(ModIdentifiers.BLOCK_ITEMHOARDER,
|
||||||
|
new BlockItemhoarder(ModIdentifiers.BLOCK_ITEMHOARDER));
|
||||||
|
public static final Block BLOCK_DIRTSALPETER = registerBlock(ModIdentifiers.BLOCK_DIRTSALPETER,
|
||||||
|
new BlockDirtSalpeter(ModIdentifiers.BLOCK_DIRTSALPETER));
|
||||||
|
public static final Block BLOCK_OREDEEPSLATESULFOR = registerBlock(ModIdentifiers.BLOCK_OREDEEPSLATESULFOR,
|
||||||
|
new BlockOreDeepslateSulphor(ModIdentifiers.BLOCK_OREDEEPSLATESULFOR));
|
||||||
|
public static final Block BLOCK_ORENETHERSULFOR = registerBlock(ModIdentifiers.BLOCK_ORENETHERSULFOR,
|
||||||
|
new BlockOreNetherSulphor(ModIdentifiers.BLOCK_ORENETHERSULFOR));
|
||||||
|
public static final Block BLOCK_ORESALPETER = registerBlock(ModIdentifiers.BLOCK_ORESALPETER,
|
||||||
|
new BlockOreSalpeter(ModIdentifiers.BLOCK_ORESALPETER));
|
||||||
|
public static final Block BLOCK_ORESANDSALPETER = registerBlock(ModIdentifiers.BLOCK_ORESANDSALPETER,
|
||||||
|
new BlockOreSandSalpeter(ModIdentifiers.BLOCK_ORESANDSALPETER));
|
||||||
|
public static final Block BLOCK_ORESULFOR = registerBlock(ModIdentifiers.BLOCK_ORESULFOR,
|
||||||
|
new BlockOreSulphor(ModIdentifiers.BLOCK_ORESULFOR));
|
||||||
|
public static final Block BLOCK_SANDSALPETER = registerBlock(ModIdentifiers.BLOCK_SANDSALPETER,
|
||||||
|
new BlockSandSalpeter(ModIdentifiers.BLOCK_SANDSALPETER));
|
||||||
|
public static final Block BLOCK_KELPSTACK = registerBlock(ModIdentifiers.BLOCK_KELPSTACK,
|
||||||
|
new BlockSlippery(ModIdentifiers.BLOCK_KELPSTACK, 0.1f, 1.0f, BlockSoundGroup.WET_GRASS));
|
||||||
|
public static final Block BLOCK_COTTONPLANT = registerBlock(ModIdentifiers.BLOCK_COTTONPLANT,
|
||||||
|
new BlockPlant(ModIdentifiers.BLOCK_COTTONPLANT, ModItems.ITEM_COTTONSEED, ModItems.ITEM_COTTON), false);
|
||||||
|
public static final Block BLOCK_CANOLAPLANT = registerBlock(ModIdentifiers.BLOCK_CANOLAPLANT,
|
||||||
|
new BlockPlant(ModIdentifiers.BLOCK_CANOLAPLANT, ModItems.ITEM_CANOLASEED, ModItems.ITEM_CANOLA), false);
|
||||||
|
public static final Block BLOCK_DRILL_DOWN = registerBlock(ModIdentifiers.BLOCK_DRILLDOWN,
|
||||||
|
new BlockDrill(ModIdentifiers.BLOCK_DRILLDOWN, Direction.DOWN));
|
||||||
|
public static final Block BLOCK_DRILL_EAST = registerBlock(ModIdentifiers.BLOCK_DRILLEAST,
|
||||||
|
new BlockDrill(ModIdentifiers.BLOCK_DRILLEAST, Direction.EAST));
|
||||||
|
public static final Block BLOCK_DRILL_SOUTH = registerBlock(ModIdentifiers.BLOCK_DRILLSOUTH,
|
||||||
|
new BlockDrill(ModIdentifiers.BLOCK_DRILLSOUTH, Direction.SOUTH));
|
||||||
|
public static final Block BLOCK_DRILL_WEST = registerBlock(ModIdentifiers.BLOCK_DRILLWEST,
|
||||||
|
new BlockDrill(ModIdentifiers.BLOCK_DRILLWEST, Direction.WEST));
|
||||||
|
public static final Block BLOCK_DRILL_NORTH = registerBlock(ModIdentifiers.BLOCK_DRILLNORTH,
|
||||||
|
new BlockDrill(ModIdentifiers.BLOCK_DRILLNORTH, Direction.NORTH));
|
||||||
|
public static final Block BLOCK_STACKER_DOWN = registerBlock(ModIdentifiers.BLOCK_STACKERDOWN,
|
||||||
|
new BlockStacker(ModIdentifiers.BLOCK_STACKERDOWN, Direction.UP, Direction.DOWN));
|
||||||
|
public static final Block BLOCK_STACKER_EAST = registerBlock(ModIdentifiers.BLOCK_STACKEREAST,
|
||||||
|
new BlockStacker(ModIdentifiers.BLOCK_STACKEREAST, Direction.WEST, Direction.EAST));
|
||||||
|
public static final Block BLOCK_STACKER_SOUTH = registerBlock(ModIdentifiers.BLOCK_STACKERSOUTH,
|
||||||
|
new BlockStacker(ModIdentifiers.BLOCK_STACKERSOUTH, Direction.NORTH, Direction.SOUTH));
|
||||||
|
public static final Block BLOCK_STACKER_WEST = registerBlock(ModIdentifiers.BLOCK_STACKERWEST,
|
||||||
|
new BlockStacker(ModIdentifiers.BLOCK_STACKERWEST, Direction.EAST, Direction.WEST));
|
||||||
|
public static final Block BLOCK_STACKER_NORTH = registerBlock(ModIdentifiers.BLOCK_STACKERNORTH,
|
||||||
|
new BlockStacker(ModIdentifiers.BLOCK_STACKERNORTH, Direction.SOUTH, Direction.NORTH));
|
||||||
|
public static final Block BLOCK_STACKER_UP = registerBlock(ModIdentifiers.BLOCK_STACKERUP,
|
||||||
|
new BlockStacker(ModIdentifiers.BLOCK_STACKERUP, Direction.DOWN, Direction.UP));
|
||||||
|
|
||||||
|
private static final Block registerBlock(Identifier identifier, Block block) {
|
||||||
|
return registerBlock(identifier, block, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Block registerBlock(Identifier identifier, Block block, boolean registerAsItem) {
|
||||||
|
if (registerAsItem) {
|
||||||
|
Registry.register(Registries.ITEM, identifier, new BlockItem(block, new Item.Settings()
|
||||||
|
.registryKey(RegistryKey.of(RegistryKeys.ITEM, identifier)).useBlockPrefixedTranslationKey()));
|
||||||
|
}
|
||||||
|
return Registry.register(Registries.BLOCK, identifier, block);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final List<Block> registerModBlocks() {
|
||||||
|
Quickiemod.LOGGER.info(String.format("registering blocks for %s", Quickiemod.MOD_ID));
|
||||||
|
|
||||||
|
List<Block> blocks = new ArrayList<>();
|
||||||
|
blocks.add(BLOCK_QUICKIEPOWDER);
|
||||||
|
blocks.add(BLOCK_SPEEDPOWDER);
|
||||||
|
blocks.add(BLOCK_SALPETER);
|
||||||
|
blocks.add(BLOCK_SULFOR);
|
||||||
|
blocks.add(BLOCK_MONSTERHOARDER);
|
||||||
|
blocks.add(BLOCK_EMPTYLAVAHOARDER);
|
||||||
|
blocks.add(BLOCK_LAVAHOARDER);
|
||||||
|
blocks.add(BLOCK_ITEMHOARDER);
|
||||||
|
blocks.add(BLOCK_DIRTSALPETER);
|
||||||
|
blocks.add(BLOCK_OREDEEPSLATESULFOR);
|
||||||
|
blocks.add(BLOCK_ORENETHERSULFOR);
|
||||||
|
blocks.add(BLOCK_ORESALPETER);
|
||||||
|
blocks.add(BLOCK_ORESANDSALPETER);
|
||||||
|
blocks.add(BLOCK_ORESULFOR);
|
||||||
|
blocks.add(BLOCK_SANDSALPETER);
|
||||||
|
blocks.add(BLOCK_KELPSTACK);
|
||||||
|
blocks.add(BLOCK_DRILL_DOWN);
|
||||||
|
blocks.add(BLOCK_DRILL_EAST);
|
||||||
|
blocks.add(BLOCK_DRILL_SOUTH);
|
||||||
|
blocks.add(BLOCK_DRILL_WEST);
|
||||||
|
blocks.add(BLOCK_DRILL_NORTH);
|
||||||
|
blocks.add(BLOCK_STACKER_DOWN);
|
||||||
|
blocks.add(BLOCK_STACKER_EAST);
|
||||||
|
blocks.add(BLOCK_STACKER_SOUTH);
|
||||||
|
blocks.add(BLOCK_STACKER_WEST);
|
||||||
|
blocks.add(BLOCK_STACKER_NORTH);
|
||||||
|
blocks.add(BLOCK_STACKER_UP);
|
||||||
|
return blocks;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
package de.jottyfan.quickiemod.block;
|
||||||
|
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class StandardBlock extends AbstractIdentifiedBlock {
|
||||||
|
|
||||||
|
public StandardBlock(Identifier identifier) {
|
||||||
|
super(identifier);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.quickiemod.blocks.help;
|
package de.jottyfan.quickiemod.block.help;
|
||||||
|
|
||||||
import net.minecraft.util.math.intprovider.IntProvider;
|
import net.minecraft.util.math.intprovider.IntProvider;
|
||||||
import net.minecraft.util.math.intprovider.IntProviderType;
|
import net.minecraft.util.math.intprovider.IntProviderType;
|
@ -1,32 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blockentity;
|
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.blocks.QuickieBlocks;
|
|
||||||
import de.jottyfan.quickiemod.init.BlockEntityIdentity;
|
|
||||||
import net.minecraft.block.entity.BlockEntityType;
|
|
||||||
import net.minecraft.registry.Registries;
|
|
||||||
import net.minecraft.registry.Registry;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class BlockEntityTypes {
|
|
||||||
public static final BlockEntityType<EmptyLavaHoarderBlockEntity> EMPTYLAVAHOARDER = Registry.register(Registries.BLOCK_ENTITY_TYPE,
|
|
||||||
BlockEntityIdentity.EMPTYLAVALHOARDER, BlockEntityType.Builder
|
|
||||||
.create(EmptyLavaHoarderBlockEntity::new, QuickieBlocks.EMPTYLAVAHOARDER.getBlock(), QuickieBlocks.LAVAHOARDER.getBlock()).build(null));
|
|
||||||
public static final BlockEntityType<ItemHoarderBlockEntity> ITEMHOARDER = Registry.register(Registries.BLOCK_ENTITY_TYPE, BlockEntityIdentity.ITEMHOARDER,
|
|
||||||
BlockEntityType.Builder.create(ItemHoarderBlockEntity::new, QuickieBlocks.ITEMHOARDER.getBlock()).build(null));
|
|
||||||
public static final BlockEntityType<MonsterHoarderBlockEntity> MONSTERHOARDER = Registry.register(Registries.BLOCK_ENTITY_TYPE,
|
|
||||||
BlockEntityIdentity.MONSTERHOARDER, BlockEntityType.Builder.create(MonsterHoarderBlockEntity::new, QuickieBlocks.MONSTERHOARDER.getBlock()).build(null));
|
|
||||||
public static final BlockEntityType<DrillBlockDownEntity> DRILL_DOWN = Registry.register(Registries.BLOCK_ENTITY_TYPE, BlockEntityIdentity.DRILL_DOWN,
|
|
||||||
BlockEntityType.Builder.create(DrillBlockDownEntity::new, QuickieBlocks.DRILL_DOWN.getBlock()).build(null));
|
|
||||||
public static final BlockEntityType<DrillBlockEastEntity> DRILL_EAST = Registry.register(Registries.BLOCK_ENTITY_TYPE, BlockEntityIdentity.DRILL_EAST,
|
|
||||||
BlockEntityType.Builder.create(DrillBlockEastEntity::new, QuickieBlocks.DRILL_EAST.getBlock()).build(null));
|
|
||||||
public static final BlockEntityType<DrillBlockSouthEntity> DRILL_SOUTH = Registry.register(Registries.BLOCK_ENTITY_TYPE, BlockEntityIdentity.DRILL_SOUTH,
|
|
||||||
BlockEntityType.Builder.create(DrillBlockSouthEntity::new, QuickieBlocks.DRILL_SOUTH.getBlock()).build(null));
|
|
||||||
public static final BlockEntityType<DrillBlockWestEntity> DRILL_WEST = Registry.register(Registries.BLOCK_ENTITY_TYPE, BlockEntityIdentity.DRILL_WEST,
|
|
||||||
BlockEntityType.Builder.create(DrillBlockWestEntity::new, QuickieBlocks.DRILL_WEST.getBlock()).build(null));
|
|
||||||
public static final BlockEntityType<DrillBlockNorthEntity> DRILL_NORTH = Registry.register(Registries.BLOCK_ENTITY_TYPE, BlockEntityIdentity.DRILL_NORTH,
|
|
||||||
BlockEntityType.Builder.create(DrillBlockNorthEntity::new, QuickieBlocks.DRILL_NORTH.getBlock()).build(null));
|
|
||||||
}
|
|
@ -1,64 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blockentity;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.blocks.QuickieBlocks;
|
|
||||||
import net.minecraft.block.AbstractBlock;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.BlockEntityProvider;
|
|
||||||
import net.minecraft.block.BlockRenderType;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
|
||||||
import net.minecraft.block.entity.BlockEntityTicker;
|
|
||||||
import net.minecraft.block.entity.BlockEntityType;
|
|
||||||
import net.minecraft.entity.LivingEntity;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
|
||||||
import net.minecraft.sound.SoundCategory;
|
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class BlockMonsterhoarder extends Block implements BlockEntityProvider {
|
|
||||||
|
|
||||||
|
|
||||||
public BlockMonsterhoarder() {
|
|
||||||
super(AbstractBlock.Settings.create().hardness(2.5f).luminance(state -> 15));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockEntity createBlockEntity(BlockPos pos, BlockState blockState) {
|
|
||||||
return new MonsterHoarderBlockEntity(pos, blockState);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockRenderType getRenderType(BlockState state) {
|
|
||||||
return BlockRenderType.MODEL;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type){
|
|
||||||
return (world1, pos, state1, be) -> MonsterHoarderBlockEntity.tick(world1, pos, state1, be);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
|
||||||
List<ItemStack> list = new ArrayList<>();
|
|
||||||
list.add(new ItemStack(QuickieBlocks.MONSTERHOARDER.getBlock()));
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) {
|
|
||||||
if (!world.isClient) {
|
|
||||||
world.playSound(null, pos, SoundEvents.UI_TOAST_CHALLENGE_COMPLETE, SoundCategory.PLAYERS, 1f, 1f);
|
|
||||||
}
|
|
||||||
super.onPlaced(world, pos, state, placer, itemStack);
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,261 @@
|
|||||||
|
package de.jottyfan.quickiemod.blockentity;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import de.jottyfan.quickiemod.Quickiemod;
|
||||||
|
import de.jottyfan.quickiemod.block.BlockStacker;
|
||||||
|
import de.jottyfan.quickiemod.container.BlockStackerScreenHandler;
|
||||||
|
import de.jottyfan.quickiemod.container.ImplementedInventory;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
|
import net.minecraft.block.entity.LootableContainerBlockEntity;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.entity.player.PlayerInventory;
|
||||||
|
import net.minecraft.inventory.Inventories;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.item.Items;
|
||||||
|
import net.minecraft.nbt.NbtCompound;
|
||||||
|
import net.minecraft.registry.RegistryWrapper.WrapperLookup;
|
||||||
|
import net.minecraft.screen.NamedScreenHandlerFactory;
|
||||||
|
import net.minecraft.screen.ScreenHandler;
|
||||||
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.util.collection.DefaultedList;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class BlockStackerEntity extends BlockEntity implements NamedScreenHandlerFactory, ImplementedInventory {
|
||||||
|
|
||||||
|
private final DefaultedList<ItemStack> inventory = DefaultedList.ofSize(BlockStackerScreenHandler.SLOTSIZE, ItemStack.EMPTY);
|
||||||
|
|
||||||
|
public BlockStackerEntity(BlockPos blockPos, BlockState blockState) {
|
||||||
|
super(ModBlockentity.BLOCKSTACKER_BLOCKENTITY, blockPos, blockState);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DefaultedList<ItemStack> getItems() {
|
||||||
|
return inventory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ItemStack> getWhiteList() {
|
||||||
|
int counter = 0;
|
||||||
|
List<ItemStack> list = new ArrayList<>();
|
||||||
|
for (ItemStack stack : inventory) {
|
||||||
|
counter++;
|
||||||
|
if (counter < 10) { // first 9 items are whitelist items
|
||||||
|
list.add(stack);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ItemStack> getBlackList() {
|
||||||
|
int counter = 0;
|
||||||
|
List<ItemStack> list = new ArrayList<>();
|
||||||
|
for (ItemStack stack : inventory) {
|
||||||
|
counter++;
|
||||||
|
if (counter > 9) { // second 9 items are blacklist items
|
||||||
|
list.add(stack);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ScreenHandler createMenu(int syncId, PlayerInventory playerInventory, PlayerEntity player) {
|
||||||
|
return new BlockStackerScreenHandler(syncId, playerInventory, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Text getDisplayName() {
|
||||||
|
return Text.translatable(getCachedState().getBlock().getTranslationKey());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void readNbt(NbtCompound nbt, WrapperLookup registryLookup) {
|
||||||
|
super.readNbt(nbt, registryLookup);
|
||||||
|
Inventories.readNbt(nbt, inventory, registryLookup);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void writeNbt(NbtCompound nbt, WrapperLookup registryLookup) {
|
||||||
|
Inventories.writeNbt(nbt, inventory, registryLookup);
|
||||||
|
super.writeNbt(nbt, registryLookup);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* if whitelist, return true if current == pattern; return false otherwise
|
||||||
|
*
|
||||||
|
* @param current the current item stack
|
||||||
|
* @param pattern the item stack to compare with
|
||||||
|
* @param whitelist if true, filter only current == pattern, if false, filter
|
||||||
|
* all but that
|
||||||
|
* @return true or false
|
||||||
|
*/
|
||||||
|
public static final Boolean filter(ItemStack current, ItemStack pattern, Boolean whitelist) {
|
||||||
|
Boolean matches = pattern.getItem().equals(current.getItem());
|
||||||
|
return whitelist ? matches : !matches;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void tick(World world, BlockPos pos, BlockState state, BlockStackerEntity entity) {
|
||||||
|
if (!world.isClient) {
|
||||||
|
pos.down();
|
||||||
|
BlockStacker block = (BlockStacker) state.getBlock();
|
||||||
|
BlockEntity source = world.getBlockEntity(pos.offset(block.getSourceOffset()));
|
||||||
|
BlockEntity dest = world.getBlockEntity(pos.offset(block.getDestOffset()));
|
||||||
|
Boolean sourceIsLootable = source instanceof LootableContainerBlockEntity;
|
||||||
|
Boolean destIsLootable = dest instanceof LootableContainerBlockEntity;
|
||||||
|
if (sourceIsLootable && destIsLootable) {
|
||||||
|
LootableContainerBlockEntity lootableSource = (LootableContainerBlockEntity) source;
|
||||||
|
LootableContainerBlockEntity lootableDest = (LootableContainerBlockEntity) dest;
|
||||||
|
transferOneStack(lootableSource, lootableDest, entity.getWhiteList(), entity.getBlackList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Boolean transferOneStack(LootableContainerBlockEntity source, LootableContainerBlockEntity dest, List<ItemStack> whiteList, List<ItemStack> blackList) {
|
||||||
|
|
||||||
|
// whitelist behaviour
|
||||||
|
List<Item> checked = new ArrayList<>();
|
||||||
|
|
||||||
|
// this way, we block whitelist items that are in the blacklist
|
||||||
|
for (ItemStack stack : blackList) {
|
||||||
|
if (stack != null && !stack.isEmpty()) {
|
||||||
|
checked.add(stack.getItem());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Boolean found = false;
|
||||||
|
|
||||||
|
if (hasItems(whiteList)) {
|
||||||
|
Item matchItem = findNextItem(whiteList, checked);
|
||||||
|
while(!found && matchItem != null) {
|
||||||
|
checked.add(matchItem);
|
||||||
|
List<Item> matchItems = new ArrayList<>();
|
||||||
|
matchItems.add(matchItem);
|
||||||
|
found = transferOneStack(source, dest, matchItems, true);
|
||||||
|
matchItem = findNextItem(whiteList, checked);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// transport all but the items of the blacklist
|
||||||
|
found = transferOneStack(source, dest, checked, false);
|
||||||
|
}
|
||||||
|
return found;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Boolean transferOneStack(LootableContainerBlockEntity source, LootableContainerBlockEntity dest,
|
||||||
|
List<Item> ignoreItems, Boolean whitelist) {
|
||||||
|
Boolean result = false;
|
||||||
|
Integer sourceSlot = findItemStackPos(source, ignoreItems, whitelist);
|
||||||
|
if (sourceSlot != null && !Items.AIR.equals(source.getStack(sourceSlot).getItem())) {
|
||||||
|
ItemStack sourceStack = source.getStack(sourceSlot);
|
||||||
|
Integer destSlot = findItemStackPos(dest, sourceStack);
|
||||||
|
if (destSlot != null) {
|
||||||
|
Integer occupied = dest.getStack(destSlot).getCount();
|
||||||
|
Integer free = dest.getStack(destSlot).getMaxCount() - occupied;
|
||||||
|
Integer candidates = source.getStack(sourceSlot).getCount();
|
||||||
|
Integer travellers = candidates > free ? free : candidates;
|
||||||
|
if (travellers > 0) {
|
||||||
|
Quickiemod.LOGGER.debug("transfer {}/{} of {} from slot {} to slot {} on top of {} ones", travellers, candidates,
|
||||||
|
source.getStack(sourceSlot).getItem().toString(), sourceSlot, destSlot, occupied);
|
||||||
|
source.getStack(sourceSlot).decrement(travellers);
|
||||||
|
if (source.getStack(sourceSlot).getCount() < 1) {
|
||||||
|
source.removeStack(sourceSlot); // make empty slots really empty
|
||||||
|
}
|
||||||
|
dest.getStack(destSlot).increment(travellers);
|
||||||
|
result = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Integer destFreeSlot = findItemStackPos(dest, true);
|
||||||
|
if (destFreeSlot != null) {
|
||||||
|
Quickiemod.LOGGER.debug("transfer all of {} from slot {} to slot {}", source.getStack(sourceSlot).getItem().toString(),
|
||||||
|
sourceSlot, destSlot);
|
||||||
|
dest.setStack(destFreeSlot, source.removeStack(sourceSlot));
|
||||||
|
result = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Boolean hasItems(List<ItemStack> list) {
|
||||||
|
Boolean result = false;
|
||||||
|
for (ItemStack stack : list) {
|
||||||
|
result = result || (stack != null && !stack.isEmpty() && stack.getCount() > 0);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Item findNextItem(List<ItemStack> inventory, List<Item> exclude) {
|
||||||
|
for (ItemStack stack : inventory) {
|
||||||
|
if (!stack.isEmpty()) {
|
||||||
|
Item item = stack.getItem();
|
||||||
|
if (!exclude.contains(item)) {
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Integer findItemStackPos(LootableContainerBlockEntity lcbe, ItemStack sourceStack) {
|
||||||
|
Integer counter = lcbe.size();
|
||||||
|
while (counter > 0) {
|
||||||
|
counter--;
|
||||||
|
ItemStack stack = lcbe.getStack(counter);
|
||||||
|
if (sourceStack.getItem().equals(stack.getItem())) {
|
||||||
|
if (stack.getCount() < stack.getMaxCount()) {
|
||||||
|
return counter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Integer findItemStackPos(LootableContainerBlockEntity lcbe, Boolean empty) {
|
||||||
|
Integer counter = lcbe.size();
|
||||||
|
while (counter > 0) {
|
||||||
|
counter--;
|
||||||
|
ItemStack stack = lcbe.getStack(counter);
|
||||||
|
if (empty.equals(ItemStack.EMPTY.equals(stack))) {
|
||||||
|
return counter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final Integer findItemStackPos(LootableContainerBlockEntity lcbe, List<Item> filterItems, Boolean whitelist) {
|
||||||
|
if (whitelist == null) {
|
||||||
|
whitelist = true;
|
||||||
|
Quickiemod.LOGGER.error("whitelist is null");
|
||||||
|
}
|
||||||
|
if (filterItems == null || filterItems.size() < 1) {
|
||||||
|
if (whitelist) {
|
||||||
|
return null;
|
||||||
|
} else {
|
||||||
|
return findItemStackPos(lcbe, false);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Integer counter = lcbe.size();
|
||||||
|
while (counter > 0) {
|
||||||
|
counter--;
|
||||||
|
ItemStack stack = lcbe.getStack(counter);
|
||||||
|
Boolean found = whitelist ? filterItems.contains(stack.getItem()) : !filterItems.contains(stack.getItem());
|
||||||
|
if (found) {
|
||||||
|
return counter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int size() {
|
||||||
|
return inventory.size();
|
||||||
|
}
|
||||||
|
}
|
@ -1,62 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blockentity;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class DrillBlockDownEntity extends DrillBlockEntity {
|
|
||||||
|
|
||||||
private static final Integer MAXDRILLSTEP = 20;
|
|
||||||
|
|
||||||
public DrillBlockDownEntity(BlockPos pos, BlockState state) {
|
|
||||||
super(BlockEntityTypes.DRILL_DOWN, pos, state, MAXDRILLSTEP);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void tick(World world, BlockPos pos, BlockState state, BlockEntity be) {
|
|
||||||
if (be instanceof DrillBlockDownEntity) {
|
|
||||||
DrillBlockDownEntity dbe = (DrillBlockDownEntity) be;
|
|
||||||
DrillBlockEntity.tick(world, pos, state, dbe, MAXDRILLSTEP, generateBlockPos(pos));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final List<BlockPos> generateBlockPos(BlockPos pos) {
|
|
||||||
List<BlockPos> list = new ArrayList<>();
|
|
||||||
Integer tracesMod = pos.getY() % 8;
|
|
||||||
tracesMod = tracesMod < 0 ? tracesMod * -1 : tracesMod; // lower that 0 makes it negative
|
|
||||||
if (tracesMod != 0) {
|
|
||||||
list.add(pos.north());
|
|
||||||
}
|
|
||||||
if (tracesMod != 1) {
|
|
||||||
list.add(pos.north().west());
|
|
||||||
}
|
|
||||||
if (tracesMod != 2) {
|
|
||||||
list.add(pos.west());
|
|
||||||
}
|
|
||||||
if (tracesMod != 3) {
|
|
||||||
list.add(pos.south().west());
|
|
||||||
}
|
|
||||||
if (tracesMod != 4) {
|
|
||||||
list.add(pos.south());
|
|
||||||
}
|
|
||||||
if (tracesMod != 5) {
|
|
||||||
list.add(pos.south().east());
|
|
||||||
}
|
|
||||||
if (tracesMod != 6) {
|
|
||||||
list.add(pos.east());
|
|
||||||
}
|
|
||||||
if (tracesMod != 7) {
|
|
||||||
list.add(pos.north().east());
|
|
||||||
}
|
|
||||||
list.add(pos.down()); // must be last position
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blockentity;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class DrillBlockEastEntity extends DrillBlockEntity {
|
|
||||||
|
|
||||||
private static final Integer MAXDRILLSTEP = 24;
|
|
||||||
|
|
||||||
public DrillBlockEastEntity(BlockPos pos, BlockState state) {
|
|
||||||
super(BlockEntityTypes.DRILL_EAST, pos, state, MAXDRILLSTEP);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void tick(World world, BlockPos pos, BlockState state, BlockEntity be) {
|
|
||||||
if (be instanceof DrillBlockEastEntity) {
|
|
||||||
DrillBlockEastEntity dbe = (DrillBlockEastEntity) be;
|
|
||||||
List<BlockPos> list = new ArrayList<>();
|
|
||||||
list.add(pos.east());
|
|
||||||
list.add(pos.east().up());
|
|
||||||
list.add(pos.east().up().up());
|
|
||||||
list.add(pos.east().up().up().up());
|
|
||||||
list.add(pos.east().down()); // must be last position
|
|
||||||
DrillBlockEntity.tick(world, pos, state, dbe, MAXDRILLSTEP, list);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,23 +1,94 @@
|
|||||||
package de.jottyfan.quickiemod.blockentity;
|
package de.jottyfan.quickiemod.blockentity;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.blocks.QuickieBlocks;
|
import de.jottyfan.quickiemod.block.BlockDrill;
|
||||||
import de.jottyfan.quickiemod.blocks.help.DrillBlock;
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.Blocks;
|
import net.minecraft.block.Blocks;
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
import net.minecraft.block.entity.BlockEntityType;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.Direction;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public abstract class DrillBlockEntity extends BlockEntity {
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class DrillBlockEntity extends BlockEntity {
|
||||||
|
|
||||||
|
private static final Integer MAXDRILLSTEP = 20;
|
||||||
|
|
||||||
private Integer drillstep;
|
private Integer drillstep;
|
||||||
private final Integer maxDrillStep;
|
private final Integer maxDrillStep;
|
||||||
|
|
||||||
public DrillBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state, Integer maxDrillStep) {
|
public DrillBlockEntity(BlockPos pos, BlockState state) {
|
||||||
super(type, pos, state);
|
super(ModBlockentity.DRILL_BLOCKENTITY, pos, state);
|
||||||
this.maxDrillStep = maxDrillStep;
|
this.maxDrillStep = MAXDRILLSTEP;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void tick(World world, BlockPos pos, BlockState state, BlockEntity be) {
|
||||||
|
if (be instanceof DrillBlockEntity dbe) {
|
||||||
|
Direction dir = state.get(BlockDrill.DIRECTION);
|
||||||
|
List<BlockPos> list = new ArrayList<>();
|
||||||
|
if (Direction.DOWN.equals(dir)) {
|
||||||
|
list = downFrom(pos);
|
||||||
|
} else if (Direction.EAST.equals(dir)) {
|
||||||
|
list = directedFrom(pos.east());
|
||||||
|
} else if (Direction.SOUTH.equals(dir)) {
|
||||||
|
list = directedFrom(pos.south());
|
||||||
|
} else if (Direction.WEST.equals(dir)) {
|
||||||
|
list = directedFrom(pos.west());
|
||||||
|
} else if (Direction.NORTH.equals(dir)) {
|
||||||
|
list = directedFrom(pos.north());
|
||||||
|
}
|
||||||
|
DrillBlockEntity.tick(world, pos, state, dbe, MAXDRILLSTEP, list);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final List<BlockPos> directedFrom(BlockPos pos) {
|
||||||
|
// Quickiemod.LOGGER.info("directed");
|
||||||
|
List<BlockPos> list = new ArrayList<>();
|
||||||
|
list.add(pos);
|
||||||
|
list.add(pos.up());
|
||||||
|
list.add(pos.up().up());
|
||||||
|
list.add(pos.up().up().up());
|
||||||
|
list.add(pos.down()); // must be last position
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final List<BlockPos> downFrom(BlockPos pos) {
|
||||||
|
// Quickiemod.LOGGER.info("down");
|
||||||
|
List<BlockPos> list = new ArrayList<>();
|
||||||
|
Integer tracesMod = pos.getY() % 8;
|
||||||
|
tracesMod = tracesMod < 0 ? tracesMod * -1 : tracesMod; // lower that 0 makes it negative
|
||||||
|
if (tracesMod != 0) {
|
||||||
|
list.add(pos.north());
|
||||||
|
}
|
||||||
|
if (tracesMod != 1) {
|
||||||
|
list.add(pos.north().west());
|
||||||
|
}
|
||||||
|
if (tracesMod != 2) {
|
||||||
|
list.add(pos.west());
|
||||||
|
}
|
||||||
|
if (tracesMod != 3) {
|
||||||
|
list.add(pos.south().west());
|
||||||
|
}
|
||||||
|
if (tracesMod != 4) {
|
||||||
|
list.add(pos.south());
|
||||||
|
}
|
||||||
|
if (tracesMod != 5) {
|
||||||
|
list.add(pos.south().east());
|
||||||
|
}
|
||||||
|
if (tracesMod != 6) {
|
||||||
|
list.add(pos.east());
|
||||||
|
}
|
||||||
|
if (tracesMod != 7) {
|
||||||
|
list.add(pos.north().east());
|
||||||
|
}
|
||||||
|
list.add(pos.down()); // must be last position
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static final void moveBlockWithEntity(BlockPos from, BlockPos to, World world) {
|
protected static final void moveBlockWithEntity(BlockPos from, BlockPos to, World world) {
|
||||||
@ -25,9 +96,8 @@ public abstract class DrillBlockEntity extends BlockEntity {
|
|||||||
BlockState bs = world.getBlockState(from);
|
BlockState bs = world.getBlockState(from);
|
||||||
if (be != null) {
|
if (be != null) {
|
||||||
world.setBlockState(from, Blocks.AIR.getDefaultState());
|
world.setBlockState(from, Blocks.AIR.getDefaultState());
|
||||||
Integer newFuel = bs.get(DrillBlock.FUEL) - 1;
|
Integer newFuel = bs.get(BlockDrill.FUEL) - 1;
|
||||||
world.setBlockState(to, bs.with(DrillBlock.FUEL, newFuel));
|
world.setBlockState(to, bs.with(BlockDrill.FUEL, newFuel));
|
||||||
world.addBlockEntity(be);
|
|
||||||
world.removeBlockEntity(from);
|
world.removeBlockEntity(from);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -35,11 +105,11 @@ public abstract class DrillBlockEntity extends BlockEntity {
|
|||||||
protected static final Boolean drill(BlockPos pos, List<BlockPos> toList, World world) {
|
protected static final Boolean drill(BlockPos pos, List<BlockPos> toList, World world) {
|
||||||
Boolean lastSuccess = false;
|
Boolean lastSuccess = false;
|
||||||
for (BlockPos to : toList) {
|
for (BlockPos to : toList) {
|
||||||
if (!world.getBlockState(to).isOf(Blocks.BEDROCK) && !world.getBlockState(to).isOf(QuickieBlocks.DRILLSTOP.getBlock())) {
|
if (!world.getBlockState(to).isOf(Blocks.BEDROCK)) {
|
||||||
world.breakBlock(to, true);
|
world.breakBlock(to, true);
|
||||||
lastSuccess = pos.down() != to; // no need for the falling one
|
lastSuccess = pos.down() != to; // no need for the falling one
|
||||||
} else {
|
} else {
|
||||||
lastSuccess = false; // in case that the last one is a bedrock or a drillstop
|
lastSuccess = false; // in case that the last one is a bedrock
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return lastSuccess;
|
return lastSuccess;
|
||||||
@ -47,7 +117,7 @@ public abstract class DrillBlockEntity extends BlockEntity {
|
|||||||
|
|
||||||
public static void tick(World world, BlockPos pos, BlockState state, DrillBlockEntity be, Integer maxDrillStep,
|
public static void tick(World world, BlockPos pos, BlockState state, DrillBlockEntity be, Integer maxDrillStep,
|
||||||
List<BlockPos> drillPosition) {
|
List<BlockPos> drillPosition) {
|
||||||
if (state.get(DrillBlock.FUEL) > 0) {
|
if (state.get(BlockDrill.FUEL) > 0) {
|
||||||
if (be.getDrillstep() < 1) {
|
if (be.getDrillstep() < 1) {
|
||||||
be.setDrillstep(maxDrillStep);
|
be.setDrillstep(maxDrillStep);
|
||||||
if (drill(pos, drillPosition, world)) {
|
if (drill(pos, drillPosition, world)) {
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blockentity;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class DrillBlockNorthEntity extends DrillBlockEntity {
|
|
||||||
|
|
||||||
private static final Integer MAXDRILLSTEP = 24;
|
|
||||||
|
|
||||||
public DrillBlockNorthEntity(BlockPos pos, BlockState state) {
|
|
||||||
super(BlockEntityTypes.DRILL_NORTH, pos, state, MAXDRILLSTEP);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void tick(World world, BlockPos pos, BlockState state, BlockEntity be) {
|
|
||||||
if (be instanceof DrillBlockNorthEntity) {
|
|
||||||
DrillBlockNorthEntity dbe = (DrillBlockNorthEntity) be;
|
|
||||||
List<BlockPos> list = new ArrayList<>();
|
|
||||||
list.add(pos.north());
|
|
||||||
list.add(pos.north().up());
|
|
||||||
list.add(pos.north().up().up());
|
|
||||||
list.add(pos.north().up().up().up());
|
|
||||||
list.add(pos.north().down()); // must be last position
|
|
||||||
DrillBlockEntity.tick(world, pos, state, dbe, MAXDRILLSTEP, list);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,35 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blockentity;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class DrillBlockSouthEntity extends DrillBlockEntity {
|
|
||||||
private static final Integer MAXDRILLSTEP = 24;
|
|
||||||
|
|
||||||
public DrillBlockSouthEntity(BlockPos pos, BlockState state) {
|
|
||||||
super(BlockEntityTypes.DRILL_SOUTH, pos, state, MAXDRILLSTEP);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void tick(World world, BlockPos pos, BlockState state, BlockEntity be) {
|
|
||||||
if (be instanceof DrillBlockSouthEntity) {
|
|
||||||
DrillBlockSouthEntity dbe = (DrillBlockSouthEntity) be;
|
|
||||||
List<BlockPos> list = new ArrayList<>();
|
|
||||||
list.add(pos.south());
|
|
||||||
list.add(pos.south().up());
|
|
||||||
list.add(pos.south().up().up());
|
|
||||||
list.add(pos.south().up().up().up());
|
|
||||||
list.add(pos.south().down()); // must be last position
|
|
||||||
DrillBlockEntity.tick(world, pos, state, dbe, MAXDRILLSTEP, list);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,36 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blockentity;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class DrillBlockWestEntity extends DrillBlockEntity {
|
|
||||||
|
|
||||||
private static final Integer MAXDRILLSTEP = 24;
|
|
||||||
|
|
||||||
public DrillBlockWestEntity(BlockPos pos, BlockState state) {
|
|
||||||
super(BlockEntityTypes.DRILL_WEST, pos, state, MAXDRILLSTEP);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void tick(World world, BlockPos pos, BlockState state, BlockEntity be) {
|
|
||||||
if (be instanceof DrillBlockWestEntity) {
|
|
||||||
DrillBlockWestEntity dbe = (DrillBlockWestEntity) be;
|
|
||||||
List<BlockPos> list = new ArrayList<>();
|
|
||||||
list.add(pos.west());
|
|
||||||
list.add(pos.west().up());
|
|
||||||
list.add(pos.west().up().up());
|
|
||||||
list.add(pos.west().up().up().up());
|
|
||||||
list.add(pos.west().down()); // must be last position
|
|
||||||
DrillBlockEntity.tick(world, pos, state, dbe, MAXDRILLSTEP, list);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,84 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blockentity;
|
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.blocks.QuickieBlocks;
|
|
||||||
import de.jottyfan.quickiemod.items.QuickieItems;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.Blocks;
|
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
|
||||||
import net.minecraft.entity.ItemEntity;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.item.Items;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class EmptyLavaHoarderBlockEntity extends BlockEntity {
|
|
||||||
|
|
||||||
public EmptyLavaHoarderBlockEntity(BlockPos pos, BlockState state) {
|
|
||||||
super(BlockEntityTypes.EMPTYLAVAHOARDER, pos, state);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final void spawnRandomItems(World world, BlockPos pos, Integer count) {
|
|
||||||
Integer which = new Random().nextInt(10);
|
|
||||||
if (which < 1) {
|
|
||||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.DIAMOND, new Random().nextInt(count + 2))));
|
|
||||||
} else if (which < 2) {
|
|
||||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.EMERALD, new Random().nextInt(count + 1))));
|
|
||||||
} else if (which < 3) {
|
|
||||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.RAW_GOLD, new Random().nextInt(count))));
|
|
||||||
} else if (which < 4) {
|
|
||||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.RAW_IRON, new Random().nextInt(count + 1))));
|
|
||||||
} else if (which < 5) {
|
|
||||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.RAW_COPPER, new Random().nextInt(count + 2))));
|
|
||||||
} else if (which < 6) {
|
|
||||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.OBSIDIAN)));
|
|
||||||
} else if (which < 7) {
|
|
||||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.LAPIS_LAZULI)));
|
|
||||||
} else if (which < 8) {
|
|
||||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(QuickieItems.SULPHOR.getItem())));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* sucks the lava that touches the block
|
|
||||||
*
|
|
||||||
* @param world the world
|
|
||||||
* @param pos the pos
|
|
||||||
* @return true if lava was found
|
|
||||||
*/
|
|
||||||
private boolean suckLava(World world, BlockPos pos) {
|
|
||||||
if (world == null) {
|
|
||||||
return false;
|
|
||||||
} else if (Blocks.LAVA.equals(world.getBlockState(pos).getBlock())) {
|
|
||||||
world.setBlockState(pos, Blocks.AIR.getDefaultState());
|
|
||||||
BlockPos up = pos.up();
|
|
||||||
Random random = new Random();
|
|
||||||
if (random.nextFloat() > 0.9f) {
|
|
||||||
spawnRandomItems(world, up, 2);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void tick(World world, BlockPos pos, BlockState state, BlockEntity be) {
|
|
||||||
if (be instanceof EmptyLavaHoarderBlockEntity) {
|
|
||||||
EmptyLavaHoarderBlockEntity elhbe = (EmptyLavaHoarderBlockEntity) be;
|
|
||||||
boolean found = elhbe.suckLava(world, pos.north());
|
|
||||||
found = found || elhbe.suckLava(world, pos.south());
|
|
||||||
found = found || elhbe.suckLava(world, pos.east());
|
|
||||||
found = found || elhbe.suckLava(world, pos.west());
|
|
||||||
found = found || elhbe.suckLava(world, pos.up());
|
|
||||||
found = found || elhbe.suckLava(world, pos.down());
|
|
||||||
if (found) {
|
|
||||||
world.setBlockState(pos, QuickieBlocks.LAVAHOARDER.getBlock().getDefaultState());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -3,7 +3,6 @@ package de.jottyfan.quickiemod.blockentity;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.text.PrefixedText;
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
import net.minecraft.block.entity.BlockEntity;
|
||||||
import net.minecraft.block.entity.LootableContainerBlockEntity;
|
import net.minecraft.block.entity.LootableContainerBlockEntity;
|
||||||
@ -30,13 +29,15 @@ import net.minecraft.world.World;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ItemHoarderBlockEntity extends LootableContainerBlockEntity {
|
public class ItemHoarderBlockEntity extends LootableContainerBlockEntity {
|
||||||
|
|
||||||
|
|
||||||
private DefaultedList<ItemStack> stacks;
|
private DefaultedList<ItemStack> stacks;
|
||||||
private float suckradius;
|
private float suckradius;
|
||||||
|
|
||||||
public ItemHoarderBlockEntity(BlockPos pos, BlockState state) {
|
public ItemHoarderBlockEntity(BlockPos pos, BlockState state) {
|
||||||
super(BlockEntityTypes.ITEMHOARDER, pos, state);
|
super(ModBlockentity.ITEM_HOARDER_BLOCKENTITY, pos, state);
|
||||||
stacks = DefaultedList.ofSize(54, ItemStack.EMPTY);
|
stacks = DefaultedList.ofSize(54, ItemStack.EMPTY);
|
||||||
setSuckradius(4f); // TODO: make it level up - able and start with 2
|
setSuckradius(4f);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: see https://fabricmc.net/wiki/tutorial:containers for a real chest
|
// TODO: see https://fabricmc.net/wiki/tutorial:containers for a real chest
|
||||||
@ -136,8 +137,7 @@ public class ItemHoarderBlockEntity extends LootableContainerBlockEntity {
|
|||||||
for (ItemStack stack : stacks) {
|
for (ItemStack stack : stacks) {
|
||||||
Item item = stack.getItem();
|
Item item = stack.getItem();
|
||||||
if (item != Items.AIR) {
|
if (item != Items.AIR) {
|
||||||
Text text = PrefixedText.instance(String.format("%dx ", stack.getCount()).concat("%s"),
|
Text text = Text.of(String.format("%dx %s", stack.getCount(), Text.translatable(stack.getItem().getTranslationKey())));
|
||||||
Text.translatable(stack.getTranslationKey()));
|
|
||||||
list.add(text);
|
list.add(text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,31 @@
|
|||||||
|
package de.jottyfan.quickiemod.blockentity;
|
||||||
|
|
||||||
|
import de.jottyfan.quickiemod.block.ModBlocks;
|
||||||
|
import de.jottyfan.quickiemod.identifier.ModIdentifiers;
|
||||||
|
import net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityTypeBuilder;
|
||||||
|
import net.minecraft.block.entity.BlockEntityType;
|
||||||
|
import net.minecraft.registry.Registries;
|
||||||
|
import net.minecraft.registry.Registry;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ModBlockentity {
|
||||||
|
public static final BlockEntityType<ItemHoarderBlockEntity> ITEM_HOARDER_BLOCKENTITY = Registry.register(
|
||||||
|
Registries.BLOCK_ENTITY_TYPE, ModIdentifiers.BLOCKENTITY_ITEMHOARDER,
|
||||||
|
FabricBlockEntityTypeBuilder.create(ItemHoarderBlockEntity::new, ModBlocks.BLOCK_ITEMHOARDER).build());
|
||||||
|
public static final BlockEntityType<DrillBlockEntity> DRILL_BLOCKENTITY = Registry.register(
|
||||||
|
Registries.BLOCK_ENTITY_TYPE, ModIdentifiers.BLOCKENTITY_DRILL,
|
||||||
|
FabricBlockEntityTypeBuilder.create(DrillBlockEntity::new, ModBlocks.BLOCK_DRILL_DOWN, ModBlocks.BLOCK_DRILL_EAST,
|
||||||
|
ModBlocks.BLOCK_DRILL_SOUTH, ModBlocks.BLOCK_DRILL_WEST, ModBlocks.BLOCK_DRILL_NORTH).build());
|
||||||
|
public static final BlockEntityType<BlockStackerEntity> BLOCKSTACKER_BLOCKENTITY = Registry.register(
|
||||||
|
Registries.BLOCK_ENTITY_TYPE, ModIdentifiers.BLOCKENTITY_BLOCKSTACKER,
|
||||||
|
FabricBlockEntityTypeBuilder.create(BlockStackerEntity::new, ModBlocks.BLOCK_STACKER_DOWN,
|
||||||
|
ModBlocks.BLOCK_STACKER_EAST, ModBlocks.BLOCK_STACKER_SOUTH, ModBlocks.BLOCK_STACKER_WEST,
|
||||||
|
ModBlocks.BLOCK_STACKER_NORTH, ModBlocks.BLOCK_STACKER_UP).build());
|
||||||
|
|
||||||
|
public static final void registerModBlockentities() {
|
||||||
|
};
|
||||||
|
}
|
@ -1,51 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blockentity;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.entity.mob.HostileEntity;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.util.math.Box;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class MonsterHoarderBlockEntity extends BlockEntity {
|
|
||||||
|
|
||||||
private float suckradius;
|
|
||||||
|
|
||||||
public MonsterHoarderBlockEntity(BlockPos pos, BlockState state) {
|
|
||||||
super(BlockEntityTypes.MONSTERHOARDER, pos, state);
|
|
||||||
setSuckradius(8f); // TODO: make it level up - able and start with 2
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void tick(World world, BlockPos pos, BlockState state, BlockEntity be) {
|
|
||||||
if (be instanceof MonsterHoarderBlockEntity) {
|
|
||||||
MonsterHoarderBlockEntity mhbe = (MonsterHoarderBlockEntity) be;
|
|
||||||
Box box = new Box(pos).expand(mhbe.getSuckradius());
|
|
||||||
List<Entity> entities = world.getOtherEntities(null, box);
|
|
||||||
for (Entity entity : entities) {
|
|
||||||
if (entity instanceof HostileEntity) {
|
|
||||||
if (entity.isFireImmune()) {
|
|
||||||
entity.kill();
|
|
||||||
} else {
|
|
||||||
entity.setOnFireFor(90);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public float getSuckradius() {
|
|
||||||
return suckradius;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSuckradius(float suckradius) {
|
|
||||||
this.suckradius = suckradius;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,66 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blocks;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.items.QuickieItems;
|
|
||||||
import net.minecraft.block.AbstractBlock;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.Blocks;
|
|
||||||
import net.minecraft.block.CropBlock;
|
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
|
||||||
import net.minecraft.item.ItemConvertible;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
|
||||||
import net.minecraft.util.ActionResult;
|
|
||||||
import net.minecraft.util.ItemScatterer;
|
|
||||||
import net.minecraft.util.collection.DefaultedList;
|
|
||||||
import net.minecraft.util.hit.BlockHitResult;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public class BlockCanolaplant extends CropBlock {
|
|
||||||
|
|
||||||
public BlockCanolaplant() {
|
|
||||||
super(AbstractBlock.Settings.copy(Blocks.WHEAT));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
|
||||||
DefaultedList<ItemStack> list = DefaultedList.of();
|
|
||||||
list.add(new ItemStack(getSeedsItem())); // the one from the seed
|
|
||||||
if (isMature(state)) {
|
|
||||||
list.add(new ItemStack(getSeedsItem(), new Random().nextInt(2)));
|
|
||||||
list.add(new ItemStack(QuickieItems.CANOLA.getItem(), new Random().nextFloat() > 0.9f ? 2 : 1));
|
|
||||||
}
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void spawnHarvested(World world, BlockPos pos, BlockState state) {
|
|
||||||
DefaultedList<ItemStack> list = DefaultedList.of();
|
|
||||||
getDroppedStacks(state, null).forEach(itemStack -> {
|
|
||||||
list.add(itemStack);
|
|
||||||
});
|
|
||||||
ItemScatterer.spawn(world, pos, list);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockState onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) {
|
|
||||||
spawnHarvested(world, pos, state);
|
|
||||||
return super.onBreak(world, pos, state, player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected ItemConvertible getSeedsItem() {
|
|
||||||
return QuickieItems.CANOLASEED.getItem();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) {
|
|
||||||
if (!world.isClient && isMature(state)) {
|
|
||||||
spawnHarvested(world, pos, state);
|
|
||||||
world.setBlockState(pos, state.with(AGE, 0));
|
|
||||||
}
|
|
||||||
return ActionResult.PASS;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,61 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blocks;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.mojang.serialization.MapCodec;
|
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.blockentity.DrillBlockDownEntity;
|
|
||||||
import de.jottyfan.quickiemod.blocks.help.DrillBlock;
|
|
||||||
import net.minecraft.block.AbstractBlock;
|
|
||||||
import net.minecraft.block.BlockEntityProvider;
|
|
||||||
import net.minecraft.block.BlockRenderType;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.FallingBlock;
|
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
|
||||||
import net.minecraft.block.entity.BlockEntityTicker;
|
|
||||||
import net.minecraft.block.entity.BlockEntityType;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class BlockDrillDown extends DrillBlock implements BlockEntityProvider {
|
|
||||||
|
|
||||||
public BlockDrillDown() {
|
|
||||||
super(AbstractBlock.Settings.create().hardness(2.5f));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockEntity createBlockEntity(BlockPos pos, BlockState blockState) {
|
|
||||||
return new DrillBlockDownEntity(pos, blockState);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
|
||||||
List<ItemStack> list = new ArrayList<>();
|
|
||||||
list.add(new ItemStack(QuickieBlocks.DRILL_DOWN.getBlock()));
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockRenderType getRenderType(BlockState state) {
|
|
||||||
return BlockRenderType.MODEL;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state,
|
|
||||||
BlockEntityType<T> type) {
|
|
||||||
return (world1, pos, state1, be) -> DrillBlockDownEntity.tick(world1, pos, state1, be);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected MapCodec<? extends FallingBlock> getCodec() {
|
|
||||||
return null; // TODO: what to return here?
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,61 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blocks;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.mojang.serialization.MapCodec;
|
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.blockentity.DrillBlockEastEntity;
|
|
||||||
import de.jottyfan.quickiemod.blocks.help.DrillBlock;
|
|
||||||
import net.minecraft.block.AbstractBlock;
|
|
||||||
import net.minecraft.block.BlockEntityProvider;
|
|
||||||
import net.minecraft.block.BlockRenderType;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.FallingBlock;
|
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
|
||||||
import net.minecraft.block.entity.BlockEntityTicker;
|
|
||||||
import net.minecraft.block.entity.BlockEntityType;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class BlockDrillEast extends DrillBlock implements BlockEntityProvider {
|
|
||||||
|
|
||||||
public BlockDrillEast() {
|
|
||||||
super(AbstractBlock.Settings.create().hardness(2.5f));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockEntity createBlockEntity(BlockPos pos, BlockState blockState) {
|
|
||||||
return new DrillBlockEastEntity(pos, blockState);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
|
||||||
List<ItemStack> list = new ArrayList<>();
|
|
||||||
list.add(new ItemStack(QuickieBlocks.DRILL_EAST.getBlock()));
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockRenderType getRenderType(BlockState state) {
|
|
||||||
return BlockRenderType.MODEL;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type){
|
|
||||||
return (world1, pos, state1, be) -> DrillBlockEastEntity.tick(world1, pos, state1, be);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected MapCodec<? extends FallingBlock> getCodec() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,61 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blocks;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.mojang.serialization.MapCodec;
|
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.blockentity.DrillBlockNorthEntity;
|
|
||||||
import de.jottyfan.quickiemod.blocks.help.DrillBlock;
|
|
||||||
import net.minecraft.block.AbstractBlock;
|
|
||||||
import net.minecraft.block.BlockEntityProvider;
|
|
||||||
import net.minecraft.block.BlockRenderType;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.FallingBlock;
|
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
|
||||||
import net.minecraft.block.entity.BlockEntityTicker;
|
|
||||||
import net.minecraft.block.entity.BlockEntityType;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class BlockDrillNorth extends DrillBlock implements BlockEntityProvider {
|
|
||||||
|
|
||||||
public BlockDrillNorth() {
|
|
||||||
super(AbstractBlock.Settings.create().hardness(2.5f));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockEntity createBlockEntity(BlockPos pos, BlockState blockState) {
|
|
||||||
return new DrillBlockNorthEntity(pos, blockState);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
|
||||||
List<ItemStack> list = new ArrayList<>();
|
|
||||||
list.add(new ItemStack(QuickieBlocks.DRILL_NORTH.getBlock()));
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockRenderType getRenderType(BlockState state) {
|
|
||||||
return BlockRenderType.MODEL;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type){
|
|
||||||
return (world1, pos, state1, be) -> DrillBlockNorthEntity.tick(world1, pos, state1, be);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected MapCodec<? extends FallingBlock> getCodec() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,61 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blocks;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.mojang.serialization.MapCodec;
|
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.blockentity.DrillBlockSouthEntity;
|
|
||||||
import de.jottyfan.quickiemod.blocks.help.DrillBlock;
|
|
||||||
import net.minecraft.block.AbstractBlock;
|
|
||||||
import net.minecraft.block.BlockEntityProvider;
|
|
||||||
import net.minecraft.block.BlockRenderType;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.FallingBlock;
|
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
|
||||||
import net.minecraft.block.entity.BlockEntityTicker;
|
|
||||||
import net.minecraft.block.entity.BlockEntityType;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class BlockDrillSouth extends DrillBlock implements BlockEntityProvider {
|
|
||||||
|
|
||||||
public BlockDrillSouth() {
|
|
||||||
super(AbstractBlock.Settings.create().hardness(2.5f));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockEntity createBlockEntity(BlockPos pos, BlockState blockState) {
|
|
||||||
return new DrillBlockSouthEntity(pos, blockState);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
|
||||||
List<ItemStack> list = new ArrayList<>();
|
|
||||||
list.add(new ItemStack(QuickieBlocks.DRILL_SOUTH.getBlock()));
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockRenderType getRenderType(BlockState state) {
|
|
||||||
return BlockRenderType.MODEL;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type){
|
|
||||||
return (world1, pos, state1, be) -> DrillBlockSouthEntity.tick(world1, pos, state1, be);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected MapCodec<? extends FallingBlock> getCodec() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,61 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blocks;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.mojang.serialization.MapCodec;
|
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.blockentity.DrillBlockWestEntity;
|
|
||||||
import de.jottyfan.quickiemod.blocks.help.DrillBlock;
|
|
||||||
import net.minecraft.block.AbstractBlock;
|
|
||||||
import net.minecraft.block.BlockEntityProvider;
|
|
||||||
import net.minecraft.block.BlockRenderType;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.FallingBlock;
|
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
|
||||||
import net.minecraft.block.entity.BlockEntityTicker;
|
|
||||||
import net.minecraft.block.entity.BlockEntityType;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class BlockDrillWest extends DrillBlock implements BlockEntityProvider {
|
|
||||||
|
|
||||||
public BlockDrillWest() {
|
|
||||||
super(AbstractBlock.Settings.create().hardness(2.5f));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockEntity createBlockEntity(BlockPos pos, BlockState blockState) {
|
|
||||||
return new DrillBlockWestEntity(pos, blockState);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
|
||||||
List<ItemStack> list = new ArrayList<>();
|
|
||||||
list.add(new ItemStack(QuickieBlocks.DRILL_WEST.getBlock()));
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockRenderType getRenderType(BlockState state) {
|
|
||||||
return BlockRenderType.MODEL;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type){
|
|
||||||
return (world1, pos, state1, be) -> DrillBlockWestEntity.tick(world1, pos, state1, be);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected MapCodec<? extends FallingBlock> getCodec() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blocks;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.minecraft.block.AbstractBlock;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class BlockDrillstop extends Block {
|
|
||||||
|
|
||||||
public BlockDrillstop() {
|
|
||||||
super(AbstractBlock.Settings.create().hardness(2.5f));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
|
||||||
List<ItemStack> list = new ArrayList<>();
|
|
||||||
list.add(new ItemStack(QuickieBlocks.DRILLSTOP.getBlock()));
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,38 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blocks;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.mojang.serialization.MapCodec;
|
|
||||||
|
|
||||||
import net.minecraft.block.AbstractBlock;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.FallingBlock;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.item.Items;
|
|
||||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
|
||||||
import net.minecraft.sound.BlockSoundGroup;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class BlockKelpstack extends FallingBlock {
|
|
||||||
|
|
||||||
public BlockKelpstack() {
|
|
||||||
super(AbstractBlock.Settings.create().hardness(0.1f).slipperiness(1.0f)
|
|
||||||
.breakInstantly().sounds(BlockSoundGroup.WET_GRASS));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ItemStack> getDroppedStacks(BlockState blockState, Builder builder) {
|
|
||||||
return Arrays.asList(new ItemStack[] { new ItemStack(Items.KELP, 9) });
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected MapCodec<? extends FallingBlock> getCodec() {
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,81 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blocks;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.blockentity.EmptyLavaHoarderBlockEntity;
|
|
||||||
import net.minecraft.block.AbstractBlock;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.BlockEntityProvider;
|
|
||||||
import net.minecraft.block.BlockRenderType;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
|
||||||
import net.minecraft.block.entity.BlockEntityTicker;
|
|
||||||
import net.minecraft.block.entity.BlockEntityType;
|
|
||||||
import net.minecraft.entity.ItemEntity;
|
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.item.Items;
|
|
||||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
|
||||||
import net.minecraft.util.ActionResult;
|
|
||||||
import net.minecraft.util.Hand;
|
|
||||||
import net.minecraft.util.hit.BlockHitResult;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class BlockLavahoarder extends Block implements BlockEntityProvider {
|
|
||||||
|
|
||||||
public BlockLavahoarder() {
|
|
||||||
super(AbstractBlock.Settings.create().hardness(2.5f).luminance(state -> 15));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockEntity createBlockEntity(BlockPos pos, BlockState blockState) {
|
|
||||||
return new EmptyLavaHoarderBlockEntity(pos, blockState);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockRenderType getRenderType(BlockState state) {
|
|
||||||
return BlockRenderType.MODEL;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state,
|
|
||||||
BlockEntityType<T> type) {
|
|
||||||
return (world1, pos, state1, be) -> EmptyLavaHoarderBlockEntity.tick(world1, pos, state1, be);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
|
||||||
List<ItemStack> list = new ArrayList<>();
|
|
||||||
list.add(new ItemStack(QuickieBlocks.LAVAHOARDER.getBlock()));
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) {
|
|
||||||
if (!world.isClient) {
|
|
||||||
Hand hand = player.getActiveHand();
|
|
||||||
ItemStack handStack = player.getStackInHand(hand);
|
|
||||||
if (handStack != null && Items.BUCKET.equals(handStack.getItem())) {
|
|
||||||
Integer amount = handStack.getCount();
|
|
||||||
ItemStack lavaBucketStack = new ItemStack(Items.LAVA_BUCKET, 1);
|
|
||||||
ItemStack emptyBucketStack = new ItemStack(Items.BUCKET, amount - 1);
|
|
||||||
if (emptyBucketStack.getCount() < 1) {
|
|
||||||
player.setStackInHand(hand, lavaBucketStack);
|
|
||||||
} else {
|
|
||||||
player.setStackInHand(hand, emptyBucketStack);
|
|
||||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), lavaBucketStack));
|
|
||||||
}
|
|
||||||
EmptyLavaHoarderBlockEntity.spawnRandomItems(world, pos, 2);
|
|
||||||
world.setBlockState(pos, QuickieBlocks.EMPTYLAVAHOARDER.getBlock().getDefaultState());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ActionResult.SUCCESS; // forbid to empty the just filled lava bucket
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,64 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blocks;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.blockentity.MonsterHoarderBlockEntity;
|
|
||||||
import net.minecraft.block.AbstractBlock;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.BlockEntityProvider;
|
|
||||||
import net.minecraft.block.BlockRenderType;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.entity.BlockEntity;
|
|
||||||
import net.minecraft.block.entity.BlockEntityTicker;
|
|
||||||
import net.minecraft.block.entity.BlockEntityType;
|
|
||||||
import net.minecraft.entity.LivingEntity;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
|
||||||
import net.minecraft.sound.SoundCategory;
|
|
||||||
import net.minecraft.sound.SoundEvents;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class BlockMonsterhoarder extends Block implements BlockEntityProvider {
|
|
||||||
|
|
||||||
|
|
||||||
public BlockMonsterhoarder() {
|
|
||||||
super(AbstractBlock.Settings.create().hardness(2.5f).luminance(state -> 15));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockEntity createBlockEntity(BlockPos pos, BlockState blockState) {
|
|
||||||
return new MonsterHoarderBlockEntity(pos, blockState);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockRenderType getRenderType(BlockState state) {
|
|
||||||
return BlockRenderType.MODEL;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(World world, BlockState state, BlockEntityType<T> type){
|
|
||||||
return (world1, pos, state1, be) -> MonsterHoarderBlockEntity.tick(world1, pos, state1, be);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
|
||||||
List<ItemStack> list = new ArrayList<>();
|
|
||||||
list.add(new ItemStack(QuickieBlocks.MONSTERHOARDER.getBlock()));
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) {
|
|
||||||
if (!world.isClient) {
|
|
||||||
world.playSound(null, pos, SoundEvents.UI_TOAST_CHALLENGE_COMPLETE, SoundCategory.PLAYERS, 1f, 1f);
|
|
||||||
}
|
|
||||||
super.onPlaced(world, pos, state, placer, itemStack);
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blocks;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.blocks.help.IntProviderHelper;
|
|
||||||
import de.jottyfan.quickiemod.items.QuickieItems;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.ExperienceDroppingBlock;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
|
||||||
import net.minecraft.sound.BlockSoundGroup;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class BlockOreDeepslateSulphor extends ExperienceDroppingBlock {
|
|
||||||
|
|
||||||
public BlockOreDeepslateSulphor() {
|
|
||||||
super(IntProviderHelper.of(0, 2), Settings.create().strength(2.5f).hardness(1.9f).sounds(BlockSoundGroup.SOUL_SAND).requiresTool());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
|
||||||
return Arrays.asList(new ItemStack[] { new ItemStack(QuickieItems.SULPHOR.getItem(), 4) });
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blocks;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.blocks.help.IntProviderHelper;
|
|
||||||
import de.jottyfan.quickiemod.items.QuickieItems;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.ExperienceDroppingBlock;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
|
||||||
import net.minecraft.sound.BlockSoundGroup;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class BlockOreNetherSulphor extends ExperienceDroppingBlock {
|
|
||||||
|
|
||||||
public BlockOreNetherSulphor() {
|
|
||||||
super(IntProviderHelper.of(0, 2), Settings.create().strength(2.5f).hardness(2.1f).sounds(BlockSoundGroup.SOUL_SAND).requiresTool());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
|
||||||
return Arrays.asList(new ItemStack[] { new ItemStack(QuickieItems.SULPHOR.getItem()) });
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blocks;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.blocks.help.IntProviderHelper;
|
|
||||||
import de.jottyfan.quickiemod.items.QuickieItems;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.ExperienceDroppingBlock;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
|
||||||
import net.minecraft.sound.BlockSoundGroup;
|
|
||||||
import net.minecraft.util.math.random.Random;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class BlockOreSalpeter extends ExperienceDroppingBlock {
|
|
||||||
|
|
||||||
public BlockOreSalpeter() {
|
|
||||||
super(IntProviderHelper.of(0, 2), Settings.create().strength(2.5f).hardness(3.1f).sounds(BlockSoundGroup.SOUL_SAND).requiresTool());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
|
||||||
return Arrays.asList(new ItemStack[] { new ItemStack(QuickieItems.SALPETER.getItem(), 2 + Random.create().nextInt(3)) });
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,30 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blocks;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.blocks.help.IntProviderHelper;
|
|
||||||
import de.jottyfan.quickiemod.items.QuickieItems;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.ExperienceDroppingBlock;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
|
||||||
import net.minecraft.sound.BlockSoundGroup;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class BlockOreSulphor extends ExperienceDroppingBlock {
|
|
||||||
|
|
||||||
public BlockOreSulphor() {
|
|
||||||
super(IntProviderHelper.of(0, 2), Settings.create().strength(2.5f).hardness(1.9f).sounds(BlockSoundGroup.SOUL_SAND).requiresTool());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
|
||||||
return Arrays.asList(new ItemStack[] { new ItemStack(QuickieItems.SULPHOR.getItem()) });
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blocks;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.blocks.help.IntProviderHelper;
|
|
||||||
import de.jottyfan.quickiemod.items.QuickieItems;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.ExperienceDroppingBlock;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
|
||||||
import net.minecraft.sound.BlockSoundGroup;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class BlockSalpeter extends ExperienceDroppingBlock {
|
|
||||||
|
|
||||||
public BlockSalpeter() {
|
|
||||||
super(IntProviderHelper.of(0, 2), Settings.create().strength(2.5f).hardness(0.5f).sounds(BlockSoundGroup.SOUL_SAND).requiresTool());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
|
||||||
return Arrays.asList(new ItemStack[] { new ItemStack(QuickieItems.SALPETER.getItem(), 9) });
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,29 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blocks;
|
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.blocks.help.IntProviderHelper;
|
|
||||||
import de.jottyfan.quickiemod.items.QuickieItems;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.ExperienceDroppingBlock;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.loot.context.LootContextParameterSet.Builder;
|
|
||||||
import net.minecraft.sound.BlockSoundGroup;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class BlockSulphor extends ExperienceDroppingBlock {
|
|
||||||
|
|
||||||
public BlockSulphor() {
|
|
||||||
super(IntProviderHelper.of(0, 2), Settings.create().strength(2.5f).hardness(0.5f).sounds(BlockSoundGroup.SOUL_SAND).requiresTool());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<ItemStack> getDroppedStacks(BlockState state, Builder builder) {
|
|
||||||
return Arrays.asList(new ItemStack[] { new ItemStack(QuickieItems.SULPHOR.getItem(), 9) });
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,63 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blocks;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public enum QuickieBlocks {
|
|
||||||
// @formatter:off
|
|
||||||
DRILL_DOWN(new BlockDrillDown(), "drill"),
|
|
||||||
DRILL_EAST(new BlockDrillEast(), "drilleast"),
|
|
||||||
DRILL_SOUTH(new BlockDrillSouth(), "drillsouth"),
|
|
||||||
DRILL_WEST(new BlockDrillWest(), "drillwest"),
|
|
||||||
DRILL_NORTH(new BlockDrillNorth(), "drillnorth"),
|
|
||||||
DRILLSTOP(new BlockDrillstop(), "drillstop"),
|
|
||||||
MONSTERHOARDER(new BlockMonsterhoarder(), "monsterhoarder"),
|
|
||||||
ITEMHOARDER(new BlockItemhoarder(), "itemhoarder"),
|
|
||||||
LAVAHOARDER(new BlockLavahoarder(), "lavahoarder", false),
|
|
||||||
EMPTYLAVAHOARDER(new BlockEmptyLavahoarder(), "emptylavahoarder"),
|
|
||||||
KELPSTACK(new BlockKelpstack(), "kelpstack"),
|
|
||||||
COTTONPLANT(new BlockCottonplant(), "cottonplant", false),
|
|
||||||
CANOLAPLANT(new BlockCanolaplant(), "canolaplant", false),
|
|
||||||
DIRTSALPETER(new BlockDirtSalpeter(), "dirtsalpeter"),
|
|
||||||
ORE_NETHER_SULPHOR(new BlockOreNetherSulphor(), "orenethersulphor"),
|
|
||||||
ORE_SALPETER(new BlockOreSalpeter(), "oresalpeter"),
|
|
||||||
ORE_SAND_SALPETER(new BlockSandSalpeter(), "oresandsalpeter"),
|
|
||||||
ORE_SULPHOR(new BlockOreSulphor(), "oresulphor"),
|
|
||||||
ORE_DEEPSLATESULPHOR(new BlockOreDeepslateSulphor(), "oredeepslatesulphor"),
|
|
||||||
SANDSALPETER(new BlockSandSalpeter(), "sandsalpeter"),
|
|
||||||
BLOCKSULPHOR(new BlockSulphor(), "blocksulphor"),
|
|
||||||
BLOCKSALPETER(new BlockSalpeter(), "blocksalpeter"),
|
|
||||||
BLOCKSPEEDPOWDER(new BlockSpeedpowder(), "blockspeedpowder"),
|
|
||||||
BLOCKQUICKIEPOWDER(new BlockQuickiepowder(), "blockquickiepowder");
|
|
||||||
// @formatter:on
|
|
||||||
|
|
||||||
private final Block block;
|
|
||||||
private final String name;
|
|
||||||
private final Boolean add2BlockPanel;
|
|
||||||
|
|
||||||
private QuickieBlocks(Block block, String name) {
|
|
||||||
this(block, name, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
private QuickieBlocks(Block block, String name, Boolean add2BlockPanel) {
|
|
||||||
this.block = block;
|
|
||||||
this.name = name;
|
|
||||||
this.add2BlockPanel = add2BlockPanel;
|
|
||||||
}
|
|
||||||
|
|
||||||
public final Block getBlock() {
|
|
||||||
return block;
|
|
||||||
}
|
|
||||||
|
|
||||||
public final String getName() {
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public final Boolean getAdd2BlockPanel() {
|
|
||||||
return add2BlockPanel;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,78 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.blocks.help;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.items.QuickieItems;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.block.FallingBlock;
|
|
||||||
import net.minecraft.entity.ItemEntity;
|
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.item.Items;
|
|
||||||
import net.minecraft.state.property.IntProperty;
|
|
||||||
import net.minecraft.text.Text;
|
|
||||||
import net.minecraft.util.ActionResult;
|
|
||||||
import net.minecraft.util.hit.BlockHitResult;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public abstract class DrillBlock extends FallingBlock {
|
|
||||||
private static final Integer MAX_FUEL = 255;
|
|
||||||
public static final IntProperty FUEL = IntProperty.of("fuel", 0, MAX_FUEL);
|
|
||||||
|
|
||||||
public DrillBlock(Settings settings) {
|
|
||||||
super(settings);
|
|
||||||
setDefaultState(getDefaultState().with(FUEL, 0));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public BlockState onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) {
|
|
||||||
Integer fuelLeft = state.get(FUEL);
|
|
||||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(QuickieItems.CANOLABOTTLE.getItem(), fuelLeft)));
|
|
||||||
return super.onBreak(world, pos, state, player);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected void appendProperties(net.minecraft.state.StateManager.Builder<Block, BlockState> builder) {
|
|
||||||
builder.add(FUEL);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, BlockHitResult hit) {
|
|
||||||
Map<Item, Integer> loadings = new HashMap<>();
|
|
||||||
loadings.put(QuickieItems.CANOLABOTTLE.getItem(), 8);
|
|
||||||
loadings.put(QuickieItems.CANOLABOTTLESTACK.getItem(), 72);
|
|
||||||
ItemStack stack = player.getStackInHand(player.getActiveHand());
|
|
||||||
Item item = stack.getItem();
|
|
||||||
if (stack.isEmpty() || !loadings.containsKey(item) ) {
|
|
||||||
if (world.isClient()) {
|
|
||||||
player.sendMessage(Text.translatable("msg.drill.fuelinfo", state.get(FUEL)));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Integer fuelWeight = loadings.get(item);
|
|
||||||
if (fuelWeight != null) {
|
|
||||||
Integer load = MAX_FUEL - state.get(FUEL);
|
|
||||||
if (load < fuelWeight) {
|
|
||||||
// Integer numberOfTooMuchLoad = fuelWeight - load;
|
|
||||||
fuelWeight = load;
|
|
||||||
}
|
|
||||||
world.setBlockState(pos, state.with(FUEL, state.get(FUEL) + fuelWeight));
|
|
||||||
if (item.equals(QuickieItems.CANOLABOTTLE.getItem())) {
|
|
||||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.GLASS_BOTTLE, 1)));
|
|
||||||
} else if (item.equals(QuickieItems.CANOLABOTTLESTACK.getItem())) {
|
|
||||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(Items.GLASS_BOTTLE, 9)));
|
|
||||||
}
|
|
||||||
stack.decrement(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ActionResult.PASS;
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,30 @@
|
|||||||
|
package de.jottyfan.quickiemod.container;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.inventory.SimpleInventory;
|
||||||
|
import net.minecraft.sound.SoundEvents;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class BlockStackerInventory extends SimpleInventory {
|
||||||
|
|
||||||
|
public BlockStackerInventory(Integer slotsize) {
|
||||||
|
super(slotsize);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onOpen(PlayerEntity player) {
|
||||||
|
super.onOpen(player);
|
||||||
|
player.playSound(SoundEvents.BLOCK_CHEST_OPEN, 1f, 1f);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClose(PlayerEntity player) {
|
||||||
|
super.onClose(player);
|
||||||
|
player.playSound(SoundEvents.BLOCK_CHEST_CLOSE, 1f, 1f);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package de.jottyfan.quickiemod.container;
|
||||||
|
|
||||||
|
import de.jottyfan.quickiemod.Quickiemod;
|
||||||
|
import net.fabricmc.api.EnvType;
|
||||||
|
import net.fabricmc.api.Environment;
|
||||||
|
import net.minecraft.client.gui.DrawContext;
|
||||||
|
import net.minecraft.client.gui.screen.ingame.HandledScreen;
|
||||||
|
import net.minecraft.client.gui.screen.ingame.ScreenHandlerProvider;
|
||||||
|
import net.minecraft.entity.player.PlayerInventory;
|
||||||
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Environment(EnvType.CLIENT)
|
||||||
|
public class BlockStackerScreen extends HandledScreen<BlockStackerScreenHandler>
|
||||||
|
implements ScreenHandlerProvider<BlockStackerScreenHandler> {
|
||||||
|
private final static Identifier TEXTURE = Identifier.of(Quickiemod.MOD_ID, "textures/gui/blockstacker.png");
|
||||||
|
private final Integer containerHeight = 222;
|
||||||
|
private final Integer containerWidth = 176;
|
||||||
|
|
||||||
|
public BlockStackerScreen(BlockStackerScreenHandler handler, PlayerInventory inventory, Text title) {
|
||||||
|
super(handler, inventory, title);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void render(DrawContext drawContext, int mouseX, int mouseY, float partialTicks) {
|
||||||
|
this.renderInGameBackground(drawContext);
|
||||||
|
super.render(drawContext, mouseX, mouseY, partialTicks);
|
||||||
|
this.drawMouseoverTooltip(drawContext, mouseX, mouseY);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void drawBackground(DrawContext context, float delta, int mouseX, int mouseY) {
|
||||||
|
// context.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
int guiX = (this.width - this.containerWidth) / 2;
|
||||||
|
int guiY = (this.height - this.containerHeight) / 2;
|
||||||
|
super.renderInGameBackground(context);
|
||||||
|
// context.drawTexture(TEXTURE, guiX, guiY, 0f, 0f, containerWidth, containerHeight, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,97 @@
|
|||||||
|
package de.jottyfan.quickiemod.container;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.entity.player.PlayerInventory;
|
||||||
|
import net.minecraft.inventory.Inventory;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.screen.NamedScreenHandlerFactory;
|
||||||
|
import net.minecraft.screen.ScreenHandler;
|
||||||
|
import net.minecraft.screen.slot.Slot;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class BlockStackerScreenHandler extends ScreenHandler {
|
||||||
|
|
||||||
|
public static final Integer SLOTSIZE = 18;
|
||||||
|
|
||||||
|
private final Inventory inventory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* client constructor
|
||||||
|
*
|
||||||
|
* @param syncId
|
||||||
|
* @param playerInventory
|
||||||
|
*/
|
||||||
|
public BlockStackerScreenHandler(int syncId, PlayerInventory playerInventory) {
|
||||||
|
this(syncId, playerInventory, new BlockStackerInventory(SLOTSIZE));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* server constructor
|
||||||
|
*
|
||||||
|
* @param syncId
|
||||||
|
* @param playerInventory
|
||||||
|
* @param inventory
|
||||||
|
*/
|
||||||
|
public BlockStackerScreenHandler(int syncId, PlayerInventory playerInventory, Inventory inventory) {
|
||||||
|
super(ScreenHandlerTypes.BLOCKSTACKER_SCREEN_HANDLER, syncId);
|
||||||
|
checkSize(inventory, SLOTSIZE);
|
||||||
|
this.inventory = inventory;
|
||||||
|
inventory.onOpen(playerInventory.player);
|
||||||
|
int m;
|
||||||
|
int l;
|
||||||
|
// whitelist
|
||||||
|
for (m = 0; m < 3; ++m) {
|
||||||
|
for (l = 0; l < 3; ++l) {
|
||||||
|
this.addSlot(new Slot(inventory, l + m * 3, 8 + l * 18, 17 + m * 18));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// blacklist
|
||||||
|
for (m = 0; m < 3; ++m) {
|
||||||
|
for (l = 0; l < 3; ++l) {
|
||||||
|
this.addSlot(new Slot(inventory, l + m * 3 + 9, 116 + l * 18, 17 + m * 18));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (m = 0; m < 3; ++m) {
|
||||||
|
for (l = 0; l < 9; ++l) {
|
||||||
|
this.addSlot(new Slot(playerInventory, l + m * 9 + 9, 8 + l * 18, 84 + m * 18));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (m = 0; m < 9; ++m) {
|
||||||
|
this.addSlot(new Slot(playerInventory, m, 8 + m * 18, 142));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canUse(PlayerEntity player) {
|
||||||
|
return this.inventory.canPlayerUse(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack quickMove(PlayerEntity player, int invSlot) {
|
||||||
|
ItemStack newStack = ItemStack.EMPTY;
|
||||||
|
Slot slot = this.slots.get(invSlot);
|
||||||
|
if (slot != null && slot.hasStack()) {
|
||||||
|
ItemStack originalStack = slot.getStack();
|
||||||
|
newStack = originalStack.copy();
|
||||||
|
if (invSlot < this.inventory.size()) {
|
||||||
|
if (!this.insertItem(originalStack, this.inventory.size(), this.slots.size(), true)) {
|
||||||
|
return ItemStack.EMPTY;
|
||||||
|
}
|
||||||
|
} else if (!this.insertItem(originalStack, 0, this.inventory.size(), false)) {
|
||||||
|
return ItemStack.EMPTY;
|
||||||
|
}
|
||||||
|
if (originalStack.isEmpty()) {
|
||||||
|
slot.setStack(ItemStack.EMPTY);
|
||||||
|
} else {
|
||||||
|
slot.markDirty();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return newStack;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,133 @@
|
|||||||
|
package de.jottyfan.quickiemod.container;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.inventory.Inventories;
|
||||||
|
import net.minecraft.inventory.Inventory;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.collection.DefaultedList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
* @see https://fabricmc.net/wiki/tutorial:inventory
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface ImplementedInventory extends Inventory {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the item list of this inventory.
|
||||||
|
* Must return the same instance every time it's called.
|
||||||
|
*/
|
||||||
|
DefaultedList<ItemStack> getItems();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates an inventory from the item list.
|
||||||
|
*/
|
||||||
|
static ImplementedInventory of(DefaultedList<ItemStack> items) {
|
||||||
|
return () -> items;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new inventory with the specified size.
|
||||||
|
*/
|
||||||
|
static ImplementedInventory ofSize(int size) {
|
||||||
|
return of(DefaultedList.ofSize(size, ItemStack.EMPTY));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the inventory size.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
default int size() {
|
||||||
|
return getItems().size();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the inventory is empty.
|
||||||
|
* @return true if this inventory has only empty stacks, false otherwise.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
default boolean isEmpty() {
|
||||||
|
for (int i = 0; i < size(); i++) {
|
||||||
|
ItemStack stack = getStack(i);
|
||||||
|
if (!stack.isEmpty()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Retrieves the item in the slot.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
default ItemStack getStack(int slot) {
|
||||||
|
return getItems().get(slot);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes items from an inventory slot.
|
||||||
|
* @param slot The slot to remove from.
|
||||||
|
* @param count How many items to remove. If there are less items in the slot than what are requested,
|
||||||
|
* takes all items in that slot.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
default ItemStack removeStack(int slot, int count) {
|
||||||
|
ItemStack result = Inventories.splitStack(getItems(), slot, count);
|
||||||
|
if (!result.isEmpty()) {
|
||||||
|
markDirty();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes all items from an inventory slot.
|
||||||
|
* @param slot The slot to remove from.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
default ItemStack removeStack(int slot) {
|
||||||
|
return Inventories.removeStack(getItems(), slot);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Replaces the current stack in an inventory slot with the provided stack.
|
||||||
|
* @param slot The inventory slot of which to replace the itemstack.
|
||||||
|
* @param stack The replacing itemstack. If the stack is too big for
|
||||||
|
* this inventory ({@link Inventory#getMaxCountPerStack()}),
|
||||||
|
* it gets resized to this inventory's maximum amount.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
default void setStack(int slot, ItemStack stack) {
|
||||||
|
getItems().set(slot, stack);
|
||||||
|
if (stack.getCount() > stack.getMaxCount()) {
|
||||||
|
stack.setCount(stack.getMaxCount());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clears the inventory.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
default void clear() {
|
||||||
|
getItems().clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Marks the state as dirty.
|
||||||
|
* Must be called after changes in the inventory, so that the game can properly save
|
||||||
|
* the inventory contents and notify neighboring blocks of inventory changes.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
default void markDirty() {
|
||||||
|
// Override if you want behavior.
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return true if the player can use the inventory, false otherwise.
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
default boolean canPlayerUse(PlayerEntity player) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package de.jottyfan.quickiemod.container;
|
||||||
|
|
||||||
|
import net.minecraft.resource.featuretoggle.FeatureFlags;
|
||||||
|
import net.minecraft.screen.ScreenHandlerType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ScreenHandlerTypes {
|
||||||
|
public static final ScreenHandlerType<BlockStackerScreenHandler> BLOCKSTACKER_SCREEN_HANDLER = new ScreenHandlerType<>(BlockStackerScreenHandler::new,
|
||||||
|
FeatureFlags.VANILLA_FEATURES);
|
||||||
|
}
|
@ -1,29 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.event;
|
|
||||||
|
|
||||||
import net.fabricmc.fabric.api.event.Event;
|
|
||||||
import net.fabricmc.fabric.api.event.EventFactory;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
|
||||||
import net.minecraft.util.ActionResult;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public interface BreakBlockCallback {
|
|
||||||
Event<BreakBlockCallback> EVENT = EventFactory.createArrayBacked(BreakBlockCallback.class,
|
|
||||||
(listeners) -> (world, blockPos, blockState, playerEntity) -> {
|
|
||||||
for (BreakBlockCallback listener : listeners) {
|
|
||||||
ActionResult result = listener.injectBlockBreakCallback(world, blockPos, blockState, playerEntity);
|
|
||||||
if (result != ActionResult.PASS) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ActionResult.PASS;
|
|
||||||
});
|
|
||||||
|
|
||||||
ActionResult injectBlockBreakCallback(World world, BlockPos blockPos, BlockState blockState, PlayerEntity playerEntity);
|
|
||||||
}
|
|
@ -3,13 +3,11 @@ package de.jottyfan.quickiemod.event;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.logging.log4j.LogManager;
|
import de.jottyfan.quickiemod.Quickiemod;
|
||||||
import org.apache.logging.log4j.Logger;
|
import de.jottyfan.quickiemod.item.HarvestRange;
|
||||||
|
import de.jottyfan.quickiemod.item.ModItems;
|
||||||
import de.jottyfan.quickiemod.QuickieMod;
|
import de.jottyfan.quickiemod.item.ToolRangeable;
|
||||||
import de.jottyfan.quickiemod.items.HarvestRange;
|
import de.jottyfan.quickiemod.item.ToolSpeedpowderAxe;
|
||||||
import de.jottyfan.quickiemod.items.QuickieItems;
|
|
||||||
import de.jottyfan.quickiemod.items.ToolRangeable;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.Blocks;
|
import net.minecraft.block.Blocks;
|
||||||
@ -27,20 +25,21 @@ import net.minecraft.world.World;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class EventBlockBreak {
|
public class EventBlockBreak {
|
||||||
private static final Logger LOGGER = LogManager.getLogger(QuickieMod.MODID);
|
|
||||||
|
|
||||||
private enum BlockBreakDirection {
|
private enum BlockBreakDirection {
|
||||||
UPWARDS, ALL;
|
UPWARDS, ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void doBreakBlock(World world, BlockPos blockPos, BlockState blockState, PlayerEntity playerEntity) {
|
public void doBreakBlock(World world, BlockPos blockPos, BlockState blockState, PlayerEntity playerEntity, Block oldBlock) {
|
||||||
ItemStack mainHandItemStack = playerEntity.getEquippedStack(EquipmentSlot.MAINHAND);
|
ItemStack mainHandItemStack = playerEntity.getEquippedStack(EquipmentSlot.MAINHAND);
|
||||||
if (mainHandItemStack != null) {
|
if (mainHandItemStack != null) {
|
||||||
Item item = mainHandItemStack.getItem();
|
Item item = mainHandItemStack.getItem();
|
||||||
if (item instanceof ToolRangeable) {
|
if (item instanceof ToolRangeable) {
|
||||||
ToolRangeable tool = (ToolRangeable) item;
|
ToolRangeable tool = (ToolRangeable) item;
|
||||||
Block block = blockState.getBlock();
|
if (!world.getBlockState(blockPos).getBlock().equals(oldBlock)) {
|
||||||
int handled = handleRangeableTools(tool, mainHandItemStack, world, block, blockPos, playerEntity);
|
// recreate old block to make it breakable; otherwise, the recursive algorithm stops directly
|
||||||
|
world.setBlockState(blockPos, oldBlock.getDefaultState());
|
||||||
|
}
|
||||||
|
int handled = handleRangeableTools(tool, mainHandItemStack, world, oldBlock, blockPos, playerEntity);
|
||||||
if (handled >= 255) {
|
if (handled >= 255) {
|
||||||
// reward for using rangeable tool very successful
|
// reward for using rangeable tool very successful
|
||||||
world.spawnEntity(
|
world.spawnEntity(
|
||||||
@ -65,36 +64,40 @@ public class EventBlockBreak {
|
|||||||
BlockPos pos, PlayerEntity player) {
|
BlockPos pos, PlayerEntity player) {
|
||||||
List<Block> validBlocks = tool.getBlockList(currentBlock);
|
List<Block> validBlocks = tool.getBlockList(currentBlock);
|
||||||
HarvestRange range = tool.getRange(itemStack);
|
HarvestRange range = tool.getRange(itemStack);
|
||||||
|
if (tool instanceof Item) {
|
||||||
LOGGER.info("current tool: {}", tool);
|
Item toolItem = (Item) tool; // a rangeable tool should always be an item
|
||||||
|
List<String> visitedBlocks = new ArrayList<>();
|
||||||
if (QuickieItems.SPEEDPOWDERAXE.getItem().equals(tool)) {
|
if (tool instanceof ToolSpeedpowderAxe) {
|
||||||
return breakBlockRecursive(new ArrayList<>(), world, validBlocks, pos, tool, range, BlockBreakDirection.UPWARDS,
|
return breakBlockRecursive(visitedBlocks, world, validBlocks, pos, tool, range, BlockBreakDirection.UPWARDS,
|
||||||
player, true);
|
player, true);
|
||||||
} else if (QuickieItems.SPEEDPOWDERPICKAXE.getItem().equals(tool)) {
|
} else if (ModItems.TOOL_SPEEDPOWDERPICKAXE.getName().equals(toolItem.getName())) {
|
||||||
return breakBlockRecursive(new ArrayList<>(), world, validBlocks, pos, tool, range, BlockBreakDirection.ALL,
|
return breakBlockRecursive(visitedBlocks, world, validBlocks, pos, tool, range, BlockBreakDirection.ALL,
|
||||||
player, false);
|
player, false);
|
||||||
} else if (QuickieItems.SPEEDPOWDERSHOVEL.getItem().equals(tool)) {
|
} else if (ModItems.TOOL_SPEEDPOWDERSHOVEL.getName().equals(toolItem.getName())) {
|
||||||
return breakBlockRecursive(new ArrayList<>(), world, validBlocks, pos, tool, range, BlockBreakDirection.ALL,
|
return breakBlockRecursive(visitedBlocks, world, validBlocks, pos, tool, range, BlockBreakDirection.ALL,
|
||||||
player, false);
|
player, false);
|
||||||
} else if (QuickieItems.SPEEDPOWDERHOE.getItem().equals(tool)) {
|
} else if (ModItems.TOOL_SPEEDPOWDERHOE.getName().equals(toolItem.getName())) {
|
||||||
return breakBlockRecursive(new ArrayList<>(), world, validBlocks, pos, tool, range, BlockBreakDirection.ALL,
|
return breakBlockRecursive(visitedBlocks, world, validBlocks, pos, tool, range, BlockBreakDirection.ALL,
|
||||||
player, false);
|
player, false);
|
||||||
} else if (QuickieItems.QUICKIEPOWDERAXE.getItem().equals(tool)) {
|
} else if (ModItems.TOOL_QUICKIEPOWDERAXE.getName().equals(toolItem.getName())) {
|
||||||
return breakBlockRecursive(new ArrayList<>(), world, validBlocks, pos, tool, range, BlockBreakDirection.UPWARDS,
|
return breakBlockRecursive(visitedBlocks, world, validBlocks, pos, tool, range, BlockBreakDirection.UPWARDS,
|
||||||
player, true);
|
player, true);
|
||||||
} else if (QuickieItems.QUICKIEPOWDERPICKAXE.getItem().equals(tool)) {
|
} else if (ModItems.TOOL_QUICKIEPOWDERPICKAXE.getName().equals(toolItem.getName())) {
|
||||||
return breakBlockRecursive(new ArrayList<>(), world, validBlocks, pos, tool, range, BlockBreakDirection.ALL,
|
return breakBlockRecursive(visitedBlocks, world, validBlocks, pos, tool, range, BlockBreakDirection.ALL,
|
||||||
player, false);
|
player, false);
|
||||||
} else if (QuickieItems.QUICKIEPOWDERSHOVEL.getItem().equals(tool)) {
|
} else if (ModItems.TOOL_QUICKIEPOWDERSHOVEL.getName().equals(toolItem.getName())) {
|
||||||
return breakBlockRecursive(new ArrayList<>(), world, validBlocks, pos, tool, range, BlockBreakDirection.ALL,
|
return breakBlockRecursive(visitedBlocks, world, validBlocks, pos, tool, range, BlockBreakDirection.ALL,
|
||||||
player, false);
|
player, false);
|
||||||
} else if (QuickieItems.QUICKIEPOWDERHOE.getItem().equals(tool)) {
|
} else if (ModItems.TOOL_QUICKIEPOWDERHOE.getName().equals(toolItem.getName())) {
|
||||||
return breakBlockRecursive(new ArrayList<>(), world, validBlocks, pos, tool, range, BlockBreakDirection.ALL,
|
return breakBlockRecursive(visitedBlocks, world, validBlocks, pos, tool, range, BlockBreakDirection.ALL,
|
||||||
player, false);
|
player, false);
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
Quickiemod.LOGGER.warn("using a tool that is not an item - no rangeable operations are possible.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -113,6 +116,7 @@ public class EventBlockBreak {
|
|||||||
private int breakBlockRecursive(List<String> visitedBlocks, World world, List<Block> validBlocks, BlockPos pos,
|
private int breakBlockRecursive(List<String> visitedBlocks, World world, List<Block> validBlocks, BlockPos pos,
|
||||||
ToolRangeable tool, HarvestRange range, BlockBreakDirection blockBreakDirection, PlayerEntity player,
|
ToolRangeable tool, HarvestRange range, BlockBreakDirection blockBreakDirection, PlayerEntity player,
|
||||||
boolean breakLeaves) {
|
boolean breakLeaves) {
|
||||||
|
boolean ignoreSpawn = visitedBlocks.size() < 1; // with this, the already broken block can be omitted to spawn
|
||||||
if (visitedBlocks.contains(pos.toString())) {
|
if (visitedBlocks.contains(pos.toString())) {
|
||||||
return 0;
|
return 0;
|
||||||
} else if (validBlocks == null) {
|
} else if (validBlocks == null) {
|
||||||
@ -125,7 +129,9 @@ public class EventBlockBreak {
|
|||||||
if (tool.canBreakNeighbors(blockState)) {
|
if (tool.canBreakNeighbors(blockState)) {
|
||||||
Block currentBlock = blockState.getBlock();
|
Block currentBlock = blockState.getBlock();
|
||||||
if (validBlocks.contains(currentBlock)) {
|
if (validBlocks.contains(currentBlock)) {
|
||||||
|
if (!ignoreSpawn) {
|
||||||
Block.dropStacks(blockState, world, pos); // includes xorbs
|
Block.dropStacks(blockState, world, pos); // includes xorbs
|
||||||
|
}
|
||||||
affected += 1;
|
affected += 1;
|
||||||
world.setBlockState(pos, Blocks.AIR.getDefaultState());
|
world.setBlockState(pos, Blocks.AIR.getDefaultState());
|
||||||
if (range == null || range.getxRange() > 1 || range.getyRange() > 1 || range.getzRange() > 1) {
|
if (range == null || range.getxRange() > 1 || range.getyRange() > 1 || range.getzRange() > 1) {
|
||||||
|
@ -0,0 +1,66 @@
|
|||||||
|
package de.jottyfan.quickiemod.feature;
|
||||||
|
|
||||||
|
import de.jottyfan.quickiemod.Quickiemod;
|
||||||
|
import net.fabricmc.fabric.api.biome.v1.BiomeModifications;
|
||||||
|
import net.fabricmc.fabric.api.biome.v1.BiomeSelectors;
|
||||||
|
import net.fabricmc.fabric.api.biome.v1.ModificationPhase;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
import net.minecraft.world.gen.GenerationStep;
|
||||||
|
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
||||||
|
import net.minecraft.world.gen.feature.PlacedFeature;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ModFeatures {
|
||||||
|
|
||||||
|
public static final RegistryKey<ConfiguredFeature<?, ?>> CF_ORESULFUR = genCf("oresulphor");
|
||||||
|
public static final RegistryKey<ConfiguredFeature<?, ?>> CF_OREDEEPSLATESULFUR = genCf("oredepslatesulphor");
|
||||||
|
public static final RegistryKey<ConfiguredFeature<?, ?>> CF_ORESALPETER = genCf("oresalpeter");
|
||||||
|
public static final RegistryKey<ConfiguredFeature<?, ?>> CF_ORENETHERSULPHOR = genCf("orenethersulphore");
|
||||||
|
public static final RegistryKey<ConfiguredFeature<?, ?>> CF_BLOCKSULPHOR = genCf("blocksulphor");
|
||||||
|
public static final RegistryKey<ConfiguredFeature<?, ?>> CF_DIRTSALPETER = genCf("dirtsalpeter");
|
||||||
|
public static final RegistryKey<ConfiguredFeature<?, ?>> CF_SANDSALPETER = genCf("sandsalpeter");
|
||||||
|
public static final RegistryKey<ConfiguredFeature<?, ?>> CF_ORESANDSALPETER = genCf("oresandsalpeter");
|
||||||
|
|
||||||
|
public static final RegistryKey<PlacedFeature> PF_ORESULPHOR = genPf("oresulphor");
|
||||||
|
public static final RegistryKey<PlacedFeature> PF_OREDEEPSLATESULPHOR = genPf("oredeepslatesulphor");
|
||||||
|
public static final RegistryKey<PlacedFeature> PF_ORESALPETER = genPf("oresalpeter");
|
||||||
|
public static final RegistryKey<PlacedFeature> PF_ORENETHERSULPHOR = genPf("orenethersulphor");
|
||||||
|
public static final RegistryKey<PlacedFeature> PF_BLOCKSULPHOR = genPf("blocksulphor");
|
||||||
|
public static final RegistryKey<PlacedFeature> PF_DIRTSALPETER = genPf("dirtsalpeter");
|
||||||
|
public static final RegistryKey<PlacedFeature> PF_SANDSALPETER = genPf("sandsalpeter");
|
||||||
|
public static final RegistryKey<PlacedFeature> PF_ORESANDSALPETER = genPf("oresandsalpeter");
|
||||||
|
|
||||||
|
private static final RegistryKey<ConfiguredFeature<?, ?>> genCf(String name) {
|
||||||
|
return RegistryKey.of(RegistryKeys.CONFIGURED_FEATURE, Identifier.of(Quickiemod.MOD_ID, name));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static final RegistryKey<PlacedFeature> genPf(String name) {
|
||||||
|
return RegistryKey.of(RegistryKeys.PLACED_FEATURE, Identifier.of(Quickiemod.MOD_ID, name));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final void registerFeatures() {
|
||||||
|
// Overworld features
|
||||||
|
BiomeModifications.create(Identifier.of(Quickiemod.MOD_ID, "features")).add(ModificationPhase.ADDITIONS,
|
||||||
|
BiomeSelectors.foundInOverworld(), (bsc, bmc) -> {
|
||||||
|
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_ORESULPHOR);
|
||||||
|
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_ORESALPETER);
|
||||||
|
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_DIRTSALPETER);
|
||||||
|
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_SANDSALPETER);
|
||||||
|
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_ORESANDSALPETER);
|
||||||
|
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_OREDEEPSLATESULPHOR);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Nether features
|
||||||
|
BiomeModifications.create(Identifier.of(Quickiemod.MOD_ID, "nether_features")).add(ModificationPhase.ADDITIONS,
|
||||||
|
BiomeSelectors.foundInTheNether(), (bsc, bmc) -> {
|
||||||
|
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_ORENETHERSULPHOR);
|
||||||
|
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_BLOCKSULPHOR);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,77 @@
|
|||||||
|
package de.jottyfan.quickiemod.identifier;
|
||||||
|
|
||||||
|
import de.jottyfan.quickiemod.Quickiemod;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ModIdentifiers {
|
||||||
|
public static final Identifier ITEM_STUB = Identifier.of(Quickiemod.MOD_ID, "stub");
|
||||||
|
public static final Identifier ITEM_SPEEDPOWDER = Identifier.of(Quickiemod.MOD_ID, "speedpowder");
|
||||||
|
public static final Identifier ITEM_QUICKIEPOWDER = Identifier.of(Quickiemod.MOD_ID, "quickiepowder");
|
||||||
|
public static final Identifier ITEM_SALPETER = Identifier.of(Quickiemod.MOD_ID, "salpeter");
|
||||||
|
public static final Identifier ITEM_SULFOR = Identifier.of(Quickiemod.MOD_ID, "sulphor");
|
||||||
|
public static final Identifier ITEM_OXIDIZEDCOPPERPOWDER = Identifier.of(Quickiemod.MOD_ID, "oxidizedcopperpowder");
|
||||||
|
public static final Identifier ITEM_SPEEDINGOT = Identifier.of(Quickiemod.MOD_ID, "speedingot");
|
||||||
|
public static final Identifier ITEM_QUICKIEINGOT = Identifier.of(Quickiemod.MOD_ID, "quickieingot");
|
||||||
|
public static final Identifier ITEM_CARROTSTACK = Identifier.of(Quickiemod.MOD_ID, "carrotstack");
|
||||||
|
public static final Identifier ITEM_ROTTENFLESHSTRIPES = Identifier.of(Quickiemod.MOD_ID, "rotten_flesh_stripes");
|
||||||
|
public static final Identifier ITEM_COTTON = Identifier.of(Quickiemod.MOD_ID, "cotton");
|
||||||
|
public static final Identifier ITEM_COTTONPLANT = Identifier.of(Quickiemod.MOD_ID, "cottonplant");
|
||||||
|
public static final Identifier ITEM_COTTONSEED = Identifier.of(Quickiemod.MOD_ID, "cottonseed");
|
||||||
|
public static final Identifier ITEM_CANOLA = Identifier.of(Quickiemod.MOD_ID, "canola");
|
||||||
|
public static final Identifier ITEM_CANOLAPLANT = Identifier.of(Quickiemod.MOD_ID, "canolaplant");
|
||||||
|
public static final Identifier ITEM_CANOLASEED = Identifier.of(Quickiemod.MOD_ID, "canolaseed");
|
||||||
|
public static final Identifier ITEM_CANOLABOTTLE = Identifier.of(Quickiemod.MOD_ID, "canolabottle");
|
||||||
|
public static final Identifier ITEM_CANOLABOTTLESTACK = Identifier.of(Quickiemod.MOD_ID, "canolabottlestack");
|
||||||
|
|
||||||
|
public static final Identifier TOOL_SPEEDPOWDERAXE = Identifier.of(Quickiemod.MOD_ID, "speedpowderaxe");
|
||||||
|
public static final Identifier TOOL_SPEEDPOWDERHOE = Identifier.of(Quickiemod.MOD_ID, "speedpowderhoe");
|
||||||
|
public static final Identifier TOOL_SPEEDPOWDERPICKAXE = Identifier.of(Quickiemod.MOD_ID, "speedpowderpickaxe");
|
||||||
|
public static final Identifier TOOL_SPEEDPOWDERSHEARS = Identifier.of(Quickiemod.MOD_ID, "speedpowdershears");
|
||||||
|
public static final Identifier TOOL_SPEEDPOWDERSHOVEL = Identifier.of(Quickiemod.MOD_ID, "speedpowdershovel");
|
||||||
|
public static final Identifier TOOL_SPEEDPOWDERWATERHOE = Identifier.of(Quickiemod.MOD_ID, "speedpowderwaterhoe");
|
||||||
|
public static final Identifier TOOL_QUICKIEPOWDERAXE = Identifier.of(Quickiemod.MOD_ID, "quickiepowderaxe");
|
||||||
|
public static final Identifier TOOL_QUICKIEPOWDERHOE = Identifier.of(Quickiemod.MOD_ID, "quickiepowderhoe");
|
||||||
|
public static final Identifier TOOL_QUICKIEPOWDERPICKAXE = Identifier.of(Quickiemod.MOD_ID, "quickiepowderpickaxe");
|
||||||
|
public static final Identifier TOOL_QUICKIEPOWDERSHOVEL = Identifier.of(Quickiemod.MOD_ID, "quickiepowdershovel");
|
||||||
|
public static final Identifier TOOL_QUICKIEPOWDERWATERHOE = Identifier.of(Quickiemod.MOD_ID, "quickiepowderwaterhoe");
|
||||||
|
|
||||||
|
public static final Identifier BLOCK_QUICKIEPOWDER = Identifier.of(Quickiemod.MOD_ID, "blockquickiepowder");
|
||||||
|
public static final Identifier BLOCK_SPEEDPOWDER = Identifier.of(Quickiemod.MOD_ID, "blockspeedpowder");
|
||||||
|
public static final Identifier BLOCK_SALPETER = Identifier.of(Quickiemod.MOD_ID, "blocksalpeter");
|
||||||
|
public static final Identifier BLOCK_SULFOR = Identifier.of(Quickiemod.MOD_ID, "blocksulphor");
|
||||||
|
public static final Identifier BLOCK_MONSTERHOARDER = Identifier.of(Quickiemod.MOD_ID, "monsterhoarder");
|
||||||
|
public static final Identifier BLOCK_LAVAHOARDER = Identifier.of(Quickiemod.MOD_ID, "lavahoarder");
|
||||||
|
public static final Identifier BLOCK_EMPTYLAVAHOARDER = Identifier.of(Quickiemod.MOD_ID, "emptylavahoarder");
|
||||||
|
public static final Identifier BLOCK_ITEMHOARDER = Identifier.of(Quickiemod.MOD_ID, "itemhoarder");
|
||||||
|
public static final Identifier BLOCK_DIRTSALPETER = Identifier.of(Quickiemod.MOD_ID, "dirtsalpeter");
|
||||||
|
public static final Identifier BLOCK_OREDEEPSLATESULFOR = Identifier.of(Quickiemod.MOD_ID, "oredeepslatesulphor");
|
||||||
|
public static final Identifier BLOCK_ORENETHERSULFOR = Identifier.of(Quickiemod.MOD_ID, "orenethersulphor");
|
||||||
|
public static final Identifier BLOCK_ORESALPETER = Identifier.of(Quickiemod.MOD_ID, "oresalpeter");
|
||||||
|
public static final Identifier BLOCK_ORESANDSALPETER = Identifier.of(Quickiemod.MOD_ID, "oresandsalpeter");
|
||||||
|
public static final Identifier BLOCK_ORESULFOR = Identifier.of(Quickiemod.MOD_ID, "oresulphor");
|
||||||
|
public static final Identifier BLOCK_SANDSALPETER = Identifier.of(Quickiemod.MOD_ID, "sandsalpeter");
|
||||||
|
public static final Identifier BLOCK_KELPSTACK = Identifier.of(Quickiemod.MOD_ID, "kelpstack");
|
||||||
|
public static final Identifier BLOCK_COTTONPLANT = Identifier.of(Quickiemod.MOD_ID, "blockcottonplant");
|
||||||
|
public static final Identifier BLOCK_CANOLAPLANT = Identifier.of(Quickiemod.MOD_ID, "blockcanolaplant");
|
||||||
|
public static final Identifier BLOCK_DRILLDOWN = Identifier.of(Quickiemod.MOD_ID, "drill");
|
||||||
|
public static final Identifier BLOCK_DRILLEAST = Identifier.of(Quickiemod.MOD_ID, "drilleast");
|
||||||
|
public static final Identifier BLOCK_DRILLSOUTH = Identifier.of(Quickiemod.MOD_ID, "drillsouth");
|
||||||
|
public static final Identifier BLOCK_DRILLWEST = Identifier.of(Quickiemod.MOD_ID, "drillwest");
|
||||||
|
public static final Identifier BLOCK_DRILLNORTH = Identifier.of(Quickiemod.MOD_ID, "drillnorth");
|
||||||
|
public static final Identifier BLOCK_STACKERDOWN = Identifier.of(Quickiemod.MOD_ID, "blockstackerdown");
|
||||||
|
public static final Identifier BLOCK_STACKEREAST = Identifier.of(Quickiemod.MOD_ID, "blockstackereast");
|
||||||
|
public static final Identifier BLOCK_STACKERSOUTH = Identifier.of(Quickiemod.MOD_ID, "blockstackersouth");
|
||||||
|
public static final Identifier BLOCK_STACKERWEST = Identifier.of(Quickiemod.MOD_ID, "blockstackerwest");
|
||||||
|
public static final Identifier BLOCK_STACKERNORTH = Identifier.of(Quickiemod.MOD_ID, "blockstackernorth");
|
||||||
|
public static final Identifier BLOCK_STACKERUP = Identifier.of(Quickiemod.MOD_ID, "blockstackerup");
|
||||||
|
|
||||||
|
public static final Identifier BLOCKENTITY_ITEMHOARDER = Identifier.of(Quickiemod.MOD_ID, "itemhoarderblockentity");
|
||||||
|
public static final Identifier BLOCKENTITY_BLOCKSTACKER = Identifier.of(Quickiemod.MOD_ID, "blockstackerblockentity");
|
||||||
|
public static final Identifier BLOCKENTITY_DRILL = Identifier.of(Quickiemod.MOD_ID, "drillblockentity");
|
||||||
|
public static final Identifier BLOCKSTACKERUP = Identifier.of(Quickiemod.MOD_ID, "blockstackerblockentity");
|
||||||
|
}
|
@ -1,22 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.init;
|
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.QuickieMod;
|
|
||||||
import net.minecraft.util.Identifier;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class BlockEntityIdentity {
|
|
||||||
public static final Identifier ITEMHOARDER = Identifier.of(QuickieMod.MODID, "itemhoarderblockentity");
|
|
||||||
public static final Identifier BLOCKSPREADER = Identifier.of(QuickieMod.MODID, "blockspreaderblockentity");
|
|
||||||
public static final Identifier BLOCKSTACKERUP = Identifier.of(QuickieMod.MODID, "blockstackerblockentity");
|
|
||||||
public static final Identifier MONSTERHOARDER = Identifier.of(QuickieMod.MODID, "monsterhoarderblockentity");
|
|
||||||
public static final Identifier EMPTYLAVALHOARDER = Identifier.of(QuickieMod.MODID, "emptylavahoarderblockentity");
|
|
||||||
public static final Identifier DRILL_DOWN = Identifier.of(QuickieMod.MODID, "drillblockdownblockentity");
|
|
||||||
public static final Identifier DRILL_EAST = Identifier.of(QuickieMod.MODID, "drillblockeastblockentity");
|
|
||||||
public static final Identifier DRILL_SOUTH = Identifier.of(QuickieMod.MODID, "drillblocksouthblockentity");
|
|
||||||
public static final Identifier DRILL_WEST = Identifier.of(QuickieMod.MODID, "drillblockwestblockentity");
|
|
||||||
public static final Identifier DRILL_NORTH = Identifier.of(QuickieMod.MODID, "drillblocknorthblockentity");
|
|
||||||
}
|
|
@ -1,66 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.init;
|
|
||||||
|
|
||||||
import java.util.function.BiConsumer;
|
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.QuickieMod;
|
|
||||||
import net.fabricmc.fabric.api.biome.v1.BiomeModificationContext;
|
|
||||||
import net.fabricmc.fabric.api.biome.v1.BiomeSelectionContext;
|
|
||||||
import net.minecraft.registry.RegistryKey;
|
|
||||||
import net.minecraft.registry.RegistryKeys;
|
|
||||||
import net.minecraft.util.Identifier;
|
|
||||||
import net.minecraft.world.gen.GenerationStep;
|
|
||||||
import net.minecraft.world.gen.feature.ConfiguredFeature;
|
|
||||||
import net.minecraft.world.gen.feature.PlacedFeature;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class FeaturesManager {
|
|
||||||
|
|
||||||
public static final RegistryKey<ConfiguredFeature<?, ?>> CF_ORESULFUR = genCf("oresulphor");
|
|
||||||
public static final RegistryKey<ConfiguredFeature<?, ?>> CF_OREDEEPSLATESULFUR = genCf("oredepslatesulphor");
|
|
||||||
public static final RegistryKey<ConfiguredFeature<?, ?>> CF_ORESALPETER = genCf("oresalpeter");
|
|
||||||
public static final RegistryKey<ConfiguredFeature<?, ?>> CF_ORENETHERSULPHOR = genCf("orenethersulphore");
|
|
||||||
public static final RegistryKey<ConfiguredFeature<?, ?>> CF_BLOCKSULPHOR = genCf("blocksulphor");
|
|
||||||
public static final RegistryKey<ConfiguredFeature<?, ?>> CF_DIRTSALPETER = genCf("dirtsalpeter");
|
|
||||||
public static final RegistryKey<ConfiguredFeature<?, ?>> CF_SANDSALPETER = genCf("sandsalpeter");
|
|
||||||
public static final RegistryKey<ConfiguredFeature<?, ?>> CF_ORESANDSALPETER = genCf("oresandsalpeter");
|
|
||||||
|
|
||||||
public static final RegistryKey<PlacedFeature> PF_ORESULPHOR = genPf("oresulphor");
|
|
||||||
public static final RegistryKey<PlacedFeature> PF_OREDEEPSLATESULPHOR = genPf("oredeepslatesulphor");
|
|
||||||
public static final RegistryKey<PlacedFeature> PF_ORESALPETER = genPf("oresalpeter");
|
|
||||||
public static final RegistryKey<PlacedFeature> PF_ORENETHERSULPHOR = genPf("orenethersulphor");
|
|
||||||
public static final RegistryKey<PlacedFeature> PF_BLOCKSULPHOR = genPf("blocksulphor");
|
|
||||||
public static final RegistryKey<PlacedFeature> PF_DIRTSALPETER = genPf("dirtsalpeter");
|
|
||||||
public static final RegistryKey<PlacedFeature> PF_SANDSALPETER = genPf("sandsalpeter");
|
|
||||||
public static final RegistryKey<PlacedFeature> PF_ORESANDSALPETER = genPf("oresandsalpeter");
|
|
||||||
|
|
||||||
private static final RegistryKey<ConfiguredFeature<?, ?>> genCf(String name) {
|
|
||||||
return RegistryKey.of(RegistryKeys.CONFIGURED_FEATURE, Identifier.of(QuickieMod.MODID, name));
|
|
||||||
}
|
|
||||||
|
|
||||||
private static final RegistryKey<PlacedFeature> genPf(String name) {
|
|
||||||
return RegistryKey.of(RegistryKeys.PLACED_FEATURE, Identifier.of(QuickieMod.MODID, name));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static final BiConsumer<BiomeSelectionContext, BiomeModificationContext> overworldOres() {
|
|
||||||
return (bsc, bmc) -> {
|
|
||||||
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_ORESULPHOR);
|
|
||||||
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_ORESALPETER);
|
|
||||||
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_DIRTSALPETER);
|
|
||||||
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_SANDSALPETER);
|
|
||||||
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_ORESANDSALPETER);
|
|
||||||
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_OREDEEPSLATESULPHOR);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
protected static final BiConsumer<BiomeSelectionContext, BiomeModificationContext> netherOres() {
|
|
||||||
return (bsc, bmc) -> {
|
|
||||||
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_ORENETHERSULPHOR);
|
|
||||||
bmc.getGenerationSettings().addFeature(GenerationStep.Feature.UNDERGROUND_ORES, PF_BLOCKSULPHOR);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -1,94 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.init;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.QuickieMod;
|
|
||||||
import de.jottyfan.quickiemod.blockentity.BlockEntityTypes;
|
|
||||||
import de.jottyfan.quickiemod.blocks.QuickieBlocks;
|
|
||||||
import de.jottyfan.quickiemod.event.BreakBlockCallback;
|
|
||||||
import de.jottyfan.quickiemod.event.EventBlockBreak;
|
|
||||||
import de.jottyfan.quickiemod.items.QuickieItems;
|
|
||||||
import net.fabricmc.fabric.api.biome.v1.BiomeModifications;
|
|
||||||
import net.fabricmc.fabric.api.biome.v1.BiomeSelectors;
|
|
||||||
import net.fabricmc.fabric.api.biome.v1.ModificationPhase;
|
|
||||||
import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup;
|
|
||||||
import net.fabricmc.fabric.api.registry.FuelRegistry;
|
|
||||||
import net.minecraft.block.ComposterBlock;
|
|
||||||
import net.minecraft.item.BlockItem;
|
|
||||||
import net.minecraft.item.Item.Settings;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.registry.Registries;
|
|
||||||
import net.minecraft.registry.Registry;
|
|
||||||
import net.minecraft.registry.RegistryKey;
|
|
||||||
import net.minecraft.registry.RegistryKeys;
|
|
||||||
import net.minecraft.text.Text;
|
|
||||||
import net.minecraft.util.ActionResult;
|
|
||||||
import net.minecraft.util.Identifier;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class RegistryManager {
|
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(QuickieMod.MODID);
|
|
||||||
|
|
||||||
public static final void registerItemGroup() {
|
|
||||||
Registry.register(Registries.ITEM_GROUP, RegistryKey.of(RegistryKeys.ITEM_GROUP, Identifier.of(QuickieMod.MODID, "itemgroups")),
|
|
||||||
FabricItemGroup.builder().icon(() -> new ItemStack(QuickieItems.ROTTEN_FLESH_STRIPES.getItem())).displayName(Text.literal(QuickieMod.MODID))
|
|
||||||
.entries((enabledFeatures, stacks) -> {
|
|
||||||
for (QuickieItems i : QuickieItems.values()) {
|
|
||||||
stacks.add(new ItemStack(i.getItem()));
|
|
||||||
}
|
|
||||||
for (QuickieBlocks b : QuickieBlocks.values()) {
|
|
||||||
if (b.getAdd2BlockPanel()) {
|
|
||||||
stacks.add(new ItemStack(b.getBlock()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).build());
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final void registerItems() {
|
|
||||||
LOGGER.info("registering items");
|
|
||||||
for (QuickieItems i : QuickieItems.values()) {
|
|
||||||
Registry.register(Registries.ITEM, Identifier.of(QuickieMod.MODID, i.getName()), i.getItem());
|
|
||||||
}
|
|
||||||
ComposterBlock.ITEM_TO_LEVEL_INCREASE_CHANCE.put(QuickieItems.COTTONSEED.getItem(), 0.5f);
|
|
||||||
ComposterBlock.ITEM_TO_LEVEL_INCREASE_CHANCE.put(QuickieItems.COTTON.getItem(), 0.75f);
|
|
||||||
ComposterBlock.ITEM_TO_LEVEL_INCREASE_CHANCE.put(QuickieItems.CANOLASEED.getItem(), 0.5f);
|
|
||||||
ComposterBlock.ITEM_TO_LEVEL_INCREASE_CHANCE.put(QuickieItems.CANOLA.getItem(), 0.75f);
|
|
||||||
FuelRegistry.INSTANCE.add(QuickieItems.SULPHOR.getItem(), 200);
|
|
||||||
FuelRegistry.INSTANCE.add(QuickieBlocks.BLOCKSULPHOR.getBlock(), 2000);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final void registerBlocks() {
|
|
||||||
LOGGER.info("registering blocks");
|
|
||||||
for (QuickieBlocks b : QuickieBlocks.values()) {
|
|
||||||
Registry.register(Registries.BLOCK, Identifier.of(QuickieMod.MODID, b.getName()), b.getBlock());
|
|
||||||
Registry.register(Registries.ITEM, Identifier.of(QuickieMod.MODID, b.getName()), new BlockItem(b.getBlock(), new Settings()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final void registerFeatures() {
|
|
||||||
// Overworld features
|
|
||||||
BiomeModifications.create(Identifier.of(QuickieMod.MODID, "features")).add(ModificationPhase.ADDITIONS, BiomeSelectors.foundInOverworld(),
|
|
||||||
FeaturesManager.overworldOres());
|
|
||||||
|
|
||||||
// Nether features
|
|
||||||
BiomeModifications.create(Identifier.of(QuickieMod.MODID, "nether_features")).add(ModificationPhase.ADDITIONS, BiomeSelectors.foundInTheNether(),
|
|
||||||
FeaturesManager.netherOres());
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final void registerEvents() {
|
|
||||||
LOGGER.info("registering events");
|
|
||||||
BreakBlockCallback.EVENT.register((world, blockPos, blockState, playerEntity) -> {
|
|
||||||
new EventBlockBreak().doBreakBlock(world, blockPos, blockState, playerEntity);
|
|
||||||
return ActionResult.SUCCESS;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public static final void registerBlockEntityTypes() {
|
|
||||||
new BlockEntityTypes();
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,20 @@
|
|||||||
|
package de.jottyfan.quickiemod.item;
|
||||||
|
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public abstract class AbstractIdentifiedItem extends Item {
|
||||||
|
|
||||||
|
public AbstractIdentifiedItem(Identifier identifier, Integer maxCount) {
|
||||||
|
super(new Item.Settings().maxCount(maxCount).useItemPrefixedTranslationKey()
|
||||||
|
.registryKey(RegistryKey.of(RegistryKeys.ITEM, identifier)));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.quickiemod.items;
|
package de.jottyfan.quickiemod.item;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
@ -34,6 +34,15 @@ public class HarvestRange implements Serializable {
|
|||||||
this.zRange = zRange;
|
this.zRange = zRange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuilder buf = new StringBuilder();
|
||||||
|
buf.append(xRange).append(":");
|
||||||
|
buf.append(yRange).append(":");
|
||||||
|
buf.append(zRange).append(":");
|
||||||
|
return buf.toString();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* add i to x, y and z and return the resulting class as a new one
|
* add i to x, y and z and return the resulting class as a new one
|
||||||
*
|
*
|
16
src/main/java/de/jottyfan/quickiemod/item/Item64Stack.java
Normal file
16
src/main/java/de/jottyfan/quickiemod/item/Item64Stack.java
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
package de.jottyfan.quickiemod.item;
|
||||||
|
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class Item64Stack extends AbstractIdentifiedItem {
|
||||||
|
|
||||||
|
public Item64Stack(Identifier identifier) {
|
||||||
|
super(identifier, 64);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
45
src/main/java/de/jottyfan/quickiemod/item/ItemSeed.java
Normal file
45
src/main/java/de/jottyfan/quickiemod/item/ItemSeed.java
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
package de.jottyfan.quickiemod.item;
|
||||||
|
|
||||||
|
import de.jottyfan.quickiemod.Quickiemod;
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.block.Blocks;
|
||||||
|
import net.minecraft.item.ItemUsageContext;
|
||||||
|
import net.minecraft.registry.Registries;
|
||||||
|
import net.minecraft.util.ActionResult;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ItemSeed extends Item64Stack {
|
||||||
|
|
||||||
|
private Identifier plant;
|
||||||
|
|
||||||
|
public ItemSeed(Identifier identifier, Identifier plant) {
|
||||||
|
super(identifier);
|
||||||
|
this.plant = plant;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ActionResult useOnBlock(ItemUsageContext context) {
|
||||||
|
BlockPos pos = context.getBlockPos();
|
||||||
|
World world = context.getWorld();
|
||||||
|
if (this.asItem().equals(context.getStack().getItem())) {
|
||||||
|
BlockState state = world.getBlockState(pos);
|
||||||
|
if (Registries.BLOCK.containsId(plant)) {
|
||||||
|
if (Blocks.FARMLAND.equals(state.getBlock()) && world.getBlockState(pos.up()).isAir()) {
|
||||||
|
world.setBlockState(pos.up(), Registries.BLOCK.get(plant).getDefaultState());
|
||||||
|
context.getStack().decrement(1);
|
||||||
|
} else {
|
||||||
|
Quickiemod.LOGGER.error("could not find block {} in Registries...", plant.toShortTranslationKey());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return super.useOnBlock(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
117
src/main/java/de/jottyfan/quickiemod/item/ModItems.java
Normal file
117
src/main/java/de/jottyfan/quickiemod/item/ModItems.java
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
package de.jottyfan.quickiemod.item;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import de.jottyfan.quickiemod.Quickiemod;
|
||||||
|
import de.jottyfan.quickiemod.identifier.ModIdentifiers;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.registry.Registries;
|
||||||
|
import net.minecraft.registry.Registry;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ModItems {
|
||||||
|
public static final Item ITEM_STUB = registerItem(ModIdentifiers.ITEM_STUB,
|
||||||
|
new Item64Stack(ModIdentifiers.ITEM_STUB));
|
||||||
|
public static final Item ITEM_SPEEDPOWDER = registerItem(ModIdentifiers.ITEM_SPEEDPOWDER,
|
||||||
|
new Item64Stack(ModIdentifiers.ITEM_SPEEDPOWDER));
|
||||||
|
public static final Item ITEM_QUICKIEPOWDER = registerItem(ModIdentifiers.ITEM_QUICKIEPOWDER,
|
||||||
|
new Item64Stack(ModIdentifiers.ITEM_QUICKIEPOWDER));
|
||||||
|
public static final Item ITEM_SALPETER = registerItem(ModIdentifiers.ITEM_SALPETER,
|
||||||
|
new Item64Stack(ModIdentifiers.ITEM_SALPETER));
|
||||||
|
public static final Item ITEM_SULFOR = registerItem(ModIdentifiers.ITEM_SULFOR,
|
||||||
|
new Item64Stack(ModIdentifiers.ITEM_SULFOR));
|
||||||
|
public static final Item ITEM_OXIDIZEDCOPPERPOWDER = registerItem(ModIdentifiers.ITEM_OXIDIZEDCOPPERPOWDER,
|
||||||
|
new Item64Stack(ModIdentifiers.ITEM_OXIDIZEDCOPPERPOWDER));
|
||||||
|
public static final Item ITEM_SPEEDINGOT = registerItem(ModIdentifiers.ITEM_SPEEDINGOT,
|
||||||
|
new Item64Stack(ModIdentifiers.ITEM_SPEEDINGOT));
|
||||||
|
public static final Item ITEM_QUICKIEINGOT = registerItem(ModIdentifiers.ITEM_QUICKIEINGOT,
|
||||||
|
new Item64Stack(ModIdentifiers.ITEM_QUICKIEINGOT));
|
||||||
|
public static final Item ITEM_CARROTSTACK = registerItem(ModIdentifiers.ITEM_CARROTSTACK,
|
||||||
|
new Item64Stack(ModIdentifiers.ITEM_CARROTSTACK));
|
||||||
|
public static final Item ITEM_ROTTENFLESHSTRIPES = registerItem(ModIdentifiers.ITEM_ROTTENFLESHSTRIPES,
|
||||||
|
new Item64Stack(ModIdentifiers.ITEM_ROTTENFLESHSTRIPES));
|
||||||
|
public static final Item ITEM_COTTON = registerItem(ModIdentifiers.ITEM_COTTON,
|
||||||
|
new Item64Stack(ModIdentifiers.ITEM_COTTON));
|
||||||
|
public static final Item ITEM_COTTONPLANT = registerItem(ModIdentifiers.ITEM_COTTONPLANT,
|
||||||
|
new Item64Stack(ModIdentifiers.BLOCK_COTTONPLANT));
|
||||||
|
public static final Item ITEM_COTTONSEED = registerItem(ModIdentifiers.ITEM_COTTONSEED,
|
||||||
|
new ItemSeed(ModIdentifiers.ITEM_COTTONSEED, ModIdentifiers.BLOCK_COTTONPLANT));
|
||||||
|
public static final Item ITEM_CANOLA = registerItem(ModIdentifiers.ITEM_CANOLA,
|
||||||
|
new Item64Stack(ModIdentifiers.ITEM_CANOLA));
|
||||||
|
public static final Item ITEM_CANOLAPLANT = registerItem(ModIdentifiers.ITEM_CANOLAPLANT,
|
||||||
|
new Item64Stack(ModIdentifiers.BLOCK_CANOLAPLANT));
|
||||||
|
public static final Item ITEM_CANOLASEED = registerItem(ModIdentifiers.ITEM_CANOLASEED,
|
||||||
|
new ItemSeed(ModIdentifiers.ITEM_CANOLASEED, ModIdentifiers.BLOCK_CANOLAPLANT));
|
||||||
|
public static final Item ITEM_CANOLABOTTLE = registerItem(ModIdentifiers.ITEM_CANOLABOTTLE,
|
||||||
|
new Item64Stack(ModIdentifiers.ITEM_CANOLABOTTLE));
|
||||||
|
public static final Item ITEM_CANOLABOTTLESTACK = registerItem(ModIdentifiers.ITEM_CANOLABOTTLESTACK,
|
||||||
|
new Item64Stack(ModIdentifiers.ITEM_CANOLABOTTLESTACK));
|
||||||
|
|
||||||
|
public static final Item TOOL_SPEEDPOWDERAXE = registerItem(ModIdentifiers.TOOL_SPEEDPOWDERAXE,
|
||||||
|
new ToolSpeedpowderAxe(ModIdentifiers.TOOL_SPEEDPOWDERAXE));
|
||||||
|
public static final Item TOOL_SPEEDPOWDERHOE = registerItem(ModIdentifiers.TOOL_SPEEDPOWDERHOE,
|
||||||
|
new ToolSpeedpowderHoe(ModIdentifiers.TOOL_SPEEDPOWDERHOE));
|
||||||
|
public static final Item TOOL_SPEEDPOWDERPICKAXE = registerItem(ModIdentifiers.TOOL_SPEEDPOWDERPICKAXE,
|
||||||
|
new ToolSpeedpowderPickaxe(ModIdentifiers.TOOL_SPEEDPOWDERPICKAXE));
|
||||||
|
public static final Item TOOL_SPEEDPOWDERSHEARS = registerItem(ModIdentifiers.TOOL_SPEEDPOWDERSHEARS,
|
||||||
|
new ToolSpeedpowderShears(ModIdentifiers.TOOL_SPEEDPOWDERSHEARS));
|
||||||
|
public static final Item TOOL_SPEEDPOWDERSHOVEL = registerItem(ModIdentifiers.TOOL_SPEEDPOWDERSHOVEL,
|
||||||
|
new ToolSpeedpowderShovel(ModIdentifiers.TOOL_SPEEDPOWDERSHOVEL));
|
||||||
|
public static final Item TOOL_SPEEDPOWDERWATERHOE = registerItem(ModIdentifiers.TOOL_SPEEDPOWDERWATERHOE,
|
||||||
|
new ToolSpeedpowderWaterHoe(ModIdentifiers.TOOL_SPEEDPOWDERWATERHOE));
|
||||||
|
public static final Item TOOL_QUICKIEPOWDERAXE = registerItem(ModIdentifiers.TOOL_QUICKIEPOWDERAXE,
|
||||||
|
new ToolQuickiepowderAxe(ModIdentifiers.TOOL_QUICKIEPOWDERAXE));
|
||||||
|
public static final Item TOOL_QUICKIEPOWDERHOE = registerItem(ModIdentifiers.TOOL_QUICKIEPOWDERHOE,
|
||||||
|
new ToolQuickiepowderHoe(ModIdentifiers.TOOL_QUICKIEPOWDERHOE));
|
||||||
|
public static final Item TOOL_QUICKIEPOWDERPICKAXE = registerItem(ModIdentifiers.TOOL_QUICKIEPOWDERPICKAXE,
|
||||||
|
new ToolQuickiepowderPickaxe(ModIdentifiers.TOOL_QUICKIEPOWDERPICKAXE));
|
||||||
|
public static final Item TOOL_QUICKIEPOWDERSHOVEL = registerItem(ModIdentifiers.TOOL_QUICKIEPOWDERSHOVEL,
|
||||||
|
new ToolQuickiepowderShovel(ModIdentifiers.TOOL_QUICKIEPOWDERSHOVEL));
|
||||||
|
public static final Item TOOL_QUICKIEPOWDERWATERHOE = registerItem(ModIdentifiers.TOOL_QUICKIEPOWDERWATERHOE,
|
||||||
|
new ToolQuickiepowderWaterHoe(ModIdentifiers.TOOL_QUICKIEPOWDERWATERHOE));
|
||||||
|
|
||||||
|
private static final Item registerItem(Identifier identifier, Item item) {
|
||||||
|
return Registry.register(Registries.ITEM, identifier, item);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final List<Item> registerModItems() {
|
||||||
|
Quickiemod.LOGGER.debug(String.format("registering item %s", Quickiemod.MOD_ID));
|
||||||
|
|
||||||
|
List<Item> items = new ArrayList<>();
|
||||||
|
items.add(ITEM_STUB);
|
||||||
|
items.add(ITEM_SPEEDPOWDER);
|
||||||
|
items.add(ITEM_QUICKIEPOWDER);
|
||||||
|
items.add(ITEM_SALPETER);
|
||||||
|
items.add(ITEM_SULFOR);
|
||||||
|
items.add(ITEM_OXIDIZEDCOPPERPOWDER);
|
||||||
|
items.add(ITEM_SPEEDINGOT);
|
||||||
|
items.add(ITEM_QUICKIEINGOT);
|
||||||
|
items.add(ITEM_CARROTSTACK);
|
||||||
|
items.add(ITEM_ROTTENFLESHSTRIPES);
|
||||||
|
items.add(ITEM_COTTON);
|
||||||
|
items.add(ITEM_COTTONSEED);
|
||||||
|
items.add(ITEM_CANOLA);
|
||||||
|
items.add(ITEM_CANOLASEED);
|
||||||
|
items.add(ITEM_CANOLABOTTLE);
|
||||||
|
items.add(ITEM_CANOLABOTTLESTACK);
|
||||||
|
|
||||||
|
items.add(TOOL_SPEEDPOWDERPICKAXE);
|
||||||
|
items.add(TOOL_SPEEDPOWDERAXE);
|
||||||
|
items.add(TOOL_SPEEDPOWDERSHOVEL);
|
||||||
|
items.add(TOOL_SPEEDPOWDERHOE);
|
||||||
|
items.add(TOOL_SPEEDPOWDERWATERHOE);
|
||||||
|
items.add(TOOL_SPEEDPOWDERSHEARS);
|
||||||
|
items.add(TOOL_QUICKIEPOWDERPICKAXE);
|
||||||
|
items.add(TOOL_QUICKIEPOWDERAXE);
|
||||||
|
items.add(TOOL_QUICKIEPOWDERSHOVEL);
|
||||||
|
items.add(TOOL_QUICKIEPOWDERHOE);
|
||||||
|
items.add(TOOL_QUICKIEPOWDERWATERHOE);
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
}
|
@ -1,21 +0,0 @@
|
|||||||
package de.jottyfan.quickiemod.item;
|
|
||||||
|
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.item.ItemUsageContext;
|
|
||||||
import net.minecraft.util.Hand;
|
|
||||||
import net.minecraft.util.hit.BlockHitResult;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @author jotty
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class ModdedItemUsageContext extends ItemUsageContext {
|
|
||||||
|
|
||||||
public ModdedItemUsageContext(World world, PlayerEntity player, Hand hand, ItemStack stack, BlockHitResult hit) {
|
|
||||||
super(world, player, hand, stack, hit);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -0,0 +1,30 @@
|
|||||||
|
package de.jottyfan.quickiemod.item;
|
||||||
|
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.item.ToolMaterial;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.registry.tag.BlockTags;
|
||||||
|
import net.minecraft.registry.tag.ItemTags;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ToolQuickiepowderAxe extends ToolRangeableAxe {
|
||||||
|
|
||||||
|
private final static ToolMaterial MATERIAL = new ToolMaterial(BlockTags.INCORRECT_FOR_DIAMOND_TOOL, 2400, 7f, 1f, 15, ItemTags.DIAMOND_TOOL_MATERIALS);
|
||||||
|
|
||||||
|
public ToolQuickiepowderAxe(Identifier identifier) {
|
||||||
|
super(MATERIAL, 7F, -3.1F, new Item.Settings().useItemPrefixedTranslationKey().registryKey(RegistryKey.of(RegistryKeys.ITEM, identifier)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HarvestRange getRange(ItemStack stack) {
|
||||||
|
// TODO: get the range from the stack
|
||||||
|
return new HarvestRange(64, 128, 64); // trees bigger than that are too heavy for one small axe...
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package de.jottyfan.quickiemod.item;
|
||||||
|
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ToolMaterial;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.registry.tag.BlockTags;
|
||||||
|
import net.minecraft.registry.tag.ItemTags;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ToolQuickiepowderHoe extends ToolRangeableHoe {
|
||||||
|
|
||||||
|
public static final Integer DEFAULT_PLOW_RANGE = 4;
|
||||||
|
private final static ToolMaterial MATERIAL = new ToolMaterial(BlockTags.INCORRECT_FOR_DIAMOND_TOOL, 2400, 7f, 1f, 15, ItemTags.DIAMOND_TOOL_MATERIALS);
|
||||||
|
|
||||||
|
public ToolQuickiepowderHoe(Identifier identifier) {
|
||||||
|
super(MATERIAL, 7F, -3.1f, new Item.Settings().useItemPrefixedTranslationKey().registryKey(RegistryKey.of(RegistryKeys.ITEM, identifier)), new HarvestRange(DEFAULT_PLOW_RANGE));
|
||||||
|
}
|
||||||
|
}
|
@ -1,15 +1,20 @@
|
|||||||
package de.jottyfan.quickiemod.items;
|
package de.jottyfan.quickiemod.item;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.items.mat.QuickieToolMaterial;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.PickaxeItem;
|
import net.minecraft.item.PickaxeItem;
|
||||||
|
import net.minecraft.item.ToolMaterial;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.registry.tag.BlockTags;
|
||||||
|
import net.minecraft.registry.tag.ItemTags;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -19,10 +24,15 @@ import net.minecraft.item.PickaxeItem;
|
|||||||
public class ToolQuickiepowderPickaxe extends PickaxeItem implements ToolRangeable {
|
public class ToolQuickiepowderPickaxe extends PickaxeItem implements ToolRangeable {
|
||||||
|
|
||||||
public static final int[] DEFAULT_HARVEST_RANGE = new int[] { 6, 6, 6 };
|
public static final int[] DEFAULT_HARVEST_RANGE = new int[] { 6, 6, 6 };
|
||||||
private final static QuickieToolMaterial MATERIAL = QuickieToolMaterial.of(7f, 2400, 15, 1f, QuickieItems.SPEEDINGOT.getItem());
|
private final static ToolMaterial MATERIAL = new ToolMaterial(BlockTags.INCORRECT_FOR_DIAMOND_TOOL, 2400, 7f, 1f, 15, ItemTags.DIAMOND_TOOL_MATERIALS);
|
||||||
|
|
||||||
public ToolQuickiepowderPickaxe() {
|
public ToolQuickiepowderPickaxe(Identifier identifier) {
|
||||||
super(MATERIAL, new Item.Settings().attributeModifiers(PickaxeItem.createAttributeModifiers(MATERIAL, 7F, -3.1F)));
|
super(MATERIAL, 7F, -3.1F, new Item.Settings().useItemPrefixedTranslationKey().registryKey(RegistryKey.of(RegistryKeys.ITEM, identifier)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isCorrectForDrops(ItemStack stack, BlockState state) {
|
||||||
|
return super.isCorrectForDrops(stack, state);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
@ -1,17 +1,22 @@
|
|||||||
package de.jottyfan.quickiemod.items;
|
package de.jottyfan.quickiemod.item;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.items.mat.QuickieToolMaterial;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.ItemUsageContext;
|
import net.minecraft.item.ItemUsageContext;
|
||||||
import net.minecraft.item.ShovelItem;
|
import net.minecraft.item.ShovelItem;
|
||||||
|
import net.minecraft.item.ToolMaterial;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.registry.tag.BlockTags;
|
||||||
|
import net.minecraft.registry.tag.ItemTags;
|
||||||
import net.minecraft.util.ActionResult;
|
import net.minecraft.util.ActionResult;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.Direction;
|
import net.minecraft.util.math.Direction;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
@ -23,11 +28,11 @@ import net.minecraft.world.World;
|
|||||||
*/
|
*/
|
||||||
public class ToolQuickiepowderShovel extends ShovelItem implements ToolRangeable {
|
public class ToolQuickiepowderShovel extends ShovelItem implements ToolRangeable {
|
||||||
public static final Integer DEFAULT_HARVEST_RANGE = 6;
|
public static final Integer DEFAULT_HARVEST_RANGE = 6;
|
||||||
private final static QuickieToolMaterial MATERIAL = QuickieToolMaterial.of(7f, 2400, 15, 1f, QuickieItems.SPEEDINGOT.getItem());
|
private final static ToolMaterial MATERIAL = new ToolMaterial(BlockTags.INCORRECT_FOR_DIAMOND_TOOL, 2400, 7f, 1f, 15, ItemTags.DIAMOND_TOOL_MATERIALS);
|
||||||
public HarvestRange range;
|
public HarvestRange range;
|
||||||
|
|
||||||
public ToolQuickiepowderShovel() {
|
public ToolQuickiepowderShovel(Identifier identifier) {
|
||||||
super(MATERIAL, new Item.Settings().attributeModifiers(ShovelItem.createAttributeModifiers(MATERIAL, 7F, -3.1F)));
|
super(MATERIAL, 7F, -3.1F, new Item.Settings().useItemPrefixedTranslationKey().registryKey(RegistryKey.of(RegistryKeys.ITEM, identifier)));
|
||||||
this.range = new HarvestRange(DEFAULT_HARVEST_RANGE);
|
this.range = new HarvestRange(DEFAULT_HARVEST_RANGE);
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.quickiemod.items;
|
package de.jottyfan.quickiemod.item;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.Blocks;
|
import net.minecraft.block.Blocks;
|
||||||
@ -8,6 +8,7 @@ import net.minecraft.item.ItemStack;
|
|||||||
import net.minecraft.item.ItemUsageContext;
|
import net.minecraft.item.ItemUsageContext;
|
||||||
import net.minecraft.util.ActionResult;
|
import net.minecraft.util.ActionResult;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
@ -17,6 +18,10 @@ import net.minecraft.world.World;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ToolQuickiepowderWaterHoe extends ToolQuickiepowderHoe {
|
public class ToolQuickiepowderWaterHoe extends ToolQuickiepowderHoe {
|
||||||
|
public ToolQuickiepowderWaterHoe(Identifier identifier) {
|
||||||
|
super(identifier);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ActionResult useOnBlock(ItemUsageContext context) {
|
public ActionResult useOnBlock(ItemUsageContext context) {
|
||||||
ActionResult res = super.useOnBlock(context);
|
ActionResult res = super.useOnBlock(context);
|
||||||
@ -28,7 +33,7 @@ public class ToolQuickiepowderWaterHoe extends ToolQuickiepowderHoe {
|
|||||||
Hand hand = context.getHand();
|
Hand hand = context.getHand();
|
||||||
PlayerEntity player = context.getPlayer();
|
PlayerEntity player = context.getPlayer();
|
||||||
ItemStack oldTool = player.getStackInHand(hand);
|
ItemStack oldTool = player.getStackInHand(hand);
|
||||||
ItemStack newTool = new ItemStack(QuickieItems.QUICKIEPOWDERHOE.getItem());
|
ItemStack newTool = new ItemStack(ModItems.TOOL_QUICKIEPOWDERHOE);
|
||||||
newTool.setDamage(oldTool.getDamage());
|
newTool.setDamage(oldTool.getDamage());
|
||||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(oldBlockState.getBlock())));
|
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(oldBlockState.getBlock())));
|
||||||
player.setStackInHand(hand, newTool);
|
player.setStackInHand(hand, newTool);
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.quickiemod.items;
|
package de.jottyfan.quickiemod.item;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.quickiemod.items;
|
package de.jottyfan.quickiemod.item;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -20,8 +20,8 @@ import net.minecraft.registry.tag.BlockTags;
|
|||||||
*/
|
*/
|
||||||
public abstract class ToolRangeableAxe extends AxeItem implements ToolRangeable {
|
public abstract class ToolRangeableAxe extends AxeItem implements ToolRangeable {
|
||||||
|
|
||||||
protected ToolRangeableAxe(ToolMaterial material, Item.Settings settings) {
|
protected ToolRangeableAxe(ToolMaterial material, float attackDamage, float attackSpeed, Item.Settings settings) {
|
||||||
super(material, settings);
|
super(material, attackDamage, attackSpeed, settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.quickiemod.items;
|
package de.jottyfan.quickiemod.item;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@ -28,8 +28,8 @@ public abstract class ToolRangeableHoe extends HoeItem implements ToolRangeable
|
|||||||
|
|
||||||
public HarvestRange range;
|
public HarvestRange range;
|
||||||
|
|
||||||
public ToolRangeableHoe(ToolMaterial material, Settings settings, HarvestRange range) {
|
public ToolRangeableHoe(ToolMaterial material, float attackDamage, float attackSpeed, Settings settings, HarvestRange range) {
|
||||||
super(material, settings);
|
super(material, attackDamage, attackSpeed, settings);
|
||||||
this.range = range;
|
this.range = range;
|
||||||
}
|
}
|
||||||
|
|
@ -0,0 +1,30 @@
|
|||||||
|
package de.jottyfan.quickiemod.item;
|
||||||
|
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.item.ToolMaterial;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.registry.tag.BlockTags;
|
||||||
|
import net.minecraft.registry.tag.ItemTags;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ToolSpeedpowderAxe extends ToolRangeableAxe {
|
||||||
|
|
||||||
|
private final static ToolMaterial MATERIAL = new ToolMaterial(BlockTags.INCORRECT_FOR_DIAMOND_TOOL, 800, 7f, 1f, 15, ItemTags.DIAMOND_TOOL_MATERIALS);
|
||||||
|
|
||||||
|
public ToolSpeedpowderAxe(Identifier identifier) {
|
||||||
|
super(MATERIAL, 7f, -3.1f, new Item.Settings().useItemPrefixedTranslationKey().registryKey(RegistryKey.of(RegistryKeys.ITEM, identifier)));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HarvestRange getRange(ItemStack stack) {
|
||||||
|
// TODO: get the range from the stack
|
||||||
|
return new HarvestRange(32, 64, 32);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package de.jottyfan.quickiemod.item;
|
||||||
|
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ToolMaterial;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.registry.tag.BlockTags;
|
||||||
|
import net.minecraft.registry.tag.ItemTags;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ToolSpeedpowderHoe extends ToolRangeableHoe {
|
||||||
|
|
||||||
|
public static final Integer DEFAULT_PLOW_RANGE = 2;
|
||||||
|
private final static ToolMaterial MATERIAL = new ToolMaterial(BlockTags.INCORRECT_FOR_DIAMOND_TOOL, 800, 7f, 1f, 15, ItemTags.DIAMOND_TOOL_MATERIALS);
|
||||||
|
|
||||||
|
public ToolSpeedpowderHoe(Identifier identifier) {
|
||||||
|
super(MATERIAL, 7F, -3.1F, new Item.Settings().useItemPrefixedTranslationKey().registryKey(RegistryKey.of(RegistryKeys.ITEM, identifier)), new HarvestRange(DEFAULT_PLOW_RANGE));
|
||||||
|
}
|
||||||
|
}
|
@ -1,16 +1,20 @@
|
|||||||
package de.jottyfan.quickiemod.items;
|
package de.jottyfan.quickiemod.item;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.items.mat.QuickieToolMaterial;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.item.AxeItem;
|
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.PickaxeItem;
|
import net.minecraft.item.PickaxeItem;
|
||||||
|
import net.minecraft.item.ToolMaterial;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.registry.tag.BlockTags;
|
||||||
|
import net.minecraft.registry.tag.ItemTags;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@ -20,10 +24,10 @@ import net.minecraft.item.PickaxeItem;
|
|||||||
public class ToolSpeedpowderPickaxe extends PickaxeItem implements ToolRangeable {
|
public class ToolSpeedpowderPickaxe extends PickaxeItem implements ToolRangeable {
|
||||||
|
|
||||||
public static final int[] DEFAULT_HARVEST_RANGE = new int[] { 3, 3, 3 };
|
public static final int[] DEFAULT_HARVEST_RANGE = new int[] { 3, 3, 3 };
|
||||||
private final static QuickieToolMaterial MATERIAL = QuickieToolMaterial.of(7f, 800, 15, 1f, QuickieItems.SPEEDINGOT.getItem());
|
private final static ToolMaterial MATERIAL = new ToolMaterial(BlockTags.INCORRECT_FOR_DIAMOND_TOOL, 800, 7.0F, 1.0F, 15, ItemTags.DIAMOND_TOOL_MATERIALS);
|
||||||
|
|
||||||
public ToolSpeedpowderPickaxe() {
|
public ToolSpeedpowderPickaxe(Identifier identifier) {
|
||||||
super(MATERIAL, new Item.Settings().attributeModifiers(AxeItem.createAttributeModifiers(MATERIAL, 7F, -3.1F)));
|
super(MATERIAL, 7F, -3.1F, new Item.Settings().useItemPrefixedTranslationKey().registryKey(RegistryKey.of(RegistryKeys.ITEM, identifier)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.quickiemod.items;
|
package de.jottyfan.quickiemod.item;
|
||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
@ -14,9 +14,12 @@ import net.minecraft.item.Item;
|
|||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.Items;
|
import net.minecraft.item.Items;
|
||||||
import net.minecraft.item.ShearsItem;
|
import net.minecraft.item.ShearsItem;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
import net.minecraft.util.ActionResult;
|
import net.minecraft.util.ActionResult;
|
||||||
import net.minecraft.util.DyeColor;
|
import net.minecraft.util.DyeColor;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -26,8 +29,8 @@ import net.minecraft.util.math.Vec3d;
|
|||||||
*/
|
*/
|
||||||
public class ToolSpeedpowderShears extends ShearsItem {
|
public class ToolSpeedpowderShears extends ShearsItem {
|
||||||
|
|
||||||
public ToolSpeedpowderShears() {
|
public ToolSpeedpowderShears(Identifier identifier) {
|
||||||
super(new Item.Settings().component(DataComponentTypes.TOOL, ShearsItem.createToolComponent()));
|
super(new Item.Settings().component(DataComponentTypes.TOOL, ShearsItem.createToolComponent()).useItemPrefixedTranslationKey().registryKey(RegistryKey.of(RegistryKeys.ITEM, identifier)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
@ -1,17 +1,22 @@
|
|||||||
package de.jottyfan.quickiemod.items;
|
package de.jottyfan.quickiemod.item;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
|
|
||||||
import de.jottyfan.quickiemod.items.mat.QuickieToolMaterial;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.ItemUsageContext;
|
import net.minecraft.item.ItemUsageContext;
|
||||||
import net.minecraft.item.ShovelItem;
|
import net.minecraft.item.ShovelItem;
|
||||||
|
import net.minecraft.item.ToolMaterial;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.registry.tag.BlockTags;
|
||||||
|
import net.minecraft.registry.tag.ItemTags;
|
||||||
import net.minecraft.util.ActionResult;
|
import net.minecraft.util.ActionResult;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.Direction;
|
import net.minecraft.util.math.Direction;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
@ -23,11 +28,11 @@ import net.minecraft.world.World;
|
|||||||
*/
|
*/
|
||||||
public class ToolSpeedpowderShovel extends ShovelItem implements ToolRangeable {
|
public class ToolSpeedpowderShovel extends ShovelItem implements ToolRangeable {
|
||||||
public static final Integer DEFAULT_HARVEST_RANGE = 3;
|
public static final Integer DEFAULT_HARVEST_RANGE = 3;
|
||||||
private final static QuickieToolMaterial MATERIAL = QuickieToolMaterial.of(7f, 800, 15, 1f, QuickieItems.SPEEDINGOT.getItem());
|
private final static ToolMaterial MATERIAL = new ToolMaterial(BlockTags.INCORRECT_FOR_DIAMOND_TOOL, 800, 7f, 1f, 15, ItemTags.DIAMOND_TOOL_MATERIALS);
|
||||||
public HarvestRange range;
|
public HarvestRange range;
|
||||||
|
|
||||||
public ToolSpeedpowderShovel() {
|
public ToolSpeedpowderShovel(Identifier identifier) {
|
||||||
super(MATERIAL, new Item.Settings().attributeModifiers(ShovelItem.createAttributeModifiers(MATERIAL, 7F, -3.1F)));
|
super(MATERIAL, 7F, -3.1F, new Item.Settings().useItemPrefixedTranslationKey().registryKey(RegistryKey.of(RegistryKeys.ITEM, identifier)));
|
||||||
this.range = new HarvestRange(DEFAULT_HARVEST_RANGE);
|
this.range = new HarvestRange(DEFAULT_HARVEST_RANGE);
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package de.jottyfan.quickiemod.items;
|
package de.jottyfan.quickiemod.item;
|
||||||
|
|
||||||
import net.minecraft.block.BlockState;
|
import net.minecraft.block.BlockState;
|
||||||
import net.minecraft.block.Blocks;
|
import net.minecraft.block.Blocks;
|
||||||
@ -8,6 +8,7 @@ import net.minecraft.item.ItemStack;
|
|||||||
import net.minecraft.item.ItemUsageContext;
|
import net.minecraft.item.ItemUsageContext;
|
||||||
import net.minecraft.util.ActionResult;
|
import net.minecraft.util.ActionResult;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
@ -17,6 +18,10 @@ import net.minecraft.world.World;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ToolSpeedpowderWaterHoe extends ToolSpeedpowderHoe {
|
public class ToolSpeedpowderWaterHoe extends ToolSpeedpowderHoe {
|
||||||
|
public ToolSpeedpowderWaterHoe(Identifier identifier) {
|
||||||
|
super(identifier);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ActionResult useOnBlock(ItemUsageContext context) {
|
public ActionResult useOnBlock(ItemUsageContext context) {
|
||||||
ActionResult res = super.useOnBlock(context);
|
ActionResult res = super.useOnBlock(context);
|
||||||
@ -28,7 +33,7 @@ public class ToolSpeedpowderWaterHoe extends ToolSpeedpowderHoe {
|
|||||||
Hand hand = context.getHand();
|
Hand hand = context.getHand();
|
||||||
PlayerEntity player = context.getPlayer();
|
PlayerEntity player = context.getPlayer();
|
||||||
ItemStack oldTool = player.getStackInHand(hand);
|
ItemStack oldTool = player.getStackInHand(hand);
|
||||||
ItemStack newTool = new ItemStack(QuickieItems.SPEEDPOWDERHOE.getItem());
|
ItemStack newTool = new ItemStack(ModItems.TOOL_SPEEDPOWDERHOE);
|
||||||
newTool.setDamage(oldTool.getDamage());
|
newTool.setDamage(oldTool.getDamage());
|
||||||
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(oldBlockState.getBlock())));
|
world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(oldBlockState.getBlock())));
|
||||||
player.setStackInHand(hand, newTool);
|
player.setStackInHand(hand, newTool);
|
@ -0,0 +1,38 @@
|
|||||||
|
package de.jottyfan.quickiemod.itemgroup;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import de.jottyfan.quickiemod.Quickiemod;
|
||||||
|
import de.jottyfan.quickiemod.item.ModItems;
|
||||||
|
import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.registry.Registries;
|
||||||
|
import net.minecraft.registry.Registry;
|
||||||
|
import net.minecraft.registry.RegistryKey;
|
||||||
|
import net.minecraft.registry.RegistryKeys;
|
||||||
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author jotty
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ModItemGroup {
|
||||||
|
|
||||||
|
public static final void registerItemGroup(List<Item> items, List<Block> blocks) {
|
||||||
|
Registry.register(Registries.ITEM_GROUP,
|
||||||
|
RegistryKey.of(RegistryKeys.ITEM_GROUP, Identifier.of(Quickiemod.MOD_ID, "itemgroup")),
|
||||||
|
FabricItemGroup.builder().icon(() -> new ItemStack(ModItems.ITEM_SPEEDPOWDER))
|
||||||
|
.displayName(Text.literal(Quickiemod.MOD_ID)).entries((enabledFeatures, stacks) -> {
|
||||||
|
for (Item item : items) {
|
||||||
|
stacks.add(new ItemStack(item));
|
||||||
|
}
|
||||||
|
for (Block block : blocks) {
|
||||||
|
stacks.add(new ItemStack(block));
|
||||||
|
}
|
||||||
|
}).build());
|
||||||
|
}
|
||||||
|
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user