do stuff idk

This commit is contained in:
Sunskimmer822 2022-03-04 12:50:02 -08:00
parent 12789ce26f
commit 31b21dce7d
6 changed files with 111 additions and 1 deletions

View File

@ -59,6 +59,12 @@ public class Shitmod implements ModInitializer {
public static final Item TOTEM_OF_EQUIVALENCY = new totemOfEquivalency(new Item.Settings().group(Shitmod.GENERAL_GROUP).maxCount(1));
public static final Item ROCK_WITH_A_STRING_TIED_AROUND = new rockWithAStringAround(new Item.Settings().group(Shitmod.GENERAL_GROUP).maxCount(1));
public static final Item KINGSOUL_LEFT = new kingsoulLeft(new Item.Settings().group(Shitmod.CHARMS_GROUP).maxCount(1));
public static final Item KINGSOUL_RIGHT = new kingsoulRight(new Item.Settings().group(Shitmod.CHARMS_GROUP).maxCount(1));
@Override
public void onInitialize() {
@ -93,6 +99,12 @@ public class Shitmod implements ModInitializer {
Registry.register(Registry.ITEM, new Identifier("shitmod", "totem_of_equivalency"), TOTEM_OF_EQUIVALENCY);
Registry.register(Registry.ITEM, new Identifier("shitmod", "rock_with_string"), ROCK_WITH_A_STRING_TIED_AROUND);
Registry.register(Registry.ITEM, new Identifier("shitmod", "kingsoul_left_fragment"), KINGSOUL_LEFT);
Registry.register(Registry.ITEM, new Identifier("shitmod", "kingsoul_right_fragment"), KINGSOUL_RIGHT);
CustomPortalBuilder.beginPortal()
.frameBlock(Blocks.DIAMOND_BLOCK)
.lightWithItem(Items.ENDER_EYE)

View File

@ -1,9 +1,12 @@
package net.serenas.shitmod;
import java.util.concurrent.TimeUnit;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.text.LiteralText;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.TypedActionResult;
@ -16,11 +19,25 @@ public class kingsoul extends Item {
}
public int availableSlots = 2;
@Override
public TypedActionResult<ItemStack> use(World world, PlayerEntity PlayerEntity, Hand hand) {
if (availableSlots > 0) {
availableSlots--;
PlayerEntity.getHungerManager().add(1, 1);
PlayerEntity.getMainHandStack().damage(1,PlayerEntity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND));
try {
TimeUnit.SECONDS.sleep(5);
} catch (InterruptedException e1) {
e1.printStackTrace();
}
availableSlots++;
} else if (availableSlots < 0) {
PlayerEntity.sendMessage(new LiteralText("You don't have enough charm notches to do that!"), true);
}
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(hand));
}

View File

@ -0,0 +1,11 @@
package net.serenas.shitmod;
import net.minecraft.item.Item;
public class kingsoulLeft extends Item{
public kingsoulLeft(Settings settings) {
super(settings);
}
}

View File

@ -0,0 +1,11 @@
package net.serenas.shitmod;
import net.minecraft.item.Item;
public class kingsoulRight extends Item{
public kingsoulRight(Settings settings) {
super(settings);
}
}

View File

@ -0,0 +1,36 @@
package net.serenas.shitmod;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.text.LiteralText;
import net.minecraft.util.ActionResult;
import net.minecraft.util.Hand;
import net.minecraft.util.TypedActionResult;
import net.minecraft.world.World;
public class rockWithAStringAround extends Item {
public rockWithAStringAround(Settings settings) {
super(settings);
}
@Override
public TypedActionResult<ItemStack> use(World World, PlayerEntity PlayerEntity, Hand Hand) {
var messageToSay = Math.random();
if (messageToSay < 0.3) {
PlayerEntity.sendMessage(new LiteralText("I'm a faggot"), false);
} else if (messageToSay > 0.3) {
if (messageToSay < 0.6) {
PlayerEntity.sendMessage(new LiteralText("I'm a tranny"), false);
}
} else if (messageToSay > 0.6) {
PlayerEntity.sendMessage(new LiteralText("I'm a mick"), false);
}
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(Hand));
}
}

View File

@ -0,0 +1,23 @@
{
"type": "minecraft:crafting_shaped",
"pattern": [
" ",
"XRW",
" "
],
"key": {
"X": {
"item": "shitmod:kingsoul_left_fragment"
},
"R": {
"item": "minecraft:iron_block"
},
"W": {
"item": "shitmod:kingsoul_right_fragment"
}
},
"result": {
"item": "shitmod:kingsoul_charm",
"count": 1
}
}