mirror of
https://github.com/TechnoVisionDev/Forge-Modding-Tutorial-1.16
synced 2025-06-13 12:54:04 +00:00
Removed ItemBase and BlockItemBase
This commit is contained in:
parent
e34e51e48c
commit
f26b4cb87a
@ -25,7 +25,7 @@ minecraft {
|
||||
// stable_# Stables are built at the discretion of the MCP team.
|
||||
// Use non-default mappings at your own risk. they may not always work.
|
||||
// Simply re-run your setup task after changing the mappings to update your workspace.
|
||||
mappings channel: 'snapshot', version: '20190719-1.14.3'
|
||||
mappings channel: 'snapshot', version: '20200707-1.15.1'
|
||||
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
|
||||
|
||||
// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
||||
@ -89,7 +89,7 @@ dependencies {
|
||||
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
|
||||
// that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied.
|
||||
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
|
||||
minecraft 'net.minecraftforge:forge:1.15.2-31.1.0'
|
||||
minecraft 'net.minecraftforge:forge:1.15.2-31.2.0'
|
||||
|
||||
// You may put jars on which you depend on in ./libs or you may define them like so..
|
||||
// compile "some.group:artifact:version:classifier"
|
||||
|
@ -1,10 +1,8 @@
|
||||
package com.technovision.tutorial;
|
||||
|
||||
import com.technovision.tutorial.util.RegistryHandler;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.Items;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
|
||||
|
@ -1,13 +0,0 @@
|
||||
package com.technovision.tutorial.blocks;
|
||||
|
||||
import com.technovision.tutorial.Tutorial;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.BlockItem;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class BlockItemBase extends BlockItem {
|
||||
|
||||
public BlockItemBase(Block block) {
|
||||
super(block, new Item.Properties().group(Tutorial.TAB));
|
||||
}
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package com.technovision.tutorial.items;
|
||||
|
||||
import com.technovision.tutorial.Tutorial;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
|
||||
public class ItemBase extends Item {
|
||||
|
||||
public ItemBase() {
|
||||
super(new Item.Properties().group(Tutorial.TAB));
|
||||
}
|
||||
}
|
@ -1,9 +1,7 @@
|
||||
package com.technovision.tutorial.util;
|
||||
|
||||
import com.technovision.tutorial.Tutorial;
|
||||
import com.technovision.tutorial.blocks.BlockItemBase;
|
||||
import com.technovision.tutorial.blocks.RubyBlock;
|
||||
import com.technovision.tutorial.items.ItemBase;
|
||||
import com.technovision.tutorial.tools.ModItemTier;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.*;
|
||||
@ -12,6 +10,7 @@ import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public class RegistryHandler {
|
||||
|
||||
public static final DeferredRegister<Item> ITEMS = new DeferredRegister<>(ForgeRegistries.ITEMS, Tutorial.MOD_ID);
|
||||
@ -23,7 +22,7 @@ public class RegistryHandler {
|
||||
}
|
||||
|
||||
// Items
|
||||
public static final RegistryObject<Item> RUBY = ITEMS.register("ruby", ItemBase::new);
|
||||
public static final RegistryObject<Item> RUBY = ITEMS.register("ruby", () -> new Item(new Item.Properties().group(Tutorial.TAB)));
|
||||
|
||||
// Tools
|
||||
public static final RegistryObject<SwordItem> RUBY_SWORD = ITEMS.register("ruby_sword", () ->
|
||||
@ -45,6 +44,6 @@ public class RegistryHandler {
|
||||
public static final RegistryObject<Block> RUBY_BLOCK = BLOCKS.register("ruby_block", RubyBlock::new);
|
||||
|
||||
// Block Items
|
||||
public static final RegistryObject<Item> RUBY_BLOCK_ITEM = ITEMS.register("ruby_block", () -> new BlockItemBase(RUBY_BLOCK.get()));
|
||||
public static final RegistryObject<Item> RUBY_BLOCK_ITEM = ITEMS.register("ruby_block", () -> new BlockItem(RUBY_BLOCK.get(), new Item.Properties().group(Tutorial.TAB)));
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user