kingsoul and stalwart charms

This commit is contained in:
Sunskimmer822 2022-03-01 23:07:57 -06:00
parent 29dac0c00f
commit 4c093f77ec
9 changed files with 54 additions and 6 deletions

View File

@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx6G
loader_version=0.12.12
# Mod Properties
mod_version = 1.3.2
mod_version = 1.4.0
maven_group = com.serenas.shitmod
archives_base_name = serenas-shitmod

View File

@ -20,7 +20,7 @@ public class FabricItem extends Item {
@Override
public TypedActionResult<ItemStack> use(World world, PlayerEntity PlayerEntity, Hand hand) {
PlayerEntity.playSound(SoundEvents.BLOCK_AMETHYST_BLOCK_CHIME, 1.0F, 1.0F);
for (int i = 0; i < 10; i++) {
for (int i = 0; i < 50; i++) {
world.spawnEntity(new TntEntity(world, PlayerEntity.getX(), PlayerEntity.getY(), PlayerEntity.getZ(), PlayerEntity));
}
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(hand));

View File

@ -35,13 +35,15 @@ public class Shitmod implements ModInitializer {
public static final Item ORANGE_JUICE = new OrangeJuice(new Item.Settings().group(ItemGroup.FOOD).rarity(Rarity.EPIC).food(new FoodComponent.Builder().hunger(200).saturationModifier(10f).snack().meat().alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.REGENERATION, 20*120, 5), 1f).statusEffect(new StatusEffectInstance(StatusEffects.ABSORPTION, 20*120, 20), 1f).statusEffect(new StatusEffectInstance(StatusEffects.FIRE_RESISTANCE, 20*120), 1f).statusEffect(new StatusEffectInstance(StatusEffects.RESISTANCE, 20*120, 3), 1f).statusEffect(new StatusEffectInstance(StatusEffects.SPEED, 20*120, 2), 1f).build()));
public static final ItemGroup ITEM_GROUP = FabricItemGroupBuilder.build(
public static final ItemGroup CHARMS_GROUP = FabricItemGroupBuilder.build(
new Identifier("shitmod", "charms"),
() -> new ItemStack(Shitmod.KINGSOUL_CHARM));
public static final Item KINGSOUL_CHARM = new kingsoul(new Item.Settings().group(ItemGroup.MISC));
public static final Item KINGSOUL_CHARM = new kingsoul(new Item.Settings().group(Shitmod.CHARMS_GROUP).maxDamage(500));
public static final StatusEffect KINGSOUL_CHARM_EFFECT = new kingsoulEffect();
public static final Item STALWART_SHELL_CHARM = new stalwartShell(new Item.Settings().group(Shitmod.CHARMS_GROUP).maxDamage(500));
@Override
public void onInitialize() {
@ -65,6 +67,8 @@ public class Shitmod implements ModInitializer {
Registry.register(Registry.STATUS_EFFECT, new Identifier("shitmod", "kingsoul_charm"), KINGSOUL_CHARM_EFFECT);
Registry.register(Registry.ITEM, new Identifier("shitmod", "stalwart_shell_charm"), STALWART_SHELL_CHARM);
CustomPortalBuilder.beginPortal()
.frameBlock(Blocks.DIAMOND_BLOCK)
.lightWithItem(Items.ENDER_EYE)

View File

@ -1,5 +1,6 @@
package net.serenas.shitmod;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@ -19,7 +20,7 @@ public class kingsoul extends Item {
public TypedActionResult<ItemStack> use(World world, PlayerEntity PlayerEntity, Hand hand) {
PlayerEntity.getHungerManager().add(1, 1);
PlayerEntity.getMainHandStack().damage(1,PlayerEntity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND));
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(hand));
}

View File

@ -0,0 +1,29 @@
package net.serenas.shitmod;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.entity.effect.StatusEffectInstance;
import net.minecraft.entity.effect.StatusEffects;
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.TypedActionResult;
import net.minecraft.world.World;
import net.minecraft.util.Hand;
public class stalwartShell extends Item{
public stalwartShell(Settings settings) {
super(settings);
}
@Override
public TypedActionResult<ItemStack> use(World world, PlayerEntity Playerentity, Hand hand) {
Playerentity.addStatusEffect(new StatusEffectInstance(StatusEffects.RESISTANCE, 20, 5));
Playerentity.getMainHandStack().damage(1,Playerentity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND));
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, Playerentity.getStackInHand(hand));
}
}

View File

@ -6,5 +6,7 @@
"effect.shitmod.lean": "Lean",
"item.shitmod.lean": "Lean",
"item.shitmod.orange_juice": "Orange Juice",
"item.shitmod.kingsoul_charm": "Kingsoul Charm"
"item.shitmod.kingsoul_charm": "Kingsoul Charm",
"itemGroup.shitmod.charms": "Charms",
"item.shitmod.stalwart_shell_charm": "Stalwart Shell Charm"
}

View File

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "shitmod:item/kingsoul_charm"
}
}

View File

@ -0,0 +1,6 @@
{
"parent": "item/generated",
"textures": {
"layer0": "shitmod:item/stalwart_shell_charm"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB