mirror of
https://github.com/dragonruler1000/hdm-mod.git
synced 2025-06-29 08:29:33 -05:00
working on adding the subtle knife.
This commit is contained in:
parent
7df8f28c16
commit
c2e75fdb20
4 changed files with 39 additions and 4 deletions
|
@ -1,11 +1,13 @@
|
|||
package us.minecraftchest2.hdm_mod.item;
|
||||
|
||||
import net.minecraft.item.Food;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.eventbus.api.IEventBus;
|
||||
import net.minecraftforge.fml.RegistryObject;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import us.minecraftchest2.hdm_mod.Hdm_mod;
|
||||
import us.minecraftchest2.hdm_mod.item.custom.SubtleKnife;
|
||||
|
||||
public class ModItems {
|
||||
|
||||
|
@ -15,8 +17,12 @@ public class ModItems {
|
|||
public static final RegistryObject<Item> DUST = ITEMS.register("dust",
|
||||
() -> new Item(new Item.Properties().isImmuneToFire().maxStackSize(42).group(ModItemGroup.HDM_ITEM_GROUP)));
|
||||
|
||||
// public static final RegistryObject<Item> OMELET = ITEMS.register("omelet",
|
||||
// () -> new Item(new Item.Properties().food()))
|
||||
|
||||
public static final RegistryObject<Item> OMELET = ITEMS.register("omelet",
|
||||
() -> new Item(new Item.Properties().group(ModItemGroup.HDM_ITEM_GROUP)));
|
||||
|
||||
public static final RegistryObject<Item> KNIFE = ITEMS.register("subtle_knife",
|
||||
() -> new SubtleKnife(new Item.Properties().maxStackSize(1).group(ModItemGroup.HDM_ITEM_GROUP).maxDamage(2000)));
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
package us.minecraftchest2.hdm_mod.item.custom;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemUseContext;
|
||||
import net.minecraft.util.ActionResultType;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
|
||||
public class SubtleKnife extends Item {
|
||||
|
||||
|
||||
public SubtleKnife(Properties properties) {
|
||||
super(properties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResultType onItemUseFirst(ItemStack stack, ItemUseContext context) {
|
||||
World world = context.getWorld();
|
||||
|
||||
if(!world.isRemote) {
|
||||
BlockPos another_pos;
|
||||
|
||||
}
|
||||
return super.onItemUseFirst(stack, context);
|
||||
}
|
||||
|
||||
}
|
|
@ -2,7 +2,7 @@
|
|||
"itemGroup.hdmModItemTab": "HDM Mod Items",
|
||||
"itemGroup.hdmModBlockTab": "HDM Mod Blocks",
|
||||
|
||||
"item.hdm_mod.knife": "Subtle Knife",
|
||||
"item.hdm_mod.subtle_knife": "Subtle Knife",
|
||||
"item.hdm_mod.omelet": "Omelet",
|
||||
"item.hdm_mod.dust": "Dust",
|
||||
"block.hdm_mod.block_of_dust": "Block of Dust"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"parent": "item/handheld",
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "hdm_mod:items/knife"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue