totem
This commit is contained in:
parent
5862e84364
commit
12789ce26f
@ -38,6 +38,10 @@ public class Shitmod implements ModInitializer {
|
|||||||
public static final ItemGroup CHARMS_GROUP = FabricItemGroupBuilder.build(
|
public static final ItemGroup CHARMS_GROUP = FabricItemGroupBuilder.build(
|
||||||
new Identifier("shitmod", "charms"),
|
new Identifier("shitmod", "charms"),
|
||||||
() -> new ItemStack(Shitmod.KINGSOUL_CHARM));
|
() -> new ItemStack(Shitmod.KINGSOUL_CHARM));
|
||||||
|
|
||||||
|
public static final ItemGroup GENERAL_GROUP = FabricItemGroupBuilder.build(
|
||||||
|
new Identifier("shitmod", "general"),
|
||||||
|
() -> new ItemStack(Shitmod.FABRIC_ITEM));
|
||||||
|
|
||||||
public static final Item KINGSOUL_CHARM = new kingsoul(new Item.Settings().group(Shitmod.CHARMS_GROUP).maxDamage(500).fireproof());
|
public static final Item KINGSOUL_CHARM = new kingsoul(new Item.Settings().group(Shitmod.CHARMS_GROUP).maxDamage(500).fireproof());
|
||||||
|
|
||||||
@ -53,6 +57,8 @@ public class Shitmod implements ModInitializer {
|
|||||||
|
|
||||||
public static final Item UNBREAKABLE_STRENGTH_CHARM = new unbreakableStrengthCharm(new Item.Settings().group(Shitmod.CHARMS_GROUP).fireproof().maxCount(1));
|
public static final Item UNBREAKABLE_STRENGTH_CHARM = new unbreakableStrengthCharm(new Item.Settings().group(Shitmod.CHARMS_GROUP).fireproof().maxCount(1));
|
||||||
|
|
||||||
|
public static final Item TOTEM_OF_EQUIVALENCY = new totemOfEquivalency(new Item.Settings().group(Shitmod.GENERAL_GROUP).maxCount(1));
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onInitialize() {
|
public void onInitialize() {
|
||||||
|
|
||||||
@ -85,6 +91,8 @@ public class Shitmod implements ModInitializer {
|
|||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "unbreakable_strength_charm"), UNBREAKABLE_STRENGTH_CHARM);
|
Registry.register(Registry.ITEM, new Identifier("shitmod", "unbreakable_strength_charm"), UNBREAKABLE_STRENGTH_CHARM);
|
||||||
|
|
||||||
|
Registry.register(Registry.ITEM, new Identifier("shitmod", "totem_of_equivalency"), TOTEM_OF_EQUIVALENCY);
|
||||||
|
|
||||||
CustomPortalBuilder.beginPortal()
|
CustomPortalBuilder.beginPortal()
|
||||||
.frameBlock(Blocks.DIAMOND_BLOCK)
|
.frameBlock(Blocks.DIAMOND_BLOCK)
|
||||||
.lightWithItem(Items.ENDER_EYE)
|
.lightWithItem(Items.ENDER_EYE)
|
||||||
|
22
src/main/java/net/serenas/shitmod/totemOfEquivalency.java
Normal file
22
src/main/java/net/serenas/shitmod/totemOfEquivalency.java
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
package net.serenas.shitmod;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.ActionResult;
|
||||||
|
import net.minecraft.util.Hand;
|
||||||
|
import net.minecraft.util.TypedActionResult;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class totemOfEquivalency extends Item {
|
||||||
|
|
||||||
|
public totemOfEquivalency(Settings settings) {
|
||||||
|
super(settings);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TypedActionResult<ItemStack> use(World World, PlayerEntity PlayerEntity, Hand Hand) {
|
||||||
|
PlayerEntity.kill();
|
||||||
|
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(Hand));
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user