Commit of all project code.
build / build (21) (push) Waiting to run

This commit is contained in:
2024-11-29 11:54:13 -07:00
commit e65dc91f0c
87 changed files with 1759 additions and 0 deletions
+9
View File
@@ -0,0 +1,9 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf
# These are Windows script files and should use crlf
*.bat text eol=crlf
+37
View File
@@ -0,0 +1,37 @@
# Automatically build the project and run any configured tests for every push
# and submitted pull request. This can help catch issues that only occur on
# certain platforms or Java versions, and provides a first line of defence
# against bad commits.
name: build
on: [pull_request, push]
jobs:
build:
strategy:
matrix:
# Use these Java versions
java: [
21, # Current Java LTS
]
runs-on: ubuntu-22.04
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v2
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'microsoft'
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: build
run: ./gradlew build
- name: capture build artifacts
if: ${{ matrix.java == '21' }} # Only upload artifacts built from latest java
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: build/libs/
+40
View File
@@ -0,0 +1,40 @@
# gradle
.gradle/
build/
out/
classes/
# eclipse
*.launch
# idea
.idea/
*.iml
*.ipr
*.iws
# vscode
.settings/
.vscode/
bin/
.classpath
.project
# macos
*.DS_Store
# fabric
run/
# java
hs_err_*.log
replay_*.log
*.hprof
*.jfr
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 Big Duckie
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:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
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.
+11
View File
@@ -0,0 +1,11 @@
# Simple Excavators
Simple Excavators is a mod that adds new digging tools via Fabric.
This mod is an updated fork of Draylar's Vanilla Excavators.
## Installation
1. Install the Fabric Launcher from [Fabric MC](https://fabricmc.net/use/installer/)
2. Install the Fabric API jar as a mod from [Modrinth](https://modrinth.com/mod/fabric-api)
3. Install the latest version of Simple Excavators from [Modrinth](https://modrinth.com/simple-excavators)
+116
View File
@@ -0,0 +1,116 @@
plugins {
id 'fabric-loom' version '1.8-SNAPSHOT'
id 'maven-publish'
}
version = "${project.mod_version}-${project.minecraft_version}"
group = project.maven_group
base {
archivesName = project.archives_base_name
}
repositories {
maven { url "https://maven.shedaniel.me/" }
maven { url "https://maven.bigduckie.dev/releases" }
}
loom {
splitEnvironmentSourceSets()
mods {
"simple-excavators" {
sourceSet sourceSets.main
sourceSet sourceSets.client
}
}
}
fabricApi {
configureDataGeneration()
}
dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
// Magna (https://github.com/Draylar/magna) for hammers
include "dev.draylar:magna:${project.magna_version}"
modImplementation("dev.draylar:magna:${project.magna_version}") {
exclude group: "net.fabricmc"
exclude group: "com.jamieswhiteshirt"
exclude group: "me.shedaniel.cloth"
exclude module: "omega-config-base"
}
// Static Content (https://github.com/Draylar/static-content) for hammer loading and compat
include "dev.bigduckie:static-content:${project.static_content_version}"
modImplementation("dev.bigduckie:static-content:${project.static_content_version}") {
exclude group: "net.fabricmc"
exclude module: "omega-config-base"
}
// Config solutions + Cloth Config for Magna
modImplementation "dev.draylar.omega-config:omega-config-base:${project.omega_config_version}"
include "dev.draylar.omega-config:omega-config-base:${project.omega_config_version}"
modApi("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}") {
exclude(group: "net.fabricmc.fabric-api")
}
}
processResources {
inputs.property "version", project.version
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}
tasks.withType(JavaCompile).configureEach {
it.options.release = 17
}
java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
jar {
from("LICENSE") {
rename { "${it}_${project.base.archivesName.get()}" }
}
}
// configure the maven publication
publishing {
publications {
create("mavenJava", MavenPublication) {
artifactId = project.archives_base_name
version = "${project.mod_version}+${project.minecraft_version}"
from components.java
}
}
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
maven {
name = "personal"
url = "https://maven.bigduckie.dev/releases"
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
}
+22
View File
@@ -0,0 +1,22 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
org.gradle.parallel=true
# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.10
loader_version=0.16.7
# Mod Properties
mod_version=1.0.0
maven_group=dev.bigduckie
archives_base_name=simple-excavators
# Dependencies
fabric_version=0.92.2+1.20.1
magna_version=1.10.1+1.20.1
static_content_version=1.0.7+1.20.1
omega_config_version=1.4.1+1.20.1
cloth_config_version=11.1.106
Binary file not shown.
+7
View File
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Vendored Executable
+252
View File
@@ -0,0 +1,252 @@
#!/bin/sh
#
# 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.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
# 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/HEAD/platforms/jvm/plugins-application/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
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
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
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 ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
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
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# 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.
# 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
# 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"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# 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" "$@"
Vendored
+94
View File
@@ -0,0 +1,94 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
+10
View File
@@ -0,0 +1,10 @@
pluginManagement {
repositories {
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
mavenCentral()
gradlePluginPortal()
}
}
@@ -0,0 +1,53 @@
package dev.bigduckie.simpleexcavators;
import dev.bigduckie.simpleexcavators.config.SimpleExcavatorsConfig;
import dev.bigduckie.simpleexcavators.data.ExcavatorData;
import dev.bigduckie.simpleexcavators.item.ExtendedExcavatorItem;
import dev.bigduckie.staticcontent.StaticContent;
import dev.draylar.magna.api.optional.MagnaOptionals;
import draylar.omegaconfig.OmegaConfig;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.event.player.AttackEntityCallback;
import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.registry.RegistryKey;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.text.Text;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Identifier;
public class SimpleExcavators implements ModInitializer {
public static final String MOD_ID = "simple-excavators";
public static SimpleExcavatorsConfig CONFIG = OmegaConfig.register(SimpleExcavatorsConfig.class);
private static final RegistryKey<ItemGroup> ITEM_GROUP = RegistryKey.of(RegistryKeys.ITEM_GROUP, id("group"));
@Override
public void onInitialize() {
MagnaOptionals.optInForCurse();
StaticContent.load(id("excavators"), ExcavatorData.class);
Registry.register(Registries.ITEM_GROUP, ITEM_GROUP, FabricItemGroup.builder().displayName(Text.translatable("itemGroup.simple-excavators.group")).icon(() -> new ItemStack(Registries.ITEM.get(id("diamond_excavator")))).entries((context, entries) -> entries.addAll(ExcavatorData.ENTRY_SET)).build());
registerCallbackHandlers();
}
private void registerCallbackHandlers() {
AttackEntityCallback.EVENT.register((playerEntity, world, hand, entity, entityHitResult) -> {
ItemStack handStack = playerEntity.getMainHandStack();
if (handStack.getItem() instanceof ExtendedExcavatorItem extendedExcavatorItem) {
// set entity on fire if this excavator smelts blocks
if (extendedExcavatorItem.getData().canSmelt()) {
entity.setOnFireFor(4);
}
}
return ActionResult.PASS;
});
}
public static Identifier id(String name) {
return new Identifier(MOD_ID, name);
}
}
@@ -0,0 +1,15 @@
package dev.bigduckie.simpleexcavators.config;
import draylar.omegaconfig.api.Config;
public class SimpleExcavatorsConfig implements Config {
public boolean enableExtraMaterials = true;
public int durabilityModifier = 5;
public double breakSpeedMultiplier = 1.0;
@Override
public String getName() {
return "simple-excavators";
}
}
@@ -0,0 +1,144 @@
package dev.bigduckie.simpleexcavators.data;
import dev.bigduckie.simpleexcavators.item.ExtendedExcavatorItem;
import dev.bigduckie.simpleexcavators.material.CustomToolMaterial;
import dev.bigduckie.staticcontent.api.ContentData;
import net.fabricmc.fabric.api.registry.FuelRegistry;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemStackSet;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.util.Identifier;
import java.util.Set;
public class ExcavatorData implements ContentData {
private final String id;
private final int miningLevel;
private final int durability;
private final float blockBreakSpeed;
private final float attackDamage;
private final float attackSpeed;
private final int enchantability;
private final Identifier repairIngredient;
private final boolean isFireImmune;
private final boolean smelts;
private final int breakRadius;
private final boolean isExtra;
private final int burnTime;
private final boolean hasExtraKnockback;
public static final Set<ItemStack> ENTRY_SET = ItemStackSet.create();
public ExcavatorData(String id, int miningLevel, int durability, float blockBreakSpeed, float attackDamage, float attackSpeed, int enchantability, Identifier repairIngredient, boolean isFireImmune, boolean smelts, int breakRadius, boolean isExtra, int burnTime, boolean hasExtraKnockback, String group) {
this.id = id;
this.miningLevel = miningLevel;
this.durability = durability;
this.blockBreakSpeed = blockBreakSpeed;
this.attackDamage = attackDamage;
this.attackSpeed = attackSpeed;
this.enchantability = enchantability;
this.repairIngredient = repairIngredient;
this.isFireImmune = isFireImmune;
this.smelts = smelts;
this.breakRadius = breakRadius;
this.isExtra = isExtra;
this.burnTime = burnTime;
this.hasExtraKnockback = hasExtraKnockback;
}
@Override
public void register(Identifier identifier) {
// only register if the excavator is not extra (wood -> diamond), or if it is extra (lapis, emerald, ...) and the option is enabled
if (!isExtra() || isExtra() && dev.bigduckie.simpleexcavators.SimpleExcavators.CONFIG.enableExtraMaterials) {
// setup settings
Item.Settings settings = new Item.Settings();
if (isFireImmune()) {
settings.fireproof();
}
// check for excavator autosmelt
// create excavator with settings
ExtendedExcavatorItem excavatorItem = new ExtendedExcavatorItem(
CustomToolMaterial.from(this),
0,
getAttackSpeed() == 0 ? -2.4f : getAttackSpeed(),
settings,
getBreakRadius() == 0 ? 1 : getBreakRadius(),
this
);
// burn time for furnace fuel
if (getBurnTime() > 0) {
FuelRegistry.INSTANCE.add(excavatorItem, getBurnTime());
}
// add excavator to tag
String path = getId() + "_excavator";
Identifier registryID = path.contains(":") ? new Identifier(path) : dev.bigduckie.simpleexcavators.SimpleExcavators.id(path);
Registry.register(Registries.ITEM, registryID, excavatorItem);
// add excavator to item group
ENTRY_SET.add(excavatorItem.getDefaultStack());
}
}
public boolean hasExtraKnockback() {
return hasExtraKnockback;
}
public boolean canSmelt() {
return smelts;
}
public int getBurnTime() {
return burnTime;
}
public boolean isExtra() {
return isExtra;
}
public String getId() {
return id;
}
public int getBreakRadius() {
return breakRadius;
}
public float getAttackSpeed() {
return attackSpeed;
}
public int getMiningLevel() {
return miningLevel;
}
public int getDurability() {
return durability;
}
public float getBlockBreakSpeed() {
return blockBreakSpeed * (float) dev.bigduckie.simpleexcavators.SimpleExcavators.CONFIG.breakSpeedMultiplier;
}
public float getAttackDamage() {
return attackDamage;
}
public int getEnchantability() {
return enchantability;
}
public Identifier getRepairIngredient() {
return repairIngredient;
}
public boolean isFireImmune() {
return isFireImmune;
}
}
@@ -0,0 +1,50 @@
package dev.bigduckie.simpleexcavators.item;
import dev.bigduckie.simpleexcavators.data.ExcavatorData;
import dev.draylar.magna.api.BlockProcessor;
import dev.draylar.magna.item.ExcavatorItem;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.SimpleInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ToolMaterial;
import net.minecraft.recipe.RecipeType;
import net.minecraft.recipe.SmeltingRecipe;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import java.util.Optional;
public class ExtendedExcavatorItem extends ExcavatorItem {
private final ExcavatorData data;
public ExtendedExcavatorItem(ToolMaterial toolMaterial, int attackDamage, float attackSpeed, Settings settings, int breakRadius, ExcavatorData data) {
super(toolMaterial, attackDamage, attackSpeed, settings, breakRadius);
this.data = data;
}
public ExcavatorData getData() {
return data;
}
@Override
public BlockProcessor getProcessor(World world, PlayerEntity player, BlockPos pos, ItemStack heldStack) {
if (data.canSmelt()) {
return (tool, input) -> {
Optional<SmeltingRecipe> cooked = world.getRecipeManager().getFirstMatch(
RecipeType.SMELTING,
new SimpleInventory(input),
world
);
if (cooked.isPresent()) {
return cooked.get().getOutput(world.getRegistryManager()).copy();
}
return input;
};
} else {
return super.getProcessor(world, player, pos, heldStack);
}
}
}
@@ -0,0 +1,67 @@
package dev.bigduckie.simpleexcavators.material;
import dev.bigduckie.simpleexcavators.data.ExcavatorData;
import net.minecraft.item.ToolMaterial;
import net.minecraft.recipe.Ingredient;
import net.minecraft.registry.Registries;
import net.minecraft.util.Identifier;
public class CustomToolMaterial implements ToolMaterial {
private final int enchantability;
private final float miningSpeedMultiplier;
private final int durability;
private final float attackDamage;
private final int miningLevel;
private final Ingredient ingredient;
public CustomToolMaterial(int enchantability, float miningSpeedMultiplier, int durability, float attackDamage, int miningLevel, Ingredient ingredient) {
this.enchantability = enchantability;
this.miningSpeedMultiplier = miningSpeedMultiplier;
this.durability = durability;
this.attackDamage = attackDamage;
this.miningLevel = miningLevel;
this.ingredient = ingredient;
}
public static CustomToolMaterial from(ExcavatorData data) {
return new CustomToolMaterial(
data.getEnchantability() == 0 ? 15 : data.getEnchantability(),
data.getBlockBreakSpeed() == 0 ? 1 : data.getBlockBreakSpeed(),
(data.getDurability() == 0 ? 500 : data.getDurability()) * dev.bigduckie.simpleexcavators.SimpleExcavators.CONFIG.durabilityModifier,
data.getAttackDamage() == 0 ? 4 : data.getAttackDamage(),
data.getMiningLevel(),
Ingredient.ofItems(Registries.ITEM.get(data.getRepairIngredient() == null ? new Identifier("iron_ingot") : data.getRepairIngredient()))
);
}
@Override
public int getDurability() {
return durability;
}
@Override
public float getMiningSpeedMultiplier() {
return miningSpeedMultiplier;
}
@Override
public float getAttackDamage() {
return attackDamage;
}
@Override
public int getMiningLevel() {
return miningLevel;
}
@Override
public int getEnchantability() {
return enchantability;
}
@Override
public Ingredient getRepairIngredient() {
return ingredient;
}
}
@@ -0,0 +1,28 @@
package dev.bigduckie.simpleexcavators.mixin;
import dev.bigduckie.simpleexcavators.item.ExtendedExcavatorItem;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.entity.LivingEntity;
import net.minecraft.item.ItemStack;
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;
@Mixin(EnchantmentHelper.class)
public class ExcavatorKnockbackMixin {
private static final int SLIME_KNOCKBACK_MODIFIER = 3;
@Inject(at = @At("HEAD"), method = "getKnockback", cancellable = true)
private static void getKnockback(LivingEntity livingEntity, CallbackInfoReturnable<Integer> info) {
ItemStack heldStack = livingEntity.getMainHandStack();
if(heldStack.getItem() instanceof ExtendedExcavatorItem excavatorItem) {
// check data associated with excavator item for extra kb
if(excavatorItem.getData().hasExtraKnockback()) {
info.setReturnValue(SLIME_KNOCKBACK_MODIFIER);
info.cancel();
}
}
}
}
@@ -0,0 +1,26 @@
package dev.bigduckie.simpleexcavators.mixin;
import dev.bigduckie.simpleexcavators.item.ExtendedExcavatorItem;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.enchantment.EnchantmentTarget;
import net.minecraft.enchantment.SilkTouchEnchantment;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.item.ItemStack;
import org.spongepowered.asm.mixin.Mixin;
@Mixin(SilkTouchEnchantment.class)
public class SilkTouchEnchantmentMixin extends Enchantment {
public SilkTouchEnchantmentMixin(Rarity weight, EnchantmentTarget type, EquipmentSlot[] slotTypes) {
super(weight, type, slotTypes);
}
@Override
public boolean isAcceptableItem(ItemStack stack) {
if (stack.getItem() instanceof ExtendedExcavatorItem item) {
return !item.getData().canSmelt();
}
return super.isAcceptableItem(stack);
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

@@ -0,0 +1,30 @@
{
"itemGroup.simple-excavators.group": "Vanilla Excavators",
"item.simple-excavators.wooden_excavator": "Wooden Excavator",
"item.simple-excavators.stone_excavator": "Stone Excavator",
"item.simple-excavators.iron_excavator": "Iron Excavator",
"item.simple-excavators.golden_excavator": "Golden Excavator",
"item.simple-excavators.diamond_excavator": "Diamond Excavator",
"item.simple-excavators.netherite_excavator": "Netherite Excavator",
"item.simple-excavators.emerald_excavator": "Emerald Excavator",
"item.simple-excavators.obsidian_excavator": "Obsidian Excavator",
"item.simple-excavators.lapis_excavator": "Lapis Lazuli Excavator",
"item.simple-excavators.quartz_excavator": "Quartz Excavator",
"item.simple-excavators.tater_excavator": "Lil Tater Excavator",
"item.simple-excavators.fiery_excavator": "Fiery Excavator",
"item.simple-excavators.prismarine_excavator": "Prismarine Excavator",
"item.simple-excavators.slime_excavator": "Slime Excavator",
"item.simple-excavators.ender_excavator": "Ender Excavator",
"item.simple-excavators.vibranium_excavator": "Vibranium Excavator",
"item.simple-excavators.glowstone_excavator": "Glowstone Excavator",
"item.simple-excavators.nether_excavator": "Nether Excavator",
"text.autoconfig.simple-excavators.option.enableExtraMaterials": "Extra Vanilla Material Excavators",
"text.autoconfig.simple-excavators.option.durabilityModifier": "Excavator Durability Modifier",
"text.autoconfig.simple-excavators.category.default": "General",
"text.autoconfig.simple-excavators.title": "Vanilla Excavators Config",
"item.simple-excavators.dynagear_excavator": "%s Excavator"
}
@@ -0,0 +1,30 @@
{
"itemGroup.simple-excavators.group": "Vanilla Excavators",
"item.simple-excavators.wooden_excavator": "Деревяный Экскаватор",
"item.simple-excavators.stone_excavator": "Каменый Экскаватор",
"item.simple-excavators.iron_excavator": "Железный Экскаватор",
"item.simple-excavators.golden_excavator": "Золотой Экскаватор",
"item.simple-excavators.diamond_excavator": "Алмазный Экскаватор",
"item.simple-excavators.netherite_excavator": "Незеритовый Экскаватор",
"item.simple-excavators.emerald_excavator": "Изумрудный Экскаватор",
"item.simple-excavators.obsidian_excavator": "Обсиантовый Экскаватор",
"item.simple-excavators.lapis_excavator": "Лазуритой Экскаватор",
"item.simple-excavators.quartz_excavator": "Кваревый Экскаватор",
"item.simple-excavators.tater_excavator": "Lil Tater Экскаватор",
"item.simple-excavators.fiery_excavator": "Пылаюший Экскаватор",
"item.simple-excavators.prismarine_excavator": "Призмариновый Экскаватор",
"item.simple-excavators.slime_excavator": "Слизневый Экскаватор",
"item.simple-excavators.ender_excavator": "Экскаватор Края",
"item.simple-excavators.vibranium_excavator": "Вибраниум Экскаватор",
"item.simple-excavators.glowstone_excavator": "Экскаватор из Светопыли",
"item.simple-excavators.nether_excavator": "Адскмй Экскаватор",
"text.autoconfig.simple-excavators.option.enableExtraMaterials": "Extra Vanilla Material Excavators",
"text.autoconfig.simple-excavators.option.durabilityModifier": "Экскаватор Durability Modifier",
"text.autoconfig.simple-excavators.category.default": "General",
"text.autoconfig.simple-excavators.title": "Vanilla Excavators Config",
"item.simple-excavators.dynagear_excavator": "%s Экскаватор"
}
@@ -0,0 +1,30 @@
{
"itemGroup.simple-excavators.group": "原版铲子",
"item.simple-excavators.wooden_excavator": "木铲",
"item.simple-excavators.stone_excavator": "石铲",
"item.simple-excavators.iron_excavator": "铁铲",
"item.simple-excavators.golden_excavator": "金铲",
"item.simple-excavators.diamond_excavator": "钻石铲",
"item.simple-excavators.netherite_excavator": "下界合金铲",
"item.simple-excavators.emerald_excavator": "绿宝石铲",
"item.simple-excavators.obsidian_excavator": "黑曜石铲",
"item.simple-excavators.lapis_excavator": "青金石铲",
"item.simple-excavators.quartz_excavator": "石英铲",
"item.simple-excavators.tater_excavator": "小塔特铲",
"item.simple-excavators.fiery_excavator": "炽烈铲",
"item.simple-excavators.prismarine_excavator": "海晶铲",
"item.simple-excavators.slime_excavator": "史莱姆铲",
"item.simple-excavators.ender_excavator": "末影铲",
"item.simple-excavators.vibranium_excavator": "振金铲",
"item.simple-excavators.glowstone_excavator": "荧石铲",
"item.simple-excavators.nether_excavator": "下界铲",
"text.autoconfig.simple-excavators.option.enableExtraMaterials": "额外原版材质铲子",
"text.autoconfig.simple-excavators.option.durabilityModifier": "铲子耐久修改",
"text.autoconfig.simple-excavators.category.default": "常规",
"text.autoconfig.simple-excavators.title": "原版铲子配置文件",
"item.simple-excavators.dynagear_excavator": "%s铲"
}
@@ -0,0 +1,6 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "simple-excavators:item/diamond_excavator"
}
}
@@ -0,0 +1,6 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "simple-excavators:item/emerald_excavator"
}
}
@@ -0,0 +1,6 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "simple-excavators:item/ender_excavator"
}
}
@@ -0,0 +1,6 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "simple-excavators:item/fiery_excavator"
}
}
@@ -0,0 +1,6 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "simple-excavators:item/glowstone_excavator"
}
}
@@ -0,0 +1,6 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "simple-excavators:item/golden_excavator"
}
}
@@ -0,0 +1,6 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "simple-excavators:item/iron_excavator"
}
}
@@ -0,0 +1,6 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "simple-excavators:item/lapis_excavator"
}
}
@@ -0,0 +1,6 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "simple-excavators:item/nether_excavator"
}
}
@@ -0,0 +1,6 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "simple-excavators:item/netherite_excavator"
}
}
@@ -0,0 +1,6 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "simple-excavators:item/obsidian_excavator"
}
}
@@ -0,0 +1,6 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "simple-excavators:item/prismarine_excavator"
}
}
@@ -0,0 +1,6 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "simple-excavators:item/quartz_excavator"
}
}
@@ -0,0 +1,6 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "simple-excavators:item/slime_excavator"
}
}
@@ -0,0 +1,6 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "simple-excavators:item/stone_excavator"
}
}
@@ -0,0 +1,6 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "simple-excavators:item/tater_hammer"
}
}
@@ -0,0 +1,6 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "simple-excavators:item/vibranium_excavator"
}
}
@@ -0,0 +1,6 @@
{
"parent": "item/handheld",
"textures": {
"layer0": "simple-excavators:item/wooden_excavator"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 369 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 359 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 B

@@ -0,0 +1,61 @@
{
"replace": false,
"values": [
{
"id": "simple-excavators:diamond_shovel",
"required": false
},
{
"id": "simple-excavators:emerald_shovel",
"required": false
},
{
"id": "simple-excavators:ender_shovel",
"required": false
},
{
"id": "simple-excavators:fiery_shovel",
"required": false
},
{
"id": "simple-excavators:golden_shovel",
"required": false
},
{
"id": "simple-excavators:iron_shovel",
"required": false
},
{
"id": "simple-excavators:lapis_shovel",
"required": false
},
{
"id": "simple-excavators:netherite_shovel",
"required": false
},
{
"id": "simple-excavators:obsidian_shovel",
"required": false
},
{
"id": "simple-excavators:prismarine_shovel",
"required": false
},
{
"id": "simple-excavators:quartz_shovel",
"required": false
},
{
"id": "simple-excavators:slime_shovel",
"required": false
},
{
"id": "simple-excavators:stone_shovel",
"required": false
},
{
"id": "simple-excavators:wooden_shovel",
"required": false
}
]
}
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"simple-excavators:golden_excavator"
]
}
@@ -0,0 +1,22 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" d ",
"DsD",
" s "
],
"key": {
"D": {
"item": "minecraft:diamond_block"
},
"d": {
"item": "minecraft:diamond"
},
"s": {
"item": "minecraft:stick"
}
},
"result": {
"item": "simple-excavators:diamond_excavator"
}
}
@@ -0,0 +1,22 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" d ",
"DsD",
" s "
],
"key": {
"D": {
"item": "minecraft:emerald_block"
},
"d": {
"item": "minecraft:emerald"
},
"s": {
"item": "minecraft:stick"
}
},
"result": {
"item": "simple-excavators:emerald_excavator"
}
}
@@ -0,0 +1,22 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" d ",
"DsD",
" s "
],
"key": {
"D": {
"item": "minecraft:end_stone_bricks"
},
"d": {
"item": "minecraft:dragon_head"
},
"s": {
"item": "minecraft:obsidian"
}
},
"result": {
"item": "simple-excavators:ender_excavator"
}
}
@@ -0,0 +1,22 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" d ",
"DsD",
" s "
],
"key": {
"D": {
"item": "minecraft:magma_block"
},
"d": {
"item": "minecraft:magma_cream"
},
"s": {
"item": "minecraft:obsidian"
}
},
"result": {
"item": "simple-excavators:fiery_excavator"
}
}
@@ -0,0 +1,22 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" d ",
"DsD",
" s "
],
"key": {
"D": {
"item": "minecraft:gold_block"
},
"d": {
"item": "minecraft:gold_ingot"
},
"s": {
"item": "minecraft:stick"
}
},
"result": {
"item": "simple-excavators:golden_excavator"
}
}
@@ -0,0 +1,22 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" d ",
"DsD",
" s "
],
"key": {
"D": {
"item": "minecraft:iron_block"
},
"d": {
"item": "minecraft:iron_ingot"
},
"s": {
"item": "minecraft:stick"
}
},
"result": {
"item": "simple-excavators:iron_excavator"
}
}
@@ -0,0 +1,22 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" d ",
"DsD",
" s "
],
"key": {
"D": {
"item": "minecraft:lapis_block"
},
"d": {
"item": "minecraft:lapis_lazuli"
},
"s": {
"item": "minecraft:stick"
}
},
"result": {
"item": "simple-excavators:lapis_excavator"
}
}
@@ -0,0 +1,12 @@
{
"type": "minecraft:smithing",
"base": {
"item": "simple-excavators:diamond_excavator"
},
"addition": {
"item": "minecraft:netherite_ingot"
},
"result": {
"item": "simple-excavators:netherite_excavator"
}
}
@@ -0,0 +1,19 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" D ",
"DsD",
" s "
],
"key": {
"D": {
"item": "minecraft:obsidian"
},
"s": {
"item": "minecraft:stick"
}
},
"result": {
"item": "simple-excavators:obsidian_excavator"
}
}
@@ -0,0 +1,22 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" d ",
"DsD",
" s "
],
"key": {
"D": {
"item": "minecraft:prismarine"
},
"d": {
"item": "minecraft:prismarine_shard"
},
"s": {
"item": "minecraft:stick"
}
},
"result": {
"item": "simple-excavators:prismarine_excavator"
}
}
@@ -0,0 +1,22 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" d ",
"DsD",
" s "
],
"key": {
"D": {
"item": "minecraft:quartz_block"
},
"d": {
"item": "minecraft:quartz"
},
"s": {
"item": "minecraft:stick"
}
},
"result": {
"item": "simple-excavators:quartz_excavator"
}
}
@@ -0,0 +1,22 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" d ",
"DsD",
" s "
],
"key": {
"D": {
"item": "minecraft:slime_block"
},
"d": {
"item": "minecraft:slime_ball"
},
"s": {
"item": "minecraft:stick"
}
},
"result": {
"item": "simple-excavators:slime_excavator"
}
}
@@ -0,0 +1,22 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" d ",
"DsD",
" s "
],
"key": {
"D": {
"item": "minecraft:stone"
},
"d": {
"item": "minecraft:cobblestone"
},
"s": {
"item": "minecraft:stick"
}
},
"result": {
"item": "simple-excavators:stone_excavator"
}
}
@@ -0,0 +1,22 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" d ",
"DsD",
" s "
],
"key": {
"D": {
"tag": "minecraft:logs"
},
"d": {
"tag": "minecraft:planks"
},
"s": {
"item": "minecraft:stick"
}
},
"result": {
"item": "simple-excavators:wooden_excavator"
}
}
+32
View File
@@ -0,0 +1,32 @@
{
"schemaVersion": 1,
"id": "simple-excavators",
"version": "${version}",
"name": "Simple Excavators",
"description": "Adds excavators that break a 3x3 area. Forked from Draylar's Vanilla Excavators.",
"authors": [
"Big Duckie",
"Draylar"
],
"contact": {
"homepage": "https://bigduckie.dev/mc-mods/simple-excavators",
"sources": "https://git.bigduckie.dev/big-duckie/simple-excavators"
},
"license": "MIT",
"icon": "assets/simple-excavators/icon.png",
"environment": "*",
"entrypoints": {
"main": [
"dev.bigduckie.simpleexcavators.SimpleExcavators"
]
},
"mixins": [
"simple-excavators.mixins.json"
],
"depends": {
"fabricloader": ">=0.16.7",
"minecraft": "~1.20.1",
"java": ">=17",
"fabric-api": "*"
}
}
@@ -0,0 +1,12 @@
{
"required": true,
"package": "dev.bigduckie.simpleexcavators.mixin",
"compatibilityLevel": "JAVA_17",
"mixins": [
"ExcavatorKnockbackMixin",
"SilkTouchEnchantmentMixin"
],
"injectors": {
"defaultRequire": 1
}
}
@@ -0,0 +1,10 @@
{
"id": "diamond",
"miningLevel": 3,
"durability": 1561,
"blockBreakSpeed": 2.3,
"attackDamage": 5,
"attackSpeed": -3,
"enchantability": 10,
"repairIngredient": "minecraft:diamond"
}
@@ -0,0 +1,11 @@
{
"id": "emerald",
"miningLevel": 3,
"durability": 750,
"blockBreakSpeed": 2.0,
"attackDamage": 5,
"attackSpeed": -3,
"enchantability": 10,
"repairIngredient": "minecraft:emerald",
"isExtra": true
}
@@ -0,0 +1,11 @@
{
"id": "ender",
"miningLevel": 3,
"durability": 1561,
"blockBreakSpeed": 2.85,
"attackDamage": 6,
"attackSpeed": -3.3,
"enchantability": 10,
"repairIngredient": "minecraft:ender_pearl",
"isExtra": true
}
@@ -0,0 +1,13 @@
{
"id": "fiery",
"miningLevel": 3,
"durability": 750,
"blockBreakSpeed": 2,
"attackDamage": 2,
"attackSpeed": -2.3,
"enchantability": 15,
"repairIngredient": "minecraft:magma_block",
"isExtra": true,
"isFireImmune": true,
"smelts": true
}
@@ -0,0 +1,10 @@
{
"id": "golden",
"miningLevel": 0,
"durability": 100,
"blockBreakSpeed": 3.5,
"attackDamage": 2,
"attackSpeed": -2.5,
"enchantability": 22,
"repairIngredient": "minecraft:gold_ingot"
}
@@ -0,0 +1,10 @@
{
"id": "iron",
"miningLevel": 2,
"durability": 250,
"blockBreakSpeed": 1.7,
"attackDamage": 2,
"attackSpeed": -2.8,
"enchantability": 14,
"repairIngredient": "minecraft:iron_ingot"
}
@@ -0,0 +1,11 @@
{
"id": "lapis",
"miningLevel": 1,
"durability": 220,
"blockBreakSpeed": 1.7,
"attackDamage": 0,
"attackSpeed": -2,
"enchantability": 30,
"repairIngredient": "minecraft:lapis_lazuli",
"isExtra": true
}
@@ -0,0 +1,11 @@
{
"id": "netherite",
"miningLevel": 4,
"durability": 2031,
"blockBreakSpeed": 2.6,
"attackDamage": 6,
"attackSpeed": -3.1,
"enchantability": 15,
"repairIngredient": "minecraft:netherite_ingot",
"isFireImmune": true
}
@@ -0,0 +1,11 @@
{
"id": "obsidian",
"miningLevel": 2,
"durability": 2048,
"blockBreakSpeed": 1.4,
"attackDamage": 3,
"attackSpeed": -3.5,
"enchantability": 5,
"repairIngredient": "minecraft:obsidian",
"isExtra": true
}
@@ -0,0 +1,11 @@
{
"id": "prismarine",
"miningLevel": 3,
"durability": 1028,
"blockBreakSpeed": 3.4,
"attackDamage": 2,
"attackSpeed": -2.3,
"enchantability": 25,
"repairIngredient": "minecraft:prismarine_shard",
"isExtra": true
}
@@ -0,0 +1,11 @@
{
"id": "quartz",
"miningLevel": 2,
"durability": 1028,
"blockBreakSpeed": 2.3,
"attackDamage": 2,
"attackSpeed": -2.5,
"enchantability": 10,
"repairIngredient": "minecraft:quartz",
"isExtra": true
}
@@ -0,0 +1,12 @@
{
"id": "slime",
"miningLevel": 2,
"durability": 1500,
"blockBreakSpeed": 1.7,
"attackDamage": 3,
"attackSpeed": -3,
"enchantability": 20,
"repairIngredient": "minecraft:slime_ball",
"isExtra": true,
"hasExtraKnockback": true
}
@@ -0,0 +1,10 @@
{
"id": "stone",
"miningLevel": 1,
"durability": 131,
"blockBreakSpeed": 1.15,
"attackDamage": 1,
"attackSpeed": -2.6,
"enchantability": 5,
"repairIngredient": "minecraft:stone"
}
@@ -0,0 +1,11 @@
{
"id": "wooden",
"miningLevel": 0,
"durability": 59,
"blockBreakSpeed": 0.57,
"attackDamage": 0,
"attackSpeed": -2.5,
"enchantability": 15,
"repairIngredient": "minecraft:oak_planks",
"burnTime": 400
}