restructuring
This commit is contained in:
parent
02130d4cc7
commit
91e3ecce01
@ -1,14 +1,13 @@
|
||||
package com.jenny.compressedblocks;
|
||||
|
||||
import com.jenny.compressedblocks.moditems.Tools;
|
||||
import com.jenny.compressedblocks.modblocks.ModBlocks;
|
||||
import com.mojang.logging.LogUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.item.*;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.material.MapColor;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.server.ServerStartingEvent;
|
||||
@ -33,98 +32,32 @@ public class CompressedBlocks
|
||||
public static final String MODID = "compressedblocks";
|
||||
// Directly reference a slf4j logger
|
||||
private static final Logger LOGGER = LogUtils.getLogger();
|
||||
// Create a Deferred Register to hold Blocks which will all be registered under the "examplemod" namespace
|
||||
public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, MODID);
|
||||
// Create a Deferred Register to hold Items which will all be registered under the "examplemod" namespace
|
||||
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, MODID);
|
||||
// Create a Deferred Register to hold CreativeModeTabs which will all be registered under the "examplemod" namespace
|
||||
public static final DeferredRegister<CreativeModeTab> CREATIVE_MODE_TABS = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, MODID);
|
||||
|
||||
/* COBBLESTONE */
|
||||
|
||||
public static final RegistryObject<Block> COBBLESTONE_1X = BLOCKS.register("cobblestone_1x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(2.0F, 8.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> COBBLESTONE_1X_ITEM = ITEMS.register("cobblestone_1x", () -> new BlockItem(COBBLESTONE_1X.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> COBBLESTONE_2X = BLOCKS.register("cobblestone_2x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(3.0F, 9.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> COBBLESTONE_2X_ITEM = ITEMS.register("cobblestone_2x", () -> new BlockItem(COBBLESTONE_2X.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> COBBLESTONE_3X = BLOCKS.register("cobblestone_3x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(4.0F, 10.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> COBBLESTONE_3X_ITEM = ITEMS.register("cobblestone_3x", () -> new BlockItem(COBBLESTONE_3X.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> COBBLESTONE_4X = BLOCKS.register("cobblestone_4x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(5.0F, 11.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> COBBLESTONE_4X_ITEM = ITEMS.register("cobblestone_4x", () -> new BlockItem(COBBLESTONE_4X.get(), new Item.Properties()));
|
||||
|
||||
/* ANDESITE */
|
||||
|
||||
public static final RegistryObject<Block> ANDESITE_1X = BLOCKS.register("andesite_1x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(2.0F, 8.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> ANDESITE_1X_ITEM = ITEMS.register("andesite_1x", () -> new BlockItem(ANDESITE_1X.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> ANDESITE_2X = BLOCKS.register("andesite_2x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(3.0F, 9.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> ANDESITE_2X_ITEM = ITEMS.register("andesite_2x", () -> new BlockItem(ANDESITE_2X.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> ANDESITE_3X = BLOCKS.register("andesite_3x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(4.0F, 10.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> ANDESITE_3X_ITEM = ITEMS.register("andesite_3x", () -> new BlockItem(ANDESITE_3X.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> ANDESITE_4X = BLOCKS.register("andesite_4x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(5.0F, 11.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> ANDESITE_4X_ITEM = ITEMS.register("andesite_4x", () -> new BlockItem(ANDESITE_4X.get(), new Item.Properties()));
|
||||
|
||||
|
||||
/* DIORITE */
|
||||
|
||||
public static final RegistryObject<Block> DIORITE_1X = BLOCKS.register("diorite_1x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(2.0F, 8.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> DIORITE_1X_ITEM = ITEMS.register("diorite_1x", () -> new BlockItem(DIORITE_1X.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> DIORITE_2X = BLOCKS.register("diorite_2x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(3.0F, 9.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> DIORITE_2X_ITEM = ITEMS.register("diorite_2x", () -> new BlockItem(DIORITE_2X.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> DIORITE_3X = BLOCKS.register("diorite_3x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(4.0F, 10.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> DIORITE_3X_ITEM = ITEMS.register("diorite_3x", () -> new BlockItem(DIORITE_3X.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> DIORITE_4X = BLOCKS.register("diorite_4x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(5.0F, 11.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> DIORITE_4X_ITEM = ITEMS.register("diorite_4x", () -> new BlockItem(DIORITE_4X.get(), new Item.Properties()));
|
||||
|
||||
/* GRANITE */
|
||||
|
||||
public static final RegistryObject<Block> GRANITE_1X = BLOCKS.register("granite_1x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(2.0F, 8.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> GRANITE_1X_ITEM = ITEMS.register("granite_1x", () -> new BlockItem(GRANITE_1X.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> GRANITE_2X = BLOCKS.register("granite_2x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(3.0F, 9.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> GRANITE_2X_ITEM = ITEMS.register("granite_2x", () -> new BlockItem(GRANITE_2X.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> GRANITE_3X = BLOCKS.register("granite_3x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(4.0F, 10.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> GRANITE_3X_ITEM = ITEMS.register("granite_3x", () -> new BlockItem(GRANITE_3X.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> GRANITE_4X = BLOCKS.register("granite_4x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(5.0F, 11.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> GRANITE_4X_ITEM = ITEMS.register("granite_4x", () -> new BlockItem(GRANITE_4X.get(), new Item.Properties()));
|
||||
|
||||
/* COMBINED BLOCKS */
|
||||
|
||||
public static final RegistryObject<Block> CBLOCK_MINING = BLOCKS.register("cblock_mining", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(5.0F, 11.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> CBLOCK_MINING_ITEM = ITEMS.register("cblock_mining", () -> new BlockItem(CBLOCK_MINING.get(), new Item.Properties()));
|
||||
|
||||
// Creates a creative tab with the id "examplemod:example_tab" for the example item, that is placed after the combat tab
|
||||
public static final RegistryObject<CreativeModeTab> EXAMPLE_TAB = CREATIVE_MODE_TABS.register("compressed_blocks", () -> CreativeModeTab.builder()
|
||||
.withTabsBefore(CreativeModeTabs.COMBAT)
|
||||
.icon(() -> COBBLESTONE_1X_ITEM.get().getDefaultInstance())
|
||||
.icon(() -> ModBlocks.COBBLESTONE_1X_ITEM.get().getDefaultInstance())
|
||||
.title(Component.translatable("Compressed Blocks"))
|
||||
.displayItems((parameters, output) -> {
|
||||
output.accept(COBBLESTONE_1X.get());
|
||||
output.accept(COBBLESTONE_2X.get());
|
||||
output.accept(COBBLESTONE_3X.get());
|
||||
output.accept(COBBLESTONE_4X.get());
|
||||
output.accept(ANDESITE_1X.get());
|
||||
output.accept(ANDESITE_2X.get());
|
||||
output.accept(ANDESITE_3X.get());
|
||||
output.accept(ANDESITE_4X.get());
|
||||
output.accept(DIORITE_1X.get());
|
||||
output.accept(DIORITE_2X.get());
|
||||
output.accept(DIORITE_3X.get());
|
||||
output.accept(DIORITE_4X.get());
|
||||
output.accept(GRANITE_1X.get());
|
||||
output.accept(GRANITE_2X.get());
|
||||
output.accept(GRANITE_3X.get());
|
||||
output.accept(GRANITE_4X.get());
|
||||
output.accept(CBLOCK_MINING.get());
|
||||
output.accept(ModBlocks.COBBLESTONE_1X.get());
|
||||
output.accept(ModBlocks.COBBLESTONE_2X.get());
|
||||
output.accept(ModBlocks.COBBLESTONE_3X.get());
|
||||
output.accept(ModBlocks.COBBLESTONE_4X.get());
|
||||
output.accept(ModBlocks.ANDESITE_1X.get());
|
||||
output.accept(ModBlocks.ANDESITE_2X.get());
|
||||
output.accept(ModBlocks.ANDESITE_3X.get());
|
||||
output.accept(ModBlocks.ANDESITE_4X.get());
|
||||
output.accept(ModBlocks.DIORITE_1X.get());
|
||||
output.accept(ModBlocks.DIORITE_2X.get());
|
||||
output.accept(ModBlocks.DIORITE_3X.get());
|
||||
output.accept(ModBlocks.DIORITE_4X.get());
|
||||
output.accept(ModBlocks.GRANITE_1X.get());
|
||||
output.accept(ModBlocks.GRANITE_2X.get());
|
||||
output.accept(ModBlocks.GRANITE_3X.get());
|
||||
output.accept(ModBlocks.GRANITE_4X.get());
|
||||
output.accept(ModBlocks.CBLOCK_MINING.get());
|
||||
output.accept(Tools.ULTRA_PICKAXE.get());
|
||||
}).build());
|
||||
|
||||
@ -133,8 +66,8 @@ public class CompressedBlocks
|
||||
IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
|
||||
|
||||
modEventBus.addListener(this::commonSetup);
|
||||
BLOCKS.register(modEventBus);
|
||||
ITEMS.register(modEventBus);
|
||||
ModBlocks.BLOCKS.register(modEventBus);
|
||||
ModBlocks.ITEMS.register(modEventBus);
|
||||
Tools.register(modEventBus);
|
||||
|
||||
CREATIVE_MODE_TABS.register(modEventBus);
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.jenny.compressedblocks.datagen;
|
||||
|
||||
import com.jenny.compressedblocks.CompressedBlocks;
|
||||
import com.jenny.compressedblocks.modblocks.ModBlocks;
|
||||
import net.minecraft.data.PackOutput;
|
||||
import net.minecraft.world.level.block.*;
|
||||
import net.minecraftforge.client.model.generators.BlockStateProvider;
|
||||
@ -14,27 +15,27 @@ public class ModBlockStateProvider extends BlockStateProvider {
|
||||
|
||||
@Override
|
||||
protected void registerStatesAndModels() {
|
||||
blockWithItem(CompressedBlocks.COBBLESTONE_1X);
|
||||
blockWithItem(CompressedBlocks.COBBLESTONE_2X);
|
||||
blockWithItem(CompressedBlocks.COBBLESTONE_3X);
|
||||
blockWithItem(CompressedBlocks.COBBLESTONE_4X);
|
||||
blockWithItem(ModBlocks.COBBLESTONE_1X);
|
||||
blockWithItem(ModBlocks.COBBLESTONE_2X);
|
||||
blockWithItem(ModBlocks.COBBLESTONE_3X);
|
||||
blockWithItem(ModBlocks.COBBLESTONE_4X);
|
||||
|
||||
blockWithItem(CompressedBlocks.ANDESITE_1X);
|
||||
blockWithItem(CompressedBlocks.ANDESITE_2X);
|
||||
blockWithItem(CompressedBlocks.ANDESITE_3X);
|
||||
blockWithItem(CompressedBlocks.ANDESITE_4X);
|
||||
blockWithItem(ModBlocks.ANDESITE_1X);
|
||||
blockWithItem(ModBlocks.ANDESITE_2X);
|
||||
blockWithItem(ModBlocks.ANDESITE_3X);
|
||||
blockWithItem(ModBlocks.ANDESITE_4X);
|
||||
|
||||
blockWithItem(CompressedBlocks.DIORITE_1X);
|
||||
blockWithItem(CompressedBlocks.DIORITE_2X);
|
||||
blockWithItem(CompressedBlocks.DIORITE_3X);
|
||||
blockWithItem(CompressedBlocks.DIORITE_4X);
|
||||
blockWithItem(ModBlocks.DIORITE_1X);
|
||||
blockWithItem(ModBlocks.DIORITE_2X);
|
||||
blockWithItem(ModBlocks.DIORITE_3X);
|
||||
blockWithItem(ModBlocks.DIORITE_4X);
|
||||
|
||||
blockWithItem(CompressedBlocks.GRANITE_1X);
|
||||
blockWithItem(CompressedBlocks.GRANITE_2X);
|
||||
blockWithItem(CompressedBlocks.GRANITE_3X);
|
||||
blockWithItem(CompressedBlocks.GRANITE_4X);
|
||||
blockWithItem(ModBlocks.GRANITE_1X);
|
||||
blockWithItem(ModBlocks.GRANITE_2X);
|
||||
blockWithItem(ModBlocks.GRANITE_3X);
|
||||
blockWithItem(ModBlocks.GRANITE_4X);
|
||||
|
||||
blockWithItem(CompressedBlocks.CBLOCK_MINING);
|
||||
blockWithItem(ModBlocks.CBLOCK_MINING);
|
||||
}
|
||||
|
||||
private void blockWithItem(RegistryObject<Block> blockRegistryObject) {
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.jenny.compressedblocks.datagen;
|
||||
|
||||
import com.jenny.compressedblocks.CompressedBlocks;
|
||||
import com.jenny.compressedblocks.modblocks.ModBlocks;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.data.PackOutput;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
@ -20,57 +21,57 @@ public class ModBlockTagGenerator extends BlockTagsProvider {
|
||||
protected void addTags(@NotNull HolderLookup.Provider pProvider) {
|
||||
this.tag(BlockTags.MINEABLE_WITH_PICKAXE)
|
||||
.add(
|
||||
CompressedBlocks.COBBLESTONE_1X.get(),
|
||||
CompressedBlocks.COBBLESTONE_2X.get(),
|
||||
CompressedBlocks.COBBLESTONE_3X.get(),
|
||||
CompressedBlocks.COBBLESTONE_4X.get(),
|
||||
ModBlocks.COBBLESTONE_1X.get(),
|
||||
ModBlocks.COBBLESTONE_2X.get(),
|
||||
ModBlocks.COBBLESTONE_3X.get(),
|
||||
ModBlocks.COBBLESTONE_4X.get(),
|
||||
|
||||
CompressedBlocks.ANDESITE_1X.get(),
|
||||
CompressedBlocks.ANDESITE_2X.get(),
|
||||
CompressedBlocks.ANDESITE_3X.get(),
|
||||
CompressedBlocks.ANDESITE_4X.get(),
|
||||
ModBlocks.ANDESITE_1X.get(),
|
||||
ModBlocks.ANDESITE_2X.get(),
|
||||
ModBlocks.ANDESITE_3X.get(),
|
||||
ModBlocks.ANDESITE_4X.get(),
|
||||
|
||||
CompressedBlocks.DIORITE_1X.get(),
|
||||
CompressedBlocks.DIORITE_2X.get(),
|
||||
CompressedBlocks.DIORITE_3X.get(),
|
||||
CompressedBlocks.DIORITE_4X.get(),
|
||||
ModBlocks.DIORITE_1X.get(),
|
||||
ModBlocks.DIORITE_2X.get(),
|
||||
ModBlocks.DIORITE_3X.get(),
|
||||
ModBlocks.DIORITE_4X.get(),
|
||||
|
||||
CompressedBlocks.GRANITE_1X.get(),
|
||||
CompressedBlocks.GRANITE_2X.get(),
|
||||
CompressedBlocks.GRANITE_3X.get(),
|
||||
CompressedBlocks.GRANITE_4X.get(),
|
||||
ModBlocks.GRANITE_1X.get(),
|
||||
ModBlocks.GRANITE_2X.get(),
|
||||
ModBlocks.GRANITE_3X.get(),
|
||||
ModBlocks.GRANITE_4X.get(),
|
||||
|
||||
CompressedBlocks.CBLOCK_MINING.get()
|
||||
ModBlocks.CBLOCK_MINING.get()
|
||||
);
|
||||
|
||||
this.tag(BlockTags.NEEDS_STONE_TOOL)
|
||||
.add(
|
||||
CompressedBlocks.COBBLESTONE_1X.get(),
|
||||
CompressedBlocks.ANDESITE_1X.get(),
|
||||
CompressedBlocks.DIORITE_1X.get(),
|
||||
CompressedBlocks.GRANITE_1X.get()
|
||||
ModBlocks.COBBLESTONE_1X.get(),
|
||||
ModBlocks.ANDESITE_1X.get(),
|
||||
ModBlocks.DIORITE_1X.get(),
|
||||
ModBlocks.GRANITE_1X.get()
|
||||
);
|
||||
|
||||
this.tag(BlockTags.NEEDS_IRON_TOOL)
|
||||
.add(
|
||||
CompressedBlocks.COBBLESTONE_2X.get(),
|
||||
CompressedBlocks.ANDESITE_2X.get(),
|
||||
CompressedBlocks.DIORITE_2X.get(),
|
||||
CompressedBlocks.GRANITE_2X.get(),
|
||||
ModBlocks.COBBLESTONE_2X.get(),
|
||||
ModBlocks.ANDESITE_2X.get(),
|
||||
ModBlocks.DIORITE_2X.get(),
|
||||
ModBlocks.GRANITE_2X.get(),
|
||||
|
||||
CompressedBlocks.COBBLESTONE_3X.get(),
|
||||
CompressedBlocks.ANDESITE_3X.get(),
|
||||
CompressedBlocks.DIORITE_3X.get(),
|
||||
CompressedBlocks.GRANITE_3X.get()
|
||||
ModBlocks.COBBLESTONE_3X.get(),
|
||||
ModBlocks.ANDESITE_3X.get(),
|
||||
ModBlocks.DIORITE_3X.get(),
|
||||
ModBlocks.GRANITE_3X.get()
|
||||
);
|
||||
|
||||
this.tag(BlockTags.NEEDS_DIAMOND_TOOL)
|
||||
.add(
|
||||
CompressedBlocks.COBBLESTONE_4X.get(),
|
||||
CompressedBlocks.ANDESITE_4X.get(),
|
||||
CompressedBlocks.DIORITE_4X.get(),
|
||||
CompressedBlocks.GRANITE_4X.get(),
|
||||
CompressedBlocks.CBLOCK_MINING.get()
|
||||
ModBlocks.COBBLESTONE_4X.get(),
|
||||
ModBlocks.ANDESITE_4X.get(),
|
||||
ModBlocks.DIORITE_4X.get(),
|
||||
ModBlocks.GRANITE_4X.get(),
|
||||
ModBlocks.CBLOCK_MINING.get()
|
||||
);
|
||||
}
|
||||
}
|
@ -1,7 +1,7 @@
|
||||
package com.jenny.compressedblocks.datagen;
|
||||
|
||||
import com.jenny.compressedblocks.CompressedBlocks;
|
||||
import com.jenny.compressedblocks.Tools;
|
||||
import com.jenny.compressedblocks.moditems.Tools;
|
||||
import net.minecraft.data.PackOutput;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.Item;
|
||||
|
@ -0,0 +1,77 @@
|
||||
package com.jenny.compressedblocks.modblocks;
|
||||
|
||||
import com.jenny.compressedblocks.CompressedBlocks;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.material.MapColor;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
|
||||
public class ModBlocks {
|
||||
public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, CompressedBlocks.MODID);
|
||||
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, CompressedBlocks.MODID);
|
||||
|
||||
public static final RegistryObject<Block> COBBLESTONE_1X = BLOCKS.register("cobblestone_1x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(2.0F, 8.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> COBBLESTONE_1X_ITEM = ITEMS.register("cobblestone_1x", () -> new BlockItem(COBBLESTONE_1X.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> COBBLESTONE_2X = BLOCKS.register("cobblestone_2x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(3.0F, 9.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> COBBLESTONE_2X_ITEM = ITEMS.register("cobblestone_2x", () -> new BlockItem(COBBLESTONE_2X.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> COBBLESTONE_3X = BLOCKS.register("cobblestone_3x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(4.0F, 10.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> COBBLESTONE_3X_ITEM = ITEMS.register("cobblestone_3x", () -> new BlockItem(COBBLESTONE_3X.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> COBBLESTONE_4X = BLOCKS.register("cobblestone_4x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(5.0F, 11.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> COBBLESTONE_4X_ITEM = ITEMS.register("cobblestone_4x", () -> new BlockItem(COBBLESTONE_4X.get(), new Item.Properties()));
|
||||
|
||||
/* ANDESITE */
|
||||
|
||||
public static final RegistryObject<Block> ANDESITE_1X = BLOCKS.register("andesite_1x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(2.0F, 8.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> ANDESITE_1X_ITEM = ITEMS.register("andesite_1x", () -> new BlockItem(ANDESITE_1X.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> ANDESITE_2X = BLOCKS.register("andesite_2x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(3.0F, 9.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> ANDESITE_2X_ITEM = ITEMS.register("andesite_2x", () -> new BlockItem(ANDESITE_2X.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> ANDESITE_3X = BLOCKS.register("andesite_3x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(4.0F, 10.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> ANDESITE_3X_ITEM = ITEMS.register("andesite_3x", () -> new BlockItem(ANDESITE_3X.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> ANDESITE_4X = BLOCKS.register("andesite_4x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(5.0F, 11.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> ANDESITE_4X_ITEM = ITEMS.register("andesite_4x", () -> new BlockItem(ANDESITE_4X.get(), new Item.Properties()));
|
||||
|
||||
|
||||
/* DIORITE */
|
||||
|
||||
public static final RegistryObject<Block> DIORITE_1X = BLOCKS.register("diorite_1x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(2.0F, 8.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> DIORITE_1X_ITEM = ITEMS.register("diorite_1x", () -> new BlockItem(DIORITE_1X.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> DIORITE_2X = BLOCKS.register("diorite_2x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(3.0F, 9.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> DIORITE_2X_ITEM = ITEMS.register("diorite_2x", () -> new BlockItem(DIORITE_2X.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> DIORITE_3X = BLOCKS.register("diorite_3x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(4.0F, 10.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> DIORITE_3X_ITEM = ITEMS.register("diorite_3x", () -> new BlockItem(DIORITE_3X.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> DIORITE_4X = BLOCKS.register("diorite_4x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(5.0F, 11.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> DIORITE_4X_ITEM = ITEMS.register("diorite_4x", () -> new BlockItem(DIORITE_4X.get(), new Item.Properties()));
|
||||
|
||||
/* GRANITE */
|
||||
|
||||
public static final RegistryObject<Block> GRANITE_1X = BLOCKS.register("granite_1x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(2.0F, 8.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> GRANITE_1X_ITEM = ITEMS.register("granite_1x", () -> new BlockItem(GRANITE_1X.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> GRANITE_2X = BLOCKS.register("granite_2x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(3.0F, 9.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> GRANITE_2X_ITEM = ITEMS.register("granite_2x", () -> new BlockItem(GRANITE_2X.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> GRANITE_3X = BLOCKS.register("granite_3x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(4.0F, 10.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> GRANITE_3X_ITEM = ITEMS.register("granite_3x", () -> new BlockItem(GRANITE_3X.get(), new Item.Properties()));
|
||||
|
||||
public static final RegistryObject<Block> GRANITE_4X = BLOCKS.register("granite_4x", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(5.0F, 11.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> GRANITE_4X_ITEM = ITEMS.register("granite_4x", () -> new BlockItem(GRANITE_4X.get(), new Item.Properties()));
|
||||
|
||||
/* COMBINED BLOCKS */
|
||||
|
||||
public static final RegistryObject<Block> CBLOCK_MINING = BLOCKS.register("cblock_mining", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.NONE).strength(5.0F, 11.0F).requiresCorrectToolForDrops()));
|
||||
public static final RegistryObject<Item> CBLOCK_MINING_ITEM = ITEMS.register("cblock_mining", () -> new BlockItem(CBLOCK_MINING.get(), new Item.Properties()));
|
||||
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package com.jenny.compressedblocks.moditems;
|
||||
|
||||
public class ModItems {
|
||||
}
|
@ -1,5 +1,8 @@
|
||||
package com.jenny.compressedblocks;
|
||||
package com.jenny.compressedblocks.moditems;
|
||||
|
||||
import com.jenny.compressedblocks.CompressedBlocks;
|
||||
import com.jenny.compressedblocks.Tags;
|
||||
import com.jenny.compressedblocks.modblocks.ModBlocks;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.item.Tier;
|
||||
import net.minecraft.world.item.Tiers;
|
||||
@ -12,7 +15,7 @@ import java.util.List;
|
||||
public class ToolTiers {
|
||||
public static final Tier ULTRA = TierSortingRegistry.registerTier(
|
||||
new ForgeTier(5, 2560, 20f, 4f, 25,
|
||||
Tags.Blocks.NEEDS_ULTRA_TOOL, () -> Ingredient.of(CompressedBlocks.CBLOCK_MINING_ITEM.get())),
|
||||
Tags.Blocks.NEEDS_ULTRA_TOOL, () -> Ingredient.of(ModBlocks.CBLOCK_MINING_ITEM.get())),
|
||||
new ResourceLocation(CompressedBlocks.MODID, "ultra"), List.of(Tiers.NETHERITE), List.of()
|
||||
);
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.jenny.compressedblocks;
|
||||
package com.jenny.compressedblocks.moditems;
|
||||
|
||||
import com.jenny.compressedblocks.CompressedBlocks;
|
||||
import net.minecraft.world.item.*;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
Loading…
x
Reference in New Issue
Block a user