do stuff idk
This commit is contained in:
parent
12789ce26f
commit
31b21dce7d
@ -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 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
|
@Override
|
||||||
public void onInitialize() {
|
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", "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()
|
CustomPortalBuilder.beginPortal()
|
||||||
.frameBlock(Blocks.DIAMOND_BLOCK)
|
.frameBlock(Blocks.DIAMOND_BLOCK)
|
||||||
.lightWithItem(Items.ENDER_EYE)
|
.lightWithItem(Items.ENDER_EYE)
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
package net.serenas.shitmod;
|
package net.serenas.shitmod;
|
||||||
|
|
||||||
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
import net.minecraft.entity.EquipmentSlot;
|
import net.minecraft.entity.EquipmentSlot;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.text.LiteralText;
|
||||||
import net.minecraft.util.ActionResult;
|
import net.minecraft.util.ActionResult;
|
||||||
import net.minecraft.util.Hand;
|
import net.minecraft.util.Hand;
|
||||||
import net.minecraft.util.TypedActionResult;
|
import net.minecraft.util.TypedActionResult;
|
||||||
@ -16,11 +19,25 @@ public class kingsoul extends Item {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int availableSlots = 2;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TypedActionResult<ItemStack> use(World world, PlayerEntity PlayerEntity, Hand hand) {
|
public TypedActionResult<ItemStack> use(World world, PlayerEntity PlayerEntity, Hand hand) {
|
||||||
|
if (availableSlots > 0) {
|
||||||
|
availableSlots--;
|
||||||
PlayerEntity.getHungerManager().add(1, 1);
|
PlayerEntity.getHungerManager().add(1, 1);
|
||||||
PlayerEntity.getMainHandStack().damage(1,PlayerEntity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND));
|
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));
|
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(hand));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
11
src/main/java/net/serenas/shitmod/kingsoulLeft.java
Normal file
11
src/main/java/net/serenas/shitmod/kingsoulLeft.java
Normal 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
11
src/main/java/net/serenas/shitmod/kingsoulRight.java
Normal file
11
src/main/java/net/serenas/shitmod/kingsoulRight.java
Normal 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
36
src/main/java/net/serenas/shitmod/rockWithAStringAround.java
Normal file
36
src/main/java/net/serenas/shitmod/rockWithAStringAround.java
Normal 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));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
23
src/main/resources/data/shitmod/recipes/kingsoul_charm.json
Normal file
23
src/main/resources/data/shitmod/recipes/kingsoul_charm.json
Normal 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
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user