wand of resizing and pocket lightning

This commit is contained in:
nimsolated
2026-03-22 10:23:14 -07:00
parent 97062fad89
commit f39f255e26
26 changed files with 898 additions and 12 deletions

View File

@@ -0,0 +1,61 @@
{
"_fv": 73,
"_type": "item",
"definition": {
"renderType": 0,
"texture": "pocket_lightning",
"customModelName": "Ranged item",
"customProperties": {},
"states": [],
"name": "Pocket Lightning",
"rarity": "UNCOMMON",
"creativeTabs": [],
"stackSize": 64,
"enchantability": 0,
"useDuration": 72000,
"toolType": 1.0,
"damageCount": 0,
"recipeRemainder": {
"value": ""
},
"destroyAnyBlock": false,
"immuneToFire": false,
"stayInGridWhenCrafting": false,
"damageOnCrafting": false,
"enableMeleeDamage": false,
"damageVsEntity": 0.0,
"specialInformation": {
"fixedValue": [
"Spawns lightning wherever it lands."
]
},
"glowCondition": {
"fixedValue": true
},
"inventorySize": 9,
"inventoryStackSize": 64,
"enableRanged": true,
"shootConstantly": false,
"rangedItemChargesPower": true,
"projectile": {
"value": "CUSTOM:PocketLightningProjectile"
},
"projectileDisableAmmoCheck": false,
"isFood": false,
"nutritionalValue": 4,
"saturation": 0.3,
"eatResultItem": {
"value": ""
},
"isMeat": false,
"isAlwaysEdible": false,
"animation": "bow",
"isMusicDisc": false,
"musicDiscMusic": {
"value": ""
},
"musicDiscDescription": "",
"musicDiscLengthInTicks": 100,
"musicDiscAnalogOutput": 0
}
}

View File

@@ -0,0 +1,27 @@
{
"_fv": 73,
"_type": "projectile",
"definition": {
"projectileItem": {
"value": "CUSTOM:PocketLightning"
},
"showParticles": false,
"actionSound": {
"value": "entity.enderpearl.throw"
},
"igniteFire": false,
"power": 1.0,
"damage": 0.0,
"knockback": 0,
"entityModel": "Default",
"customModelTexture": "",
"modelWidth": 0.5,
"modelHeight": 0.5,
"onHitsBlock": {
"name": "PocketLightningProjectileProjectileHitsBlock"
},
"onHitsEntity": {
"name": "PocketLightningProjectileProjectileHitsLivingEntity"
}
}
}

View File

@@ -0,0 +1,7 @@
{
"_fv": 73,
"_type": "procedure",
"definition": {
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"event_trigger\" deletable=\"false\" x=\"40\" y=\"40\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"logic_negate\"><value name=\"BOOL\"><block type=\"world_data_isremote\"></block></value></block></value><statement name=\"DO0\"><block type=\"spawn_entity\"><field name=\"entity\">EntityLightningBolt</field><value name=\"x\"><block type=\"coord_x\"></block></value><value name=\"y\"><block type=\"coord_y\"></block></value><value name=\"z\"><block type=\"coord_z\"></block></value></block></statement></block></next></block></xml>"
}
}

View File

@@ -0,0 +1,7 @@
{
"_fv": 73,
"_type": "procedure",
"definition": {
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"event_trigger\" deletable=\"false\" x=\"40\" y=\"40\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"logic_negate\"><value name=\"BOOL\"><block type=\"world_data_isremote\"></block></value></block></value><statement name=\"DO0\"><block type=\"spawn_entity\"><field name=\"entity\">EntityLightningBolt</field><value name=\"x\"><block type=\"coord_x\"></block></value><value name=\"y\"><block type=\"coord_y\"></block></value><value name=\"z\"><block type=\"coord_z\"></block></value></block></statement></block></next></block></xml>"
}
}

View File

@@ -0,0 +1,48 @@
{
"_fv": 73,
"_type": "recipe",
"definition": {
"recipeType": "Crafting",
"recipeRetstackSize": 1,
"group": "",
"cookingBookCategory": "MISC",
"xpReward": 0.0,
"cookingTime": 200,
"craftingBookCategory": "MISC",
"recipeShapeless": false,
"recipeSlots": [
{
"value": ""
},
{
"value": ""
},
{
"value": "Items.BLAZE_ROD"
},
{
"value": ""
},
{
"value": "Items.BLAZE_ROD"
},
{
"value": ""
},
{
"value": "Items.BLAZE_POWDER"
},
{
"value": ""
},
{
"value": ""
}
],
"recipeReturnStack": {
"value": "CUSTOM:PocketLightning"
},
"name": "pocket_lightning_recipe",
"namespace": "mod"
}
}

View File

@@ -0,0 +1,40 @@
{
"_fv": 73,
"_type": "tool",
"definition": {
"toolType": "Special",
"renderType": 0,
"blockingRenderType": 0,
"texture": "wand_of_resizing",
"customModelName": "Normal",
"blockingModelName": "Normal blocking",
"name": "Wand Of Resizing",
"specialInformation": {
"fixedValue": [
"DISCLAIMER: Does not work with Origins that periodically reset your scale!"
]
},
"creativeTabs": [
{
"value": "TOOLS"
}
],
"efficiency": 4.0,
"attackSpeed": 1.0,
"enchantability": 2,
"damageVsEntity": 1.0,
"usageCount": 0,
"glowCondition": {
"fixedValue": false
},
"repairItems": [],
"immuneToFire": true,
"blockDropsTier": "WOOD",
"blocksAffected": [],
"stayInGridWhenCrafting": false,
"damageOnCrafting": false,
"onRightClickedInAir": {
"name": "WandOfResizingRightclicked"
}
}
}

