Browse Source

Add scraper tool, tweak existing materials

mistress
Agatha 6 months ago
parent
commit
f58a2f76f5
Signed by: sorceress <agatharose@wantscuddl.es> GPG Key ID: 2DB18BA2E0A80BC3
1 changed files with 16 additions and 7 deletions
  1. +16
    -7
      src/main/java/dev/agatharose/asbestos/Asbestos.java

+ 16
- 7
src/main/java/dev/agatharose/asbestos/Asbestos.java View File

@@ -1,33 +1,42 @@
package dev.agatharose.asbestos;

import dev.agatharose.asbestos.item.ScraperItem;
import dev.agatharose.asbestos.item.ScraperToolMaterial;
import net.fabricmc.api.ModInitializer;
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
import net.minecraft.block.Block;
import net.minecraft.block.Material;
import net.minecraft.item.BlockItem;
import net.minecraft.item.Item;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ToolItem;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;

public class Asbestos implements ModInitializer {

public static final Item ASBESTOS_FIBERS = new Item(new FabricItemSettings().group(ItemGroup.MATERIALS));
public static final Item ASBESTOS_FIBERS = new Item(
new FabricItemSettings().group(ItemGroup.MATERIALS).fireproof());

public static final Block ASBESTOS_BLOCK = new Block(FabricBlockSettings.of(Material.WOOL)
.breakByTool(FabricToolTags.AXES).hardness(0.3f).sounds(BlockSoundGroup.WOOL));
public static final Block ASBESTOS_BLOCK = new Block(
FabricBlockSettings.of(Material.WOOL).hardness(1.0f).sounds(BlockSoundGroup.WOOL));

public static ToolItem IRON_SCRAPER = new ScraperItem(ScraperToolMaterial.INSTANCE, 0.0f, -3.0f,
new Item.Settings().group(ItemGroup.TOOLS));

@Override
public void onInitialize() {
// asbestos fibers item registration
// asbestos fibers item
Registry.register(Registry.ITEM, new Identifier("asbestos", "asbestos_fibers"), ASBESTOS_FIBERS);

// asbestos block registration
// asbestos block
Registry.register(Registry.BLOCK, new Identifier("asbestos", "asbestos_block"), ASBESTOS_BLOCK);
Registry.register(Registry.ITEM, new Identifier("asbestos", "asbestos_block"),
new BlockItem(ASBESTOS_BLOCK, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS)));
new BlockItem(ASBESTOS_BLOCK, new Item.Settings().group(ItemGroup.BUILDING_BLOCKS).fireproof()));

// scraper tool
Registry.register(Registry.ITEM, new Identifier("asbestos", "iron_scraper"), IRON_SCRAPER);
}
}

Loading…
Cancel
Save