Compare commits
No commits in common. "master" and "1.19/rewrite" have entirely different histories.
master
...
1.19/rewri
147
.gitignore
vendored
@ -1,4 +1,18 @@
|
||||
# ---> Java
|
||||
# User-specific stuff
|
||||
.idea/
|
||||
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
|
||||
# IntelliJ
|
||||
out/
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Compiled class file
|
||||
*.class
|
||||
|
||||
@ -8,9 +22,6 @@
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.jar
|
||||
*.war
|
||||
@ -20,98 +31,88 @@
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
#Fabric
|
||||
run/
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
|
||||
# ---> JetBrains
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
*~
|
||||
|
||||
# User-specific stuff
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/**/usage.statistics.xml
|
||||
.idea/**/dictionaries
|
||||
.idea/**/shelf
|
||||
# temporary files which can be created if a process still has a handle open of a deleted file
|
||||
.fuse_hidden*
|
||||
|
||||
# AWS User-specific
|
||||
.idea/**/aws.xml
|
||||
# KDE directory preferences
|
||||
.directory
|
||||
|
||||
# Generated files
|
||||
.idea/**/contentModel.xml
|
||||
# Linux trash folder which might appear on any partition or disk
|
||||
.Trash-*
|
||||
|
||||
# Sensitive or high-churn files
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
.idea/**/dbnavigator.xml
|
||||
# .nfs files are created when an open file is removed but is still being accessed
|
||||
.nfs*
|
||||
|
||||
# Gradle
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
# General
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Gradle and Maven with auto-import
|
||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||
# since they will be recreated, and may cause churn. Uncomment if using
|
||||
# auto-import.
|
||||
# .idea/artifacts
|
||||
# .idea/compiler.xml
|
||||
# .idea/jarRepositories.xml
|
||||
# .idea/modules.xml
|
||||
# .idea/*.iml
|
||||
# .idea/modules
|
||||
# *.iml
|
||||
# *.ipr
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
# CMake
|
||||
cmake-build-*/
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Mongo Explorer plugin
|
||||
.idea/**/mongoSettings.xml
|
||||
# Files that might appear in the root of a volume
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
.com.apple.timemachine.donotpresent
|
||||
|
||||
# File-based project format
|
||||
*.iws
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
# IntelliJ
|
||||
out/
|
||||
# Windows thumbnail cache files
|
||||
Thumbs.db
|
||||
Thumbs.db:encryptable
|
||||
ehthumbs.db
|
||||
ehthumbs_vista.db
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
# Dump file
|
||||
*.stackdump
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
# Folder config file
|
||||
[Dd]esktop.ini
|
||||
|
||||
# Cursive Clojure plugin
|
||||
.idea/replstate.xml
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
# Windows Installer files
|
||||
*.cab
|
||||
*.msi
|
||||
*.msix
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# Editor-based Rest Client
|
||||
.idea/httpRequests
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
|
||||
# Android studio 3.1+ serialized cache file
|
||||
.idea/caches/build_file_checksums.ser
|
||||
|
||||
# ---> Gradle
|
||||
.gradle
|
||||
**/build/
|
||||
!src/**/build/
|
||||
build/
|
||||
|
||||
# Ignore Gradle GUI config
|
||||
gradle-app.setting
|
||||
|
||||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
|
||||
!gradle-wrapper.jar
|
||||
|
||||
# Cache of project
|
||||
.gradletasknamecache
|
||||
|
||||
**/build/
|
||||
|
||||
# Common working directory
|
||||
run/
|
||||
|
||||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
|
||||
!gradle-wrapper.jar
|
||||
|
8
.idea/.gitignore
vendored
@ -1,8 +0,0 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<bytecodeTargetLevel target="17" />
|
||||
</component>
|
||||
</project>
|
@ -1,40 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RemoteRepositoriesConfiguration">
|
||||
<remote-repository>
|
||||
<option name="id" value="central" />
|
||||
<option name="name" value="Maven Central repository" />
|
||||
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="jboss.community" />
|
||||
<option name="name" value="JBoss Community repository" />
|
||||
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="MavenRepo" />
|
||||
<option name="name" value="MavenRepo" />
|
||||
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="Fabric" />
|
||||
<option name="name" value="Fabric" />
|
||||
<option name="url" value="https://maven.fabricmc.net/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="Mojang" />
|
||||
<option name="name" value="Mojang" />
|
||||
<option name="url" value="https://libraries.minecraft.net/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="UserLocalRemappedMods" />
|
||||
<option name="name" value="UserLocalRemappedMods" />
|
||||
<option name="url" value="file:/$USER_HOME$/Minecraft%20Mods%20and%20Plugins/Fabric/VanillaPlus/.gradle/loom-cache/remapped_mods/" />
|
||||
</remote-repository>
|
||||
<remote-repository>
|
||||
<option name="id" value="UserLocalRemappedMods" />
|
||||
<option name="name" value="UserLocalRemappedMods" />
|
||||
<option name="url" value="file:/$PROJECT_DIR$/.gradle/loom-cache/remapped_mods/" />
|
||||
</remote-repository>
|
||||
</component>
|
||||
</project>
|
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="FrameworkDetectionExcludesConfiguration">
|
||||
<file type="web" url="file://$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="temurin-17" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
@ -1,12 +0,0 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Minecraft Client" type="Application" factoryName="Application">
|
||||
<option name="MAIN_CLASS_NAME" value="net.fabricmc.devlaunchinjector.Main" />
|
||||
<module name="VanillaPlus.main" />
|
||||
<option name="PROGRAM_PARAMETERS" value="" />
|
||||
<option name="VM_PARAMETERS" value="-XX:+ShowCodeDetailsInExceptionMessages -Dfabric.dli.config=F:\Java\Minecraft@@0020Mods@@0020and@@0020Plugins\Fabric\VanillaPlus\.gradle\loom-cache\launch.cfg -Dfabric.dli.env=client -Dfabric.dli.main=net.fabricmc.loader.launch.knot.KnotClient" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/run/" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
@ -1,12 +0,0 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Minecraft Server" type="Application" factoryName="Application">
|
||||
<option name="MAIN_CLASS_NAME" value="net.fabricmc.devlaunchinjector.Main" />
|
||||
<module name="VanillaPlus.main" />
|
||||
<option name="PROGRAM_PARAMETERS" value="nogui" />
|
||||
<option name="VM_PARAMETERS" value="-XX:+ShowCodeDetailsInExceptionMessages -Dfabric.dli.config=F:\Java\Minecraft@@0020Mods@@0020and@@0020Plugins\Fabric\VanillaPlus\.gradle\loom-cache\launch.cfg -Dfabric.dli.env=server -Dfabric.dli.main=net.fabricmc.loader.launch.knot.KnotServer" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/run/" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
130
LICENSE
@ -1,117 +1,21 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
Copyright (c) 2022 SteveO718, the5gi, qpcrummer
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
Preamble
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and modification follow.
|
||||
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
one line to give the program's name and an idea of what it does. Copyright (C) yyyy name of author
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
signature of Ty Coon, 1 April 1989 Ty Coon, President of Vice
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
@ -1,3 +0,0 @@
|
||||
# VanillaPlus
|
||||
|
||||
Complete rewrite of my previous attempt EverythingVanilla!
|
25
build.gradle
@ -3,9 +3,6 @@ plugins {
|
||||
id 'maven-publish'
|
||||
}
|
||||
|
||||
sourceCompatibility = JavaVersion.VERSION_17
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
archivesBaseName = project.archives_base_name
|
||||
version = project.mod_version
|
||||
group = project.maven_group
|
||||
@ -20,26 +17,35 @@ dependencies {
|
||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||
|
||||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||
}
|
||||
|
||||
loom {
|
||||
accessWidenerPath = file("src/main/resources/vplus.accesswidener")
|
||||
}
|
||||
}
|
||||
|
||||
processResources {
|
||||
inputs.property "version", project.version
|
||||
filteringCharset "UTF-8"
|
||||
|
||||
filesMatching("fabric.mod.json") {
|
||||
expand "version": project.version
|
||||
}
|
||||
}
|
||||
|
||||
//loom {
|
||||
// accessWidenerPath = file("src/main/resources/vplus.accesswidener")
|
||||
//}
|
||||
|
||||
def targetJavaVersion = 17
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
it.options.encoding = "UTF-8"
|
||||
it.options.release = 17
|
||||
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
|
||||
it.options.release = targetJavaVersion
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
|
||||
if (JavaVersion.current() < javaVersion) {
|
||||
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
|
||||
}
|
||||
archivesBaseName = project.archives_base_name
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
@ -48,4 +54,3 @@ jar {
|
||||
rename { "${it}_${project.archivesBaseName}"}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,16 +1,14 @@
|
||||
# Done to increase the memory available to gradle.
|
||||
org.gradle.jvmargs=-Xmx4G
|
||||
|
||||
# Fabric Properties
|
||||
# check these on https://fabricmc.net/versions.html
|
||||
# check these on https://modmuss50.me/fabric.html
|
||||
minecraft_version=1.19
|
||||
yarn_mappings=1.19+build.1
|
||||
loader_version=0.14.6
|
||||
|
||||
yarn_mappings=1.19+build.4
|
||||
loader_version=0.14.8
|
||||
# Mod Properties
|
||||
mod_version = 1.1.2
|
||||
maven_group = tech.nevets
|
||||
archives_base_name = vplus
|
||||
|
||||
mod_version=2.0.0
|
||||
maven_group=tech.nevets
|
||||
archives_base_name=vplus
|
||||
# Dependencies
|
||||
fabric_version=0.55.1+1.19
|
||||
# check this on https://modmuss50.me/fabric.html
|
||||
fabric_version=0.57.0+1.19
|
||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
269
gradlew
vendored
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@ -17,67 +17,101 @@
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
APP_BASE_NAME=${0##*/}
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MSYS* | MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
@ -106,80 +140,95 @@ location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
@ -1,25 +0,0 @@
|
||||
package tech.nevets.vplus;
|
||||
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import tech.nevets.vplus.armor.VPArmor;
|
||||
import tech.nevets.vplus.blocks.VPBlocks;
|
||||
import tech.nevets.vplus.food.VPFood;
|
||||
import tech.nevets.vplus.items.VPItems;
|
||||
import tech.nevets.vplus.misc.VPFuels;
|
||||
import tech.nevets.vplus.tools.VPTools;
|
||||
import tech.nevets.vplus.worldgen.features.VPOreConfiguredFeatures;
|
||||
|
||||
public class Main implements ModInitializer {
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
VPBlocks.vpBlocks();
|
||||
VPItems.vpItems();
|
||||
VPFood.vpFood();
|
||||
VPTools.vpTools();
|
||||
VPArmor.vpArmor();
|
||||
new VPOreConfiguredFeatures();
|
||||
//VPOreGen.vpOres();
|
||||
VPFuels.vpFuels();
|
||||
}
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
package tech.nevets.vplus;
|
||||
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.intprovider.IntProvider;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class VPBlocks extends Blocks {
|
||||
public static final List<Block> BLOCKS = new ArrayList<>();
|
||||
public static final Block SAPPHIRE_ORE;
|
||||
public static final Block RUBY_ORE;
|
||||
public static final Block JADE_ORE;
|
||||
|
||||
public VPBlocks() {
|
||||
}
|
||||
|
||||
static {
|
||||
SAPPHIRE_ORE = register("sapphire_ore", new OreBlock(AbstractBlock.Settings.of(Material.STONE).requiresTool().strength(3.0F, 3.0F)), VPItemGroups.ALL).getBlock();
|
||||
RUBY_ORE = register("ruby_ore", new OreBlock(AbstractBlock.Settings.of(Material.STONE).requiresTool().strength(3.0F, 3.0F)), VPItemGroups.ALL).getBlock();
|
||||
JADE_ORE = register("jade_ore", new OreBlock(AbstractBlock.Settings.of(Material.STONE).requiresTool().strength(3.0F, 3.0F)), VPItemGroups.ALL).getBlock();
|
||||
|
||||
///////////////////\\\\ITERATOR////\\\\\\\\\\\\\\\\\\\
|
||||
|
||||
for (Block block : BLOCKS) {
|
||||
for (BlockState blockState : block.getStateManager().getStates()) {
|
||||
Block.STATE_IDS.add(blockState);
|
||||
}
|
||||
block.getLootTableId();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Use blockItem.getBlock(); to get instance of the block if needed
|
||||
*/
|
||||
private static BlockItem register(String id, Block block, ItemGroup group) {
|
||||
BLOCKS.add(block);
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus", id), block);
|
||||
return Registry.register(Registry.ITEM, new Identifier("vplus", id), new BlockItem(block, new Item.Settings().group(group)));
|
||||
}
|
||||
|
||||
}
|
19
src/main/java/tech/nevets/vplus/VPProperties.java
Normal file
@ -0,0 +1,19 @@
|
||||
package tech.nevets.vplus;
|
||||
|
||||
import net.minecraft.state.property.DirectionProperty;
|
||||
import net.minecraft.state.property.EnumProperty;
|
||||
import net.minecraft.state.property.Properties;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import tech.nevets.vplus.blocks.enums.VerticalSlabType;
|
||||
|
||||
public class VPProperties extends Properties {
|
||||
public static final DirectionProperty VERTICAL_FACING;
|
||||
public static final EnumProperty<VerticalSlabType> VERTICAL_SLAB_TYPE;
|
||||
|
||||
public VPProperties() {}
|
||||
|
||||
static {
|
||||
VERTICAL_FACING = DirectionProperty.of("facing", Direction.Type.VERTICAL);
|
||||
VERTICAL_SLAB_TYPE = EnumProperty.of("type", VerticalSlabType.class);
|
||||
}
|
||||
}
|
14
src/main/java/tech/nevets/vplus/VanillaPlus.java
Normal file
@ -0,0 +1,14 @@
|
||||
package tech.nevets.vplus;
|
||||
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
import tech.nevets.vplus.blocks.VPBlocks;
|
||||
import tech.nevets.vplus.items.VPItems;
|
||||
|
||||
public class VanillaPlus implements ModInitializer {
|
||||
|
||||
@Override
|
||||
public void onInitialize() {
|
||||
VPBlocks.init();
|
||||
VPItems.init();
|
||||
}
|
||||
}
|
@ -1,76 +0,0 @@
|
||||
package tech.nevets.vplus.armor;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.entity.EquipmentSlot;
|
||||
import net.minecraft.item.ArmorMaterial;
|
||||
import net.minecraft.item.ItemConvertible;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.recipe.Ingredient;
|
||||
import net.minecraft.sound.SoundEvent;
|
||||
import net.minecraft.sound.SoundEvents;
|
||||
import net.minecraft.util.Lazy;
|
||||
import tech.nevets.vplus.items.VPItems;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public enum ArmorMaterials implements ArmorMaterial {
|
||||
COPPER("copper", 13, new int[]{2, 4, 5, 2}, 20, SoundEvents.ITEM_ARMOR_EQUIP_IRON, 0.0F, 0.0F, () -> Ingredient.ofItems(Items.COPPER_INGOT)),
|
||||
EMERALD("emerald", 30, new int[]{2, 6, 8, 2}, 30, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 1.0F, 0.0F, () -> Ingredient.ofItems(Items.EMERALD)),
|
||||
PLATINUM("platinum", 40, new int[]{6, 8, 10, 6}, 40, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 1.0F, 0.5F, () -> Ingredient.ofItems(VPItems.PLATINUMINGOT)),
|
||||
RUBY("ruby", 75, new int[]{10, 15, 20, 10}, 100, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 4.0F, 1.0F, () -> Ingredient.ofItems(VPItems.RUBY));
|
||||
|
||||
private static final int[] BASE_DURABILITY = new int[]{13, 15, 16, 11};
|
||||
private final String name;
|
||||
private final int durabilityMultiplier;
|
||||
private final int[] protectionAmounts;
|
||||
private final int enchantability;
|
||||
private final SoundEvent equipSound;
|
||||
private final float toughness;
|
||||
private final float knockbackResistance;
|
||||
private final Lazy<Ingredient> repairIngredientSupplier;
|
||||
|
||||
ArmorMaterials(String name, int durabilityMultiplier, int[] protectionAmounts, int enchantability, SoundEvent equipSound, float toughness, float knockbackResistance, Supplier<Ingredient> repairIngredientSupplier) {
|
||||
this.name = name;
|
||||
this.durabilityMultiplier = durabilityMultiplier;
|
||||
this.protectionAmounts = protectionAmounts;
|
||||
this.enchantability = enchantability;
|
||||
this.equipSound = equipSound;
|
||||
this.toughness = toughness;
|
||||
this.knockbackResistance = knockbackResistance;
|
||||
this.repairIngredientSupplier = new Lazy(repairIngredientSupplier);
|
||||
}
|
||||
|
||||
public int getDurability(EquipmentSlot slot) {
|
||||
return BASE_DURABILITY[slot.getEntitySlotId()] * this.durabilityMultiplier;
|
||||
}
|
||||
|
||||
public int getProtectionAmount(EquipmentSlot slot) {
|
||||
return this.protectionAmounts[slot.getEntitySlotId()];
|
||||
}
|
||||
|
||||
public int getEnchantability() {
|
||||
return this.enchantability;
|
||||
}
|
||||
|
||||
public SoundEvent getEquipSound() {
|
||||
return this.equipSound;
|
||||
}
|
||||
|
||||
public Ingredient getRepairIngredient() {
|
||||
return this.repairIngredientSupplier.get();
|
||||
}
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public float getToughness() {
|
||||
return this.toughness;
|
||||
}
|
||||
|
||||
public float getKnockbackResistance() {
|
||||
return this.knockbackResistance;
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package tech.nevets.vplus.armor;
|
||||
|
||||
import net.minecraft.entity.EquipmentSlot;
|
||||
import net.minecraft.item.ArmorItem;
|
||||
import net.minecraft.item.ArmorMaterial;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class BaseArmor extends ArmorItem {
|
||||
public BaseArmor(ArmorMaterial material, EquipmentSlot slot) {
|
||||
super(material, slot, new Settings().group(VPItemGroups.COMBAT));
|
||||
}
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
package tech.nevets.vplus.armor;
|
||||
|
||||
import net.minecraft.entity.EquipmentSlot;
|
||||
import net.minecraft.item.ArmorMaterial;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
||||
public class VPArmor {
|
||||
|
||||
public static final ArmorMaterial COPPER_ARMOR = ArmorMaterials.COPPER;
|
||||
public static final ArmorMaterial EMERALD_ARMOR = ArmorMaterials.EMERALD;
|
||||
public static final ArmorMaterial PLATINUM_ARMOR = ArmorMaterials.PLATINUM;
|
||||
public static final ArmorMaterial RUBY_ARMOR = ArmorMaterials.RUBY;
|
||||
|
||||
public static void vpArmor() {
|
||||
initializeHelmet();
|
||||
initializeChestplates();
|
||||
initialzeLeggings();
|
||||
initializeBoots();
|
||||
}
|
||||
|
||||
public static void initializeHelmet() {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "copper_helmet"), new BaseArmor(COPPER_ARMOR, EquipmentSlot.HEAD));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_helmet"), new BaseArmor(EMERALD_ARMOR, EquipmentSlot.HEAD));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_helmet"), new BaseArmor(PLATINUM_ARMOR, EquipmentSlot.HEAD));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_helmet"), new BaseArmor(RUBY_ARMOR, EquipmentSlot.HEAD));
|
||||
}
|
||||
|
||||
public static void initializeChestplates() {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "copper_chestplate"), new BaseArmor(COPPER_ARMOR, EquipmentSlot.CHEST));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_chestplate"), new BaseArmor(EMERALD_ARMOR, EquipmentSlot.CHEST));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_chestplate"), new BaseArmor(PLATINUM_ARMOR, EquipmentSlot.CHEST));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_chestplate"), new BaseArmor(RUBY_ARMOR, EquipmentSlot.CHEST));
|
||||
}
|
||||
|
||||
public static void initialzeLeggings() {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "copper_leggings"), new BaseArmor(COPPER_ARMOR, EquipmentSlot.LEGS));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_leggings"), new BaseArmor(EMERALD_ARMOR, EquipmentSlot.LEGS));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_leggings"), new BaseArmor(PLATINUM_ARMOR, EquipmentSlot.LEGS));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_leggings"), new BaseArmor(RUBY_ARMOR, EquipmentSlot.LEGS));
|
||||
}
|
||||
|
||||
public static void initializeBoots() {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "copper_boots"), new BaseArmor(COPPER_ARMOR, EquipmentSlot.FEET));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_boots"), new BaseArmor(EMERALD_ARMOR, EquipmentSlot.FEET));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_boots"), new BaseArmor(PLATINUM_ARMOR, EquipmentSlot.FEET));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_boots"), new BaseArmor(RUBY_ARMOR, EquipmentSlot.FEET));
|
||||
}
|
||||
}
|
@ -1,46 +0,0 @@
|
||||
package tech.nevets.vplus.blocks;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.particle.ParticleEffect;
|
||||
import net.minecraft.particle.ParticleTypes;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.shape.VoxelShape;
|
||||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldAccess;
|
||||
import net.minecraft.world.WorldView;
|
||||
|
||||
public class ColorTorchBlock extends Block {
|
||||
protected static final int field_31265 = 2;
|
||||
protected static final VoxelShape BOUNDING_SHAPE = Block.createCuboidShape(6.0D, 0.0D, 6.0D, 10.0D, 10.0D, 10.0D);
|
||||
protected final ParticleEffect particle;
|
||||
|
||||
|
||||
public ColorTorchBlock(Settings settings, ParticleEffect particle) {
|
||||
super(settings);
|
||||
this.particle = particle;
|
||||
}
|
||||
|
||||
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) {
|
||||
return BOUNDING_SHAPE;
|
||||
}
|
||||
|
||||
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) {
|
||||
return direction == Direction.DOWN && !this.canPlaceAt(state, world, pos) ? Blocks.AIR.getDefaultState() : super.getStateForNeighborUpdate(state, direction, neighborState, world, pos, neighborPos);
|
||||
}
|
||||
|
||||
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
|
||||
return sideCoversSmallSquare(world, pos.down(), Direction.UP);
|
||||
}
|
||||
|
||||
public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random) {
|
||||
double d = (double) pos.getX() + 0.5D;
|
||||
double e = (double) pos.getY() + 0.7D;
|
||||
double f = (double) pos.getZ() + 0.5D;
|
||||
world.addParticle(ParticleTypes.SMOKE, d, e, f, 0.0D, 0.0D, 0.0D);
|
||||
world.addParticle(this.particle, d, e, f, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
}
|
@ -1,109 +0,0 @@
|
||||
package tech.nevets.vplus.blocks;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.Maps;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.item.ItemPlacementContext;
|
||||
import net.minecraft.particle.ParticleEffect;
|
||||
import net.minecraft.particle.ParticleTypes;
|
||||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.state.property.DirectionProperty;
|
||||
import net.minecraft.util.BlockMirror;
|
||||
import net.minecraft.util.BlockRotation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.shape.VoxelShape;
|
||||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldAccess;
|
||||
import net.minecraft.world.WorldView;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
public class ColorWallTorchBlock extends TorchBlock {
|
||||
public static final DirectionProperty FACING;
|
||||
protected static final float field_31285 = 2.5F;
|
||||
private static final Map<Direction, VoxelShape> BOUNDING_SHAPES;
|
||||
|
||||
protected ColorWallTorchBlock(Settings settings, ParticleEffect particleEffect) {
|
||||
super(settings, particleEffect);
|
||||
this.setDefaultState(this.stateManager.getDefaultState().with(FACING, Direction.NORTH));
|
||||
}
|
||||
|
||||
public String getTranslationKey() {
|
||||
return this.asItem().getTranslationKey();
|
||||
}
|
||||
|
||||
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) {
|
||||
return getBoundingShape(state);
|
||||
}
|
||||
|
||||
public static VoxelShape getBoundingShape(BlockState state) {
|
||||
return BOUNDING_SHAPES.get(state.get(FACING));
|
||||
}
|
||||
|
||||
public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
|
||||
Direction direction = state.get(FACING);
|
||||
BlockPos blockPos = pos.offset(direction.getOpposite());
|
||||
BlockState blockState = world.getBlockState(blockPos);
|
||||
return blockState.isSideSolidFullSquare(world, blockPos, direction);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public BlockState getPlacementState(ItemPlacementContext ctx) {
|
||||
BlockState blockState = this.getDefaultState();
|
||||
WorldView worldView = ctx.getWorld();
|
||||
BlockPos blockPos = ctx.getBlockPos();
|
||||
Direction[] directions = ctx.getPlacementDirections();
|
||||
Direction[] var6 = directions;
|
||||
int var7 = directions.length;
|
||||
|
||||
for(int var8 = 0; var8 < var7; ++var8) {
|
||||
Direction direction = var6[var8];
|
||||
if (direction.getAxis().isHorizontal()) {
|
||||
Direction direction2 = direction.getOpposite();
|
||||
blockState = blockState.with(FACING, direction2);
|
||||
if (blockState.canPlaceAt(worldView, blockPos)) {
|
||||
return blockState;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) {
|
||||
return direction.getOpposite() == state.get(FACING) && !state.canPlaceAt(world, pos) ? Blocks.AIR.getDefaultState() : state;
|
||||
}
|
||||
|
||||
public void randomDisplayTick(BlockState state, World world, BlockPos pos, Random random) {
|
||||
Direction direction = state.get(FACING);
|
||||
double d = (double)pos.getX() + 0.5D;
|
||||
double e = (double)pos.getY() + 0.7D;
|
||||
double f = (double)pos.getZ() + 0.5D;
|
||||
double g = 0.22D;
|
||||
double h = 0.27D;
|
||||
Direction direction2 = direction.getOpposite();
|
||||
world.addParticle(ParticleTypes.SMOKE, d + 0.27D * (double)direction2.getOffsetX(), e + 0.22D, f + 0.27D * (double)direction2.getOffsetZ(), 0.0D, 0.0D, 0.0D);
|
||||
world.addParticle(this.particle, d + 0.27D * (double)direction2.getOffsetX(), e + 0.22D, f + 0.27D * (double)direction2.getOffsetZ(), 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
|
||||
public BlockState rotate(BlockState state, BlockRotation rotation) {
|
||||
return state.with(FACING, rotation.rotate(state.get(FACING)));
|
||||
}
|
||||
|
||||
public BlockState mirror(BlockState state, BlockMirror mirror) {
|
||||
return state.rotate(mirror.getRotation(state.get(FACING)));
|
||||
}
|
||||
|
||||
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
|
||||
builder.add(FACING);
|
||||
}
|
||||
|
||||
static {
|
||||
FACING = HorizontalFacingBlock.FACING;
|
||||
BOUNDING_SHAPES = Maps.newEnumMap(ImmutableMap.of(Direction.NORTH, Block.createCuboidShape(5.5D, 3.0D, 11.0D, 10.5D, 13.0D, 16.0D), Direction.SOUTH, Block.createCuboidShape(5.5D, 3.0D, 0.0D, 10.5D, 13.0D, 5.0D), Direction.WEST, Block.createCuboidShape(11.0D, 3.0D, 5.5D, 16.0D, 13.0D, 10.5D), Direction.EAST, Block.createCuboidShape(0.0D, 3.0D, 5.5D, 5.0D, 13.0D, 10.5D)));
|
||||
}
|
||||
}
|
@ -1,10 +1,8 @@
|
||||
package tech.nevets.vplus.blocks;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.fluid.FluidState;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.tag.FluidTags;
|
||||
import net.minecraft.util.Pair;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@ -14,10 +12,8 @@ import net.minecraft.world.World;
|
||||
import java.util.Queue;
|
||||
|
||||
public class LavaSpongeBlock extends Block {
|
||||
|
||||
|
||||
public LavaSpongeBlock() {
|
||||
super(FabricBlockSettings.of(Material.STONE).strength(0.6F).sounds(BlockSoundGroup.BASALT));
|
||||
super(AbstractBlock.Settings.of(Material.STONE).requiresTool().strength(1.5F, 1.5F));
|
||||
}
|
||||
|
||||
public void onBlockAdded(BlockState state, World world, BlockPos pos, BlockState oldState, boolean notify) {
|
||||
@ -26,17 +22,16 @@ public class LavaSpongeBlock extends Block {
|
||||
}
|
||||
}
|
||||
|
||||
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos fromPos, boolean notify) {
|
||||
public void neighborUpdate(BlockState state, World world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) {
|
||||
this.update(world, pos);
|
||||
super.neighborUpdate(state, world, pos, block, fromPos, notify);
|
||||
super.neighborUpdate(state, world, pos, sourceBlock, sourcePos, notify);
|
||||
}
|
||||
|
||||
protected void update(World world, BlockPos pos) {
|
||||
if (this.absorbLava(world, pos)) {
|
||||
world.setBlockState(pos, VPBlocks.SATURATEDLAVASPONGEBLOCK.getDefaultState(), 2);
|
||||
world.syncWorldEvent(2001, pos, Block.getRawIdFromState(Blocks.LAVA.getDefaultState()));
|
||||
world.setBlockState(pos, VPBlocks.SATURATED_LAVA_SPONGE_BLOCK.getDefaultState(), 2);
|
||||
world.syncWorldEvent(2001, pos, Block.getRawIdFromState(Blocks.WATER.getDefaultState()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private boolean absorbLava(World world, BlockPos pos) {
|
||||
@ -45,20 +40,17 @@ public class LavaSpongeBlock extends Block {
|
||||
int i = 0;
|
||||
|
||||
while(!queue.isEmpty()) {
|
||||
Pair pair = queue.poll();
|
||||
BlockPos blockPos = (BlockPos)pair.getLeft();
|
||||
int j = (Integer)pair.getRight();
|
||||
Direction[] var8 = Direction.values();
|
||||
int var9 = var8.length;
|
||||
Pair<BlockPos, Integer> pair = queue.poll();
|
||||
BlockPos blockPos = pair.getLeft();
|
||||
int j = pair.getRight();
|
||||
Direction[] directions = Direction.values();
|
||||
|
||||
for(int var10 = 0; var10 < var9; ++var10) {
|
||||
Direction direction = var8[var10];
|
||||
for (Direction direction : directions) {
|
||||
BlockPos blockPos2 = blockPos.offset(direction);
|
||||
BlockState blockState = world.getBlockState(blockPos2);
|
||||
FluidState fluidState = world.getFluidState(blockPos2);
|
||||
Material material = blockState.getMaterial();
|
||||
if (fluidState.isIn(FluidTags.LAVA)) {
|
||||
if (blockState.getBlock() instanceof FluidDrainable && !((FluidDrainable)blockState.getBlock()).tryDrainFluid(world, blockPos2, blockState).isEmpty()) {
|
||||
if (blockState.getBlock() instanceof FluidDrainable && !((FluidDrainable) blockState.getBlock()).tryDrainFluid(world, blockPos2, blockState).isEmpty()) {
|
||||
++i;
|
||||
if (j < 6) {
|
||||
queue.add(new Pair(blockPos2, j + 1));
|
||||
@ -72,10 +64,12 @@ public class LavaSpongeBlock extends Block {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (i > 64) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return i > 0;
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package tech.nevets.vplus.blocks;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
|
||||
//TODO Change platinum to saphire
|
||||
public class PlatinumBlock extends Block {
|
||||
public PlatinumBlock() {
|
||||
super(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.METAL).strength(30, 1000f));
|
||||
}
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
package tech.nevets.vplus.blocks;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.enchantment.Enchantments;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.random.Random;
|
||||
|
||||
public class PlatinumOre extends Block {
|
||||
public PlatinumOre() {
|
||||
super(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).strength(3, 1500f));
|
||||
}
|
||||
protected int getExperienceWhenMined(Random random) {
|
||||
return MathHelper.nextInt(random, 3, 7);
|
||||
}
|
||||
|
||||
/*
|
||||
public void onStacksDropped(BlockState state, ServerWorld world, BlockPos pos, ItemStack stack) {
|
||||
super.onStacksDropped(state, world, pos, stack);
|
||||
if (EnchantmentHelper.getLevel(Enchantments.SILK_TOUCH, stack) == 0) {
|
||||
int i = this.getExperienceWhenMined(world.random);
|
||||
if (i > 0) {
|
||||
this.dropExperience(world, pos, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package tech.nevets.vplus.blocks;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
|
||||
public class RubyBlock extends Block {
|
||||
public RubyBlock() {
|
||||
super(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.METAL).strength(5, 6.0f));
|
||||
}
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
package tech.nevets.vplus.blocks;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.enchantment.Enchantments;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.server.world.ServerWorld;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.random.Random;
|
||||
|
||||
public class RubyOre extends Block {
|
||||
public RubyOre() {
|
||||
super(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).strength(3, 1500f));
|
||||
}
|
||||
protected int getExperienceWhenMined(Random random) {
|
||||
return MathHelper.nextInt(random, 3, 7);
|
||||
}
|
||||
|
||||
/*
|
||||
public void onStacksDropped(BlockState state, ServerWorld world, BlockPos pos, ItemStack stack) {
|
||||
super.onStacksDropped(state, world, pos, stack);
|
||||
if (EnchantmentHelper.getLevel(Enchantments.SILK_TOUCH, stack) == 0) {
|
||||
int i = this.getExperienceWhenMined(world.random);
|
||||
if (i > 0) {
|
||||
this.dropExperience(world, pos, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
@ -2,12 +2,11 @@ package tech.nevets.vplus.blocks;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.AbstractBlock;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.particle.ParticleTypes;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.random.Random;
|
||||
@ -16,7 +15,7 @@ import net.minecraft.world.World;
|
||||
public class SaturatedLavaSpongeBlock extends Block {
|
||||
|
||||
public SaturatedLavaSpongeBlock() {
|
||||
super(FabricBlockSettings.of(Material.STONE).strength(0.6F).sounds(BlockSoundGroup.BASALT));
|
||||
super(AbstractBlock.Settings.of(Material.STONE).requiresTool().strength(1.5F, 1.5F));
|
||||
}
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
@ -26,9 +25,9 @@ public class SaturatedLavaSpongeBlock extends Block {
|
||||
BlockPos blockPos = pos.offset(direction);
|
||||
BlockState blockState = world.getBlockState(blockPos);
|
||||
if (!state.isOpaque() || !blockState.isSideSolidFullSquare(world, blockPos, direction.getOpposite())) {
|
||||
double d = (double)pos.getX();
|
||||
double e = (double)pos.getY();
|
||||
double f = (double)pos.getZ();
|
||||
double d = pos.getX();
|
||||
double e = pos.getY();
|
||||
double f = pos.getZ();
|
||||
if (direction == Direction.DOWN) {
|
||||
e -= 0.05D;
|
||||
d += random.nextDouble();
|
||||
@ -56,5 +55,4 @@ public class SaturatedLavaSpongeBlock extends Block {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,50 +1,152 @@
|
||||
package tech.nevets.vplus.blocks;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.particle.ParticleTypes;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class VPBlocks {
|
||||
public static final List<Block> BLOCKS = new ArrayList<>();
|
||||
|
||||
public static final Block LAVASPONGEBLOCK = new LavaSpongeBlock();
|
||||
public static final Block SATURATEDLAVASPONGEBLOCK = new SaturatedLavaSpongeBlock();
|
||||
public static final Block PLATINUMORE = new PlatinumOre();
|
||||
public static final Block PLATINUMBLOCK = new PlatinumBlock();
|
||||
public static final Block RUBYBLOCK = new RubyBlock();
|
||||
public static final Block RUBYORE = new RubyOre();
|
||||
public static final Block SAPPHIRE_ORE;
|
||||
public static final Block RUBY_ORE;
|
||||
public static final Block JADE_ORE;
|
||||
public static final Block SAPPHIRE_BLOCK;
|
||||
public static final Block RUBY_BLOCK;
|
||||
public static final Block JADE_BLOCK;
|
||||
public static final Block LAVA_SPONGE_BLOCK;
|
||||
public static final Block SATURATED_LAVA_SPONGE_BLOCK;
|
||||
|
||||
public static void vpBlocks() {
|
||||
initializeBlocks();
|
||||
initializeBlockItems();
|
||||
initializeTorches();
|
||||
VPVerticalSlabs.vpVerticalSlabs();
|
||||
// Vertical Slabs
|
||||
public static final Block VERTICAL_OAK_SLAB;
|
||||
public static final Block VERTICAL_SPRUCE_SLAB;
|
||||
public static final Block VERTICAL_BIRCH_SLAB;
|
||||
public static final Block VERTICAL_JUNGLE_SLAB;
|
||||
public static final Block VERTICAL_ACACIA_SLAB;
|
||||
public static final Block VERTICAL_DARK_OAK_SLAB;
|
||||
public static final Block VERTICAL_CRIMSON_SLAB;
|
||||
public static final Block VERTICAL_WARPED_SLAB;
|
||||
public static final Block VERTICAL_STONE_SLAB;
|
||||
public static final Block VERTICAL_SMOOTH_STONE_SLAB;
|
||||
public static final Block VERTICAL_SANDSTONE_SLAB;
|
||||
public static final Block VERTICAL_CUT_SANDSTONE_SLAB;
|
||||
public static final Block VERTICAL_COBBLESTONE_SLAB;
|
||||
public static final Block VERTICAL_BRICK_SLAB;
|
||||
public static final Block VERTICAL_STONE_BRICK_SLAB;
|
||||
public static final Block VERTICAL_NETHER_BRICK_SLAB;
|
||||
public static final Block VERTICAL_QUARTZ_SLAB;
|
||||
public static final Block VERTICAL_RED_SANDSTONE_SLAB;
|
||||
public static final Block VERTICAL_CUT_RED_SANDSTONE_SLAB;
|
||||
public static final Block VERTICAL_PURPUR_SLAB;
|
||||
public static final Block VERTICAL_PRISMARINE_SLAB;
|
||||
public static final Block VERTICAL_PRISMARINE_BRICK_SLAB;
|
||||
public static final Block VERTICAL_DARK_PRISMARINE_SLAB;
|
||||
public static final Block VERTICAL_POLISHED_GRANITE_SLAB;
|
||||
public static final Block VERTICAL_SMOOTH_RED_SANDSTONE_SLAB;
|
||||
public static final Block VERTICAL_MOSSY_STONE_BRICK_SLAB;
|
||||
public static final Block VERTICAL_POLISHED_DIORITE_SLAB;
|
||||
public static final Block VERTICAL_MOSSY_COBBLESTONE_SLAB;
|
||||
public static final Block VERTICAL_END_STONE_BRICK_SLAB;
|
||||
public static final Block VERTICAL_SMOOTH_SANDSTONE_SLAB;
|
||||
public static final Block VERTICAL_SMOOTH_QUARTZ_SLAB;
|
||||
public static final Block VERTICAL_GRANITE_SLAB;
|
||||
public static final Block VERTICAL_ANDESITE_SLAB;
|
||||
public static final Block VERTICAL_RED_NETHER_BRICK_SLAB;
|
||||
public static final Block VERTICAL_POLISHED_ANDESITE_SLAB;
|
||||
public static final Block VERTICAL_DIORITE_SLAB;
|
||||
public static final Block VERTICAL_BLACKSTONE_SLAB;
|
||||
public static final Block VERTICAL_POLISHED_BLACKSTONE_SLAB;
|
||||
public static final Block VERTICAL_POLISHED_BLACKSTONE_BRICK_SLAB;
|
||||
|
||||
public VPBlocks() {
|
||||
}
|
||||
|
||||
public static void initializeBlocks() {
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus", "lava_sponge"), LAVASPONGEBLOCK);
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus", "saturated_lava_sponge"), SATURATEDLAVASPONGEBLOCK);
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus", "platinum_ore"), PLATINUMORE);
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus", "platinum_block"), PLATINUMBLOCK);
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus", "ruby_block"), RUBYBLOCK);
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus", "ruby_ore"), RUBYORE);
|
||||
static {
|
||||
SAPPHIRE_ORE = register("sapphire_ore", new OreBlock(AbstractBlock.Settings.of(Material.STONE).requiresTool().strength(3.0F, 3.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
RUBY_ORE = register("ruby_ore", new OreBlock(AbstractBlock.Settings.of(Material.STONE).requiresTool().strength(3.0F, 3.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
JADE_ORE = register("jade_ore", new OreBlock(AbstractBlock.Settings.of(Material.STONE).requiresTool().strength(3.0F, 3.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
SAPPHIRE_BLOCK = register("sapphire_block", new Block(AbstractBlock.Settings.of(Material.METAL).requiresTool().strength(3.0F, 3.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
RUBY_BLOCK = register("ruby_block", new Block(AbstractBlock.Settings.of(Material.METAL).requiresTool().strength(3.0F, 3.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
JADE_BLOCK = register("jade_block", new Block(AbstractBlock.Settings.of(Material.METAL).requiresTool().strength(3.0F, 3.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
LAVA_SPONGE_BLOCK = register("lava_sponge", new LavaSpongeBlock(), VPItemGroups.BLOCKS).getBlock();
|
||||
SATURATED_LAVA_SPONGE_BLOCK = register("saturated_lava_sponge", new SaturatedLavaSpongeBlock(), VPItemGroups.BLOCKS, new Item.Settings().recipeRemainder(Item.fromBlock(LAVA_SPONGE_BLOCK))).getBlock();
|
||||
|
||||
// Vertical Slabs
|
||||
//TODO add new 1.17 blocks
|
||||
//TODO add new 1.18 blocks
|
||||
//TODO add new 1.19 blocks
|
||||
VERTICAL_OAK_SLAB = register("vertical_oak_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_SPRUCE_SLAB = register("vertical_spruce_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_BIRCH_SLAB = register("vertical_birch_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_JUNGLE_SLAB = register("vertical_jungle_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_ACACIA_SLAB = register("vertical_acacia_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_DARK_OAK_SLAB = register("vertical_dark_oak_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_CRIMSON_SLAB = register("vertical_crimson_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_WARPED_SLAB = register("vertical_warped_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_STONE_SLAB = register("vertical_stone_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_SMOOTH_STONE_SLAB = register("vertical_smooth_stone_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_SANDSTONE_SLAB = register("vertical_sandstone_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_CUT_SANDSTONE_SLAB = register("vertical_cut_sandstone_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_COBBLESTONE_SLAB = register("vertical_cobblestone_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_BRICK_SLAB = register("vertical_brick_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_STONE_BRICK_SLAB = register("vertical_stone_brick_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_NETHER_BRICK_SLAB = register("vertical_nether_brick_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_QUARTZ_SLAB = register("vertical_quartz_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_RED_SANDSTONE_SLAB = register("vertical_red_sandstone_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_CUT_RED_SANDSTONE_SLAB = register("vertical_cut_red_sandstone_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_PURPUR_SLAB = register("vertical_purpur_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_PRISMARINE_SLAB = register("vertical_prismarine_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_PRISMARINE_BRICK_SLAB = register("vertical_prismarine_brick_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_DARK_PRISMARINE_SLAB = register("vertical_dark_prismarine_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_POLISHED_GRANITE_SLAB = register("vertical_polished_granite_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_SMOOTH_RED_SANDSTONE_SLAB = register("vertical_smooth_red_sandstone_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_MOSSY_STONE_BRICK_SLAB = register("vertical_mossy_stone_brick_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_POLISHED_DIORITE_SLAB = register("vertical_polished_diorite_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_MOSSY_COBBLESTONE_SLAB = register("vertical_mossy_cobblestone_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_END_STONE_BRICK_SLAB = register("vertical_end_stone_brick_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_SMOOTH_SANDSTONE_SLAB = register("vertical_smooth_sandstone_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_SMOOTH_QUARTZ_SLAB = register("vertical_smooth_quartz_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_GRANITE_SLAB = register("vertical_granite_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_ANDESITE_SLAB = register("vertical_andesite_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_RED_NETHER_BRICK_SLAB = register("vertical_red_nether_brick_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_POLISHED_ANDESITE_SLAB = register("vertical_polished_andesite_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_DIORITE_SLAB = register("vertical_diorite_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_BLACKSTONE_SLAB = register("vertical_blackstone_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_POLISHED_BLACKSTONE_SLAB = register("vertical_polished_blackstone_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
VERTICAL_POLISHED_BLACKSTONE_BRICK_SLAB = register("vertical_polished_blackstone_brick_slab", new VerticalSlabBlock(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F)), VPItemGroups.BLOCKS).getBlock();
|
||||
|
||||
///////////////////\\\\ITERATOR////\\\\\\\\\\\\\\\\\\\
|
||||
|
||||
for (Block block : BLOCKS) {
|
||||
for (BlockState blockState : block.getStateManager().getStates()) {
|
||||
Block.STATE_IDS.add(blockState);
|
||||
}
|
||||
block.getLootTableId();
|
||||
}
|
||||
}
|
||||
|
||||
public static void initializeBlockItems() {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "lava_sponge"), new BlockItem(LAVASPONGEBLOCK, new Item.Settings().group(VPItemGroups.ALL)));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "saturated_lava_sponge"), new BlockItem(SATURATEDLAVASPONGEBLOCK, new Item.Settings().group(VPItemGroups.ALL).recipeRemainder(Item.fromBlock(VPBlocks.LAVASPONGEBLOCK))));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_ore"), new BlockItem(PLATINUMORE, new Item.Settings().group(VPItemGroups.ALL)));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_block"), new BlockItem(PLATINUMBLOCK, new Item.Settings().group(VPItemGroups.ALL)));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_block"), new BlockItem(RUBYBLOCK, new Item.Settings().group(VPItemGroups.ALL)));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_ore"), new BlockItem(RUBYORE, new Item.Settings().group(VPItemGroups.ALL)));
|
||||
/*
|
||||
Use blockItem.getBlock(); to get instance of the block if needed
|
||||
*/
|
||||
private static BlockItem register(String id, Block block, ItemGroup group) {
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus", id), block);
|
||||
BLOCKS.add(block);
|
||||
return Registry.register(Registry.ITEM, new Identifier("vplus", id), new BlockItem(block, new Item.Settings().group(group)));
|
||||
}
|
||||
|
||||
public static void initializeTorches() {
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus", "green_torch"), new ColorTorchBlock(AbstractBlock.Settings.of(Material.DECORATION).noCollision().breakInstantly().luminance((state) -> 14).sounds(BlockSoundGroup.WOOD), ParticleTypes.FLAME));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus", "green_wall_torch"), new ColorWallTorchBlock(AbstractBlock.Settings.of(Material.DECORATION).noCollision().breakInstantly().luminance((state) -> 14).sounds(BlockSoundGroup.WOOD).dropsLike(Blocks.TORCH), ParticleTypes.FLAME));
|
||||
private static BlockItem register(String id, Block block, ItemGroup group, Item.Settings itemSettings) {
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus", id), block);
|
||||
BLOCKS.add(block);
|
||||
return Registry.register(Registry.ITEM, new Identifier("vplus", id), new BlockItem(block, itemSettings.group(group)));
|
||||
}
|
||||
|
||||
public static void init() {}
|
||||
}
|
||||
|
@ -1,181 +0,0 @@
|
||||
package tech.nevets.vplus.blocks;
|
||||
|
||||
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.sound.BlockSoundGroup;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class VPVerticalSlabs {
|
||||
|
||||
//TODO add new 1.17 blocks
|
||||
//TODO add new 1.18 blocks
|
||||
//TODO add new 1.19 blocks
|
||||
|
||||
public static final Block VERTICAL_OAK_SLAB;
|
||||
public static final Block VERTICAL_SPRUCE_SLAB;
|
||||
public static final Block VERTICAL_BIRCH_SLAB;
|
||||
public static final Block VERTICAL_JUNGLE_SLAB;
|
||||
public static final Block VERTICAL_ACACIA_SLAB;
|
||||
public static final Block VERTICAL_DARK_OAK_SLAB;
|
||||
public static final Block VERTICAL_CRIMSON_SLAB;
|
||||
public static final Block VERTICAL_WARPED_SLAB;
|
||||
public static final Block VERTICAL_STONE_SLAB;
|
||||
public static final Block VERTICAL_SMOOTH_STONE_SLAB;
|
||||
public static final Block VERTICAL_SANDSTONE_SLAB;
|
||||
public static final Block VERTICAL_CUT_SANDSTONE_SLAB;
|
||||
public static final Block VERTICAL_COBBLESTONE_SLAB;
|
||||
public static final Block VERTICAL_BRICK_SLAB;
|
||||
public static final Block VERTICAL_STONE_BRICK_SLAB;
|
||||
public static final Block VERTICAL_NETHER_BRICK_SLAB;
|
||||
public static final Block VERTICAL_QUARTZ_SLAB;
|
||||
public static final Block VERTICAL_RED_SANDSTONE_SLAB;
|
||||
public static final Block VERTICAL_CUT_RED_SANDSTONE_SLAB;
|
||||
public static final Block VERTICAL_PURPUR_SLAB;
|
||||
public static final Block VERTICAL_PRISMARINE_SLAB;
|
||||
public static final Block VERTICAL_PRISMARINE_BRICK_SLAB;
|
||||
public static final Block VERTICAL_DARK_PRISMARINE_SLAB;
|
||||
public static final Block VERTICAL_POLISHED_GRANITE_SLAB;
|
||||
public static final Block VERTICAL_SMOOTH_RED_SANDSTONE_SLAB;
|
||||
public static final Block VERTICAL_MOSSY_STONE_BRICK_SLAB;
|
||||
public static final Block VERTICAL_POLISHED_DIORITE_SLAB;
|
||||
public static final Block VERTICAL_MOSSY_COBBLESTONE_SLAB;
|
||||
public static final Block VERTICAL_END_STONE_BRICK_SLAB;
|
||||
public static final Block VERTICAL_SMOOTH_SANDSTONE_SLAB;
|
||||
public static final Block VERTICAL_SMOOTH_QUARTZ_SLAB;
|
||||
public static final Block VERTICAL_GRANITE_SLAB;
|
||||
public static final Block VERTICAL_ANDESITE_SLAB;
|
||||
public static final Block VERTICAL_RED_NETHER_BRICK_SLAB;
|
||||
public static final Block VERTICAL_POLISHED_ANDESITE_SLAB;
|
||||
public static final Block VERTICAL_DIORITE_SLAB;
|
||||
public static final Block VERTICAL_BLACKSTONE_SLAB;
|
||||
public static final Block VERTICAL_POLISHED_BLACKSTONE_SLAB;
|
||||
public static final Block VERTICAL_POLISHED_BLACKSTONE_BRICK_SLAB;
|
||||
|
||||
public static void vpVerticalSlabs() {
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_oak_slab"), VERTICAL_OAK_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_oak_slab"), new BlockItem(VERTICAL_OAK_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_spruce_slab"), VERTICAL_SPRUCE_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_spruce_slab"), new BlockItem(VERTICAL_SPRUCE_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_birch_slab"), VERTICAL_BIRCH_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_birch_slab"), new BlockItem(VERTICAL_BIRCH_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_jungle_slab"), VERTICAL_JUNGLE_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_jungle_slab"), new BlockItem(VERTICAL_JUNGLE_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_acacia_slab"), VERTICAL_ACACIA_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_acacia_slab"), new BlockItem(VERTICAL_ACACIA_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_dark_oak_slab"), VERTICAL_DARK_OAK_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_dark_oak_slab"), new BlockItem(VERTICAL_DARK_OAK_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_crimson_slab"), VERTICAL_CRIMSON_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_crimson_slab"), new BlockItem(VERTICAL_CRIMSON_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_warped_slab"), VERTICAL_WARPED_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_warped_slab"), new BlockItem(VERTICAL_WARPED_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_stone_slab"), VERTICAL_STONE_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_stone_slab"), new BlockItem(VERTICAL_STONE_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_smooth_stone_slab"), VERTICAL_SMOOTH_STONE_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_smooth_stone_slab"), new BlockItem(VERTICAL_SMOOTH_STONE_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_sandstone_slab"), VERTICAL_SANDSTONE_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_sandstone_slab"), new BlockItem(VERTICAL_SANDSTONE_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_cut_sandstone_slab"), VERTICAL_CUT_SANDSTONE_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_cut_sandstone_slab"), new BlockItem(VERTICAL_CUT_SANDSTONE_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_cobblestone_slab"), VERTICAL_COBBLESTONE_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_cobblestone_slab"), new BlockItem(VERTICAL_COBBLESTONE_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_brick_slab"), VERTICAL_BRICK_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_brick_slab"), new BlockItem(VERTICAL_BRICK_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_stone_brick_slab"), VERTICAL_STONE_BRICK_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_stone_brick_slab"), new BlockItem(VERTICAL_STONE_BRICK_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_nether_brick_slab"), VERTICAL_NETHER_BRICK_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_nether_brick_slab"), new BlockItem(VERTICAL_NETHER_BRICK_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_quartz_slab"), VERTICAL_QUARTZ_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_quartz_slab"), new BlockItem(VERTICAL_QUARTZ_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_red_sandstone_slab"), VERTICAL_RED_SANDSTONE_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_red_sandstone_slab"), new BlockItem(VERTICAL_RED_SANDSTONE_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_cut_red_sandstone_slab"), VERTICAL_CUT_RED_SANDSTONE_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_cut_red_sandstone_slab"), new BlockItem(VERTICAL_CUT_RED_SANDSTONE_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_purpur_slab"), VERTICAL_PURPUR_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_purpur_slab"), new BlockItem(VERTICAL_PURPUR_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_prismarine_slab"), VERTICAL_PRISMARINE_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_prismarine_slab"), new BlockItem(VERTICAL_PRISMARINE_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_prismarine_brick_slab"), VERTICAL_PRISMARINE_BRICK_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_prismarine_brick_slab"), new BlockItem(VERTICAL_PRISMARINE_BRICK_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_dark_prismarine_slab"), VERTICAL_DARK_PRISMARINE_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_dark_prismarine_slab"), new BlockItem(VERTICAL_DARK_PRISMARINE_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_polished_granite_slab"), VERTICAL_POLISHED_GRANITE_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_polished_granite_slab"), new BlockItem(VERTICAL_POLISHED_GRANITE_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_smooth_red_sandstone_slab"), VERTICAL_SMOOTH_RED_SANDSTONE_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_smooth_red_sandstone_slab"), new BlockItem(VERTICAL_SMOOTH_RED_SANDSTONE_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_mossy_stone_brick_slab"), VERTICAL_MOSSY_STONE_BRICK_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_mossy_stone_brick_slab"), new BlockItem(VERTICAL_MOSSY_STONE_BRICK_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_polished_diorite_slab"), VERTICAL_POLISHED_DIORITE_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_polished_diorite_slab"), new BlockItem(VERTICAL_POLISHED_DIORITE_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_mossy_cobblestone_slab"), VERTICAL_MOSSY_COBBLESTONE_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_mossy_cobblestone_slab"), new BlockItem(VERTICAL_MOSSY_COBBLESTONE_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_end_stone_brick_slab"), VERTICAL_END_STONE_BRICK_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_end_stone_brick_slab"), new BlockItem(VERTICAL_END_STONE_BRICK_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_smooth_sandstone_slab"), VERTICAL_SMOOTH_SANDSTONE_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_smooth_sandstone_slab"), new BlockItem(VERTICAL_SMOOTH_SANDSTONE_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_smooth_quartz_slab"), VERTICAL_SMOOTH_QUARTZ_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_smooth_quartz_slab"), new BlockItem(VERTICAL_SMOOTH_QUARTZ_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_granite_slab"), VERTICAL_GRANITE_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_granite_slab"), new BlockItem(VERTICAL_GRANITE_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_andesite_slab"), VERTICAL_ANDESITE_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_andesite_slab"), new BlockItem(VERTICAL_ANDESITE_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_red_nether_brick_slab"), VERTICAL_RED_NETHER_BRICK_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_red_nether_brick_slab"), new BlockItem(VERTICAL_RED_NETHER_BRICK_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_polished_andesite_slab"), VERTICAL_POLISHED_ANDESITE_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_polished_andesite_slab"), new BlockItem(VERTICAL_POLISHED_ANDESITE_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_diorite_slab"), VERTICAL_DIORITE_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_diorite_slab"), new BlockItem(VERTICAL_DIORITE_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_blackstone_slab"), VERTICAL_BLACKSTONE_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_blackstone_slab"), new BlockItem(VERTICAL_BLACKSTONE_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_polished_blackstone_slab"), VERTICAL_POLISHED_BLACKSTONE_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_polished_blackstone_slab"), new BlockItem(VERTICAL_POLISHED_BLACKSTONE_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
Registry.register(Registry.BLOCK, new Identifier("vplus","vertical_polished_blackstone_brick_slab"), VERTICAL_POLISHED_BLACKSTONE_BRICK_SLAB);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus","vertical_polished_blackstone_brick_slab"), new BlockItem(VERTICAL_POLISHED_BLACKSTONE_BRICK_SLAB, new Item.Settings().group(VPItemGroups.VERTICAL_SLABS)));
|
||||
}
|
||||
|
||||
static {
|
||||
VERTICAL_OAK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F));
|
||||
VERTICAL_SPRUCE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F));
|
||||
VERTICAL_BIRCH_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F));
|
||||
VERTICAL_JUNGLE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F));
|
||||
VERTICAL_ACACIA_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F));
|
||||
VERTICAL_DARK_OAK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F));
|
||||
VERTICAL_CRIMSON_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F));
|
||||
VERTICAL_WARPED_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.WOOD).sounds(BlockSoundGroup.WOOD).hardness(2.0F));
|
||||
VERTICAL_STONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_SMOOTH_STONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_SANDSTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_CUT_SANDSTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_COBBLESTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_BRICK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_STONE_BRICK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_NETHER_BRICK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_QUARTZ_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_RED_SANDSTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_CUT_RED_SANDSTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_PURPUR_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_PRISMARINE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_PRISMARINE_BRICK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_DARK_PRISMARINE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_POLISHED_GRANITE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_SMOOTH_RED_SANDSTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_MOSSY_STONE_BRICK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_POLISHED_DIORITE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_MOSSY_COBBLESTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_END_STONE_BRICK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_SMOOTH_SANDSTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_SMOOTH_QUARTZ_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_GRANITE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_ANDESITE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_RED_NETHER_BRICK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_POLISHED_ANDESITE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_DIORITE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_BLACKSTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_POLISHED_BLACKSTONE_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
VERTICAL_POLISHED_BLACKSTONE_BRICK_SLAB = new VerticalSlabs(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).hardness(2.0F));
|
||||
}
|
||||
}
|
142
src/main/java/tech/nevets/vplus/blocks/VerticalSlabBlock.java
Normal file
@ -0,0 +1,142 @@
|
||||
package tech.nevets.vplus.blocks;
|
||||
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.block.enums.SlabType;
|
||||
import net.minecraft.entity.ai.pathing.NavigationType;
|
||||
import net.minecraft.fluid.Fluid;
|
||||
import net.minecraft.fluid.FluidState;
|
||||
import net.minecraft.fluid.Fluids;
|
||||
import net.minecraft.item.ItemPlacementContext;
|
||||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.state.property.BooleanProperty;
|
||||
import net.minecraft.state.property.DirectionProperty;
|
||||
import net.minecraft.state.property.EnumProperty;
|
||||
import net.minecraft.state.property.Properties;
|
||||
import net.minecraft.tag.FluidTags;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.shape.VoxelShape;
|
||||
import net.minecraft.util.shape.VoxelShapes;
|
||||
import net.minecraft.world.BlockView;
|
||||
import net.minecraft.world.WorldAccess;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import tech.nevets.vplus.VPProperties;
|
||||
import tech.nevets.vplus.blocks.enums.VerticalSlabType;
|
||||
|
||||
public class VerticalSlabBlock extends HorizontalFacingBlock implements Waterloggable {
|
||||
public static final EnumProperty<VerticalSlabType> TYPE;
|
||||
public static final BooleanProperty WATERLOGGED;
|
||||
private static final VoxelShape NORTH;
|
||||
private static final VoxelShape EAST;
|
||||
private static final VoxelShape SOUTH;
|
||||
private static final VoxelShape WEST;
|
||||
|
||||
public VerticalSlabBlock(Settings settings) {
|
||||
super(settings);
|
||||
setDefaultState(this.stateManager.getDefaultState().with(Properties.HORIZONTAL_FACING, Direction.NORTH).with(WATERLOGGED, false));
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public boolean hasSidedTransparency(BlockState state) {
|
||||
// return state.get(TYPE) != VerticalSlabType.DOUBLE;
|
||||
// }
|
||||
|
||||
@Override
|
||||
protected void appendProperties(StateManager.Builder<Block, BlockState> stateManager) {
|
||||
stateManager.add(Properties.HORIZONTAL_FACING, WATERLOGGED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) {
|
||||
VerticalSlabType verticalSlabType = state.get(TYPE);
|
||||
Direction dir = state.get(FACING);
|
||||
switch (dir) {
|
||||
case NORTH -> {return NORTH;}
|
||||
case SOUTH -> {return SOUTH;}
|
||||
case EAST -> {return EAST;}
|
||||
case WEST -> {return WEST;}
|
||||
default -> {return VoxelShapes.fullCube();}
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public BlockState getPlacementState(ItemPlacementContext ctx) {
|
||||
BlockPos blockPos = ctx.getBlockPos();
|
||||
BlockState blockState = ctx.getWorld().getBlockState(blockPos);
|
||||
if (blockState.isOf(this)) {
|
||||
return blockState.with(TYPE, VerticalSlabType.DOUBLE).with(WATERLOGGED, false);
|
||||
} else {
|
||||
return this.getDefaultState().with(Properties.HORIZONTAL_FACING, ctx.getPlayerFacing().getOpposite()).with(WATERLOGGED, ctx.getWorld().getFluidState(ctx.getBlockPos()).getFluid() == Fluids.WATER);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public FluidState getFluidState(BlockState state) {
|
||||
return state.get(WATERLOGGED) ? Fluids.WATER.getStill(false) : super.getFluidState(state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getStateForNeighborUpdate(BlockState state, Direction direction, BlockState neighborState, WorldAccess world, BlockPos pos, BlockPos neighborPos) {
|
||||
if (state.get(WATERLOGGED)) {
|
||||
world.createAndScheduleFluidTick(pos, Fluids.WATER, Fluids.WATER.getTickRate(world));
|
||||
}
|
||||
|
||||
return super.getStateForNeighborUpdate(state, direction, neighborState, world, pos, neighborPos);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPathfindThrough(BlockState state, BlockView world, BlockPos pos, NavigationType type) {
|
||||
switch (type) {
|
||||
case WATER -> {return world.getFluidState(pos).isIn(FluidTags.WATER);}
|
||||
default -> {return false;}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean tryFillWithFluid(WorldAccess world, BlockPos pos, BlockState state, FluidState fluidState) {
|
||||
Direction dir = state.get(FACING);
|
||||
switch(dir) {
|
||||
case NORTH, SOUTH, EAST, WEST -> {return Waterloggable.super.tryFillWithFluid(world, pos, state, fluidState);}
|
||||
default -> {return false;}
|
||||
} }
|
||||
|
||||
@Override
|
||||
public boolean canFillWithFluid(BlockView world, BlockPos pos, BlockState state, Fluid fluid) {
|
||||
Direction dir = state.get(FACING);
|
||||
switch(dir) {
|
||||
case NORTH, SOUTH, EAST, WEST -> {return Waterloggable.super.canFillWithFluid(world, pos, state, fluid);}
|
||||
default -> {return false;}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockRenderType getRenderType(BlockState blockState_1) {
|
||||
return BlockRenderType.MODEL;
|
||||
}
|
||||
|
||||
|
||||
private static VoxelShape rotate(Direction from, Direction to, VoxelShape shape) {
|
||||
VoxelShape[] buffer = new VoxelShape[]{ shape, VoxelShapes.empty() };
|
||||
|
||||
int times = (to.getHorizontal() - from.getHorizontal() + 4) % 4;
|
||||
for (int i = 0; i < times; i++) {
|
||||
buffer[0].forEachBox((minX, minY, minZ, maxX, maxY, maxZ) -> buffer[1] = VoxelShapes.union(buffer[1], VoxelShapes.cuboid(1-maxZ, minY, minX, 1-minZ, maxY, maxX)));
|
||||
buffer[0] = buffer[1];
|
||||
buffer[1] = VoxelShapes.empty();
|
||||
}
|
||||
|
||||
return buffer[0];
|
||||
}
|
||||
|
||||
static {
|
||||
TYPE = VPProperties.VERTICAL_SLAB_TYPE;
|
||||
WATERLOGGED = Properties.WATERLOGGED;
|
||||
|
||||
VoxelShape shape = createCuboidShape(0.0D, 0.0D, 0.0D, 8.0D, 16.0D, 16.0D);
|
||||
|
||||
EAST = shape;
|
||||
NORTH = rotate(Direction.EAST, Direction.NORTH, shape);
|
||||
SOUTH = rotate(Direction.EAST, Direction.SOUTH, shape);
|
||||
WEST = rotate(Direction.EAST, Direction.WEST, shape);
|
||||
}
|
||||
}
|
@ -1,85 +0,0 @@
|
||||
package tech.nevets.vplus.blocks;
|
||||
|
||||
import net.minecraft.block.*;
|
||||
import net.minecraft.fluid.FluidState;
|
||||
import net.minecraft.fluid.Fluids;
|
||||
import net.minecraft.item.ItemPlacementContext;
|
||||
import net.minecraft.state.StateManager;
|
||||
import net.minecraft.state.property.BooleanProperty;
|
||||
import net.minecraft.state.property.Properties;
|
||||
import net.minecraft.tag.FluidTags;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.shape.VoxelShape;
|
||||
import net.minecraft.util.shape.VoxelShapes;
|
||||
import net.minecraft.world.BlockView;
|
||||
|
||||
public class VerticalSlabs extends HorizontalFacingBlock {
|
||||
private static final VoxelShape NORTH_SHAPE;
|
||||
private static final VoxelShape EAST_SHAPE;
|
||||
private static final VoxelShape SOUTH_SHAPE;
|
||||
private static final VoxelShape WEST_SHAPE;
|
||||
public static final BooleanProperty WATERLOGGED = Properties.WATERLOGGED;
|
||||
|
||||
public VerticalSlabs(Settings settings){
|
||||
super(settings);
|
||||
this.setDefaultState(this.stateManager.getDefaultState().with(WATERLOGGED, true).with(FACING, Direction.NORTH));
|
||||
}
|
||||
|
||||
//TODO Fix Waterlogging
|
||||
@Override
|
||||
public FluidState getFluidState(BlockState blockState) {
|
||||
return blockState.get(WATERLOGGED) ? Fluids.WATER.getStill(false) : super.getFluidState(blockState);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockRenderType getRenderType(BlockState blockState_1) {
|
||||
return BlockRenderType.MODEL;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getPlacementState(ItemPlacementContext itemPlacementContext) {
|
||||
FluidState fluidState = itemPlacementContext.getWorld().getFluidState(itemPlacementContext.getBlockPos());
|
||||
boolean waterLog = fluidState.isIn(FluidTags.WATER) && fluidState.getLevel() == 8;
|
||||
return super.getPlacementState(itemPlacementContext).with(WATERLOGGED, waterLog)
|
||||
.with(FACING, itemPlacementContext.getPlayerFacing().getOpposite());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void appendProperties(StateManager.Builder<Block, BlockState> builder) {
|
||||
builder.add(WATERLOGGED, FACING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, ShapeContext context) {
|
||||
switch(state.get(FACING)) {
|
||||
case NORTH: return NORTH_SHAPE;
|
||||
case EAST: return EAST_SHAPE;
|
||||
case SOUTH: return SOUTH_SHAPE;
|
||||
case WEST: return WEST_SHAPE;
|
||||
default: return super.getOutlineShape(state, view, pos, context);
|
||||
}
|
||||
}
|
||||
|
||||
static {
|
||||
VoxelShape shape = createCuboidShape(0.0D, 0.0D, 0.0D, 8.0D, 16.0D, 16.0D);
|
||||
|
||||
EAST_SHAPE = shape;
|
||||
NORTH_SHAPE = rotate(Direction.EAST, Direction.NORTH, shape);
|
||||
SOUTH_SHAPE = rotate(Direction.EAST, Direction.SOUTH, shape);
|
||||
WEST_SHAPE = rotate(Direction.EAST, Direction.WEST, shape);
|
||||
}
|
||||
|
||||
private static VoxelShape rotate(Direction from, Direction to, VoxelShape shape) {
|
||||
VoxelShape[] buffer = new VoxelShape[]{ shape, VoxelShapes.empty() };
|
||||
|
||||
int times = (to.getHorizontal() - from.getHorizontal() + 4) % 4;
|
||||
for (int i = 0; i < times; i++) {
|
||||
buffer[0].forEachBox((minX, minY, minZ, maxX, maxY, maxZ) -> buffer[1] = VoxelShapes.union(buffer[1], VoxelShapes.cuboid(1-maxZ, minY, minX, 1-minZ, maxY, maxX)));
|
||||
buffer[0] = buffer[1];
|
||||
buffer[1] = VoxelShapes.empty();
|
||||
}
|
||||
|
||||
return buffer[0];
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package tech.nevets.vplus.blocks.enums;
|
||||
|
||||
import net.minecraft.util.StringIdentifiable;
|
||||
|
||||
public enum VerticalSlabType implements StringIdentifiable {
|
||||
NORTH("north"),
|
||||
EAST("east"),
|
||||
SOUTH("south"),
|
||||
WEST("west"),
|
||||
DOUBLE("double");
|
||||
|
||||
private final String name;
|
||||
|
||||
VerticalSlabType(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public String asString() {
|
||||
return this.name;
|
||||
}
|
||||
}
|
@ -1,9 +1,26 @@
|
||||
package tech.nevets.vplus.init;
|
||||
package tech.nevets.vplus.client;
|
||||
|
||||
import static tech.nevets.vplus.misc.VPZoom.*;
|
||||
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.option.KeyBinding;
|
||||
import net.minecraft.client.util.InputUtil;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
public class ZoomInit {
|
||||
public static Boolean isZooming() {
|
||||
public class VPZoom {
|
||||
public static Boolean currentlyZoomed;
|
||||
public static KeyBinding keyBinding;
|
||||
public static Boolean originalSmoothCameraEnabled;
|
||||
public static final MinecraftClient mc = MinecraftClient.getInstance();
|
||||
public static final double zoomLevel = 0.23;
|
||||
|
||||
public static void zoomInit() {
|
||||
keyBinding = new KeyBinding("key.vplus.zoom", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_C, "category.vplus.zoom");
|
||||
currentlyZoomed = false;
|
||||
originalSmoothCameraEnabled = false;
|
||||
KeyBindingHelper.registerKeyBinding(keyBinding);
|
||||
}
|
||||
|
||||
public static boolean isZooming() {
|
||||
return keyBinding.isPressed();
|
||||
}
|
||||
|
||||
@ -19,7 +36,7 @@ public class ZoomInit {
|
||||
}
|
||||
}
|
||||
|
||||
private static Boolean isSmoothCamera() {
|
||||
private static boolean isSmoothCamera() {
|
||||
return mc.options.smoothCameraEnabled;
|
||||
}
|
||||
|
@ -0,0 +1,13 @@
|
||||
package tech.nevets.vplus.client;
|
||||
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
@Environment(net.fabricmc.api.EnvType.CLIENT)
|
||||
public class VanillaPlusClient implements ClientModInitializer {
|
||||
|
||||
@Override
|
||||
public void onInitializeClient() {
|
||||
VPZoom.zoomInit();
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package tech.nevets.vplus.clientmixin;
|
||||
package tech.nevets.vplus.client.mixin;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
@ -7,17 +7,18 @@ import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
import tech.nevets.vplus.init.ZoomInit;
|
||||
import tech.nevets.vplus.misc.VPZoom;
|
||||
import tech.nevets.vplus.client.VPZoom;
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
@Mixin(GameRenderer.class)
|
||||
public class ZoomMixin {
|
||||
@Inject(method = "getFov(Lnet/minecraft/client/render/Camera;FZ)D", at = @At("RETURN"), cancellable = true)
|
||||
public void getZoomLevel(CallbackInfoReturnable<Double> callbackInfo) {
|
||||
if(ZoomInit.isZooming()) {
|
||||
callbackInfo.setReturnValue(VPZoom.zoomLevel);
|
||||
if (VPZoom.isZooming()) {
|
||||
double fov = callbackInfo.getReturnValue();
|
||||
callbackInfo.setReturnValue(fov * VPZoom.zoomLevel);
|
||||
}
|
||||
ZoomInit.manageSmoothCamera();
|
||||
|
||||
VPZoom.manageSmoothCamera();
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package tech.nevets.vplus.food;
|
||||
|
||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
import net.minecraft.item.FoodComponent;
|
||||
import net.minecraft.item.Item;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class CopperApple extends Item {
|
||||
public CopperApple() {
|
||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(12).saturationModifier(16).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 5),1f).build()));
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package tech.nevets.vplus.food;
|
||||
|
||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
import net.minecraft.item.FoodComponent;
|
||||
import net.minecraft.item.Item;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class DiamondApple extends Item {
|
||||
public DiamondApple() {
|
||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(8).saturationModifier(14).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 3),1f).build()));
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package tech.nevets.vplus.food;
|
||||
|
||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
import net.minecraft.item.FoodComponent;
|
||||
import net.minecraft.item.Item;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class EmeraldApple extends Item {
|
||||
public EmeraldApple() {
|
||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(12).saturationModifier(16).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 5),1f).build()));
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
package tech.nevets.vplus.food;
|
||||
|
||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
import net.minecraft.item.FoodComponent;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class EnchantedCopperApple extends Item {
|
||||
public EnchantedCopperApple() {
|
||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(12).saturationModifier(16).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 6),1f).build()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasGlint(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
package tech.nevets.vplus.food;
|
||||
|
||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
import net.minecraft.item.FoodComponent;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class EnchantedDiamondApple extends Item {
|
||||
public EnchantedDiamondApple() {
|
||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(8).saturationModifier(14).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 4),1f).build()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasGlint(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
package tech.nevets.vplus.food;
|
||||
|
||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
import net.minecraft.item.FoodComponent;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class EnchantedEmeraldApple extends Item {
|
||||
public EnchantedEmeraldApple() {
|
||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(12).saturationModifier(16).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 6),1f).build()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasGlint(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
package tech.nevets.vplus.food;
|
||||
|
||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
import net.minecraft.item.FoodComponent;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class EnchantedIronApple extends Item {
|
||||
public EnchantedIronApple() {
|
||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(6).saturationModifier(10).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 2),1f).build()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasGlint(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
package tech.nevets.vplus.food;
|
||||
|
||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
import net.minecraft.item.FoodComponent;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class EnchantedNetheriteApple extends Item {
|
||||
public EnchantedNetheriteApple() {
|
||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(14).saturationModifier(18).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 8),1f).build()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasGlint(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
package tech.nevets.vplus.food;
|
||||
|
||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
import net.minecraft.item.FoodComponent;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class EnchantedPlatinumApple extends Item {
|
||||
public EnchantedPlatinumApple() {
|
||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(16).saturationModifier(20).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 10),1f).build()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasGlint(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
package tech.nevets.vplus.food;
|
||||
|
||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
import net.minecraft.item.FoodComponent;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class EnchantedRubyApple extends Item {
|
||||
public EnchantedRubyApple() {
|
||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(18).saturationModifier(22).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 12),1f).build()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasGlint(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package tech.nevets.vplus.food;
|
||||
|
||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
import net.minecraft.item.FoodComponent;
|
||||
import net.minecraft.item.Item;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class IronApple extends Item {
|
||||
public IronApple() {
|
||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(6).saturationModifier(10).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 1),1f).build()));
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package tech.nevets.vplus.food;
|
||||
|
||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
import net.minecraft.item.FoodComponent;
|
||||
import net.minecraft.item.Item;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class NetheriteApple extends Item {
|
||||
public NetheriteApple() {
|
||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(14).saturationModifier(18).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 7),1f).build()));
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package tech.nevets.vplus.food;
|
||||
|
||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
import net.minecraft.item.FoodComponent;
|
||||
import net.minecraft.item.Item;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class PlatinumApple extends Item {
|
||||
public PlatinumApple() {
|
||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(16).saturationModifier(20).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 9),1f).build()));
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package tech.nevets.vplus.food;
|
||||
|
||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
import net.minecraft.item.FoodComponent;
|
||||
import net.minecraft.item.Item;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class RubyApple extends Item {
|
||||
public RubyApple() {
|
||||
super(new Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(18).saturationModifier(22).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 11),1f).build()));
|
||||
}
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
package tech.nevets.vplus.food;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
||||
public class VPFood {
|
||||
|
||||
public static final Item IRONAPPLE = new IronApple();
|
||||
public static final Item ENCHANTEDIRONAPPLE = new EnchantedIronApple();
|
||||
public static final Item COPPERAPPLE = new CopperApple();
|
||||
public static final Item ENCHANTEDCOPPERAPPLE = new EnchantedCopperApple();
|
||||
public static final Item DIAMONDAPPLE = new DiamondApple();
|
||||
public static final Item ENCHANTEDDIAMONDAPPLE = new EnchantedDiamondApple();
|
||||
public static final Item EMERALDAPPLE = new EmeraldApple();
|
||||
public static final Item ENCHANTEDEMERALDAPPLE = new EnchantedEmeraldApple();
|
||||
public static final Item NETHERITEAPPLE = new NetheriteApple();
|
||||
public static final Item ENCHANTEDNETHERITEAPPLE = new EnchantedNetheriteApple();
|
||||
public static final Item PLATINUMAPPLE = new PlatinumApple();
|
||||
public static final Item ENCHANTEDPLATINUMAPPLE = new EnchantedPlatinumApple();
|
||||
public static final Item RUBYAPPLE = new RubyApple();
|
||||
public static final Item ENCHANTEDRUBYAPPLE = new EnchantedRubyApple();
|
||||
|
||||
public static void vpFood() {
|
||||
initializeApples();
|
||||
}
|
||||
|
||||
//TODO Balance apple strengths
|
||||
public static void initializeApples() {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "iron_apple"), IRONAPPLE);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "enchanted_iron_apple"), ENCHANTEDIRONAPPLE);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "copper_apple"), COPPERAPPLE);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "enchanted_copper_apple"), ENCHANTEDCOPPERAPPLE);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "diamond_apple"), DIAMONDAPPLE);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "enchanted_diamond_apple"), ENCHANTEDDIAMONDAPPLE);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_apple"), EMERALDAPPLE);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "enchanted_emerald_apple"), ENCHANTEDEMERALDAPPLE);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "netherite_apple"), NETHERITEAPPLE);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "enchanted_netherite_apple"), ENCHANTEDNETHERITEAPPLE);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_apple"), PLATINUMAPPLE);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "enchanted_platinum_apple"), ENCHANTEDPLATINUMAPPLE);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_apple"), RUBYAPPLE);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "enchanted_ruby_apple"), ENCHANTEDRUBYAPPLE);
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package tech.nevets.vplus.init;
|
||||
|
||||
import net.fabricmc.api.ClientModInitializer;
|
||||
import tech.nevets.vplus.misc.VPZoom;
|
||||
|
||||
public class ClientInit implements ClientModInitializer {
|
||||
|
||||
@Override
|
||||
public void onInitializeClient() {
|
||||
VPZoom.vpZoom();
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
package tech.nevets.vplus.items;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class PlatinumIngot extends Item {
|
||||
public PlatinumIngot(Settings settings) {
|
||||
super(settings);
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
package tech.nevets.vplus.items;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class PlatinumNugget extends Item {
|
||||
public PlatinumNugget(Settings settings) {
|
||||
super(settings);
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
package tech.nevets.vplus.items;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class Ruby extends Item {
|
||||
public Ruby(Settings settings) {
|
||||
super(settings);
|
||||
}
|
||||
}
|
39
src/main/java/tech/nevets/vplus/items/VPArmor.java
Normal file
@ -0,0 +1,39 @@
|
||||
package tech.nevets.vplus.items;
|
||||
|
||||
import net.minecraft.entity.EquipmentSlot;
|
||||
import net.minecraft.item.ArmorItem;
|
||||
import net.minecraft.item.ArmorMaterial;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
||||
public class VPArmor {
|
||||
|
||||
public static final ArmorMaterial COPPER_ARMOR;
|
||||
public static final ArmorMaterial EMERALD_ARMOR;
|
||||
public static final ArmorMaterial SAPPHIRE_ARMOR;
|
||||
public static final ArmorMaterial RUBY_ARMOR;
|
||||
public static final ArmorMaterial JADE_ARMOR;
|
||||
|
||||
public VPArmor() {
|
||||
}
|
||||
|
||||
static {
|
||||
COPPER_ARMOR = register("copper", VPMaterials.COPPER);
|
||||
EMERALD_ARMOR = register("emerald", VPMaterials.EMERALD);
|
||||
SAPPHIRE_ARMOR = register("sapphire", VPMaterials.SAPPHIRE);
|
||||
RUBY_ARMOR = register("ruby", VPMaterials.RUBY);
|
||||
JADE_ARMOR = register("jade", VPMaterials.JADE);
|
||||
}
|
||||
|
||||
public static VPMaterials register(String id, VPMaterials material) {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", id + "_helmet"), new ArmorItem(material, EquipmentSlot.HEAD, new Item.Settings().group(VPItemGroups.COMBAT)));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", id + "_chestplate"), new ArmorItem(material, EquipmentSlot.CHEST, new Item.Settings().group(VPItemGroups.COMBAT)));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", id + "_leggings"), new ArmorItem(material, EquipmentSlot.LEGS, new Item.Settings().group(VPItemGroups.COMBAT)));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", id + "_boots"), new ArmorItem(material, EquipmentSlot.FEET, new Item.Settings().group(VPItemGroups.COMBAT)));
|
||||
|
||||
return material;
|
||||
}
|
||||
|
||||
public static void init() {}
|
||||
}
|
75
src/main/java/tech/nevets/vplus/items/VPFood.java
Normal file
@ -0,0 +1,75 @@
|
||||
package tech.nevets.vplus.items;
|
||||
|
||||
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
import net.minecraft.item.FoodComponent;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
||||
public class VPFood {
|
||||
|
||||
public static final Item IRON_APPLE;
|
||||
public static final Item ENCHANTED_IRON_APPLE;
|
||||
public static final Item COPPER_APPLE;
|
||||
public static final Item ENCHANTED_COPPER_APPLE;
|
||||
public static final Item DIAMOND_APPLE;
|
||||
public static final Item ENCHANTED_DIAMOND_APPLE;
|
||||
public static final Item EMERALD_APPLE;
|
||||
public static final Item ENCHANTED_EMERALD_APPLE;
|
||||
public static final Item NETHERITE_APPLE;
|
||||
public static final Item ENCHANTED_NETHERITE_APPLE;
|
||||
public static final Item SAPPHIRE_APPLE;
|
||||
public static final Item ENCHANTED_SAPPHIRE_APPLE;
|
||||
public static final Item RUBY_APPLE;
|
||||
public static final Item ENCHANTED_RUBY_APPLE;
|
||||
public static final Item JADE_APPLE;
|
||||
public static final Item ENCHANTED_JADE_APPLE;
|
||||
|
||||
public VPFood() {
|
||||
}
|
||||
|
||||
static {
|
||||
IRON_APPLE = register("iron_apple", new Item.Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(6).saturationModifier(10).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 2),1f).build()));
|
||||
ENCHANTED_IRON_APPLE = register("enchanted_iron_apple", new Item.Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(6).saturationModifier(10).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 2),1f).build()), true);
|
||||
COPPER_APPLE = register("copper_apple", new Item.Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(6).saturationModifier(10).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 2),1f).build()));
|
||||
ENCHANTED_COPPER_APPLE = register("enchanted_copper_apple", new Item.Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(6).saturationModifier(10).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 2),1f).build()), true);
|
||||
DIAMOND_APPLE = register("diamond_apple", new Item.Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(6).saturationModifier(10).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 2),1f).build()));
|
||||
ENCHANTED_DIAMOND_APPLE = register("enchanted_diamond_apple", new Item.Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(6).saturationModifier(10).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 2),1f).build()), true);
|
||||
EMERALD_APPLE = register("emerald_apple", new Item.Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(6).saturationModifier(10).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 2),1f).build()));
|
||||
ENCHANTED_EMERALD_APPLE = register("enchanted_emerald_apple", new Item.Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(6).saturationModifier(10).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 2),1f).build()), true);
|
||||
NETHERITE_APPLE = register("netherite_apple", new Item.Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(6).saturationModifier(10).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 2),1f).build()));
|
||||
ENCHANTED_NETHERITE_APPLE = register("enchanted_netherite_apple", new Item.Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(6).saturationModifier(10).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 2),1f).build()), true);
|
||||
SAPPHIRE_APPLE = register("sapphire_apple", new Item.Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(6).saturationModifier(10).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 2),1f).build()));
|
||||
ENCHANTED_SAPPHIRE_APPLE = register("enchanted_sapphire_apple", new Item.Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(6).saturationModifier(10).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 2),1f).build()), true);
|
||||
RUBY_APPLE = register("ruby_apple", new Item.Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(6).saturationModifier(10).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 2),1f).build()));
|
||||
ENCHANTED_RUBY_APPLE = register("enchanted_ruby_apple", new Item.Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(6).saturationModifier(10).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 2),1f).build()), true);
|
||||
JADE_APPLE = register("jade_apple", new Item.Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(6).saturationModifier(10).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 2),1f).build()));
|
||||
ENCHANTED_JADE_APPLE = register("enchanted_jade_apple", new Item.Settings().group(VPItemGroups.FOOD).food(new FoodComponent.Builder().hunger(6).saturationModifier(10).alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 2),1f).build()), true);
|
||||
}
|
||||
|
||||
private static Item register(String id, Item.Settings settings) {
|
||||
Item item = new Item(settings);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", id), item);
|
||||
return item;
|
||||
}
|
||||
|
||||
private static Item register(String id, Item.Settings settings, boolean hasGlint) {
|
||||
Item item;
|
||||
if (hasGlint) {
|
||||
item = new Item(settings) {
|
||||
@Override
|
||||
public boolean hasGlint(ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
} else {
|
||||
item = new Item(settings);
|
||||
}
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", id), item);
|
||||
return item;
|
||||
}
|
||||
|
||||
public static void init() {}
|
||||
}
|
20
src/main/java/tech/nevets/vplus/items/VPFuels.java
Normal file
@ -0,0 +1,20 @@
|
||||
package tech.nevets.vplus.items;
|
||||
|
||||
import net.fabricmc.fabric.api.registry.FuelRegistry;
|
||||
import net.minecraft.item.ItemConvertible;
|
||||
import tech.nevets.vplus.blocks.VPBlocks;
|
||||
|
||||
public class VPFuels {
|
||||
|
||||
public VPFuels() {}
|
||||
|
||||
static {
|
||||
register(VPBlocks.SATURATED_LAVA_SPONGE_BLOCK, 20000);
|
||||
}
|
||||
|
||||
private static void register(ItemConvertible fuel, int duration) {
|
||||
FuelRegistry.INSTANCE.add(fuel, duration);
|
||||
}
|
||||
|
||||
public static void init() {}
|
||||
}
|
@ -5,31 +5,30 @@ import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.util.Identifier;
|
||||
import tech.nevets.vplus.blocks.VPBlocks;
|
||||
|
||||
public class VPItemGroups {
|
||||
//Creative Tab
|
||||
public static final ItemGroup ALL = FabricItemGroupBuilder.build(
|
||||
new Identifier("vplus", "all"),
|
||||
() -> new ItemStack((Items.GRASS_BLOCK)));
|
||||
//Combat Tab
|
||||
public static final ItemGroup COMBAT = FabricItemGroupBuilder.build(
|
||||
new Identifier("vplus", "combat"),
|
||||
() -> new ItemStack((Items.DIAMOND_SWORD)));
|
||||
//Tools Tab
|
||||
public static final ItemGroup TOOLS = FabricItemGroupBuilder.create(
|
||||
new Identifier("vplus", "tools"))
|
||||
.icon(() -> new ItemStack(Items.DIAMOND_PICKAXE))
|
||||
/*.appendItems(stacks -> {
|
||||
stacks.add(new ItemStack(Main.RUBY));
|
||||
stacks.add(new ItemStack(Items.EMERALD_BLOCK));
|
||||
})*/
|
||||
.build();
|
||||
//Food Tab
|
||||
public static final ItemGroup FOOD = FabricItemGroupBuilder.build(
|
||||
new Identifier("vplus", "food"),
|
||||
() -> new ItemStack(Items.ENCHANTED_GOLDEN_APPLE));
|
||||
//Vertical Slabs Tab
|
||||
public static final ItemGroup VERTICAL_SLABS = FabricItemGroupBuilder.build(
|
||||
new Identifier("vplus", "vert_slabs"),
|
||||
() -> new ItemStack(Items.BRICK_SLAB));
|
||||
|
||||
public static final ItemGroup BLOCKS;
|
||||
public static final ItemGroup ITEMS;
|
||||
public static final ItemGroup COMBAT;
|
||||
public static final ItemGroup TOOLS;
|
||||
public static final ItemGroup FOOD;
|
||||
|
||||
public VPItemGroups() {
|
||||
}
|
||||
|
||||
static {
|
||||
BLOCKS = FabricItemGroupBuilder.build(newId("blocksplus"), () -> new ItemStack(VPBlocks.RUBY_BLOCK));
|
||||
ITEMS = FabricItemGroupBuilder.build(newId("itemsplus"), () -> new ItemStack(VPItems.SAPPHIRE));
|
||||
COMBAT = FabricItemGroupBuilder.build(newId("combatplus"), () -> new ItemStack(Items.DIAMOND_SWORD)); //TODO Fix this when I add back all items
|
||||
TOOLS = FabricItemGroupBuilder.build(newId("toolsplus"), () -> new ItemStack(Items.DIAMOND_PICKAXE)); //TODO Fix this when I add back all items
|
||||
FOOD = FabricItemGroupBuilder.build(newId("foodplus"), () -> new ItemStack(Items.GOLDEN_APPLE)); //TODO Fix this when I add back all items
|
||||
}
|
||||
|
||||
private static Identifier newId(String id) {
|
||||
return new Identifier("vplus", id);
|
||||
}
|
||||
|
||||
public static void init() {}
|
||||
}
|
||||
|
@ -6,18 +6,30 @@ import net.minecraft.util.registry.Registry;
|
||||
|
||||
public class VPItems {
|
||||
|
||||
public static final Item PLATINUMINGOT = new PlatinumIngot(new Item.Settings().group(VPItemGroups.ALL));
|
||||
public static final Item PLATINUMNUGGET = new PlatinumNugget(new Item.Settings().group(VPItemGroups.ALL));
|
||||
public static final Item RUBY = new Ruby(new Item.Settings().group(VPItemGroups.ALL));
|
||||
public static final Item RUBY;
|
||||
public static final Item SAPPHIRE;
|
||||
public static final Item JADE;
|
||||
|
||||
public static void vpItems() {
|
||||
initializeValuables();
|
||||
public VPItems() {
|
||||
}
|
||||
|
||||
public static void initializeValuables() {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_ingot"), PLATINUMINGOT);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_nugget"), PLATINUMNUGGET);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby"), RUBY);
|
||||
static {
|
||||
RUBY = register("ruby", new Item.Settings().group(VPItemGroups.ITEMS));
|
||||
SAPPHIRE = register("sapphire", new Item.Settings().group(VPItemGroups.ITEMS));
|
||||
JADE = register("jade", new Item.Settings().group(VPItemGroups.ITEMS));
|
||||
}
|
||||
|
||||
public static Item register(String id, Item.Settings settings) {
|
||||
Item item = new Item(settings);
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", id), item);
|
||||
return item;
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
VPItemGroups.init();
|
||||
VPFood.init();
|
||||
VPArmor.init();
|
||||
VPTools.init();
|
||||
VPFuels.init();
|
||||
}
|
||||
}
|
||||
|
138
src/main/java/tech/nevets/vplus/items/VPMaterials.java
Normal file
@ -0,0 +1,138 @@
|
||||
package tech.nevets.vplus.items;
|
||||
|
||||
import net.minecraft.entity.EquipmentSlot;
|
||||
import net.minecraft.item.ArmorMaterial;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
import net.minecraft.recipe.Ingredient;
|
||||
import net.minecraft.sound.SoundEvent;
|
||||
import net.minecraft.sound.SoundEvents;
|
||||
|
||||
public enum VPMaterials implements ToolMaterial, ArmorMaterial {
|
||||
|
||||
COPPER("copper", 20, Ingredient.ofItems(Items.COPPER_INGOT), 13, new int[]{2, 4, 5, 2}, SoundEvents.ITEM_ARMOR_EQUIP_GOLD, 0.0F, 0.0F, 2, 200, 5.0F, 3.0F),
|
||||
EMERALD("emerald", 30, Ingredient.ofItems(Items.EMERALD), 30, new int[]{2, 6, 8, 2}, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 0.5F, 0.0F, 3, 750, 7.0F, 4.0F),
|
||||
SAPPHIRE("sapphire", 50, Ingredient.ofItems(VPItems.SAPPHIRE), 40, new int[]{6, 8, 10, 6}, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 1.0F, 0.1F, 4, 3000, 8.0F, 6.0F),
|
||||
RUBY("ruby", 50, Ingredient.ofItems(VPItems.RUBY), 40, new int[]{10, 15, 20, 10}, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 1.0F, .01F, 4, 3000, 8.0F, 6.0F),
|
||||
JADE("jade", 50, Ingredient.ofItems(VPItems.JADE), 40, new int[]{10, 15, 20, 10}, SoundEvents.ITEM_ARMOR_EQUIP_DIAMOND, 1.0F, 0.1F, 4, 3000, 8.0F, 6.0F);
|
||||
|
||||
private static final int[] BASE_ARMOR_DURABILITY = new int[]{13, 15, 16, 11};
|
||||
// Used by both
|
||||
private String name;
|
||||
private int enchantability;
|
||||
private Ingredient repairIngredient;
|
||||
|
||||
// Used by armor
|
||||
private int armorDurability;
|
||||
private int[] protectionAmounts;
|
||||
private SoundEvent equipSound;
|
||||
private float toughness;
|
||||
private float knockbackResistance;
|
||||
|
||||
// Used by tools
|
||||
private int miningLevel;
|
||||
private float miningSpeed;
|
||||
private float attackDamage;
|
||||
private int toolDurability;
|
||||
|
||||
|
||||
// Used for armor materials
|
||||
VPMaterials(String name, int armorDurability, int[] protectionAmounts, int enchantability, SoundEvent equipSound, float toughness, float knockbackResistance, Ingredient repairIngredient) {
|
||||
this.name = name;
|
||||
this.armorDurability = armorDurability;
|
||||
this.protectionAmounts = protectionAmounts;
|
||||
this.enchantability = enchantability;
|
||||
this.equipSound = equipSound;
|
||||
this.toughness = toughness;
|
||||
this.knockbackResistance = knockbackResistance;
|
||||
this.repairIngredient = repairIngredient;
|
||||
}
|
||||
|
||||
// Used for tool materials
|
||||
VPMaterials(String name, int miningLevel, int toolDurability, float miningSpeed, float attackDamage, int enchantability, Ingredient repairIngredient) {
|
||||
this.name = name;
|
||||
this.miningLevel = miningLevel;
|
||||
this.toolDurability = toolDurability;
|
||||
this.miningSpeed = miningSpeed;
|
||||
this.attackDamage = attackDamage;
|
||||
this.enchantability = enchantability;
|
||||
this.repairIngredient = repairIngredient;
|
||||
}
|
||||
|
||||
//Used for both
|
||||
VPMaterials(String name, int enchantability, Ingredient repairIngredient, int armorDurability, int[] protectionAmounts, SoundEvent equipSound, float toughness, float knockbackResistance, int miningLevel, int toolDurability, float miningSpeed, float attackDamage) {
|
||||
this.name = name;
|
||||
this.enchantability = enchantability;
|
||||
this.repairIngredient = repairIngredient;
|
||||
this.armorDurability = armorDurability;
|
||||
this.protectionAmounts = protectionAmounts;
|
||||
this.equipSound = equipSound;
|
||||
this.toughness = toughness;
|
||||
this.knockbackResistance = knockbackResistance;
|
||||
this.miningLevel = miningLevel;
|
||||
this.toolDurability = toolDurability;
|
||||
this.miningSpeed = miningSpeed;
|
||||
this.attackDamage = attackDamage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Ingredient getRepairIngredient() {
|
||||
return this.repairIngredient;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getEnchantability() {
|
||||
return this.enchantability;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDurability() {
|
||||
return this.toolDurability;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDurability(EquipmentSlot slot) {
|
||||
return BASE_ARMOR_DURABILITY[slot.getEntitySlotId()] * this.armorDurability;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getProtectionAmount(EquipmentSlot slot) {
|
||||
return this.protectionAmounts[slot.getEntitySlotId()];
|
||||
}
|
||||
|
||||
@Override
|
||||
public SoundEvent getEquipSound() {
|
||||
return this.equipSound;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getToughness() {
|
||||
return this.toughness;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getKnockbackResistance() {
|
||||
return this.knockbackResistance;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public float getMiningSpeedMultiplier() {
|
||||
return this.miningSpeed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getAttackDamage() {
|
||||
return this.attackDamage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMiningLevel() {
|
||||
return this.miningLevel;
|
||||
}
|
||||
}
|
51
src/main/java/tech/nevets/vplus/items/VPTools.java
Normal file
@ -0,0 +1,51 @@
|
||||
package tech.nevets.vplus.items;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ToolItem;
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import tech.nevets.vplus.items.tools.*;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
public class VPTools {
|
||||
|
||||
public VPTools() {}
|
||||
|
||||
static {
|
||||
register(VPMaterials.COPPER);
|
||||
register(VPMaterials.EMERALD);
|
||||
register(VPMaterials.SAPPHIRE);
|
||||
register(VPMaterials.RUBY);
|
||||
register(VPMaterials.JADE);
|
||||
}
|
||||
|
||||
private static void register(VPMaterials material) {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", material.getName() + "_axe"), new AxeBase(material, new Item.Settings()));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", material.getName() + "_hoe"), new HoeBase(material, new Item.Settings()));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", material.getName() + "_pickaxe"), new PickaxeBase(material, new Item.Settings()));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", material.getName() + "_shovel"), new ShovelBase(material, new Item.Settings()));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", material.getName() + "_sword"), new SwordBase(material, new Item.Settings()));
|
||||
}
|
||||
|
||||
private static void register(VPMaterials material, Class<? extends ToolItem> T, String toolName) {
|
||||
try {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", material.getName() + "_" + toolName), T.getConstructor(ToolMaterial.class, Item.Settings.class).newInstance(material, new Item.Settings()));
|
||||
} catch (InvocationTargetException | InstantiationException | IllegalAccessException | NoSuchMethodException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private static void registerAll(VPMaterials[] materials, Class<? extends ToolItem> T, String toolName) {
|
||||
for (VPMaterials material : materials) {
|
||||
try {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", material.getName() + "_" + toolName), T.getConstructor(ToolMaterial.class, Item.Settings.class).newInstance(material, new Item.Settings()));
|
||||
} catch (InvocationTargetException | InstantiationException | IllegalAccessException | NoSuchMethodException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void init() {}
|
||||
}
|
12
src/main/java/tech/nevets/vplus/items/tools/AxeBase.java
Normal file
@ -0,0 +1,12 @@
|
||||
package tech.nevets.vplus.items.tools;
|
||||
|
||||
import net.minecraft.item.AxeItem;
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class AxeBase extends AxeItem {
|
||||
|
||||
public AxeBase(ToolMaterial material, Settings settings) {
|
||||
super(material, 5, -3.0F, settings.group(VPItemGroups.TOOLS));
|
||||
}
|
||||
}
|
11
src/main/java/tech/nevets/vplus/items/tools/HoeBase.java
Normal file
@ -0,0 +1,11 @@
|
||||
package tech.nevets.vplus.items.tools;
|
||||
|
||||
import net.minecraft.item.HoeItem;
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class HoeBase extends HoeItem {
|
||||
public HoeBase(ToolMaterial material, Settings settings) {
|
||||
super(material, -3, 0F, settings.group(VPItemGroups.TOOLS));
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
package tech.nevets.vplus.items.tools;
|
||||
|
||||
import net.minecraft.item.SwordItem;
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
|
||||
public class LongSwordBase extends SwordItem {
|
||||
public LongSwordBase(ToolMaterial toolMaterial, Settings settings) {
|
||||
super(toolMaterial, 2, -3.F, settings);
|
||||
}
|
||||
}
|
12
src/main/java/tech/nevets/vplus/items/tools/PickaxeBase.java
Normal file
@ -0,0 +1,12 @@
|
||||
package tech.nevets.vplus.items.tools;
|
||||
|
||||
import net.minecraft.item.PickaxeItem;
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
import tech.nevets.vplus.items.VPTools;
|
||||
|
||||
public class PickaxeBase extends PickaxeItem {
|
||||
public PickaxeBase(ToolMaterial material, Settings settings) {
|
||||
super(material, 1, -2.8F, settings.group(VPItemGroups.TOOLS));
|
||||
}
|
||||
}
|
@ -1,11 +1,11 @@
|
||||
package tech.nevets.vplus.tools;
|
||||
package tech.nevets.vplus.items.tools;
|
||||
|
||||
import net.minecraft.item.ShovelItem;
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class ShovelBase extends ShovelItem {
|
||||
public ShovelBase(ToolMaterial toolMaterial) {
|
||||
super(toolMaterial, 1, -3f, new Settings().group(VPItemGroups.TOOLS));
|
||||
public ShovelBase(ToolMaterial material, Settings settings) {
|
||||
super(material, 1, -3F, settings.group(VPItemGroups.TOOLS));
|
||||
}
|
||||
}
|
11
src/main/java/tech/nevets/vplus/items/tools/SwordBase.java
Normal file
@ -0,0 +1,11 @@
|
||||
package tech.nevets.vplus.items.tools;
|
||||
|
||||
import net.minecraft.item.AxeItem;
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class SwordBase extends AxeItem {
|
||||
public SwordBase(ToolMaterial material, Settings settings) {
|
||||
super(material, 2, -2.4F, settings.group(VPItemGroups.COMBAT));
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
package tech.nevets.vplus.misc;
|
||||
|
||||
import net.fabricmc.fabric.api.registry.FuelRegistry;
|
||||
import tech.nevets.vplus.blocks.SaturatedLavaSpongeBlock;
|
||||
|
||||
public class VPFuels {
|
||||
public static void vpFuels() {
|
||||
FuelRegistry.INSTANCE.add(new SaturatedLavaSpongeBlock(), 20000);
|
||||
}
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
package tech.nevets.vplus.misc;
|
||||
|
||||
import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.option.KeyBinding;
|
||||
import net.minecraft.client.util.InputUtil;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
public class VPZoom {
|
||||
|
||||
public static Boolean currentlyZoomed;
|
||||
public static KeyBinding keyBinding;
|
||||
public static Boolean originalSmoothCameraEnabled;
|
||||
public static final MinecraftClient mc = MinecraftClient.getInstance();
|
||||
public static final double zoomLevel = 19.0;
|
||||
|
||||
public static void vpZoom() {
|
||||
keyBinding = new KeyBinding("key.vplus.zoom", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_C, "category.vplus.zoom");
|
||||
currentlyZoomed = false;
|
||||
originalSmoothCameraEnabled = false;
|
||||
KeyBindingHelper.registerKeyBinding(keyBinding);
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
package tech.nevets.vplus.tools;
|
||||
|
||||
import net.minecraft.item.AxeItem;
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class AxeBase extends AxeItem {
|
||||
public AxeBase(ToolMaterial toolMaterial) {
|
||||
super(toolMaterial, 5, -3.0f, new Settings().group(VPItemGroups.TOOLS));
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
package tech.nevets.vplus.tools;
|
||||
|
||||
import net.minecraft.item.HoeItem;
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class HoeBase extends HoeItem {
|
||||
public HoeBase(ToolMaterial toolMaterial) {
|
||||
super(toolMaterial, -3, 0f, new Settings().group(VPItemGroups.TOOLS));
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
package tech.nevets.vplus.tools;
|
||||
|
||||
import net.minecraft.item.PickaxeItem;
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class PickaxeBase extends PickaxeItem {
|
||||
public PickaxeBase(ToolMaterial toolMaterial) {
|
||||
super(toolMaterial, 1, -2.8f, new Settings().group(VPItemGroups.TOOLS));
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
package tech.nevets.vplus.tools;
|
||||
|
||||
import net.minecraft.item.SwordItem;
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
import tech.nevets.vplus.items.VPItemGroups;
|
||||
|
||||
public class SwordBase extends SwordItem {
|
||||
public SwordBase(ToolMaterial toolMaterial) {
|
||||
super(toolMaterial, 2, -2.4f, new Settings().group(VPItemGroups.COMBAT));
|
||||
}
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
package tech.nevets.vplus.tools;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
import net.minecraft.recipe.Ingredient;
|
||||
import net.minecraft.util.Lazy;
|
||||
import tech.nevets.vplus.items.VPItems;
|
||||
|
||||
public enum ToolMaterials implements ToolMaterial {
|
||||
COPPER (2, 200, 5.0F, 3.0F, 20, () -> Ingredient.ofItems(Items.COPPER_INGOT)),
|
||||
EMERALD(3, 750, 7.0F, 4.0F, 30, () -> Ingredient.ofItems(Items.EMERALD)),
|
||||
PLATINUM(4, 3000, 10.0F, 6.0F, 40, () -> Ingredient.ofItems(VPItems.PLATINUMINGOT)),
|
||||
RUBY(4, 5000, 12.0F, 10.0F, 100, () -> Ingredient.ofItems(VPItems.RUBY));
|
||||
|
||||
private final int miningLevel;
|
||||
private final int itemDurability;
|
||||
private final float miningSpeed;
|
||||
private final float attackDamage;
|
||||
private final int enchantability;
|
||||
private final Lazy<Ingredient> repairIngredient;
|
||||
ToolMaterials(int miningLevel, int itemDurability, float miningSpeed, float attackDamage, int enchantability, Supplier<Ingredient> repairIngredient) {
|
||||
this.miningLevel = miningLevel;
|
||||
this.itemDurability = itemDurability;
|
||||
this.miningSpeed = miningSpeed;
|
||||
this.attackDamage = attackDamage;
|
||||
this.enchantability = enchantability;
|
||||
this.repairIngredient = new Lazy(repairIngredient);
|
||||
}
|
||||
|
||||
public int getDurability() {
|
||||
return this.itemDurability;
|
||||
}
|
||||
|
||||
public float getMiningSpeedMultiplier() {
|
||||
return this.miningSpeed;
|
||||
}
|
||||
|
||||
public float getAttackDamage() {
|
||||
return this.attackDamage;
|
||||
}
|
||||
|
||||
public int getMiningLevel() {
|
||||
return this.miningLevel;
|
||||
}
|
||||
|
||||
public int getEnchantability() {
|
||||
return this.enchantability;
|
||||
}
|
||||
|
||||
public Ingredient getRepairIngredient() {
|
||||
return (Ingredient)this.repairIngredient.get();
|
||||
}
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
package tech.nevets.vplus.tools;
|
||||
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
|
||||
public class VPTools {
|
||||
|
||||
public static void vpTools() {
|
||||
initializeAxes();
|
||||
initializeHoes();
|
||||
initializePickaxes();
|
||||
initializeShovels();
|
||||
initializeSwords();
|
||||
}
|
||||
|
||||
public static void initializeAxes() {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "copper_axe"), new AxeBase(ToolMaterials.COPPER));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_axe"), new AxeBase(ToolMaterials.EMERALD));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_axe"), new AxeBase(ToolMaterials.PLATINUM));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_axe"), new AxeBase(ToolMaterials.RUBY));
|
||||
}
|
||||
|
||||
public static void initializeHoes() {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "copper_hoe"), new HoeBase(ToolMaterials.COPPER));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_hoe"), new HoeBase(ToolMaterials.EMERALD));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_hoe"), new HoeBase(ToolMaterials.PLATINUM));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_hoe"), new HoeBase(ToolMaterials.RUBY));
|
||||
}
|
||||
|
||||
public static void initializePickaxes() {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "copper_pickaxe"), new PickaxeBase(ToolMaterials.COPPER));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_pickaxe"), new PickaxeBase(ToolMaterials.EMERALD));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_pickaxe"), new PickaxeBase(ToolMaterials.PLATINUM));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_pickaxe"), new PickaxeBase(ToolMaterials.RUBY));
|
||||
}
|
||||
|
||||
public static void initializeShovels() {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "copper_shovel"), new ShovelBase(ToolMaterials.COPPER));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_shovel"), new ShovelBase(ToolMaterials.EMERALD));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_shovel"), new ShovelBase(ToolMaterials.PLATINUM));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_shovel"), new ShovelBase(ToolMaterials.RUBY));
|
||||
}
|
||||
|
||||
public static void initializeSwords() {
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "copper_sword"), new SwordBase(ToolMaterials.COPPER));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "emerald_sword"), new SwordBase(ToolMaterials.EMERALD));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "platinum_sword"), new SwordBase(ToolMaterials.PLATINUM));
|
||||
Registry.register(Registry.ITEM, new Identifier("vplus", "ruby_sword"), new SwordBase(ToolMaterials.RUBY));
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
package tech.nevets.vplus.worldgen;
|
||||
|
||||
public class VPOreGen {
|
||||
|
||||
public VPOreGen() {
|
||||
}
|
||||
|
||||
public static void generateOres() {
|
||||
}
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
package tech.nevets.vplus.worldgen.features;
|
||||
|
||||
import net.minecraft.util.registry.RegistryEntry;
|
||||
import net.minecraft.world.gen.feature.*;
|
||||
import tech.nevets.vplus.VPBlocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class VPOreConfiguredFeatures extends OreConfiguredFeatures {
|
||||
public static final List<OreFeatureConfig.Target> SAPPHIRE_ORES;
|
||||
public static final List<OreFeatureConfig.Target> RUBY_ORES;
|
||||
public static final List<OreFeatureConfig.Target> JADE_ORES;
|
||||
public static final RegistryEntry<ConfiguredFeature<OreFeatureConfig, ?>> ORE_SAPPHIRE;
|
||||
public static final RegistryEntry<ConfiguredFeature<OreFeatureConfig, ?>> ORE_RUBY;
|
||||
public static final RegistryEntry<ConfiguredFeature<OreFeatureConfig, ?>> ORE_JADE;
|
||||
|
||||
public VPOreConfiguredFeatures() {
|
||||
}
|
||||
|
||||
static {
|
||||
SAPPHIRE_ORES = List.of(OreFeatureConfig.createTarget(STONE_ORE_REPLACEABLES, VPBlocks.SAPPHIRE_ORE.getDefaultState()));
|
||||
RUBY_ORES = List.of(OreFeatureConfig.createTarget(STONE_ORE_REPLACEABLES, VPBlocks.RUBY_ORE.getDefaultState()));
|
||||
JADE_ORES = List.of(OreFeatureConfig.createTarget(STONE_ORE_REPLACEABLES, VPBlocks.RUBY_ORE.getDefaultState()));
|
||||
ORE_SAPPHIRE = ConfiguredFeatures.register("ore_sapphire", Feature.ORE, new OreFeatureConfig(List.of(OreFeatureConfig.createTarget(STONE_ORE_REPLACEABLES, VPBlocks.SAPPHIRE_ORE.getDefaultState())), 4));
|
||||
ORE_RUBY = ConfiguredFeatures.register("ore_ruby", Feature.ORE, new OreFeatureConfig(List.of(OreFeatureConfig.createTarget(STONE_ORE_REPLACEABLES, VPBlocks.RUBY_ORE.getDefaultState())), 3));
|
||||
ORE_JADE = ConfiguredFeatures.register("ore_jade", Feature.ORE, new OreFeatureConfig(List.of(OreFeatureConfig.createTarget(STONE_ORE_REPLACEABLES, VPBlocks.JADE_ORE.getDefaultState())), 2));
|
||||
}
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
package tech.nevets.vplus.worldgen.features;
|
||||
|
||||
import net.minecraft.util.registry.RegistryEntry;
|
||||
import net.minecraft.world.gen.YOffset;
|
||||
import net.minecraft.world.gen.feature.OrePlacedFeatures;
|
||||
import net.minecraft.world.gen.feature.PlacedFeature;
|
||||
import net.minecraft.world.gen.feature.PlacedFeatures;
|
||||
import net.minecraft.world.gen.placementmodifier.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class VPPlacedFeatures extends OrePlacedFeatures {
|
||||
public static final RegistryEntry<PlacedFeature> ORE_SAPPHIRE;
|
||||
public static final RegistryEntry<PlacedFeature> ORE_RUBY;
|
||||
public static final RegistryEntry<PlacedFeature> ORE_JADE;
|
||||
|
||||
public VPPlacedFeatures() {
|
||||
}
|
||||
|
||||
private static List<PlacementModifier> modifiers(PlacementModifier countModifier, PlacementModifier heightModifier) {
|
||||
return List.of(countModifier, SquarePlacementModifier.of(), heightModifier, BiomePlacementModifier.of());
|
||||
}
|
||||
|
||||
private static List<PlacementModifier> modifiersWithCount(int count, PlacementModifier heightModifier) {
|
||||
return modifiers(CountPlacementModifier.of(count), heightModifier);
|
||||
}
|
||||
|
||||
private static List<PlacementModifier> modifiersWithRarity(int chance, PlacementModifier heightModifier) {
|
||||
return modifiers(RarityFilterPlacementModifier.of(chance), heightModifier);
|
||||
}
|
||||
|
||||
static {
|
||||
ORE_SAPPHIRE = PlacedFeatures.register("ore_sapphire", VPOreConfiguredFeatures.ORE_SAPPHIRE, modifiersWithCount(4, HeightRangePlacementModifier.trapezoid(YOffset.fixed(0), YOffset.fixed(24))));
|
||||
ORE_RUBY = PlacedFeatures.register("ore_ruby", VPOreConfiguredFeatures.ORE_RUBY, modifiersWithCount(3, HeightRangePlacementModifier.uniform(YOffset.fixed(-12), YOffset.fixed(0))));
|
||||
ORE_JADE = PlacedFeatures.register("ore_jade", VPOreConfiguredFeatures.ORE_SAPPHIRE, modifiersWithCount(2, HeightRangePlacementModifier.trapezoid(YOffset.fixed(-24), YOffset.fixed(-12))));
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
@ -1,19 +0,0 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=east": {
|
||||
"model": "minecraft:block/wall_torch"
|
||||
},
|
||||
"facing=north": {
|
||||
"model": "minecraft:block/wall_torch",
|
||||
"y": 270
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "minecraft:block/wall_torch",
|
||||
"y": 90
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "minecraft:block/wall_torch",
|
||||
"y": 180
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"variants": {
|
||||
"": {
|
||||
"model": "minecraft:block/torch"
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
"variants": {
|
||||
"": { "model": "vplus:block/platinum_block"}
|
||||
}
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
"variants": {
|
||||
"": { "model": "vplus:block/platinum_ore"}
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"variants": {
|
||||
"": { "model": "vplus:block/sapphire_block"}
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"variants": {
|
||||
"": { "model": "vplus:block/sapphire_ore"}
|
||||
}
|
||||
}
|
@ -2,77 +2,19 @@
|
||||
"key.vplus.zoom": "Zoom Key",
|
||||
"category.vplus.zoom": "Zoom",
|
||||
|
||||
"itemGroup.vplus.all": "All",
|
||||
"itemGroup.vplus.combat": "Combat",
|
||||
"itemGroup.vplus.tools": "Tools",
|
||||
"itemGroup.vplus.food": "Food",
|
||||
"itemGroup.vplus.vert_slabs": "Vertical Slabs",
|
||||
"itemGroup.vplus.blocksplus": "Blocks Plus",
|
||||
"itemGroup.vplus.itemsplus": "Items Plus",
|
||||
"itemGroup.vplus.combatplus": "Combat",
|
||||
"itemGroup.vplus.toolsplus": "Tools",
|
||||
"itemGroup.vplus.foodplus": "Food",
|
||||
|
||||
"block.vplus.lava_sponge": "Lava Sponge",
|
||||
"block.vplus.saturated_lava_sponge": "Saturated Lava Sponge",
|
||||
"block.vplus.platinum_ore": "Platinum Ore",
|
||||
"block.vplus.platinum_block": "Platinum Block",
|
||||
"block.vplus.sapphire_ore": "Sapphire Ore",
|
||||
"block.vplus.sapphire_block": "Sapphire Block",
|
||||
"block.vplus.ruby_ore": "Ruby Ore",
|
||||
"block.vplus.ruby_block": "Ruby Block",
|
||||
|
||||
"item.vplus.platinum_ingot": "Platinum Ingot",
|
||||
"item.vplus.platinum_nugget": "Platinum Nugget",
|
||||
"item.vplus.ruby": "Ruby",
|
||||
|
||||
"item.vplus.copper_sword": "Copper Sword",
|
||||
"item.vplus.emerald_sword": "Emerald Sword",
|
||||
"item.vplus.platinum_sword": "Platinum Sword",
|
||||
"item.vplus.ruby_sword": "Ruby Sword",
|
||||
|
||||
"item.vplus.copper_helmet": "Copper Helmet",
|
||||
"item.vplus.copper_chestplate": "Copper Chestplate",
|
||||
"item.vplus.copper_leggings": "Copper Leggings",
|
||||
"item.vplus.copper_boots": "Copper Boots",
|
||||
"item.vplus.emerald_helmet": "Emerald Helmet",
|
||||
"item.vplus.emerald_chestplate": "Emerald Chestplate",
|
||||
"item.vplus.emerald_leggings": "Emerald Leggings",
|
||||
"item.vplus.emerald_boots": "Emerald Boots",
|
||||
"item.vplus.platinum_helmet": "Platinum Helmet",
|
||||
"item.vplus.platinum_chestplate": "Platinum Chestplate",
|
||||
"item.vplus.platinum_leggings": "Platinum Leggings",
|
||||
"item.vplus.platinum_boots": "Platinum Boots",
|
||||
"item.vplus.ruby_helmet": "Ruby Helmet",
|
||||
"item.vplus.ruby_chestplate": "Ruby Chestplate",
|
||||
"item.vplus.ruby_leggings": "Ruby Leggings",
|
||||
"item.vplus.ruby_boots": "Ruby Boots",
|
||||
|
||||
"item.vplus.copper_pickaxe": "Copper Pickaxe",
|
||||
"item.vplus.copper_axe": "Copper Axe",
|
||||
"item.vplus.copper_shovel": "Copper Shovel",
|
||||
"item.vplus.copper_hoe": "Copper Hoe",
|
||||
"item.vplus.emerald_pickaxe": "Emerald Pickaxe",
|
||||
"item.vplus.emerald_axe": "Emerald Axe",
|
||||
"item.vplus.emerald_shovel": "Emerald Shovel",
|
||||
"item.vplus.emerald_hoe": "Emerald Hoe",
|
||||
"item.vplus.platinum_pickaxe": "Platinum Pickaxe",
|
||||
"item.vplus.platinum_axe": "Platinum Axe",
|
||||
"item.vplus.platinum_shovel": "Platinum Shovel",
|
||||
"item.vplus.platinum_hoe": "Platinum Hoe",
|
||||
"item.vplus.ruby_pickaxe": "Ruby Pickaxe",
|
||||
"item.vplus.ruby_axe": "Ruby Axe",
|
||||
"item.vplus.ruby_shovel": "Ruby Shovel",
|
||||
"item.vplus.ruby_hoe": "Ruby Hoe",
|
||||
|
||||
"item.vplus.iron_apple": "Iron Apple",
|
||||
"item.vplus.enchanted_iron_apple": "Enchanted Iron Apple",
|
||||
"item.vplus.copper_apple": "Copper Apple",
|
||||
"item.vplus.enchanted_copper_apple": "Enchanted Copper Apple",
|
||||
"item.vplus.diamond_apple": "Diamond Apple",
|
||||
"item.vplus.enchanted_diamond_apple": "Enchanted Diamond Apple",
|
||||
"item.vplus.emerald_apple": "Emerald Apple",
|
||||
"item.vplus.enchanted_emerald_apple": "Enchanted Emerald Apple",
|
||||
"item.vplus.netherite_apple": "Netherite Apple",
|
||||
"item.vplus.enchanted_netherite_apple": "Enchanted Netherite Apple",
|
||||
"item.vplus.platinum_apple": "Platinum Apple",
|
||||
"item.vplus.enchanted_platinum_apple": "Enchanted Platinum Apple",
|
||||
"item.vplus.ruby_apple": "Ruby Apple",
|
||||
"item.vplus.enchanted_ruby_apple": "Enchanted Ruby Apple",
|
||||
|
||||
"block.vplus.vertical_oak_slab":"Vertical Oak Slab",
|
||||
"block.vplus.vertical_spruce_slab":"Vertical Spruce Slab",
|
||||
"block.vplus.vertical_birch_slab":"Vertical Birch Slab",
|
||||
@ -111,5 +53,62 @@
|
||||
"block.vplus.vertical_diorite_slab":"Vertical Diorite Slab",
|
||||
"block.vplus.vertical_blackstone_slab":"Vertical Blackstone Slab",
|
||||
"block.vplus.vertical_polished_blackstone_slab":"Vertical Polished Blackstone Slab",
|
||||
"block.vplus.vertical_polished_blackstone_brick_slab":"Vertical Polished Blackstone Brick Slab"
|
||||
"block.vplus.vertical_polished_blackstone_brick_slab":"Vertical Polished Blackstone Brick Slab",
|
||||
|
||||
"item.vplus.sapphire": "Sapphire",
|
||||
"item.vplus.ruby": "Ruby",
|
||||
|
||||
"item.vplus.copper_sword": "Copper Sword",
|
||||
"item.vplus.emerald_sword": "Emerald Sword",
|
||||
"item.vplus.sapphire_sword": "Sapphire Sword",
|
||||
"item.vplus.ruby_sword": "Ruby Sword",
|
||||
|
||||
"item.vplus.copper_helmet": "Copper Helmet",
|
||||
"item.vplus.copper_chestplate": "Copper Chestplate",
|
||||
"item.vplus.copper_leggings": "Copper Leggings",
|
||||
"item.vplus.copper_boots": "Copper Boots",
|
||||
"item.vplus.emerald_helmet": "Emerald Helmet",
|
||||
"item.vplus.emerald_chestplate": "Emerald Chestplate",
|
||||
"item.vplus.emerald_leggings": "Emerald Leggings",
|
||||
"item.vplus.emerald_boots": "Emerald Boots",
|
||||
"item.vplus.sapphire_helmet": "Sapphire Helmet",
|
||||
"item.vplus.sapphire_chestplate": "Sapphire Chestplate",
|
||||
"item.vplus.sapphire_leggings": "Sapphire Leggings",
|
||||
"item.vplus.sapphire_boots": "Sapphire Boots",
|
||||
"item.vplus.ruby_helmet": "Ruby Helmet",
|
||||
"item.vplus.ruby_chestplate": "Ruby Chestplate",
|
||||
"item.vplus.ruby_leggings": "Ruby Leggings",
|
||||
"item.vplus.ruby_boots": "Ruby Boots",
|
||||
|
||||
"item.vplus.copper_pickaxe": "Copper Pickaxe",
|
||||
"item.vplus.copper_axe": "Copper Axe",
|
||||
"item.vplus.copper_shovel": "Copper Shovel",
|
||||
"item.vplus.copper_hoe": "Copper Hoe",
|
||||
"item.vplus.emerald_pickaxe": "Emerald Pickaxe",
|
||||
"item.vplus.emerald_axe": "Emerald Axe",
|
||||
"item.vplus.emerald_shovel": "Emerald Shovel",
|
||||
"item.vplus.emerald_hoe": "Emerald Hoe",
|
||||
"item.vplus.sapphire_pickaxe": "Sapphire Pickaxe",
|
||||
"item.vplus.sapphire_axe": "Sapphire Axe",
|
||||
"item.vplus.sapphire_shovel": "Sapphire Shovel",
|
||||
"item.vplus.sapphire_hoe": "Sapphire Hoe",
|
||||
"item.vplus.ruby_pickaxe": "Ruby Pickaxe",
|
||||
"item.vplus.ruby_axe": "Ruby Axe",
|
||||
"item.vplus.ruby_shovel": "Ruby Shovel",
|
||||
"item.vplus.ruby_hoe": "Ruby Hoe",
|
||||
|
||||
"item.vplus.iron_apple": "Iron Apple",
|
||||
"item.vplus.enchanted_iron_apple": "Enchanted Iron Apple",
|
||||
"item.vplus.copper_apple": "Copper Apple",
|
||||
"item.vplus.enchanted_copper_apple": "Enchanted Copper Apple",
|
||||
"item.vplus.diamond_apple": "Diamond Apple",
|
||||
"item.vplus.enchanted_diamond_apple": "Enchanted Diamond Apple",
|
||||
"item.vplus.emerald_apple": "Emerald Apple",
|
||||
"item.vplus.enchanted_emerald_apple": "Enchanted Emerald Apple",
|
||||
"item.vplus.netherite_apple": "Netherite Apple",
|
||||
"item.vplus.enchanted_netherite_apple": "Enchanted Netherite Apple",
|
||||
"item.vplus.sapphire_apple": "Sapphire Apple",
|
||||
"item.vplus.enchanted_sapphire_apple": "Enchanted Sapphire Apple",
|
||||
"item.vplus.ruby_apple": "Ruby Apple",
|
||||
"item.vplus.enchanted_ruby_apple": "Enchanted Ruby Apple"
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"parent": "minecraft:block/template_torch_wall",
|
||||
"textures": {
|
||||
"torch": "minecraft:block/torch"
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"parent": "minecraft:block/template_torch",
|
||||
"textures": {
|
||||
"torch": "minecraft:block/torch"
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "vplus:block/platinum_block"
|
||||
"all": "vplus:block/sapphire_block"
|
||||
}
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"parent": "block/cube_all",
|
||||
"textures": {
|
||||
"all": "vplus:block/platinum_ore"
|
||||
"all": "vplus:block/sapphire_ore"
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "vplus:item/enchanted_platinum_apple"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "vplus:item/enchanted_sapphire_apple"
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "minecraft:block/torch"
|
||||
}
|
||||
}
|