View File

@@ -0,0 +1,48 @@
{
"_fv": 73,
"_type": "recipe",
"definition": {
"recipeType": "Crafting",
"recipeRetstackSize": 1,
"group": "",
"cookingBookCategory": "MISC",
"xpReward": 0.0,
"cookingTime": 200,
"craftingBookCategory": "EQUIPMENT",
"recipeShapeless": false,
"recipeSlots": [
{
"value": ""
},
{
"value": "Items.SPAWN_EGG#58"
},
{
"value": "Items.NETHER_STAR"
},
{
"value": ""
},
{
"value": "Items.STICK"
},
{
"value": "Items.SPAWN_EGG#101"
},
{
"value": "Items.STICK"
},
{
"value": ""
},
{
"value": ""
}
],
"recipeReturnStack": {
"value": "CUSTOM:WandOfResizing"
},
"name": "wand_of_resizing_recipe",
"namespace": "mod"
}
}

File diff suppressed because one or more lines are too long

View File

@@ -3359,6 +3359,174 @@
]
},
"path": "~/Bedrock"
},
{
"name": "WandOfResizing",
"type": "tool",
"compiles": true,
"locked_code": false,
"registry_name": "wand_of_resizing",
"metadata": {
"files": [
"src/main/resources/assets/nims_random_bullshit/models/item/wand_of_resizing.json",
"src/main/java/net/mcreator/nimsrandombullshit/item/WandOfResizingItem.java"
]
},
"path": "~/Other"
},
{
"name": "WandOfResizingRightclicked",
"type": "procedure",
"compiles": true,
"locked_code": false,
"registry_name": "wand_of_resizing_rightclicked",
"metadata": {
"files": [
"src/main/java/net/mcreator/nimsrandombullshit/procedures/WandOfResizingRightclickedProcedure.java"
],
"dependencies": [
{
"name": "entity",
"type": "entity"
},
{
"name": "itemstack",
"type": "itemstack"
},
{
"name": "x",
"type": "number"
},
{
"name": "y",
"type": "number"
},
{
"name": "z",
"type": "number"
},
{
"name": "world",
"type": "world"
}
]
},
"path": "~/Other"
},
{
"name": "WandOfResizingRecipe",
"type": "recipe",
"compiles": true,
"locked_code": false,
"registry_name": "wand_of_resizing_recipe",
"metadata": {
"files": [
"src/main/resources/data/nims_random_bullshit/recipes/wand_of_resizing_recipe.json"
]
},
"path": "~/Other"
},
{
"name": "PocketLightning",
"type": "item",
"compiles": true,
"locked_code": false,
"registry_name": "pocket_lightning",
"metadata": {
"files": [
"src/main/resources/assets/nims_random_bullshit/models/item/pocket_lightning.json",
"src/main/java/net/mcreator/nimsrandombullshit/item/PocketLightningItem.java"
]
},
"path": "~/PocketLightning"
},
{
"name": "PocketLightningProjectile",
"type": "projectile",
"compiles": true,
"locked_code": false,
"registry_name": "pocket_lightning_projectile",
"metadata": {
"files": [
"src/main/java/net/mcreator/nimsrandombullshit/entity/PocketLightningProjectileEntity.java"
]
},
"path": "~/PocketLightning"
},
{
"name": "PocketLightningProjectileProjectileHitsBlock",
"type": "procedure",
"compiles": true,
"locked_code": false,
"registry_name": "pocket_lightning_projectile_projectile_hits_block",
"metadata": {
"files": [
"src/main/java/net/mcreator/nimsrandombullshit/procedures/PocketLightningProjectileProjectileHitsBlockProcedure.java"
],
"dependencies": [
{
"name": "x",
"type": "number"
},
{
"name": "y",
"type": "number"
},
{
"name": "z",
"type": "number"
},
{
"name": "world",
"type": "world"
}
]
},
"path": "~/PocketLightning"
},
{
"name": "PocketLightningProjectileProjectileHitsLivingEntity",
"type": "procedure",
"compiles": true,
"locked_code": false,
"registry_name": "pocket_lightning_projectile_projectile_hits_living_entity",
"metadata": {
"files": [
"src/main/java/net/mcreator/nimsrandombullshit/procedures/PocketLightningProjectileProjectileHitsLivingEntityProcedure.java"
],
"dependencies": [
{
"name": "x",
"type": "number"
},
{
"name": "y",
"type": "number"
},
{
"name": "z",
"type": "number"
},
{
"name": "world",
"type": "world"
}
]
},
"path": "~/PocketLightning"
},
{
"name": "PocketLightningRecipe",
"type": "recipe",
"compiles": true,
"locked_code": false,
"registry_name": "pocket_lightning_recipe",
"metadata": {
"files": [
"src/main/resources/data/nims_random_bullshit/recipes/pocket_lightning_recipe.json"
]
},
"path": "~/PocketLightning"
}
],
"variable_elements": [],
@@ -3373,6 +3541,7 @@
"~CUSTOM:Bedrockifier"
],
"ITEMS:minecraft:pickaxes": [
"~CUSTOM:WandOfResizing",
"~CUSTOM:OrichalcumPickaxe",
"~CUSTOM:BedrockPickaxe",
"~CUSTOM:StarWand",
@@ -3448,11 +3617,11 @@
"language_map": {
"en_us": {
"advancements.condensed_netherrack_advancement.descr": "Condense Netherrack for the first time",
"item.nims_random_bullshit.magic_dust": "Magic Dust",
"block.nims_random_bullshit.penta_condensed_netherrack": "Penta-condensed Netherrack",
"item.nims_random_bullshit.magic_dust": "Magic Dust",
"item.nims_random_bullshit.orichalcum_armor_boots": "Orichalcum Boots",
"block.nims_random_bullshit.magma_brick_button": "Magma Brick Button",
"advancements.orichalcum_advancement.descr": "Obtain Orichalcum",
"block.nims_random_bullshit.magma_brick_button": "Magma Brick Button",
"painting.nims_random_bullshit.shit_painting.title": "Shit Painting",
"advancements.spawner_advancement.title": "It\u0027s spawnin\u0027 time!",
"item.nims_random_bullshit.bedrock_shard": "Bedrock Shard",
@@ -3463,9 +3632,10 @@
"block.nims_random_bullshit.rubber_slab": "Rubber Slab",
"item.nims_random_bullshit.bedrock_upgrade_template": "Bedrock Upgrade Template",
"advancements.orichalcum_set_advancement.descr": "Wear a full armor set of Orichalcum.",
"block.nims_random_bullshit.redstone_bricks": "Redstone Bricks",
"block.nims_random_bullshit.orichalcum_ore": "Orichalcum Ore",
"block.nims_random_bullshit.redstone_bricks": "Redstone Bricks",
"item.nims_random_bullshit.iron_golem_question_mark": "Iron Golem...?",
"item.nims_random_bullshit.wand_of_resizing": "Wand Of Resizing",
"item.nims_random_bullshit.lapis_lazuli_nugget": "Lapis Lazuli Nugget",
"item.nims_random_bullshit.gravedigger.description_1": "We must dig!",
"item.nims_random_bullshit.gravedigger.description_0": "Right-Click on soul sand or soul soil to use them, summoning a ghoul that attacks hostile mobs.",
@@ -3475,9 +3645,9 @@
"item.nims_random_bullshit.wither_question_mark": "Wither...?",
"advancements.block_eater_advancement.descr": "Eat a block with the Block Eater",
"advancements.tux_advancement.title": "Tux!?",
"item.nims_random_bullshit.gravedigger": "Gravedigger",
"block.nims_random_bullshit.condensed_condensed_netherrack": "Condensed Condensed Netherrack",
"advancements.netherrack_juice_advancement.descr": "Obtain Netherrack Juice",
"block.nims_random_bullshit.condensed_condensed_netherrack": "Condensed Condensed Netherrack",
"item.nims_random_bullshit.gravedigger": "Gravedigger",
"block.nims_random_bullshit.quadra_condensed_netherrack": "Quadra-condensed Netherrack",
"advancements.shit_advancement.descr": "Shit",
"gui.nims_random_bullshit.bedrockifier_gui.button_empty": "-\u003e",
@@ -3490,11 +3660,13 @@
"item.nims_random_bullshit.netherrack_juice_bucket": "Netherrack Juice Bucket",
"item.nims_random_bullshit.orichalcum": "Orichalcum",
"advancements.magic_egg_advancement.descr": "Obtain a Magic Egg",
"item.nims_random_bullshit.pocket_lightning.description_0": "Spawns lightning wherever it lands.",
"item.nims_random_bullshit.bedrock_eater": "Bedrock Eater",
"block.nims_random_bullshit.rubber_pressure_plate": "Rubber Pressure Plate",
"item.nims_random_bullshit.orichalcum_armor_leggings": "Orichalcum Leggings",
"block.nims_random_bullshit.condensed_netherrack": "Condensed Netherrack",
"block.nims_random_bullshit.magma_brick_slabs": "Magma Brick Slab",
"item.nims_random_bullshit.pocket_lightning": "Pocket Lightning",
"advancements.orichalcum_set_advancement.title": "Cover Me In Orc Cum",
"item.nims_random_bullshit.star_wand": "Star Wand",
"gui.nims_random_bullshit.ore_miner_gui.button_mine": "Mine",
@@ -3530,6 +3702,7 @@
"item.nims_random_bullshit.netherrackite": "Netherrackite Ingot",
"advancements.bedrock_shard_advancement.title": "Unobtainium",
"fluid.nims_random_bullshit.netherrack_juice": "Netherrack Juice",
"item.nims_random_bullshit.wand_of_resizing.description_0": "DISCLAIMER: Does not work with Origins that periodically reset your scale!",
"gui.nims_random_bullshit.mailbox_gui.outbox_z_coord": "0",
"advancements.shit_advancement.title": "Oh Shit!",
"item.nims_random_bullshit.netherrackite_pickaxe.description_0": "Non-condensed netherracks broken by this pickaxe drop themselves an additional time.",
@@ -3620,13 +3793,17 @@
{
"name": "Orichalcum",
"children": []
},
{
"name": "PocketLightning",
"children": []
}
]
},
"workspaceSettings": {
"modid": "nims_random_bullshit",
"modName": "Nim\u0027s Random Bullshit",
"version": "1.7.1",
"version": "1.8.0",
"description": "Random shit added by Nim. Created with MCreator.",
"author": "nimsolated, MCreator",
"websiteURL": "https://mcreator.net",

View File

@@ -0,0 +1,124 @@
package net.mcreator.nimsrandombullshit.entity;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraftforge.network.PlayMessages;
import net.minecraftforge.network.NetworkHooks;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraft.world.phys.EntityHitResult;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.level.Level;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.entity.projectile.ItemSupplier;
import net.minecraft.world.entity.projectile.AbstractArrow;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.util.RandomSource;
import net.minecraft.sounds.SoundSource;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.network.protocol.game.ClientGamePacketListener;
import net.minecraft.network.protocol.Packet;
import net.mcreator.nimsrandombullshit.procedures.PocketLightningProjectileProjectileHitsLivingEntityProcedure;
import net.mcreator.nimsrandombullshit.procedures.PocketLightningProjectileProjectileHitsBlockProcedure;
import net.mcreator.nimsrandombullshit.init.NimsRandomBullshitModItems;
import net.mcreator.nimsrandombullshit.init.NimsRandomBullshitModEntities;
@OnlyIn(value = Dist.CLIENT, _interface = ItemSupplier.class)
public class PocketLightningProjectileEntity extends AbstractArrow implements ItemSupplier {
public static final ItemStack PROJECTILE_ITEM = new ItemStack(NimsRandomBullshitModItems.POCKET_LIGHTNING.get());
public PocketLightningProjectileEntity(PlayMessages.SpawnEntity packet, Level world) {
super(NimsRandomBullshitModEntities.POCKET_LIGHTNING_PROJECTILE.get(), world);
}
public PocketLightningProjectileEntity(EntityType<? extends PocketLightningProjectileEntity> type, Level world) {
super(type, world);
}
public PocketLightningProjectileEntity(EntityType<? extends PocketLightningProjectileEntity> type, double x, double y, double z, Level world) {
super(type, x, y, z, world);
}
public PocketLightningProjectileEntity(EntityType<? extends PocketLightningProjectileEntity> type, LivingEntity entity, Level world) {
super(type, entity, world);
}
@Override
public Packet<ClientGamePacketListener> getAddEntityPacket() {
return NetworkHooks.getEntitySpawningPacket(this);
}
@Override
@OnlyIn(Dist.CLIENT)
public ItemStack getItem() {
return PROJECTILE_ITEM;
}
@Override
protected ItemStack getPickupItem() {
return PROJECTILE_ITEM;
}
@Override
protected void doPostHurtEffects(LivingEntity entity) {
super.doPostHurtEffects(entity);
entity.setArrowCount(entity.getArrowCount() - 1);
}
@Override
public void onHitEntity(EntityHitResult entityHitResult) {
super.onHitEntity(entityHitResult);
PocketLightningProjectileProjectileHitsLivingEntityProcedure.execute(this.level(), this.getX(), this.getY(), this.getZ());
}
@Override
public void onHitBlock(BlockHitResult blockHitResult) {
super.onHitBlock(blockHitResult);
PocketLightningProjectileProjectileHitsBlockProcedure.execute(this.level(), blockHitResult.getBlockPos().getX(), blockHitResult.getBlockPos().getY(), blockHitResult.getBlockPos().getZ());
}
@Override
public void tick() {
super.tick();
if (this.inGround)
this.discard();
}
public static PocketLightningProjectileEntity shoot(Level world, LivingEntity entity, RandomSource source) {
return shoot(world, entity, source, 1f, 0, 0);
}
public static PocketLightningProjectileEntity shoot(Level world, LivingEntity entity, RandomSource source, float pullingPower) {
return shoot(world, entity, source, pullingPower * 1f, 0, 0);
}
public static PocketLightningProjectileEntity shoot(Level world, LivingEntity entity, RandomSource random, float power, double damage, int knockback) {
PocketLightningProjectileEntity entityarrow = new PocketLightningProjectileEntity(NimsRandomBullshitModEntities.POCKET_LIGHTNING_PROJECTILE.get(), entity, world);
entityarrow.shoot(entity.getViewVector(1).x, entity.getViewVector(1).y, entity.getViewVector(1).z, power * 2, 0);
entityarrow.setSilent(true);
entityarrow.setCritArrow(false);
entityarrow.setBaseDamage(damage);
entityarrow.setKnockback(knockback);
world.addFreshEntity(entityarrow);
world.playSound(null, entity.getX(), entity.getY(), entity.getZ(), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("entity.ender_pearl.throw")), SoundSource.PLAYERS, 1, 1f / (random.nextFloat() * 0.5f + 1) + (power / 2));
return entityarrow;
}
public static PocketLightningProjectileEntity shoot(LivingEntity entity, LivingEntity target) {
PocketLightningProjectileEntity entityarrow = new PocketLightningProjectileEntity(NimsRandomBullshitModEntities.POCKET_LIGHTNING_PROJECTILE.get(), entity, entity.level());
double dx = target.getX() - entity.getX();
double dy = target.getY() + target.getEyeHeight() - 1.1;
double dz = target.getZ() - entity.getZ();
entityarrow.shoot(dx, dy - entityarrow.getY() + Math.hypot(dx, dz) * 0.2F, dz, 1f * 2, 12.0F);
entityarrow.setSilent(true);
entityarrow.setBaseDamage(0);
entityarrow.setKnockback(0);
entityarrow.setCritArrow(false);
entity.level().addFreshEntity(entityarrow);
entity.level().playSound(null, entity.getX(), entity.getY(), entity.getZ(), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("entity.ender_pearl.throw")), SoundSource.PLAYERS, 1, 1f / (RandomSource.create().nextFloat() * 0.5f + 1));
return entityarrow;
}
}

