Add scraper tool

This commit is contained in:
Agatha Lovelace 2020-11-15 00:07:52 +02:00
parent f58a2f76f5
commit f30c8380a3
No known key found for this signature in database
GPG Key ID: 2DB18BA2E0A80BC3
6 changed files with 85 additions and 1 deletions

View File

@ -0,0 +1,15 @@
package dev.agatharose.asbestos.item;
import java.util.Set;
import dev.agatharose.asbestos.Asbestos;
import net.minecraft.item.MiningToolItem;
import net.minecraft.item.ToolMaterial;
public class ScraperItem extends MiningToolItem {
public ScraperItem(ToolMaterial material, float attackDamage, float attackSpeed, Settings settings) {
super(attackDamage, attackSpeed, material, Set.of(Asbestos.ASBESTOS_BLOCK /* TODO add other blocks here */),
settings);
}
}

View File

@ -0,0 +1,40 @@
package dev.agatharose.asbestos.item;
import net.minecraft.item.Items;
import net.minecraft.item.ToolMaterial;
import net.minecraft.recipe.Ingredient;
public class ScraperToolMaterial implements ToolMaterial {
public static final ScraperToolMaterial INSTANCE = new ScraperToolMaterial();
@Override
public int getDurability() {
return 300;
}
@Override
public float getMiningSpeedMultiplier() {
return 5.0f;
}
@Override
public float getAttackDamage() {
return 2.5f;
}
@Override
public int getMiningLevel() {
return 1;
}
@Override
public int getEnchantability() {
return 10;
}
@Override
public Ingredient getRepairIngredient() {
return Ingredient.ofItems(Items.IRON_INGOT);
}
}

View File

@ -1,4 +1,5 @@
{
"block.asbestos.asbestos_block": "Asbestos Block",
"item.asbestos.asbestos_fibers": "Asbests Fibers"
"item.asbestos.asbestos_fibers": "Asbests Fibers",
"item.asbestos.iron_scraper": "Asbestos Scraper"
}

View File

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "asbestos:item/iron_scraper"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 B

View File

@ -0,0 +1,22 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" NI",
" IN",
"S "
],
"key": {
"N": {
"item": "minecraft:iron_nugget"
},
"I": {
"item": "minecraft:iron_ingot"
},
"S": {
"item": "minecraft:stick"
}
},
"result": {
"item": "asbestos:iron_scraper"
}
}