Compare commits
31 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
038cec0c4e | ||
![]() |
3befd1c9c2 | ||
![]() |
0aa3876bf9 | ||
![]() |
7e63b34ac8 | ||
![]() |
5a8ffd815f | ||
![]() |
15a4b57643 | ||
![]() |
6bd79f8aa3 | ||
![]() |
60a48f3b0c | ||
![]() |
b89684f0aa | ||
![]() |
336ed0f95c | ||
![]() |
dadedaed62 | ||
![]() |
143ce70b91 | ||
![]() |
34fc80ff5e | ||
![]() |
3d4291cf58 | ||
![]() |
5615a098ef | ||
![]() |
8bbecbf135 | ||
![]() |
2274852c9b | ||
![]() |
49a6c22003 | ||
![]() |
68cbeaa21f | ||
![]() |
90bd7fb6d9 | ||
![]() |
4e34ad8822 | ||
![]() |
7fff77816e | ||
![]() |
0cafb2c688 | ||
![]() |
7d5bb049c1 | ||
![]() |
2fe6036756 | ||
![]() |
69c6bd62f4 | ||
![]() |
54b58d790e | ||
![]() |
a1254a91ff | ||
![]() |
5b33204e07 | ||
![]() |
6731e64cb1 | ||
![]() |
bc18fa3d6c |
@ -1,6 +1,5 @@
|
|||||||
# Build
|
# Build
|
||||||
|
|
||||||
linux: ./gradlew build
|
While inside the root directory of the repo: ./gradlew build
|
||||||
windows: .\gradlew build
|
|
||||||
|
|
||||||
the resulting file will be located at [cloned folder]/build/libs/mod-VERSION.jar
|
the resulting file will be located at [repo root]/build/libs/mod-VERSION.jar
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'fabric-loom' version '0.11-SNAPSHOT'
|
id 'fabric-loom' version '0.12-SNAPSHOT'
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,14 +3,16 @@ org.gradle.jvmargs=-Xmx6G
|
|||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://fabricmc.net/develop
|
# check these on https://fabricmc.net/develop
|
||||||
minecraft_version=1.19
|
minecraft_version=1.19.3
|
||||||
yarn_mappings=1.19+build.1
|
yarn_mappings=1.19.3+build.5
|
||||||
loader_version=0.14.7
|
loader_version=0.14.14
|
||||||
|
|
||||||
|
#Fabric api
|
||||||
|
fabric_version=0.74.0+1.19.3
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.5.0
|
mod_version = 1.7.0
|
||||||
maven_group = com.serenas.shitmod
|
maven_group = net.serenas.shitmod
|
||||||
archives_base_name = serenas-shitmod
|
archives_base_name = serenas-shitmod
|
||||||
|
|
||||||
# Fabric API
|
|
||||||
fabric_version=0.55.3+1.19
|
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
# Done to increase the memory available to gradle.
|
|
||||||
org.gradle.jvmargs=-Xmx6G
|
|
||||||
|
|
||||||
# Fabric Properties
|
|
||||||
# check these on https://fabricmc.net/develop
|
|
||||||
minecraft_version=1.18.1
|
|
||||||
yarn_mappings=1.18.1+build.22
|
|
||||||
loader_version=0.12.12
|
|
||||||
|
|
||||||
# Mod Properties
|
|
||||||
mod_version = 1.5.0
|
|
||||||
maven_group = com.serenas.shitmod
|
|
||||||
archives_base_name = serenas-shitmod
|
|
||||||
|
|
||||||
# Dependencies
|
|
||||||
fabric_version=0.46.2+1.18
|
|
Before Width: | Height: | Size: 529 KiB |
Before Width: | Height: | Size: 476 KiB |
Before Width: | Height: | Size: 298 KiB |
Before Width: | Height: | Size: 563 KiB |
@ -21,7 +21,9 @@ public class FabricItem extends Item {
|
|||||||
public TypedActionResult<ItemStack> use(World world, PlayerEntity PlayerEntity, Hand hand) {
|
public TypedActionResult<ItemStack> use(World world, PlayerEntity PlayerEntity, Hand hand) {
|
||||||
PlayerEntity.playSound(SoundEvents.BLOCK_AMETHYST_BLOCK_CHIME, 1.0F, 1.0F);
|
PlayerEntity.playSound(SoundEvents.BLOCK_AMETHYST_BLOCK_CHIME, 1.0F, 1.0F);
|
||||||
for (int i = 0; i < 50; i++) {
|
for (int i = 0; i < 50; i++) {
|
||||||
world.spawnEntity(new TntEntity(world, PlayerEntity.getX(), PlayerEntity.getY(), PlayerEntity.getZ(), PlayerEntity));
|
TntEntity tnt = new TntEntity(world, PlayerEntity.getX(), PlayerEntity.getY(), PlayerEntity.getZ(), PlayerEntity);
|
||||||
|
tnt.setFuse(1);
|
||||||
|
world.spawnEntity(tnt);
|
||||||
}
|
}
|
||||||
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(hand));
|
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(hand));
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,14 @@
|
|||||||
package net.serenas.shitmod;
|
package net.serenas.shitmod;
|
||||||
|
|
||||||
|
import java.lang.reflect.Array;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import net.fabricmc.api.ModInitializer;
|
import net.fabricmc.api.ModInitializer;
|
||||||
import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder;
|
|
||||||
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
||||||
|
import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup;
|
||||||
|
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.enchantment.Enchantment;
|
import net.minecraft.enchantment.Enchantment;
|
||||||
import net.minecraft.enchantment.EnchantmentTarget;
|
import net.minecraft.enchantment.EnchantmentTarget;
|
||||||
@ -14,175 +20,266 @@ import net.minecraft.item.BlockItem;
|
|||||||
import net.minecraft.item.FoodComponent;
|
import net.minecraft.item.FoodComponent;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemGroup;
|
import net.minecraft.item.ItemGroup;
|
||||||
|
import net.minecraft.item.ItemGroups;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.item.PickaxeItem;
|
||||||
import net.minecraft.item.ShovelItem;
|
import net.minecraft.item.ShovelItem;
|
||||||
import net.minecraft.item.ToolItem;
|
import net.minecraft.item.ToolItem;
|
||||||
|
import net.minecraft.item.ToolMaterials;
|
||||||
|
import net.minecraft.registry.Registries;
|
||||||
|
import net.minecraft.registry.Registry;
|
||||||
|
import net.minecraft.sound.SoundEvent;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import net.minecraft.util.Rarity;
|
import net.minecraft.util.Rarity;
|
||||||
import net.minecraft.util.registry.Registry;
|
|
||||||
|
|
||||||
public class Shitmod implements ModInitializer {
|
public class Shitmod implements ModInitializer {
|
||||||
|
|
||||||
public static final ItemGroup CHARMS_GROUP = FabricItemGroupBuilder.build(
|
public static final Logger LOGGER = LoggerFactory.getLogger("shitmod");
|
||||||
new Identifier("shitmod", "charms"),
|
|
||||||
() -> new ItemStack(Shitmod.KINGSOUL_CHARM));
|
|
||||||
|
|
||||||
public static final ItemGroup GENERAL_GROUP = FabricItemGroupBuilder.build(
|
public Integer a;
|
||||||
new Identifier("shitmod", "general"),
|
public Integer b;
|
||||||
() -> new ItemStack(Shitmod.FABRIC_ITEM));
|
public Integer c;
|
||||||
|
public Integer d;
|
||||||
|
|
||||||
public static final ItemGroup TOOLS_GROUP = FabricItemGroupBuilder.build(
|
public static final ItemGroup CHARMS_GROUP = FabricItemGroup.builder(
|
||||||
new Identifier("shitmod", "tools"),
|
new Identifier("shitmod", "charms"))
|
||||||
() -> new ItemStack(Shitmod.BLAZE_METAL_SHOVEL));
|
.icon(() -> new ItemStack(Shitmod.KINGSOUL_CHARM))
|
||||||
|
.build();
|
||||||
|
|
||||||
public static final Item FABRIC_ITEM = new FabricItem(new Item.Settings().group(Shitmod.GENERAL_GROUP));
|
public static final ItemGroup GENERAL_GROUP = FabricItemGroup.builder(
|
||||||
|
new Identifier("shitmod", "general"))
|
||||||
|
.icon(() -> new ItemStack(Shitmod.PP))
|
||||||
|
.build();
|
||||||
|
|
||||||
|
public static final ItemGroup TOOLS_GROUP = FabricItemGroup.builder(
|
||||||
|
new Identifier("shitmod", "tools"))
|
||||||
|
.icon(() -> new ItemStack(Shitmod.BLAZE_METAL_SHOVEL))
|
||||||
|
.build();
|
||||||
|
|
||||||
|
public static final Item PP = new FabricItem(new FabricItemSettings());
|
||||||
|
|
||||||
public static final Block FABRIC_BLOCK = new FabricBlock();
|
public static final Block FABRIC_BLOCK = new FabricBlock();
|
||||||
|
|
||||||
public static final Item HAUSBOMMER_ITEM = new Hausbommer(new Item.Settings().group(Shitmod.GENERAL_GROUP));
|
public static final Item HAUSBOMMER_ITEM = new Hausbommer(new Item.Settings());
|
||||||
|
|
||||||
public static final StatusEffect LEAN_EFFECT = new LeanStatusEffect();
|
public static final StatusEffect LEAN_EFFECT = new LeanStatusEffect();
|
||||||
|
|
||||||
public static final Item LEAN = new Lean(new Item.Settings().group(ItemGroup.FOOD).rarity(Rarity.UNCOMMON).food(new FoodComponent.Builder().hunger(20).saturationModifier(10f).snack().meat().alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.WEAKNESS, 20*60, 5), 1f).statusEffect(new StatusEffectInstance(StatusEffects.BLINDNESS, 20*60, 5), 1f).statusEffect(new StatusEffectInstance(StatusEffects.NAUSEA, 20*60), 1f).statusEffect(new StatusEffectInstance(StatusEffects.SLOWNESS, 20*60, 2), 1f).statusEffect(new StatusEffectInstance(StatusEffects.POISON, 20*60, 5), 1f).statusEffect(new StatusEffectInstance(StatusEffects.GLOWING, 20*60), 1f).statusEffect(new StatusEffectInstance(StatusEffects.MINING_FATIGUE, 20*60, 5), 1f).statusEffect(new StatusEffectInstance(StatusEffects.HUNGER, 20*60, 3), 1f).build()));
|
public static final Item LEAN = new Lean(new Item.Settings().rarity(Rarity.UNCOMMON).food(new FoodComponent.Builder().hunger(20).saturationModifier(10f).snack().meat().alwaysEdible().statusEffect(new StatusEffectInstance(StatusEffects.WEAKNESS, 20*60, 5), 1f).statusEffect(new StatusEffectInstance(StatusEffects.BLINDNESS, 20*60, 5), 1f).statusEffect(new StatusEffectInstance(StatusEffects.NAUSEA, 20*60), 1f).statusEffect(new StatusEffectInstance(StatusEffects.SLOWNESS, 20*60, 2), 1f).statusEffect(new StatusEffectInstance(StatusEffects.POISON, 20*60, 5), 1f).statusEffect(new StatusEffectInstance(StatusEffects.GLOWING, 20*60), 1f).statusEffect(new StatusEffectInstance(StatusEffects.MINING_FATIGUE, 20*60, 5), 1f).statusEffect(new StatusEffectInstance(StatusEffects.HUNGER, 20*60, 3), 1f).build()));
|
||||||
|
|
||||||
public static final StatusEffect EXP = new ExpStatusEffect();
|
public static final StatusEffect EXP = new ExpStatusEffect();
|
||||||
|
|
||||||
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 Item ORANGE_JUICE = new OrangeJuice(new Item.Settings().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 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().maxDamage(500).fireproof());
|
||||||
|
|
||||||
public static final StatusEffect KINGSOUL_CHARM_EFFECT = new kingsoulEffect();
|
public static final Item STALWART_SHELL_CHARM = new stalwartShell(new Item.Settings().maxDamage(500).fireproof());
|
||||||
|
|
||||||
public static final Item STALWART_SHELL_CHARM = new stalwartShell(new Item.Settings().group(Shitmod.CHARMS_GROUP).maxDamage(500).fireproof());
|
public static final Item FRAGILE_HEART_CHARM = new fragileHeartCharm(new Item.Settings().maxDamage(100).fireproof());
|
||||||
|
|
||||||
public static final Item FRAGILE_HEART_CHARM = new fragileHeartCharm(new Item.Settings().group(Shitmod.CHARMS_GROUP).maxDamage(100).fireproof());
|
public static final Item UNBREAKABLE_HEART_CHARM = new unbreakableHeartCharm(new Item.Settings().fireproof().maxCount(1));
|
||||||
|
|
||||||
public static final Item UNBREAKABLE_HEART_CHARM = new unbreakableHeartCharm(new Item.Settings().group(Shitmod.CHARMS_GROUP).fireproof().maxCount(1));
|
public static final Item FRAGILE_STRENGTH_CHARM = new fragileStrengthCharm(new Item.Settings().maxDamage(100).fireproof());
|
||||||
|
|
||||||
public static final Item FRAGILE_STRENGTH_CHARM = new fragileStrengthCharm(new Item.Settings().group(Shitmod.CHARMS_GROUP).maxDamage(100).fireproof());
|
public static final Item UNBREAKABLE_STRENGTH_CHARM = new unbreakableStrengthCharm(new Item.Settings().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));
|
public static final Item TOTEM_OF_EQUIVALENCY = new totemOfEquivalency(new Item.Settings().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 ROCK_WITH_A_STRING_TIED_AROUND = new rockWithAStringAround(new Item.Settings().maxCount(1));
|
||||||
|
|
||||||
public static final Item KINGSOUL_LEFT = new kingsoulLeft(new Item.Settings().group(Shitmod.CHARMS_GROUP).maxCount(1));
|
public static final Item KINGSOUL_LEFT = new kingsoulLeft(new Item.Settings().maxCount(1));
|
||||||
|
|
||||||
public static final Item KINGSOUL_RIGHT = new kingsoulRight(new Item.Settings().group(Shitmod.CHARMS_GROUP).maxCount(1));
|
public static final Item KINGSOUL_RIGHT = new kingsoulRight(new Item.Settings().maxCount(1));
|
||||||
|
|
||||||
public static final ToolItem BLAZE_METAL_SWORD = new blazeMetalSword(blazeMetalMaterial.INSTANCE, 5, 3f, new Item.Settings().group(Shitmod.TOOLS_GROUP).maxDamage(8000));
|
public static final ToolItem BLAZE_METAL_SWORD = new blazeMetalSword(blazeMetalMaterial.INSTANCE, 5, 3f, new Item.Settings().maxDamage(8000));
|
||||||
|
|
||||||
public static final ToolItem BLAZE_METAL_PICKAXE = new blazeMetalPickaxe(blazeMetalMaterial.INSTANCE, 1, -0.5f, new Item.Settings().group(Shitmod.TOOLS_GROUP).maxDamage(8000));
|
public static final ToolItem BLAZE_METAL_PICKAXE = new blazeMetalPickaxe(blazeMetalMaterial.INSTANCE, 1, -0.5f, new Item.Settings().maxDamage(8000));
|
||||||
|
|
||||||
public static final ToolItem BLAZE_METAL_AXE = new blazeMetalAxe(blazeMetalMaterial.INSTANCE, 8.0f, -1.0f, new Item.Settings().group(Shitmod.TOOLS_GROUP).maxDamage(8000));
|
public static final ToolItem BLAZE_METAL_AXE = new blazeMetalAxe(blazeMetalMaterial.INSTANCE, 8.0f, -1.0f, new Item.Settings().maxDamage(8000));
|
||||||
|
|
||||||
public static final ToolItem BLAZE_METAL_SHOVEL = new ShovelItem(blazeMetalMaterial.INSTANCE, 1f, 3.0f, new Item.Settings().group(Shitmod.TOOLS_GROUP).maxDamage(8000));
|
public static final ToolItem BLAZE_METAL_SHOVEL = new ShovelItem(blazeMetalMaterial.INSTANCE, 1f, 3.0f, new Item.Settings().maxDamage(8000));
|
||||||
|
|
||||||
public static final ToolItem BLAZE_METAL_HOE = new blazeMetalHoe(blazeMetalMaterial.INSTANCE, new Item.Settings().group(Shitmod.TOOLS_GROUP).maxDamage(8000));
|
public static final ToolItem BLAZE_METAL_HOE = new blazeMetalHoe(blazeMetalMaterial.INSTANCE, -4, 1f, new Item.Settings().maxDamage(8000));
|
||||||
|
|
||||||
public static final Item BLAZE_METAL_INGOT = new blazeMetalIngot(new Item.Settings().group(Shitmod.GENERAL_GROUP));
|
public static final Item BLAZE_METAL_INGOT = new blazeMetalIngot(new Item.Settings());
|
||||||
|
|
||||||
public static final Enchantment EXPLOSION_ASPECT = new explosionAspectEnchantment();
|
public static final Enchantment EXPLOSION_ASPECT = new explosionAspectEnchantment();
|
||||||
|
|
||||||
public static final Enchantment EXPLOSIVE_THORNS = new explosiveThornsEnchantment(Enchantment.Rarity.RARE, EnchantmentTarget.WEARABLE, new EquipmentSlot[] {EquipmentSlot.HEAD, EquipmentSlot.CHEST, EquipmentSlot.LEGS, EquipmentSlot.FEET});
|
public static final Enchantment EXPLOSIVE_THORNS = new explosiveThornsEnchantment(Enchantment.Rarity.RARE, EnchantmentTarget.WEARABLE, new EquipmentSlot[] {EquipmentSlot.HEAD, EquipmentSlot.CHEST, EquipmentSlot.LEGS, EquipmentSlot.FEET});
|
||||||
|
|
||||||
public static final Item REINFORCED_BLAZE_METAL_INGOT = new reinforcedBlazeMetalIngot(new Item.Settings().fireproof().group(Shitmod.GENERAL_GROUP));
|
public static final Item REINFORCED_BLAZE_METAL_INGOT = new reinforcedBlazeMetalIngot(new Item.Settings().fireproof());
|
||||||
|
|
||||||
public static final Item BLAZE_METAL_SWORD_CASING = new blazeMetalSwordCasing(new Item.Settings().fireproof().group(Shitmod.GENERAL_GROUP));
|
public static final Item BLAZE_METAL_SWORD_CASING = new blazeMetalSwordCasing(new Item.Settings().fireproof());
|
||||||
|
|
||||||
public static final Item BLAZE_METAL_PICKAXE_CASING = new blazeMetalPickaxeCasing(new Item.Settings().fireproof().group(Shitmod.GENERAL_GROUP));
|
public static final Item BLAZE_METAL_PICKAXE_CASING = new blazeMetalPickaxeCasing(new Item.Settings().fireproof());
|
||||||
|
|
||||||
public static final Item BLAZE_METAL_AXE_CASING = new blazeMetalAxeCasing(new Item.Settings().fireproof().group(Shitmod.GENERAL_GROUP));
|
public static final Item BLAZE_METAL_AXE_CASING = new blazeMetalAxeCasing(new Item.Settings().fireproof());
|
||||||
|
|
||||||
public static final Item BLAZE_METAL_SHOVEL_CASING = new blazeMetalShovelCasing(new Item.Settings().fireproof().group(Shitmod.GENERAL_GROUP));
|
public static final Item BLAZE_METAL_SHOVEL_CASING = new blazeMetalShovelCasing(new Item.Settings().fireproof());
|
||||||
|
|
||||||
public static final Item BLAZE_METAL_HOE_CASING = new blazeMetalHoeCasing(new Item.Settings().fireproof().group(Shitmod.GENERAL_GROUP));
|
public static final Item BLAZE_METAL_HOE_CASING = new blazeMetalHoeCasing(new Item.Settings().fireproof());
|
||||||
|
|
||||||
public static final Item POTATO_CHIPS = new potatoChips(new Item.Settings().group(ItemGroup.FOOD).maxCount(69));
|
public static final Item POTATO_CHIPS = new potatoChips(new Item.Settings().maxCount(69));
|
||||||
|
|
||||||
public static final Item PULVERIZED_BLAZE_METAL = new pulverizedBlazeMetal(new Item.Settings().fireproof().group(Shitmod.GENERAL_GROUP));
|
public static final Item PULVERIZED_BLAZE_METAL = new pulverizedBlazeMetal(new Item.Settings().fireproof());
|
||||||
|
|
||||||
public static final Item SEARED_GOLD_INGOT = new searedGoldIngot(new Item.Settings().fireproof().group(Shitmod.GENERAL_GROUP));
|
public static final Item SEARED_GOLD_INGOT = new searedGoldIngot(new Item.Settings().fireproof());
|
||||||
|
|
||||||
public static final Item PULVERIZED_NETHERITE = new pulverizedNetherite(new Item.Settings().fireproof().group(Shitmod.GENERAL_GROUP));
|
public static final Item PULVERIZED_NETHERITE = new pulverizedNetherite(new Item.Settings().fireproof());
|
||||||
|
|
||||||
|
public static final ToolItem COPPER_SWORD = new copperSword(copperMaterial.INSTANCE, 2, -2.4f, new Item.Settings().maxDamage(250));
|
||||||
|
|
||||||
|
public static final ToolItem COPPER_PICKAXE = new copperPickaxe(copperMaterial.INSTANCE, 0, -2.8f, new Item.Settings().maxDamage(250));
|
||||||
|
|
||||||
|
public static final ToolItem COPPER_AXE = new copperAxe(copperMaterial.INSTANCE, 5, -3.1f, new Item.Settings().maxDamage(250));
|
||||||
|
|
||||||
|
public static final ToolItem COPPER_SHOVEL = new copperShovel(copperMaterial.INSTANCE, 0.5f, -3f, new Item.Settings().maxDamage(250));
|
||||||
|
|
||||||
|
public static final ToolItem COPPER_HOE = new copperHoe(copperMaterial.INSTANCE, -3, -1f, new Item.Settings().maxDamage(250));
|
||||||
|
|
||||||
|
public static final Item GLOCK = new glock(new FabricItemSettings().maxDamage(1000).rarity(Rarity.EPIC));
|
||||||
|
|
||||||
|
public static final Identifier GLOCK_NOISE_ID = new Identifier("shitmod:glock_noise");
|
||||||
|
|
||||||
|
public static final SoundEvent GLOCK_NOISE_EVENT = SoundEvent.of(GLOCK_NOISE_ID);
|
||||||
|
|
||||||
|
public static final Enchantment LIFESTEAL = new lifeStealEnchantment(Enchantment.Rarity.RARE, EnchantmentTarget.WEAPON, new EquipmentSlot[] {EquipmentSlot.MAINHAND});
|
||||||
|
|
||||||
|
public static final PickaxeItem HAMMER = new testHammer(ToolMaterials.NETHERITE, 3, -1, new Item.Settings().fireproof().maxDamage(2031));
|
||||||
|
|
||||||
|
public static final StatusEffect BERSERK = new berserkEffect();
|
||||||
|
|
||||||
|
public static final Item BERSERKER_TOTEM = new berserkerTotem(new FabricItemSettings().maxDamage(512).rarity(Rarity.EPIC));
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onInitialize() {
|
public void onInitialize() {
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "fabric_item"), FABRIC_ITEM);
|
LOGGER.info("Shitmod has been initialized.");
|
||||||
|
|
||||||
Registry.register(Registry.BLOCK, new Identifier("shitmod", "fabric_block"), FABRIC_BLOCK);
|
ItemStack[] generalItems = {Shitmod.PP.getDefaultStack(),Shitmod.HAUSBOMMER_ITEM.getDefaultStack(),Shitmod.TOTEM_OF_EQUIVALENCY.getDefaultStack(),Shitmod.ROCK_WITH_A_STRING_TIED_AROUND.getDefaultStack(),Shitmod.REINFORCED_BLAZE_METAL_INGOT.getDefaultStack(),Shitmod.BLAZE_METAL_SWORD_CASING.getDefaultStack(),Shitmod.BLAZE_METAL_PICKAXE_CASING.getDefaultStack(),Shitmod.BLAZE_METAL_AXE_CASING.getDefaultStack(),Shitmod.BLAZE_METAL_SHOVEL_CASING.getDefaultStack(),Shitmod.BLAZE_METAL_HOE_CASING.getDefaultStack(),Shitmod.PULVERIZED_BLAZE_METAL.getDefaultStack(),Shitmod.SEARED_GOLD_INGOT.getDefaultStack(),Shitmod.PULVERIZED_NETHERITE.getDefaultStack(),Shitmod.BERSERKER_TOTEM.getDefaultStack()};
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "fabric_block"), new BlockItem(FABRIC_BLOCK, new FabricItemSettings().group(ItemGroup.MISC)));
|
|
||||||
|
ItemStack[] foodItems = {Shitmod.LEAN.getDefaultStack(),Shitmod.ORANGE_JUICE.getDefaultStack(),Shitmod.POTATO_CHIPS.getDefaultStack()};
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "hausbommer"), HAUSBOMMER_ITEM);
|
ItemStack[] charmItems = {Shitmod.KINGSOUL_CHARM.getDefaultStack(),Shitmod.KINGSOUL_LEFT.getDefaultStack(),Shitmod.KINGSOUL_RIGHT.getDefaultStack(),Shitmod.STALWART_SHELL_CHARM.getDefaultStack(),Shitmod.FRAGILE_HEART_CHARM.getDefaultStack(),Shitmod.UNBREAKABLE_HEART_CHARM.getDefaultStack(),Shitmod.FRAGILE_STRENGTH_CHARM.getDefaultStack(),Shitmod.UNBREAKABLE_STRENGTH_CHARM.getDefaultStack()};
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "lean"), LEAN);
|
ItemStack[] toolItems = {Shitmod.BLAZE_METAL_SWORD.getDefaultStack(),Shitmod.BLAZE_METAL_PICKAXE.getDefaultStack(),Shitmod.BLAZE_METAL_AXE.getDefaultStack(),Shitmod.BLAZE_METAL_SHOVEL.getDefaultStack(),Shitmod.BLAZE_METAL_HOE.getDefaultStack(),Shitmod.COPPER_SWORD.getDefaultStack(),Shitmod.COPPER_PICKAXE.getDefaultStack(),Shitmod.COPPER_AXE.getDefaultStack(),Shitmod.COPPER_SHOVEL.getDefaultStack(),Shitmod.COPPER_HOE.getDefaultStack(),Shitmod.GLOCK.getDefaultStack(),Shitmod.HAMMER.getDefaultStack()};
|
||||||
|
|
||||||
|
ItemGroupEvents.modifyEntriesEvent(Shitmod.GENERAL_GROUP).register(content -> {
|
||||||
|
for (a = 0;a<Array.getLength(generalItems);a++) {
|
||||||
|
content.add((ItemStack) Array.get(generalItems,a));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Registry.register(Registry.STATUS_EFFECT, new Identifier("shitmod", "exp"), EXP);
|
ItemGroupEvents.modifyEntriesEvent(ItemGroups.FOOD_AND_DRINK).register(content -> {
|
||||||
|
for (b = 0;b<Array.getLength(foodItems);b++) {
|
||||||
|
content.add((ItemStack) Array.get(foodItems,b));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Registry.register(Registry.STATUS_EFFECT, new Identifier("shitmod", "lean"), LEAN_EFFECT);
|
ItemGroupEvents.modifyEntriesEvent(Shitmod.CHARMS_GROUP).register(content -> {
|
||||||
|
for (c = 0;c<Array.getLength(charmItems);c++) {
|
||||||
|
content.add((ItemStack) Array.get(charmItems,c));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "orange_juice"), ORANGE_JUICE);
|
ItemGroupEvents.modifyEntriesEvent(Shitmod.TOOLS_GROUP).register(content -> {
|
||||||
|
for (d = 0;d<Array.getLength(toolItems);d++) {
|
||||||
|
content.add((ItemStack) Array.get(toolItems,d));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "kingsoul_charm"), KINGSOUL_CHARM);
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "pp"), PP);
|
||||||
|
|
||||||
Registry.register(Registry.STATUS_EFFECT, new Identifier("shitmod", "kingsoul_charm"), KINGSOUL_CHARM_EFFECT);
|
Registry.register(Registries.BLOCK, new Identifier("shitmod", "gay_block"), FABRIC_BLOCK);
|
||||||
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "fabric_block"), new BlockItem(FABRIC_BLOCK, new FabricItemSettings()));
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "stalwart_shell_charm"), STALWART_SHELL_CHARM);
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "hausbommer"), HAUSBOMMER_ITEM);
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "fragile_heart_charm"), FRAGILE_HEART_CHARM);
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "lean"), LEAN);
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "unbreakable_heart_charm"), UNBREAKABLE_HEART_CHARM);
|
Registry.register(Registries.STATUS_EFFECT, new Identifier("shitmod", "exp"), EXP);
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "fragile_strength_charm"), FRAGILE_STRENGTH_CHARM);
|
Registry.register(Registries.STATUS_EFFECT, new Identifier("shitmod", "lean"), LEAN_EFFECT);
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "unbreakable_strength_charm"), UNBREAKABLE_STRENGTH_CHARM);
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "orange_juice"), ORANGE_JUICE);
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "totem_of_equivalency"), TOTEM_OF_EQUIVALENCY);
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "kingsoul_charm"), KINGSOUL_CHARM);
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "rock_with_string"), ROCK_WITH_A_STRING_TIED_AROUND);
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "stalwart_shell_charm"), STALWART_SHELL_CHARM);
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "kingsoul_left_fragment"), KINGSOUL_LEFT);
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "fragile_heart_charm"), FRAGILE_HEART_CHARM);
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "kingsoul_right_fragment"), KINGSOUL_RIGHT);
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "unbreakable_heart_charm"), UNBREAKABLE_HEART_CHARM);
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "blaze_metal_sword"), BLAZE_METAL_SWORD);
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "fragile_strength_charm"), FRAGILE_STRENGTH_CHARM);
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "blaze_metal_pickaxe"), BLAZE_METAL_PICKAXE);
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "unbreakable_strength_charm"), UNBREAKABLE_STRENGTH_CHARM);
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "blaze_metal_axe"), BLAZE_METAL_AXE);
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "totem_of_equivalency"), TOTEM_OF_EQUIVALENCY);
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "blaze_metal_shovel"), BLAZE_METAL_SHOVEL);
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "rock_with_string"), ROCK_WITH_A_STRING_TIED_AROUND);
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "blaze_metal_hoe"), BLAZE_METAL_HOE);
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "kingsoul_left_fragment"), KINGSOUL_LEFT);
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "blaze_metal_ingot"), BLAZE_METAL_INGOT);
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "kingsoul_right_fragment"), KINGSOUL_RIGHT);
|
||||||
|
|
||||||
Registry.register(Registry.ENCHANTMENT, new Identifier("shitmod", "explosion_aspect"), EXPLOSION_ASPECT);
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "blaze_metal_sword"), BLAZE_METAL_SWORD);
|
||||||
|
|
||||||
Registry.register(Registry.ENCHANTMENT, new Identifier("shitmod", "explosive_thorns"), EXPLOSIVE_THORNS);
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "blaze_metal_pickaxe"), BLAZE_METAL_PICKAXE);
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "reinforced_blaze_metal_ingot"), REINFORCED_BLAZE_METAL_INGOT);
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "blaze_metal_axe"), BLAZE_METAL_AXE);
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "blaze_metal_sword_casing"), BLAZE_METAL_SWORD_CASING);
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "blaze_metal_shovel"), BLAZE_METAL_SHOVEL);
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "blaze_metal_pickaxe_casing"), BLAZE_METAL_PICKAXE_CASING);
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "blaze_metal_hoe"), BLAZE_METAL_HOE);
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "blaze_metal_axe_casing"), BLAZE_METAL_AXE_CASING);
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "blaze_metal_ingot"), BLAZE_METAL_INGOT);
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "blaze_metal_shovel_casing"), BLAZE_METAL_SHOVEL_CASING);
|
Registry.register(Registries.ENCHANTMENT, new Identifier("shitmod", "explosion_aspect"), EXPLOSION_ASPECT);
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "blaze_metal_hoe_casing"), BLAZE_METAL_HOE_CASING);
|
Registry.register(Registries.ENCHANTMENT, new Identifier("shitmod", "explosive_thorns"), EXPLOSIVE_THORNS);
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "potato_chip"), POTATO_CHIPS);
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "reinforced_blaze_metal_ingot"), REINFORCED_BLAZE_METAL_INGOT);
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "pulverized_blaze_metal"), PULVERIZED_BLAZE_METAL);
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "blaze_metal_sword_casing"), BLAZE_METAL_SWORD_CASING);
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "pulverized_netherite"), PULVERIZED_NETHERITE);
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "blaze_metal_pickaxe_casing"), BLAZE_METAL_PICKAXE_CASING);
|
||||||
|
|
||||||
Registry.register(Registry.ITEM, new Identifier("shitmod", "seared_gold_ingot"), SEARED_GOLD_INGOT);
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "blaze_metal_axe_casing"), BLAZE_METAL_AXE_CASING);
|
||||||
|
|
||||||
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "blaze_metal_shovel_casing"), BLAZE_METAL_SHOVEL_CASING);
|
||||||
|
|
||||||
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "blaze_metal_hoe_casing"), BLAZE_METAL_HOE_CASING);
|
||||||
|
|
||||||
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "potato_chip"), POTATO_CHIPS);
|
||||||
|
|
||||||
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "pulverized_blaze_metal"), PULVERIZED_BLAZE_METAL);
|
||||||
|
|
||||||
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "pulverized_netherite"), PULVERIZED_NETHERITE);
|
||||||
|
|
||||||
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "seared_gold_ingot"), SEARED_GOLD_INGOT);
|
||||||
|
|
||||||
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "copper_sword"), COPPER_SWORD);
|
||||||
|
|
||||||
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "copper_pickaxe"), COPPER_PICKAXE);
|
||||||
|
|
||||||
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "copper_axe"), COPPER_AXE);
|
||||||
|
|
||||||
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "copper_shovel"), COPPER_SHOVEL);
|
||||||
|
|
||||||
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "copper_hoe"), COPPER_HOE);
|
||||||
|
|
||||||
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "glock"), GLOCK);
|
||||||
|
|
||||||
|
Registry.register(Registries.SOUND_EVENT, Shitmod.GLOCK_NOISE_ID, GLOCK_NOISE_EVENT);
|
||||||
|
|
||||||
|
Registry.register(Registries.ENCHANTMENT, new Identifier("shitmod", "lifesteal"), LIFESTEAL);
|
||||||
|
|
||||||
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "hammer"), HAMMER);
|
||||||
|
|
||||||
|
Registry.register(Registries.STATUS_EFFECT, new Identifier("shitmod", "berserk"), BERSERK);
|
||||||
|
|
||||||
|
Registry.register(Registries.ITEM, new Identifier("shitmod", "berserker_totem"), BERSERKER_TOTEM);
|
||||||
|
|
||||||
|
LOGGER.info("Shitmod items have been registered.");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
33
src/main/java/net/serenas/shitmod/berserkEffect.java
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
package net.serenas.shitmod;
|
||||||
|
|
||||||
|
import net.minecraft.entity.LivingEntity;
|
||||||
|
import net.minecraft.entity.damage.DamageSource;
|
||||||
|
import net.minecraft.entity.effect.StatusEffect;
|
||||||
|
import net.minecraft.entity.effect.StatusEffectCategory;
|
||||||
|
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||||
|
import net.minecraft.entity.effect.StatusEffects;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
|
||||||
|
public class berserkEffect extends StatusEffect{
|
||||||
|
|
||||||
|
protected berserkEffect() {
|
||||||
|
super(StatusEffectCategory.BENEFICIAL, 0xa80f12);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canApplyUpdateEffect(int duration, int amplifier) {
|
||||||
|
// In our case, we just make it return true so that it applies the status effect every tick.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// This method is called when it applies the status effect. We implement custom functionality here.
|
||||||
|
@Override
|
||||||
|
public void applyUpdateEffect(LivingEntity entity, int amplifier) {
|
||||||
|
if (entity instanceof PlayerEntity) {
|
||||||
|
((PlayerEntity) entity).damage(DamageSource.MAGIC, (0.5f));
|
||||||
|
((PlayerEntity) entity).addStatusEffect(new StatusEffectInstance(StatusEffects.STRENGTH, 2, amplifier*2, false, false, false));
|
||||||
|
((PlayerEntity) entity).addStatusEffect(new StatusEffectInstance(StatusEffects.HASTE, 2, amplifier*2, false, false, false));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
39
src/main/java/net/serenas/shitmod/berserkerTotem.java
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
package net.serenas.shitmod;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||||
|
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 berserkerTotem extends Item{
|
||||||
|
|
||||||
|
public berserkerTotem(Settings settings) {
|
||||||
|
super(settings);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TypedActionResult<ItemStack> use(World world, PlayerEntity playerEntity, Hand hand) {
|
||||||
|
int rand = new Random().nextInt(5);
|
||||||
|
int rand2 = new Random().nextInt(3);
|
||||||
|
ItemStack itemStack = playerEntity.getStackInHand(hand);
|
||||||
|
if (rand == 0) {
|
||||||
|
rand++;
|
||||||
|
playerEntity.addStatusEffect(new StatusEffectInstance(Shitmod.BERSERK, 400*(rand2++), rand));
|
||||||
|
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, playerEntity.getStackInHand(hand));
|
||||||
|
}
|
||||||
|
playerEntity.addStatusEffect(new StatusEffectInstance(Shitmod.BERSERK, 400*(rand2++), rand));
|
||||||
|
if (!playerEntity.isCreative()){
|
||||||
|
itemStack.damage(1, playerEntity, (entity) -> entity.sendToolBreakStatus(hand));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, playerEntity.getStackInHand(hand));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package net.serenas.shitmod;
|
package net.serenas.shitmod;
|
||||||
|
|
||||||
|
import net.minecraft.enchantment.Enchantments;
|
||||||
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.entity.projectile.FireballEntity;
|
import net.minecraft.entity.projectile.FireballEntity;
|
||||||
@ -22,8 +23,14 @@ public class blazeMetalAxe extends AxeItem {
|
|||||||
Vec3d looking = PlayerEntity.getRotationVector();
|
Vec3d looking = PlayerEntity.getRotationVector();
|
||||||
World.spawnEntity(new FireballEntity(World, PlayerEntity, looking.x, looking.y, looking.z, 6));
|
World.spawnEntity(new FireballEntity(World, PlayerEntity, looking.x, looking.y, looking.z, 6));
|
||||||
PlayerEntity.getStackInHand(Hand).damage(100,PlayerEntity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND));
|
PlayerEntity.getStackInHand(Hand).damage(100,PlayerEntity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND));
|
||||||
|
PlayerEntity.getItemCooldownManager().set(this, 40);
|
||||||
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(Hand));
|
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(Hand));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCraft(ItemStack stack, World world, PlayerEntity player) {
|
||||||
|
stack.addEnchantment(Enchantments.FIRE_ASPECT, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,12 +1,21 @@
|
|||||||
package net.serenas.shitmod;
|
package net.serenas.shitmod;
|
||||||
|
|
||||||
import net.minecraft.item.ToolItem;
|
import net.minecraft.enchantment.Enchantments;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.item.HoeItem;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.ToolMaterial;
|
import net.minecraft.item.ToolMaterial;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class blazeMetalHoe extends ToolItem {
|
public class blazeMetalHoe extends HoeItem {
|
||||||
|
|
||||||
public blazeMetalHoe(ToolMaterial material, Settings settings) {
|
public blazeMetalHoe(ToolMaterial material, int attackDamage, float attackSpeed, Settings settings) {
|
||||||
super(material, settings);
|
super(material, attackDamage, attackSpeed, settings);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCraft(ItemStack stack, World world, PlayerEntity player) {
|
||||||
|
stack.addEnchantment(Enchantments.FIRE_ASPECT, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,19 @@
|
|||||||
package net.serenas.shitmod;
|
package net.serenas.shitmod;
|
||||||
|
|
||||||
|
import net.minecraft.enchantment.Enchantments;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.item.PickaxeItem;
|
import net.minecraft.item.PickaxeItem;
|
||||||
import net.minecraft.item.ToolMaterial;
|
import net.minecraft.item.ToolMaterial;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class blazeMetalPickaxe extends PickaxeItem {
|
public class blazeMetalPickaxe extends PickaxeItem {
|
||||||
public blazeMetalPickaxe(ToolMaterial material, int attackDamage, float attackSpeed, Settings settings) {
|
public blazeMetalPickaxe(ToolMaterial material, int attackDamage, float attackSpeed, Settings settings) {
|
||||||
super(material, attackDamage, attackSpeed, settings);
|
super(material, attackDamage, attackSpeed, settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCraft(ItemStack stack, World world, PlayerEntity player) {
|
||||||
|
stack.addEnchantment(Enchantments.FIRE_ASPECT, 2);
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,5 +1,6 @@
|
|||||||
package net.serenas.shitmod;
|
package net.serenas.shitmod;
|
||||||
|
|
||||||
|
import net.minecraft.enchantment.Enchantments;
|
||||||
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.entity.projectile.FireballEntity;
|
import net.minecraft.entity.projectile.FireballEntity;
|
||||||
@ -21,9 +22,17 @@ public class blazeMetalSword extends SwordItem {
|
|||||||
@Override
|
@Override
|
||||||
public TypedActionResult<ItemStack> use(World World, PlayerEntity PlayerEntity, Hand Hand) {
|
public TypedActionResult<ItemStack> use(World World, PlayerEntity PlayerEntity, Hand Hand) {
|
||||||
Vec3d looking = PlayerEntity.getRotationVector();
|
Vec3d looking = PlayerEntity.getRotationVector();
|
||||||
FireballEntity fireball = new FireballEntity(World, PlayerEntity, looking.x, looking.y, looking.z, 5);
|
FireballEntity fireball = new FireballEntity(World, PlayerEntity, (2*looking.x), (2*looking.y), (2*looking.z), 5);
|
||||||
|
fireball.setOwner(PlayerEntity);
|
||||||
World.spawnEntity(fireball);
|
World.spawnEntity(fireball);
|
||||||
PlayerEntity.getStackInHand(Hand).damage(100,PlayerEntity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND));
|
PlayerEntity.getStackInHand(Hand).damage(100,PlayerEntity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND));
|
||||||
|
PlayerEntity.getItemCooldownManager().set(this, 40);
|
||||||
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(Hand));
|
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(Hand));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCraft(ItemStack stack, World world, PlayerEntity player) {
|
||||||
|
stack.addEnchantment(Enchantments.FIRE_ASPECT, 4);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,33 @@
|
|||||||
package net.serenas.shitmod;
|
package net.serenas.shitmod;
|
||||||
|
|
||||||
|
import net.minecraft.entity.LivingEntity;
|
||||||
|
import net.minecraft.entity.damage.DamageSource;
|
||||||
import net.minecraft.entity.effect.StatusEffect;
|
import net.minecraft.entity.effect.StatusEffect;
|
||||||
import net.minecraft.entity.effect.StatusEffectCategory;
|
import net.minecraft.entity.effect.StatusEffectCategory;
|
||||||
|
|
||||||
public class careFreeMelodyEffect extends StatusEffect {
|
public class careFreeMelodyEffect extends StatusEffect {
|
||||||
|
|
||||||
protected careFreeMelodyEffect(StatusEffectCategory category, int color) {
|
protected careFreeMelodyEffect(StatusEffectCategory category, int color) {
|
||||||
super(category, color);
|
super(
|
||||||
|
StatusEffectCategory.BENEFICIAL, // whether beneficial or harmful for entities
|
||||||
|
0x98D982);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This method is called every tick to check whether it should apply the status effect or not
|
||||||
|
@Override
|
||||||
|
public boolean canApplyUpdateEffect(int duration, int amplifier) {
|
||||||
|
// In our case, we just make it return true so that it applies the status effect every tick.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// This method is called when it applies the status effect. We implement custom functionality here.
|
||||||
|
@Override
|
||||||
|
public void applyUpdateEffect(LivingEntity entity, int amplifier) {
|
||||||
|
float damage = entity.getDamageTracker().getMostRecentDamage().getDamage();
|
||||||
|
float health = entity.getDamageTracker().getMostRecentDamage().getEntityHealth();
|
||||||
|
DamageSource source = entity.getDamageTracker().getMostRecentDamage().getDamageSource();
|
||||||
|
entity.getDamageTracker().onDamage(source, health, damage);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
41
src/main/java/net/serenas/shitmod/copperMaterial.java
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
package net.serenas.shitmod;
|
||||||
|
|
||||||
|
import net.minecraft.item.Items;
|
||||||
|
import net.minecraft.item.ToolMaterial;
|
||||||
|
import net.minecraft.recipe.Ingredient;
|
||||||
|
|
||||||
|
public class copperMaterial implements ToolMaterial {
|
||||||
|
|
||||||
|
public static final copperMaterial INSTANCE = new copperMaterial();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getDurability() {
|
||||||
|
return 250;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getMiningSpeedMultiplier() {
|
||||||
|
return 6.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getAttackDamage() {
|
||||||
|
return 3.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getMiningLevel() {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getEnchantability() {
|
||||||
|
return 44;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Ingredient getRepairIngredient() {
|
||||||
|
return Ingredient.ofItems(Items.COPPER_INGOT);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -4,9 +4,11 @@ import net.minecraft.enchantment.Enchantment;
|
|||||||
import net.minecraft.enchantment.EnchantmentTarget;
|
import net.minecraft.enchantment.EnchantmentTarget;
|
||||||
import net.minecraft.entity.EquipmentSlot;
|
import net.minecraft.entity.EquipmentSlot;
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
|
import net.minecraft.entity.damage.DamageSource;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.explosion.Explosion;
|
import net.minecraft.world.World.ExplosionSourceType;
|
||||||
|
|
||||||
public class explosionAspectEnchantment extends Enchantment {
|
public class explosionAspectEnchantment extends Enchantment {
|
||||||
|
|
||||||
@ -30,7 +32,7 @@ public class explosionAspectEnchantment extends Enchantment {
|
|||||||
World world = user.world;
|
World world = user.world;
|
||||||
if (target instanceof LivingEntity) {
|
if (target instanceof LivingEntity) {
|
||||||
Vec3d pos = target.getPos();
|
Vec3d pos = target.getPos();
|
||||||
world.createExplosion(user, pos.x, pos.y, pos.z, level * 4.0F, Explosion.DestructionType.BREAK);
|
world.createExplosion(user, DamageSource.player(((PlayerEntity)user)), null, pos, level * 4.0F , true, ExplosionSourceType.MOB);
|
||||||
}
|
}
|
||||||
super.onTargetDamaged(user, target, level);
|
super.onTargetDamaged(user, target, level);
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ import net.minecraft.entity.LivingEntity;
|
|||||||
import net.minecraft.entity.damage.DamageSource;
|
import net.minecraft.entity.damage.DamageSource;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.explosion.Explosion.DestructionType;
|
import net.minecraft.world.World.ExplosionSourceType;
|
||||||
|
|
||||||
public class explosiveThornsEnchantment extends Enchantment {
|
public class explosiveThornsEnchantment extends Enchantment {
|
||||||
|
|
||||||
@ -26,7 +26,8 @@ public class explosiveThornsEnchantment extends Enchantment {
|
|||||||
public void onUserDamaged(LivingEntity user, Entity attacker, int level) {
|
public void onUserDamaged(LivingEntity user, Entity attacker, int level) {
|
||||||
World World = attacker.world;
|
World World = attacker.world;
|
||||||
Vec3d pos = attacker.getPos();
|
Vec3d pos = attacker.getPos();
|
||||||
World.createExplosion(user, DamageSource.MAGIC, null, pos.x, pos.y, pos.z, 3 * level, false, DestructionType.NONE);
|
World.createExplosion(attacker, DamageSource.GENERIC, null, pos, 3 * level, false, ExplosionSourceType.NONE);
|
||||||
|
// World.createExplosion(user, DamageSource.MAGIC, null, pos.x, pos.y, pos.z, 3 * level, false, DestructionType.NONE);
|
||||||
super.onUserDamaged(user, attacker, level);
|
super.onUserDamaged(user, attacker, level);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
33
src/main/java/net/serenas/shitmod/glock.java
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
package net.serenas.shitmod;
|
||||||
|
|
||||||
|
import net.minecraft.entity.EquipmentSlot;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.entity.projectile.ArrowEntity;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.sound.SoundCategory;
|
||||||
|
import net.minecraft.util.ActionResult;
|
||||||
|
import net.minecraft.util.Hand;
|
||||||
|
import net.minecraft.util.TypedActionResult;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class glock extends Item{
|
||||||
|
|
||||||
|
public glock(Settings settings) {
|
||||||
|
super(settings);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public TypedActionResult<ItemStack> use(World world, PlayerEntity playerEntity, Hand hand) {
|
||||||
|
ArrowEntity arro = new ArrowEntity(world, playerEntity.getX(), playerEntity.getEyeY(), playerEntity.getZ());
|
||||||
|
arro.setVelocity(playerEntity, playerEntity.getPitch(), playerEntity.getHeadYaw(), 0f, 100, 0);
|
||||||
|
arro.setOwner(playerEntity);
|
||||||
|
world.spawnEntity(arro);
|
||||||
|
if (!world.isClient()) {
|
||||||
|
world.playSound(null, playerEntity.getX(), playerEntity.getY(), playerEntity.getZ(), Shitmod.GLOCK_NOISE_EVENT, SoundCategory.NEUTRAL, 1f, 1f, 1);
|
||||||
|
}
|
||||||
|
playerEntity.getMainHandStack().damage(1,playerEntity,e-> e.sendEquipmentBreakStatus(EquipmentSlot.MAINHAND));
|
||||||
|
playerEntity.getItemCooldownManager().set(this, 20);
|
||||||
|
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, playerEntity.getStackInHand(hand));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,25 +0,0 @@
|
|||||||
package net.serenas.shitmod;
|
|
||||||
|
|
||||||
import net.minecraft.entity.LivingEntity;
|
|
||||||
import net.minecraft.entity.effect.StatusEffect;
|
|
||||||
import net.minecraft.entity.effect.StatusEffectCategory;
|
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
|
||||||
|
|
||||||
public class kingsoulEffect extends StatusEffect{
|
|
||||||
|
|
||||||
public kingsoulEffect() {
|
|
||||||
super(StatusEffectCategory.BENEFICIAL, 0x98D982);
|
|
||||||
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public boolean canApplyUpdateEffect(int duration, int amplifier) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
PlayerEntity playerentity;
|
|
||||||
@Override
|
|
||||||
public void applyUpdateEffect(LivingEntity entity, int amplifier) {
|
|
||||||
if (entity instanceof PlayerEntity) {
|
|
||||||
playerentity.getHungerManager().add(1, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
28
src/main/java/net/serenas/shitmod/lifeStealEnchantment.java
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
package net.serenas.shitmod;
|
||||||
|
|
||||||
|
import net.minecraft.enchantment.Enchantment;
|
||||||
|
import net.minecraft.enchantment.EnchantmentTarget;
|
||||||
|
import net.minecraft.entity.EquipmentSlot;
|
||||||
|
import net.minecraft.entity.LivingEntity;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
|
||||||
|
public class lifeStealEnchantment extends Enchantment {
|
||||||
|
|
||||||
|
protected lifeStealEnchantment(Rarity weight, EnchantmentTarget type, EquipmentSlot[] slotTypes) {
|
||||||
|
super(weight, type, slotTypes);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getMaxLevel() {
|
||||||
|
return 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onTargetDamaged(LivingEntity user, Entity target, int level) {
|
||||||
|
if (!target.isAlive()) {
|
||||||
|
user.heal(level*2);
|
||||||
|
}
|
||||||
|
super.onTargetDamaged(user, target, level);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,5 +1,7 @@
|
|||||||
package net.serenas.shitmod;
|
package net.serenas.shitmod;
|
||||||
|
|
||||||
|
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||||
|
import net.minecraft.entity.effect.StatusEffects;
|
||||||
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;
|
||||||
@ -20,6 +22,11 @@ int potatoChipsConsumed = 0;
|
|||||||
public TypedActionResult<ItemStack> use(World World, PlayerEntity PlayerEntity, Hand Hand) {
|
public TypedActionResult<ItemStack> use(World World, PlayerEntity PlayerEntity, Hand Hand) {
|
||||||
PlayerEntity.getHungerManager().add(1, 10f);
|
PlayerEntity.getHungerManager().add(1, 10f);
|
||||||
PlayerEntity.getStackInHand(Hand).decrement(1);
|
PlayerEntity.getStackInHand(Hand).decrement(1);
|
||||||
|
potatoChipsConsumed+=1;
|
||||||
|
if (potatoChipsConsumed == 69) {
|
||||||
|
PlayerEntity.addStatusEffect(new StatusEffectInstance(StatusEffects.HUNGER, 20 * 15, 4));
|
||||||
|
potatoChipsConsumed-=69;
|
||||||
|
}
|
||||||
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(Hand));
|
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(Hand));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,8 +26,6 @@ public class rockWithAStringAround extends Item {
|
|||||||
} else if (messageToSay > 0.6) {
|
} else if (messageToSay > 0.6) {
|
||||||
System.out.println("placeholder 3");
|
System.out.println("placeholder 3");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(Hand));
|
return new TypedActionResult<ItemStack>(ActionResult.SUCCESS, PlayerEntity.getStackInHand(Hand));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
25
src/main/java/net/serenas/shitmod/sheepShearCallback.java
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
package net.serenas.shitmod;
|
||||||
|
|
||||||
|
import net.fabricmc.fabric.api.event.Event;
|
||||||
|
import net.fabricmc.fabric.api.event.EventFactory;
|
||||||
|
import net.minecraft.entity.passive.SheepEntity;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.util.ActionResult;
|
||||||
|
|
||||||
|
public interface sheepShearCallback {
|
||||||
|
|
||||||
|
Event<sheepShearCallback> EVENT = EventFactory.createArrayBacked(sheepShearCallback.class,
|
||||||
|
(listeners) -> (player, sheep) -> {
|
||||||
|
for (sheepShearCallback listener : listeners) {
|
||||||
|
ActionResult result = listener.interact(player, sheep);
|
||||||
|
|
||||||
|
if(result != ActionResult.PASS) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return ActionResult.PASS;
|
||||||
|
});
|
||||||
|
|
||||||
|
ActionResult interact(PlayerEntity player, SheepEntity sheep);
|
||||||
|
}
|
55
src/main/java/net/serenas/shitmod/testHammer.java
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
package net.serenas.shitmod;
|
||||||
|
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockState;
|
||||||
|
import net.minecraft.enchantment.Enchantments;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.item.PickaxeItem;
|
||||||
|
import net.minecraft.item.ToolMaterial;
|
||||||
|
import net.minecraft.util.hit.BlockHitResult;
|
||||||
|
import net.minecraft.util.math.BlockPos;
|
||||||
|
import net.minecraft.util.math.Direction;
|
||||||
|
import net.minecraft.util.math.Vec3d;
|
||||||
|
import net.minecraft.util.math.Direction.Axis;
|
||||||
|
import net.minecraft.world.RaycastContext;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class testHammer extends PickaxeItem {
|
||||||
|
|
||||||
|
protected testHammer(ToolMaterial material, int attackDamage, float attackSpeed, Settings settings) {
|
||||||
|
super(material, attackDamage, attackSpeed, settings);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public boolean canMine(BlockState blockState, World world, BlockPos pos, PlayerEntity player) {
|
||||||
|
if (world.isClient){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
ItemStack mainHandStack = player.getMainHandStack();
|
||||||
|
Vec3d vec3d_1 = player.getCameraPosVec(1);
|
||||||
|
Vec3d vec3d_2 = player.getRotationVec(1);
|
||||||
|
int range = 4;
|
||||||
|
Vec3d vec3d_3 = vec3d_1.add(vec3d_2.x * range, vec3d_2.y * range, vec3d_2.z * range);
|
||||||
|
BlockHitResult hitResult = world.raycast(new RaycastContext(vec3d_1, vec3d_3, RaycastContext.ShapeType.OUTLINE, RaycastContext.FluidHandling.ANY, player));
|
||||||
|
Direction.Axis axis = hitResult.getSide().getAxis();
|
||||||
|
for (int i = -1; i <= 1; i++)
|
||||||
|
for (int j = -1; j <= 1; j++) {
|
||||||
|
if (i != 0 || j != 0) {
|
||||||
|
BlockPos newPos = new BlockPos(axis == Axis.X ? pos.getX() : pos.getX() + i, axis == Axis.X ? pos.getY() + i : axis == Axis.Y ? pos.getY() : pos.getY() + j, axis != Axis.Z ? pos.getZ() + j : pos.getZ());
|
||||||
|
BlockState newState = world.getBlockState(newPos);
|
||||||
|
boolean canBreak = newState.getHardness(world, newPos) >= 0 || (!newState.isToolRequired() && mainHandStack.getMiningSpeedMultiplier(newState) > 1);
|
||||||
|
if (!canBreak)
|
||||||
|
continue;
|
||||||
|
if (player.isCreative()) world.breakBlock(newPos, false, player);
|
||||||
|
if (!player.isCreative()) world.breakBlock(newPos, true, player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCraft(ItemStack stack, World world, PlayerEntity player) {
|
||||||
|
stack.addEnchantment(Enchantments.EFFICIENCY, 5);
|
||||||
|
}
|
||||||
|
}
|
@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"variants": {
|
|
||||||
"axis=x": {
|
|
||||||
"model": "customportalapi:block/customportalblock_ns"
|
|
||||||
},
|
|
||||||
"axis=z": {
|
|
||||||
"model": "customportalapi:block/customportalblock_ew"
|
|
||||||
},
|
|
||||||
"axis=y": {
|
|
||||||
"model": "customportalapi:block/customportalblock_flat"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Before Width: | Height: | Size: 12 KiB |
@ -1,42 +0,0 @@
|
|||||||
{
|
|
||||||
"textures": {
|
|
||||||
"particle": "customportalapi:block/customportalblock",
|
|
||||||
"portal": "customportalapi:block/customportalblock"
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"from": [
|
|
||||||
6,
|
|
||||||
0,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"to": [
|
|
||||||
10,
|
|
||||||
16,
|
|
||||||
16
|
|
||||||
],
|
|
||||||
"faces": {
|
|
||||||
"east": {
|
|
||||||
"uv": [
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
16,
|
|
||||||
16
|
|
||||||
],
|
|
||||||
"texture": "#portal",
|
|
||||||
"tintindex": 4
|
|
||||||
},
|
|
||||||
"west": {
|
|
||||||
"uv": [
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
16,
|
|
||||||
16
|
|
||||||
],
|
|
||||||
"texture": "#portal",
|
|
||||||
"tintindex": 4
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,42 +0,0 @@
|
|||||||
{
|
|
||||||
"textures": {
|
|
||||||
"particle": "customportalapi:block/customportalblock",
|
|
||||||
"portal": "customportalapi:block/customportalblock"
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"from": [
|
|
||||||
0,
|
|
||||||
6,
|
|
||||||
0
|
|
||||||
],
|
|
||||||
"to": [
|
|
||||||
16,
|
|
||||||
10,
|
|
||||||
16
|
|
||||||
],
|
|
||||||
"faces": {
|
|
||||||
"up": {
|
|
||||||
"uv": [
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
16,
|
|
||||||
16
|
|
||||||
],
|
|
||||||
"texture": "#portal",
|
|
||||||
"tintindex": 4
|
|
||||||
},
|
|
||||||
"down": {
|
|
||||||
"uv": [
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
16,
|
|
||||||
16
|
|
||||||
],
|
|
||||||
"texture": "#portal",
|
|
||||||
"tintindex": 4
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,42 +0,0 @@
|
|||||||
{
|
|
||||||
"textures": {
|
|
||||||
"particle": "customportalapi:block/customportalblock",
|
|
||||||
"portal": "customportalapi:block/customportalblock"
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"from": [
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
6
|
|
||||||
],
|
|
||||||
"to": [
|
|
||||||
16,
|
|
||||||
16,
|
|
||||||
10
|
|
||||||
],
|
|
||||||
"faces": {
|
|
||||||
"north": {
|
|
||||||
"uv": [
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
16,
|
|
||||||
16
|
|
||||||
],
|
|
||||||
"texture": "#portal",
|
|
||||||
"tintindex": 4
|
|
||||||
},
|
|
||||||
"south": {
|
|
||||||
"uv": [
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
16,
|
|
||||||
16
|
|
||||||
],
|
|
||||||
"texture": "#portal",
|
|
||||||
"tintindex": 4
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"textures": [
|
|
||||||
"minecraft:generic_0",
|
|
||||||
"minecraft:generic_1",
|
|
||||||
"minecraft:generic_2",
|
|
||||||
"minecraft:generic_3",
|
|
||||||
"minecraft:generic_4",
|
|
||||||
"minecraft:generic_5",
|
|
||||||
"minecraft:generic_6",
|
|
||||||
"minecraft:generic_7"
|
|
||||||
]
|
|
||||||
}
|
|
Before Width: | Height: | Size: 19 KiB |
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"animation": {}
|
|
||||||
}
|
|
@ -1,13 +1,52 @@
|
|||||||
{
|
{
|
||||||
"item.shitmod.fabric_item": "Penis",
|
"item.shitmod.pp": "Penis",
|
||||||
"block.shitmod.fabric_block": "Gay Block",
|
"block.shitmod.gay_block": "Gay Block",
|
||||||
"item.shitmod.hausbommer": "Hausbommer",
|
"item.shitmod.hausbommer": "Hausbommer",
|
||||||
"effect.shitmod.exp": "Experience",
|
"effect.shitmod.exp": "Experience",
|
||||||
"effect.shitmod.lean": "Lean",
|
"effect.shitmod.lean": "Lean",
|
||||||
"item.shitmod.lean": "Lean",
|
"item.shitmod.lean": "Lean",
|
||||||
"item.shitmod.orange_juice": "Orange Juice",
|
"item.shitmod.orange_juice": "Orange Juice",
|
||||||
"item.shitmod.kingsoul_charm": "Kingsoul Charm",
|
"item.shitmod.kingsoul_charm": "Kingsoul Charm",
|
||||||
"itemGroup.shitmod.charms": "Charms",
|
"itemGroup.shitmod.charms": "Shitmod Charms",
|
||||||
"item.shitmod.stalwart_shell_charm": "Stalwart Shell Charm",
|
"item.shitmod.stalwart_shell_charm": "Stalwart Shell Charm",
|
||||||
"entity.minecraft.mooshroom": "Drug Cow"
|
"entity.minecraft.mooshroom": "Drug Cow",
|
||||||
|
"item.shitmod.potato_chip": "Potato Chips",
|
||||||
|
"item.shitmod.fragile_heart_charm": "Fragile Heart",
|
||||||
|
"item.shitmod.unbreakable_heart_charm": "Unbreakable Heart",
|
||||||
|
"item.shitmod.fragile_strength_charm": "Fragile Strength",
|
||||||
|
"item.shitmod.unbreakable_strength_charm": "Unbreakable Strength",
|
||||||
|
"item.shitmod.kingsoul_left_fragment": "Left Kingsoul Charm Fragment",
|
||||||
|
"item.shitmod.kingsoul_right_fragment": "Right Kingsoul Charm Fragment",
|
||||||
|
"item.shitmod.totem_of_equivalency": "Totem of Equivalency",
|
||||||
|
"item.shitmod.rock_with_string": "Rock with a string wound around",
|
||||||
|
"item.shitmod.blaze_metal_ingot": "Blaze Metal Ingot",
|
||||||
|
"item.shitmod.reinforced_blaze_metal_ingot": "Reinforced Blaze Metal Ingot",
|
||||||
|
"item.shitmod.blaze_metal_sword_casing": "Blaze Metal Sword Casing",
|
||||||
|
"item.shitmod.blaze_metal_pickaxe_casing": "Blaze Metal Pickaxe Casing",
|
||||||
|
"item.shitmod.blaze_metal_axe_casing": "Blaze Metal Axe Casing",
|
||||||
|
"item.shitmod.blaze_metal_shovel_casing": "Blaze Metal Shovel Casing",
|
||||||
|
"item.shitmod.blaze_metal_hoe_casing": "Blaze Metal Hoe Casing",
|
||||||
|
"item.shitmod.pulverized_blaze_metal": "Pulverized Blaze Metal",
|
||||||
|
"item.shitmod.pulverized_netherite": "Pulverized Netherite",
|
||||||
|
"item.shitmod.seared_gold_ingot": "Seared Gold Ingot",
|
||||||
|
"item.shitmod.blaze_metal_sword": "Blaze Metal Sword",
|
||||||
|
"item.shitmod.blaze_metal_pickaxe": "Blaze Metal Pickaxe",
|
||||||
|
"item.shitmod.blaze_metal_axe": "Blaze Metal Axe",
|
||||||
|
"item.shitmod.blaze_metal_shovel": "Blaze Metal Shovel",
|
||||||
|
"item.shitmod.blaze_metal_hoe": "Blaze Metal Hoe",
|
||||||
|
"item.shitmod.copper_sword": "Copper Sword",
|
||||||
|
"item.shitmod.copper_pickaxe": "Copper Pickaxe",
|
||||||
|
"item.shitmod.copper_axe": "Copper Axe",
|
||||||
|
"item.shitmod.copper_shovel": "Copper Shovel",
|
||||||
|
"item.shitmod.copper_hoe": "Copper Hoe",
|
||||||
|
"itemGroup.shitmod.general": "Shitmod Misc",
|
||||||
|
"itemGroup.shitmod.tools": "Shitmod Tools",
|
||||||
|
"item.shitmod.glock": "Glock",
|
||||||
|
"subtitles.shitmod.glock_noise": "Glock Fires",
|
||||||
|
"enchantment.shitmod.lifesteal": "Life Steal",
|
||||||
|
"enchantment.shitmod.explosion_aspect": "Explosion Aspect",
|
||||||
|
"enchantment.shitmod.explosive_thorns": "Explosive Thorns",
|
||||||
|
"item.shitmod.hammer": "Hammer",
|
||||||
|
"item.shitmod.berserker_totem": "Berserker Totem",
|
||||||
|
"effect.shitmod.berserk": "Berserk"
|
||||||
}
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "shitmod:item/berserker_totem"
|
||||||
|
}
|
||||||
|
}
|
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"parent": "shitmod:block/fabric_block"
|
|
||||||
}
|
|
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"parent": "shitmod:block/gay_block"
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"parent": "item/generated",
|
"parent": "item/generated",
|
||||||
"textures": {
|
"textures": {
|
||||||
"layer0": "shitmod:item/fabric_item"
|
"layer0": "shitmod:item/glock"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "shitmod:item/hammer"
|
||||||
|
}
|
||||||
|
}
|
6
src/main/resources/assets/shitmod/models/item/pp.json
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "shitmod:item/pp"
|
||||||
|
}
|
||||||
|
}
|
8
src/main/resources/assets/shitmod/sounds.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"glock_noise": {
|
||||||
|
"subtitle": "subtitles.shitmod.glock_noise",
|
||||||
|
"sounds": [
|
||||||
|
"shitmod:glock_noise"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
BIN
src/main/resources/assets/shitmod/sounds/glock_noise.ogg
Normal file
After Width: | Height: | Size: 9.8 KiB |
BIN
src/main/resources/assets/shitmod/textures/item/glock.png
Normal file
After Width: | Height: | Size: 66 KiB |
BIN
src/main/resources/assets/shitmod/textures/item/hammer.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
@ -6,7 +6,7 @@
|
|||||||
"entries": [
|
"entries": [
|
||||||
{
|
{
|
||||||
"type": "minecraft:item",
|
"type": "minecraft:item",
|
||||||
"name": "shitmod:fabric_block",
|
"name": "shitmod:gay_block",
|
||||||
"functions": [
|
"functions": [
|
||||||
{
|
{
|
||||||
"function": "minecraft:set_count",
|
"function": "minecraft:set_count",
|
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"block": "shitmod:fabric_block",
|
|
||||||
"dim": "minecraft:the_end",
|
|
||||||
"ignitionType": "ITEM",
|
|
||||||
"ignitionSource": "shitmod:fabric_item",
|
|
||||||
"r": 255,
|
|
||||||
"g": 192,
|
|
||||||
"b": 203
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
|||||||
],
|
],
|
||||||
"key": {
|
"key": {
|
||||||
"X": {
|
"X": {
|
||||||
"item": "shitmod:fabric_block"
|
"item": "shitmod:gay_block"
|
||||||
},
|
},
|
||||||
"R": {
|
"R": {
|
||||||
"item": "shitmod:hausbommer"
|
"item": "shitmod:hausbommer"
|
||||||
|
@ -10,14 +10,14 @@
|
|||||||
"item": "minecraft:dragon_head"
|
"item": "minecraft:dragon_head"
|
||||||
},
|
},
|
||||||
"R": {
|
"R": {
|
||||||
"item": "shitmod:fabric_block"
|
"item": "shitmod:gay_block"
|
||||||
},
|
},
|
||||||
"W": {
|
"W": {
|
||||||
"item": "minecraft:netherite_block"
|
"item": "minecraft:netherite_block"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"result": {
|
"result": {
|
||||||
"item": "shitmod:fabric_item",
|
"item": "shitmod:pp",
|
||||||
"count": 1
|
"count": 1
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -14,7 +14,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"result": {
|
"result": {
|
||||||
"item": "shitmod:fabric_block",
|
"item": "shitmod:gay_block",
|
||||||
"count": 4
|
"count": 4
|
||||||
}
|
}
|
||||||
}
|
}
|
29
src/main/resources/data/shitmod/recipes/glock.json
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"pattern": [
|
||||||
|
"BBB",
|
||||||
|
"ITO",
|
||||||
|
"N "
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"B": {
|
||||||
|
"item": "minecraft:iron_block"
|
||||||
|
},
|
||||||
|
"I": {
|
||||||
|
"item": "minecraft:iron_ingot"
|
||||||
|
},
|
||||||
|
"T": {
|
||||||
|
"item": "minecraft:tnt"
|
||||||
|
},
|
||||||
|
"N": {
|
||||||
|
"item": "minecraft:netherite_ingot"
|
||||||
|
},
|
||||||
|
"O": {
|
||||||
|
"item": "minecraft:bow"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"item": "shitmod:glock",
|
||||||
|
"count": 1
|
||||||
|
}
|
||||||
|
}
|
@ -7,10 +7,10 @@
|
|||||||
],
|
],
|
||||||
"key": {
|
"key": {
|
||||||
"X": {
|
"X": {
|
||||||
"item": "shitmod:fabric_item"
|
"item": "shitmod:pp"
|
||||||
},
|
},
|
||||||
"R": {
|
"R": {
|
||||||
"item": "shitmod:fabric_block"
|
"item": "shitmod:gay_block"
|
||||||
},
|
},
|
||||||
"W": {
|
"W": {
|
||||||
"item": "minecraft:iron_block"
|
"item": "minecraft:iron_block"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"replace": false,
|
"replace": false,
|
||||||
"values": [
|
"values": [
|
||||||
"shitmod:blaze_metal_pickaxe"
|
"shitmod:blaze_metal_pickaxe",
|
||||||
|
"shitmod:copper_pickaxe"
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -23,16 +23,16 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"mixins": [
|
"mixins": [
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.12.12",
|
"fabricloader": ">=0.14.14",
|
||||||
"fabric": "*",
|
"fabric": "*",
|
||||||
"minecraft": "1.18.x",
|
"minecraft": "1.19.3",
|
||||||
"java": ">=17"
|
"java": ">=17"
|
||||||
},
|
},
|
||||||
"suggests": {
|
"suggests": {
|
||||||
"another-mod": "*"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|