View File

@@ -18,6 +18,7 @@ import net.minecraft.world.entity.Entity;
import net.mcreator.nimsrandombullshit.entity.TuxEntity;
import net.mcreator.nimsrandombullshit.entity.ShitProjectileEntity;
import net.mcreator.nimsrandombullshit.entity.PocketLightningProjectileEntity;
import net.mcreator.nimsrandombullshit.entity.GhoulEntity;
import net.mcreator.nimsrandombullshit.NimsRandomBullshitMod;
@@ -32,6 +33,9 @@ public class NimsRandomBullshitModEntities {
EntityType.Builder.<TuxEntity>of(TuxEntity::new, MobCategory.MONSTER).setShouldReceiveVelocityUpdates(true).setTrackingRange(64).setUpdateInterval(3).setCustomClientFactory(TuxEntity::new)
.sized(0.6f, 1.8f));
public static final RegistryObject<EntityType<PocketLightningProjectileEntity>> POCKET_LIGHTNING_PROJECTILE = register("pocket_lightning_projectile",
EntityType.Builder.<PocketLightningProjectileEntity>of(PocketLightningProjectileEntity::new, MobCategory.MISC).setCustomClientFactory(PocketLightningProjectileEntity::new).setShouldReceiveVelocityUpdates(true).setTrackingRange(64)
.setUpdateInterval(1).sized(0.5f, 0.5f));
// Start of user code block custom entities
// End of user code block custom entities

View File

@@ -21,5 +21,6 @@ public class NimsRandomBullshitModEntityRenderers {
event.registerEntityRenderer(NimsRandomBullshitModEntities.SHIT_PROJECTILE.get(), ThrownItemRenderer::new);
event.registerEntityRenderer(NimsRandomBullshitModEntities.GHOUL.get(), GhoulRenderer::new);
event.registerEntityRenderer(NimsRandomBullshitModEntities.TUX.get(), TuxRenderer::new);
event.registerEntityRenderer(NimsRandomBullshitModEntities.POCKET_LIGHTNING_PROJECTILE.get(), ThrownItemRenderer::new);
}
}

View File

@@ -14,11 +14,13 @@ import net.minecraft.world.item.Item;
import net.minecraft.world.item.BlockItem;
import net.mcreator.nimsrandombullshit.item.WitherQuestionMarkItem;
import net.mcreator.nimsrandombullshit.item.WandOfResizingItem;
import net.mcreator.nimsrandombullshit.item.StarWandItem;
import net.mcreator.nimsrandombullshit.item.StarItem;
import net.mcreator.nimsrandombullshit.item.SnowGolemQuestionMarkItem;
import net.mcreator.nimsrandombullshit.item.ShitItem;
import net.mcreator.nimsrandombullshit.item.SandDustItem;
import net.mcreator.nimsrandombullshit.item.PocketLightningItem;
import net.mcreator.nimsrandombullshit.item.OrichalcumSwordItem;
import net.mcreator.nimsrandombullshit.item.OrichalcumShovelItem;
import net.mcreator.nimsrandombullshit.item.OrichalcumPickaxeItem;
@@ -105,6 +107,8 @@ public class NimsRandomBullshitModItems {
public static final RegistryObject<Item> ORICHALCUM_ARMOR_BOOTS = REGISTRY.register("orichalcum_armor_boots", () -> new OrichalcumArmorItem.Boots());
public static final RegistryObject<Item> BEDROCK_SHARD = REGISTRY.register("bedrock_shard", () -> new BedrockShardItem());
public static final RegistryObject<Item> BEDROCK_EATER = REGISTRY.register("bedrock_eater", () -> new BedrockEaterItem());
public static final RegistryObject<Item> WAND_OF_RESIZING = REGISTRY.register("wand_of_resizing", () -> new WandOfResizingItem());
public static final RegistryObject<Item> POCKET_LIGHTNING = REGISTRY.register("pocket_lightning", () -> new PocketLightningItem());
// Start of user code block custom items
// End of user code block custom items

View File

@@ -49,6 +49,7 @@ public class NimsRandomBullshitModTabs {
tabData.accept(NimsRandomBullshitModItems.ORICHALCUM_SHOVEL.get());
tabData.accept(NimsRandomBullshitModItems.ORICHALCUM_HOE.get());
tabData.accept(NimsRandomBullshitModItems.BEDROCK_EATER.get());
tabData.accept(NimsRandomBullshitModItems.WAND_OF_RESIZING.get());
} else if (tabData.getTabKey() == CreativeModeTabs.INGREDIENTS) {
tabData.accept(NimsRandomBullshitModItems.NETHERRACKITE.get());
tabData.accept(NimsRandomBullshitModItems.SAND_DUST.get());

View File

@@ -0,0 +1,106 @@
package net.mcreator.nimsrandombullshit.item;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraft.world.level.Level;
import net.minecraft.world.item.UseAnim;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.item.Rarity;
import net.minecraft.world.item.ProjectileWeaponItem;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.BowItem;
import net.minecraft.world.entity.projectile.AbstractArrow;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.InteractionHand;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.network.chat.Component;
import net.mcreator.nimsrandombullshit.entity.PocketLightningProjectileEntity;
import java.util.List;
public class PocketLightningItem extends Item {
public PocketLightningItem() {
super(new Item.Properties().stacksTo(64).rarity(Rarity.UNCOMMON));
}
@Override
public UseAnim getUseAnimation(ItemStack itemstack) {
return UseAnim.BOW;
}
@Override
public int getUseDuration(ItemStack itemstack) {
return 72000;
}
@Override
@OnlyIn(Dist.CLIENT)
public boolean isFoil(ItemStack itemstack) {
return true;
}
@Override
public void appendHoverText(ItemStack itemstack, Level level, List<Component> list, TooltipFlag flag) {
super.appendHoverText(itemstack, level, list, flag);
list.add(Component.translatable("item.nims_random_bullshit.pocket_lightning.description_0"));
}
@Override
public InteractionResultHolder<ItemStack> use(Level world, Player entity, InteractionHand hand) {
InteractionResultHolder<ItemStack> ar = InteractionResultHolder.fail(entity.getItemInHand(hand));
if (entity.getAbilities().instabuild || findAmmo(entity) != ItemStack.EMPTY) {
ar = InteractionResultHolder.success(entity.getItemInHand(hand));
entity.startUsingItem(hand);
}
return ar;
}
@Override
public void releaseUsing(ItemStack itemstack, Level world, LivingEntity entity, int time) {
if (!world.isClientSide() && entity instanceof ServerPlayer player) {
float pullingPower = BowItem.getPowerForTime(this.getUseDuration(itemstack) - time);
if (pullingPower < 0.1)
return;
ItemStack stack = findAmmo(player);
if (player.getAbilities().instabuild || stack != ItemStack.EMPTY) {
PocketLightningProjectileEntity projectile = PocketLightningProjectileEntity.shoot(world, entity, world.getRandom(), pullingPower);
if (player.getAbilities().instabuild) {
projectile.pickup = AbstractArrow.Pickup.CREATIVE_ONLY;
} else {
if (stack.isDamageableItem()) {
if (stack.hurt(1, world.getRandom(), player)) {
stack.shrink(1);
stack.setDamageValue(0);
if (stack.isEmpty())
player.getInventory().removeItem(stack);
}
} else {
stack.shrink(1);
if (stack.isEmpty())
player.getInventory().removeItem(stack);
}
}
}
}
}
private ItemStack findAmmo(Player player) {
ItemStack stack = ProjectileWeaponItem.getHeldProjectile(player, e -> e.getItem() == PocketLightningProjectileEntity.PROJECTILE_ITEM.getItem());
if (stack == ItemStack.EMPTY) {
for (int i = 0; i < player.getInventory().items.size(); i++) {
ItemStack teststack = player.getInventory().items.get(i);
if (teststack != null && teststack.getItem() == PocketLightningProjectileEntity.PROJECTILE_ITEM.getItem()) {
stack = teststack;
break;
}
}
}
return stack;
}
}

View File

@@ -0,0 +1,78 @@
package net.mcreator.nimsrandombullshit.item;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.Level;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Item;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.entity.ai.attributes.Attributes;
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
import net.minecraft.world.entity.ai.attributes.Attribute;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.InteractionHand;
import net.minecraft.network.chat.Component;
import net.minecraft.core.BlockPos;
import net.mcreator.nimsrandombullshit.procedures.WandOfResizingRightclickedProcedure;
import java.util.List;
import com.google.common.collect.Multimap;
import com.google.common.collect.ImmutableMultimap;
public class WandOfResizingItem extends Item {
public WandOfResizingItem() {
super(new Item.Properties().durability(0).fireResistant());
}
@Override
public float getDestroySpeed(ItemStack itemstack, BlockState blockstate) {
return 1;
}
@Override
public boolean mineBlock(ItemStack itemstack, Level world, BlockState blockstate, BlockPos pos, LivingEntity entity) {
itemstack.hurtAndBreak(1, entity, i -> i.broadcastBreakEvent(EquipmentSlot.MAINHAND));
return true;
}
@Override
public boolean hurtEnemy(ItemStack itemstack, LivingEntity entity, LivingEntity sourceentity) {
itemstack.hurtAndBreak(2, entity, i -> i.broadcastBreakEvent(EquipmentSlot.MAINHAND));
return true;
}
@Override
public InteractionResultHolder<ItemStack> use(Level world, Player entity, InteractionHand hand) {
InteractionResultHolder<ItemStack> ar = super.use(world, entity, hand);
WandOfResizingRightclickedProcedure.execute(world, entity.getX(), entity.getY(), entity.getZ(), entity, ar.getObject());
return ar;
}
@Override
public int getEnchantmentValue() {
return 2;
}
@Override
public Multimap<Attribute, AttributeModifier> getDefaultAttributeModifiers(EquipmentSlot equipmentSlot) {
if (equipmentSlot == EquipmentSlot.MAINHAND) {
ImmutableMultimap.Builder<Attribute, AttributeModifier> builder = ImmutableMultimap.builder();
builder.putAll(super.getDefaultAttributeModifiers(equipmentSlot));
builder.put(Attributes.ATTACK_DAMAGE, new AttributeModifier(BASE_ATTACK_DAMAGE_UUID, "Tool modifier", 0f, AttributeModifier.Operation.ADDITION));
builder.put(Attributes.ATTACK_SPEED, new AttributeModifier(BASE_ATTACK_SPEED_UUID, "Tool modifier", -3, AttributeModifier.Operation.ADDITION));
return builder.build();
}
return super.getDefaultAttributeModifiers(equipmentSlot);
}
@Override
public void appendHoverText(ItemStack itemstack, Level level, List<Component> list, TooltipFlag flag) {
super.appendHoverText(itemstack, level, list, flag);
list.add(Component.translatable("item.nims_random_bullshit.wand_of_resizing.description_0"));
}
}

View File

@@ -0,0 +1,21 @@
package net.mcreator.nimsrandombullshit.procedures;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.entity.MobSpawnType;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.Entity;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.core.BlockPos;
public class PocketLightningProjectileProjectileHitsBlockProcedure {
public static void execute(LevelAccessor world, double x, double y, double z) {
if (!world.isClientSide()) {
if (world instanceof ServerLevel _level) {
Entity entityToSpawn = EntityType.LIGHTNING_BOLT.spawn(_level, BlockPos.containing(x, y, z), MobSpawnType.MOB_SUMMONED);
if (entityToSpawn != null) {
entityToSpawn.setYRot(world.getRandom().nextFloat() * 360F);
}
}
}
}
}

View File

@@ -0,0 +1,21 @@
package net.mcreator.nimsrandombullshit.procedures;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.entity.MobSpawnType;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.Entity;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.core.BlockPos;
public class PocketLightningProjectileProjectileHitsLivingEntityProcedure {
public static void execute(LevelAccessor world, double x, double y, double z) {
if (!world.isClientSide()) {
if (world instanceof ServerLevel _level) {
Entity entityToSpawn = EntityType.LIGHTNING_BOLT.spawn(_level, BlockPos.containing(x, y, z), MobSpawnType.MOB_SUMMONED);
if (entityToSpawn != null) {
entityToSpawn.setYRot(world.getRandom().nextFloat() * 360F);
}
}
}
}
}

View File

@@ -0,0 +1,51 @@
package net.mcreator.nimsrandombullshit.procedures;
import virtuoel.pehkui.api.ScaleTypes;
import virtuoel.pehkui.api.ScaleOperations;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.level.Level;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.entity.Entity;
import net.minecraft.sounds.SoundSource;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.core.BlockPos;
public class WandOfResizingRightclickedProcedure {
public static void execute(LevelAccessor world, double x, double y, double z, Entity entity, ItemStack itemstack) {
if (entity == null)
return;
if (entity.isShiftKeyDown()) {
if (ScaleTypes.HEIGHT.getScaleData(entity).getTargetScale() > 0.26 && ScaleTypes.WIDTH.getScaleData(entity).getTargetScale() > 0.26) {
if (entity instanceof Player _player)
_player.getCooldowns().addCooldown(itemstack.getItem(), 70);
ScaleTypes.HEIGHT.getScaleData(entity).setTargetScale((float) ScaleOperations.SET.applyAsDouble(ScaleTypes.HEIGHT.getScaleData(entity).getTargetScale(), (ScaleTypes.HEIGHT.getScaleData(entity).getTargetScale() / 2)));
ScaleTypes.WIDTH.getScaleData(entity).setTargetScale((float) ScaleOperations.SET.applyAsDouble(ScaleTypes.WIDTH.getScaleData(entity).getTargetScale(), (ScaleTypes.WIDTH.getScaleData(entity).getTargetScale() / 2)));
if (world instanceof Level _level) {
if (!_level.isClientSide()) {
_level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.beacon.activate")), SoundSource.BLOCKS, (float) 0.85, (float) 1.2);
} else {
_level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.beacon.activate")), SoundSource.BLOCKS, (float) 0.85, (float) 1.2, false);
}
}
}
} else {
if (ScaleTypes.HEIGHT.getScaleData(entity).getTargetScale() < 1.99 && ScaleTypes.WIDTH.getScaleData(entity).getTargetScale() < 1.99) {
if (entity instanceof Player _player)
_player.getCooldowns().addCooldown(itemstack.getItem(), 70);
ScaleTypes.HEIGHT.getScaleData(entity).setTargetScale((float) ScaleOperations.SET.applyAsDouble(ScaleTypes.HEIGHT.getScaleData(entity).getTargetScale(), (ScaleTypes.HEIGHT.getScaleData(entity).getTargetScale() * 2)));
ScaleTypes.WIDTH.getScaleData(entity).setTargetScale((float) ScaleOperations.SET.applyAsDouble(ScaleTypes.WIDTH.getScaleData(entity).getTargetScale(), (ScaleTypes.WIDTH.getScaleData(entity).getTargetScale() * 2)));
if (world instanceof Level _level) {
if (!_level.isClientSide()) {
_level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.beacon.activate")), SoundSource.BLOCKS, (float) 0.85, (float) 0.8);
} else {
_level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.beacon.activate")), SoundSource.BLOCKS, (float) 0.85, (float) 0.8, false);
}
}
}
}
}
}

View File

@@ -4,7 +4,7 @@ license="Academic Free License v3.0"
[[mods]]
modId="nims_random_bullshit"
version="1.7.1"
version="1.8.0"
displayName="Nim's Random Bullshit"
displayURL="https://mcreator.net"
logoFile="logo.png"

View File

@@ -1,10 +1,10 @@
{
"advancements.condensed_netherrack_advancement.descr": "Condense Netherrack for the first time",
"item.nims_random_bullshit.magic_dust": "Magic Dust",
"block.nims_random_bullshit.penta_condensed_netherrack": "Penta-condensed Netherrack",
"item.nims_random_bullshit.magic_dust": "Magic Dust",
"item.nims_random_bullshit.orichalcum_armor_boots": "Orichalcum Boots",
"block.nims_random_bullshit.magma_brick_button": "Magma Brick Button",
"advancements.orichalcum_advancement.descr": "Obtain Orichalcum",
"block.nims_random_bullshit.magma_brick_button": "Magma Brick Button",
"painting.nims_random_bullshit.shit_painting.title": "Shit Painting",
"advancements.spawner_advancement.title": "It\u0027s spawnin\u0027 time!",
"item.nims_random_bullshit.bedrock_shard": "Bedrock Shard",
@@ -15,9 +15,10 @@
"block.nims_random_bullshit.rubber_slab": "Rubber Slab",
"item.nims_random_bullshit.bedrock_upgrade_template": "Bedrock Upgrade Template",
"advancements.orichalcum_set_advancement.descr": "Wear a full armor set of Orichalcum.",
"block.nims_random_bullshit.redstone_bricks": "Redstone Bricks",
"block.nims_random_bullshit.orichalcum_ore": "Orichalcum Ore",
"block.nims_random_bullshit.redstone_bricks": "Redstone Bricks",
"item.nims_random_bullshit.iron_golem_question_mark": "Iron Golem...?",
"item.nims_random_bullshit.wand_of_resizing": "Wand Of Resizing",
"item.nims_random_bullshit.lapis_lazuli_nugget": "Lapis Lazuli Nugget",
"item.nims_random_bullshit.gravedigger.description_1": "We must dig!",
"item.nims_random_bullshit.gravedigger.description_0": "Right-Click on soul sand or soul soil to use them, summoning a ghoul that attacks hostile mobs.",
@@ -27,9 +28,9 @@
"item.nims_random_bullshit.wither_question_mark": "Wither...?",
"advancements.block_eater_advancement.descr": "Eat a block with the Block Eater",
"advancements.tux_advancement.title": "Tux!?",
"item.nims_random_bullshit.gravedigger": "Gravedigger",
"block.nims_random_bullshit.condensed_condensed_netherrack": "Condensed Condensed Netherrack",
"advancements.netherrack_juice_advancement.descr": "Obtain Netherrack Juice",
"block.nims_random_bullshit.condensed_condensed_netherrack": "Condensed Condensed Netherrack",
"item.nims_random_bullshit.gravedigger": "Gravedigger",
"block.nims_random_bullshit.quadra_condensed_netherrack": "Quadra-condensed Netherrack",
"advancements.shit_advancement.descr": "Shit",
"gui.nims_random_bullshit.bedrockifier_gui.button_empty": "-\u003e",
@@ -42,11 +43,13 @@
"item.nims_random_bullshit.netherrack_juice_bucket": "Netherrack Juice Bucket",
"item.nims_random_bullshit.orichalcum": "Orichalcum",
"advancements.magic_egg_advancement.descr": "Obtain a Magic Egg",
"item.nims_random_bullshit.pocket_lightning.description_0": "Spawns lightning wherever it lands.",
"item.nims_random_bullshit.bedrock_eater": "Bedrock Eater",
"block.nims_random_bullshit.rubber_pressure_plate": "Rubber Pressure Plate",
"item.nims_random_bullshit.orichalcum_armor_leggings": "Orichalcum Leggings",
"block.nims_random_bullshit.condensed_netherrack": "Condensed Netherrack",
"block.nims_random_bullshit.magma_brick_slabs": "Magma Brick Slab",
"item.nims_random_bullshit.pocket_lightning": "Pocket Lightning",
"advancements.orichalcum_set_advancement.title": "Cover Me In Orc Cum",
"item.nims_random_bullshit.star_wand": "Star Wand",
"gui.nims_random_bullshit.ore_miner_gui.button_mine": "Mine",
@@ -82,6 +85,7 @@
"item.nims_random_bullshit.netherrackite": "Netherrackite Ingot",
"advancements.bedrock_shard_advancement.title": "Unobtainium",
"fluid.nims_random_bullshit.netherrack_juice": "Netherrack Juice",
"item.nims_random_bullshit.wand_of_resizing.description_0": "DISCLAIMER: Does not work with Origins that periodically reset your scale!",
"gui.nims_random_bullshit.mailbox_gui.outbox_z_coord": "0",
"advancements.shit_advancement.title": "Oh Shit!",
"item.nims_random_bullshit.netherrackite_pickaxe.description_0": "Non-condensed netherracks broken by this pickaxe drop themselves an additional time.",

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 B

View File

@@ -1,6 +1,7 @@
{
"replace": false,
"values": [
"nims_random_bullshit:wand_of_resizing",
"nims_random_bullshit:orichalcum_pickaxe",
"nims_random_bullshit:bedrock_pickaxe",
"nims_random_bullshit:star_wand",

View File

@@ -0,0 +1,21 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"pattern": [
" a",
" a ",
"b "
],
"key": {
"a": {
"item": "minecraft:blaze_rod"
},
"b": {
"item": "minecraft:blaze_powder"
}
},
"result": {
"item": "nims_random_bullshit:pocket_lightning",
"count": 1
}
}

View File

@@ -0,0 +1,27 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"pattern": [
" ab",
" cd",
"c "
],
"key": {
"a": {
"item": "minecraft:enderman_spawn_egg"
},
"b": {
"item": "minecraft:nether_star"
},
"c": {
"item": "minecraft:stick"
},
"d": {
"item": "minecraft:rabbit_spawn_egg"
}
},
"result": {
"item": "nims_random_bullshit:wand_of_resizing",
"count": 1
}
}