update: 1.8.0

This commit is contained in:
nimsolated
2026-03-22 13:52:36 -07:00
parent f39f255e26
commit 43e451f984
51 changed files with 1547 additions and 8 deletions

View File

@@ -0,0 +1,74 @@
package net.mcreator.nimsrandombullshit.block;
import org.checkerframework.checker.units.qual.s;
import net.minecraft.world.phys.shapes.VoxelShape;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.level.block.state.properties.IntegerProperty;
import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.BlockBehaviour;
import net.minecraft.world.level.block.SoundType;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.util.RandomSource;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.core.BlockPos;
import net.mcreator.nimsrandombullshit.procedures.RaveBlockOnTickUpdateProcedure;
public class RaveBlockBlock extends Block {
public static final IntegerProperty BLOCKSTATE = IntegerProperty.create("blockstate", 0, 5);
public RaveBlockBlock() {
super(BlockBehaviour.Properties.of().sound(SoundType.AMETHYST).strength(1f, 3600000f).lightLevel(s -> (new Object() {
public int getLightLevel() {
if (s.getValue(BLOCKSTATE) == 1)
return 10;
if (s.getValue(BLOCKSTATE) == 2)
return 10;
if (s.getValue(BLOCKSTATE) == 3)
return 10;
if (s.getValue(BLOCKSTATE) == 4)
return 10;
if (s.getValue(BLOCKSTATE) == 5)
return 10;
return 10;
}
}.getLightLevel())));
}
@Override
public int getLightBlock(BlockState state, BlockGetter worldIn, BlockPos pos) {
return 15;
}
@Override
public VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) {
return box(0, 0, 0, 16, 16, 16);
}
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
super.createBlockStateDefinition(builder);
builder.add(BLOCKSTATE);
}
@Override
public void onPlace(BlockState blockstate, Level world, BlockPos pos, BlockState oldState, boolean moving) {
super.onPlace(blockstate, world, pos, oldState, moving);
world.scheduleTick(pos, this, 4);
}
@Override
public void tick(BlockState blockstate, ServerLevel world, BlockPos pos, RandomSource random) {
super.tick(blockstate, world, pos, random);
int x = pos.getX();
int y = pos.getY();
int z = pos.getZ();
RaveBlockOnTickUpdateProcedure.execute(world, x, y, z, blockstate);
world.scheduleTick(pos, this, 4);
}
}

View File

@@ -0,0 +1,42 @@
package net.mcreator.nimsrandombullshit.enchantment;
import net.minecraft.world.item.enchantment.EnchantmentCategory;
import net.minecraft.world.item.enchantment.Enchantment;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.tags.ItemTags;
import net.minecraft.resources.ResourceLocation;
import net.mcreator.nimsrandombullshit.init.NimsRandomBullshitModEnchantments;
import java.util.List;
public class RuiningEnchantmentEnchantment extends Enchantment {
private static final EnchantmentCategory ENCHANTMENT_CATEGORY = EnchantmentCategory.create("nims_random_bullshit_ruining_enchantment", item -> Ingredient.of(ItemTags.create(new ResourceLocation("minecraft:swords"))).test(new ItemStack(item)));
public RuiningEnchantmentEnchantment() {
super(Enchantment.Rarity.RARE, ENCHANTMENT_CATEGORY, new EquipmentSlot[]{EquipmentSlot.MAINHAND});
}
@Override
public int getMinCost(int level) {
return 1 + level * 10;
}
@Override
public int getMaxCost(int level) {
return 6 + level * 10;
}
@Override
public int getMaxLevel() {
return 5;
}
@Override
protected boolean checkCompatibility(Enchantment enchantment) {
return super.checkCompatibility(enchantment) && !List.of(NimsRandomBullshitModEnchantments.SUNDERING_ENCHANTMENT.get()).contains(enchantment);
}
}

View File

@@ -0,0 +1,42 @@
package net.mcreator.nimsrandombullshit.enchantment;
import net.minecraft.world.item.enchantment.EnchantmentCategory;
import net.minecraft.world.item.enchantment.Enchantment;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.tags.ItemTags;
import net.minecraft.resources.ResourceLocation;
import net.mcreator.nimsrandombullshit.init.NimsRandomBullshitModEnchantments;
import java.util.List;
public class SunderingEnchantmentEnchantment extends Enchantment {
private static final EnchantmentCategory ENCHANTMENT_CATEGORY = EnchantmentCategory.create("nims_random_bullshit_sundering_enchantment", item -> Ingredient.of(ItemTags.create(new ResourceLocation("minecraft:swords"))).test(new ItemStack(item)));
public SunderingEnchantmentEnchantment() {
super(Enchantment.Rarity.VERY_RARE, ENCHANTMENT_CATEGORY, new EquipmentSlot[]{EquipmentSlot.MAINHAND});
}
@Override
public int getMinCost(int level) {
return 1 + level * 10;
}
@Override
public int getMaxCost(int level) {
return 6 + level * 10;
}
@Override
public int getMaxLevel() {
return 5;
}
@Override
protected boolean checkCompatibility(Enchantment enchantment) {
return super.checkCompatibility(enchantment) && !List.of(NimsRandomBullshitModEnchantments.RUINING_ENCHANTMENT.get()).contains(enchantment);
}
}

View File

@@ -14,6 +14,7 @@ import net.mcreator.nimsrandombullshit.block.RedstoneBricksBlock;
import net.mcreator.nimsrandombullshit.block.RedstoneBrickWallsBlock;
import net.mcreator.nimsrandombullshit.block.RedstoneBrickStairsBlock;
import net.mcreator.nimsrandombullshit.block.RedstoneBrickSlabsBlock;
import net.mcreator.nimsrandombullshit.block.RaveBlockBlock;
import net.mcreator.nimsrandombullshit.block.QuadraCondensedNetherrackBlock;
import net.mcreator.nimsrandombullshit.block.PentaCondensedNetherrackBlock;
import net.mcreator.nimsrandombullshit.block.OrichalcumOreBlock;
@@ -58,6 +59,7 @@ public class NimsRandomBullshitModBlocks {
public static final RegistryObject<Block> BEDROCKIFIER = REGISTRY.register("bedrockifier", () -> new BedrockifierBlock());
public static final RegistryObject<Block> ORICHALCUM_ORE = REGISTRY.register("orichalcum_ore", () -> new OrichalcumOreBlock());
public static final RegistryObject<Block> ORICHALCUM_BLOCK = REGISTRY.register("orichalcum_block", () -> new OrichalcumBlockBlock());
public static final RegistryObject<Block> RAVE_BLOCK = REGISTRY.register("rave_block", () -> new RaveBlockBlock());
// Start of user code block custom blocks
// End of user code block custom blocks
}

View File

@@ -10,10 +10,14 @@ import net.minecraftforge.registries.DeferredRegister;
import net.minecraft.world.item.enchantment.Enchantment;
import net.mcreator.nimsrandombullshit.enchantment.SunderingEnchantmentEnchantment;
import net.mcreator.nimsrandombullshit.enchantment.RuiningEnchantmentEnchantment;
import net.mcreator.nimsrandombullshit.enchantment.PassiveIncomeEnchantmentEnchantment;
import net.mcreator.nimsrandombullshit.NimsRandomBullshitMod;
public class NimsRandomBullshitModEnchantments {
public static final DeferredRegister<Enchantment> REGISTRY = DeferredRegister.create(ForgeRegistries.ENCHANTMENTS, NimsRandomBullshitMod.MODID);
public static final RegistryObject<Enchantment> PASSIVE_INCOME_ENCHANTMENT = REGISTRY.register("passive_income_enchantment", () -> new PassiveIncomeEnchantmentEnchantment());
public static final RegistryObject<Enchantment> RUINING_ENCHANTMENT = REGISTRY.register("ruining_enchantment", () -> new RuiningEnchantmentEnchantment());
public static final RegistryObject<Enchantment> SUNDERING_ENCHANTMENT = REGISTRY.register("sundering_enchantment", () -> new SunderingEnchantmentEnchantment());
}

View File

@@ -28,6 +28,7 @@ import net.mcreator.nimsrandombullshit.item.OrichalcumItem;
import net.mcreator.nimsrandombullshit.item.OrichalcumHoeItem;
import net.mcreator.nimsrandombullshit.item.OrichalcumAxeItem;
import net.mcreator.nimsrandombullshit.item.OrichalcumArmorItem;
import net.mcreator.nimsrandombullshit.item.NightVisionGogglesItem;
import net.mcreator.nimsrandombullshit.item.NetherrackitePickaxeItem;
import net.mcreator.nimsrandombullshit.item.NetherrackiteItem;
import net.mcreator.nimsrandombullshit.item.NetherrackJuiceItem;
@@ -40,6 +41,7 @@ import net.mcreator.nimsrandombullshit.item.GravediggerItem;
import net.mcreator.nimsrandombullshit.item.GoldenBerriesItem;
import net.mcreator.nimsrandombullshit.item.CheeseItem;
import net.mcreator.nimsrandombullshit.item.BlockEaterItem;
import net.mcreator.nimsrandombullshit.item.BlackIronIngotItem;
import net.mcreator.nimsrandombullshit.item.BedrockUpgradeTemplateItem;
import net.mcreator.nimsrandombullshit.item.BedrockSwordItem;
import net.mcreator.nimsrandombullshit.item.BedrockShardItem;
@@ -109,6 +111,9 @@ public class NimsRandomBullshitModItems {
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());
public static final RegistryObject<Item> NIGHT_VISION_GOGGLES_HELMET = REGISTRY.register("night_vision_goggles_helmet", () -> new NightVisionGogglesItem.Helmet());
public static final RegistryObject<Item> BLACK_IRON_INGOT = REGISTRY.register("black_iron_ingot", () -> new BlackIronIngotItem());
public static final RegistryObject<Item> RAVE_BLOCK = block(NimsRandomBullshitModBlocks.RAVE_BLOCK);
// Start of user code block custom items
// End of user code block custom items

View File

@@ -35,6 +35,7 @@ public class NimsRandomBullshitModTabs {
tabData.accept(NimsRandomBullshitModBlocks.MAGMA_BRICK_WALLS.get().asItem());
tabData.accept(NimsRandomBullshitModBlocks.ORICHALCUM_ORE.get().asItem());
tabData.accept(NimsRandomBullshitModBlocks.ORICHALCUM_BLOCK.get().asItem());
tabData.accept(NimsRandomBullshitModBlocks.RAVE_BLOCK.get().asItem());
} else if (tabData.getTabKey() == CreativeModeTabs.TOOLS_AND_UTILITIES) {
tabData.accept(NimsRandomBullshitModItems.BLOCK_EATER.get());
tabData.accept(NimsRandomBullshitModItems.NETHERRACKITE_PICKAXE.get());
@@ -63,6 +64,7 @@ public class NimsRandomBullshitModTabs {
tabData.accept(NimsRandomBullshitModItems.SNOW_GOLEM_QUESTION_MARK.get());
tabData.accept(NimsRandomBullshitModItems.ORICHALCUM.get());
tabData.accept(NimsRandomBullshitModItems.BEDROCK_SHARD.get());
tabData.accept(NimsRandomBullshitModItems.BLACK_IRON_INGOT.get());
} else if (tabData.getTabKey() == CreativeModeTabs.FOOD_AND_DRINKS) {
tabData.accept(NimsRandomBullshitModItems.MAGIC_FLESH.get());
tabData.accept(NimsRandomBullshitModItems.GOLDEN_BERRIES.get());
@@ -87,6 +89,7 @@ public class NimsRandomBullshitModTabs {
tabData.accept(NimsRandomBullshitModItems.ORICHALCUM_ARMOR_CHESTPLATE.get());
tabData.accept(NimsRandomBullshitModItems.ORICHALCUM_ARMOR_LEGGINGS.get());
tabData.accept(NimsRandomBullshitModItems.ORICHALCUM_ARMOR_BOOTS.get());
tabData.accept(NimsRandomBullshitModItems.NIGHT_VISION_GOGGLES_HELMET.get());
}
}
}

View File

@@ -0,0 +1,11 @@
package net.mcreator.nimsrandombullshit.item;
import net.minecraft.world.item.Rarity;
import net.minecraft.world.item.Item;
public class BlackIronIngotItem extends Item {
public BlackIronIngotItem() {
super(new Item.Properties().stacksTo(64).rarity(Rarity.COMMON));
}
}

View File

@@ -0,0 +1,86 @@
package net.mcreator.nimsrandombullshit.item;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.Level;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ArmorMaterial;
import net.minecraft.world.item.ArmorItem;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.entity.Entity;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.resources.ResourceLocation;
import net.mcreator.nimsrandombullshit.procedures.NightVisionGogglesHelmetTickEventProcedure;
import com.google.common.collect.Iterables;
public abstract class NightVisionGogglesItem extends ArmorItem {
public NightVisionGogglesItem(ArmorItem.Type type, Item.Properties properties) {
super(new ArmorMaterial() {
@Override
public int getDurabilityForType(ArmorItem.Type type) {
return new int[]{13, 15, 16, 11}[type.getSlot().getIndex()] * 15;
}
@Override
public int getDefenseForType(ArmorItem.Type type) {
return new int[]{0, 0, 0, 2}[type.getSlot().getIndex()];
}
@Override
public int getEnchantmentValue() {
return 9;
}
@Override
public SoundEvent getEquipSound() {
return ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("block.sculk_sensor.clicking"));
}
@Override
public Ingredient getRepairIngredient() {
return Ingredient.of(new ItemStack(Blocks.LIME_STAINED_GLASS_PANE));
}
@Override
public String getName() {
return "night_vision_goggles";
}
@Override
public float getToughness() {
return 0f;
}
@Override
public float getKnockbackResistance() {
return 0f;
}
}, type, properties);
}
public static class Helmet extends NightVisionGogglesItem {
public Helmet() {
super(ArmorItem.Type.HELMET, new Item.Properties());
}
@Override
public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlot slot, String type) {
return "nims_random_bullshit:textures/models/armor/night_vision_goggles_layer_1.png";
}
@Override
public void inventoryTick(ItemStack itemstack, Level world, Entity entity, int slot, boolean selected) {
super.inventoryTick(itemstack, world, entity, slot, selected);
if (entity instanceof Player player && Iterables.contains(player.getArmorSlots(), itemstack)) {
NightVisionGogglesHelmetTickEventProcedure.execute(world, entity);
}
}
}
}

View File

@@ -1,6 +1,8 @@
package net.mcreator.nimsrandombullshit.item;
import net.minecraftforge.registries.ForgeRegistries;
import net.minecraft.world.level.Level;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.item.ItemStack;
@@ -10,8 +12,8 @@ import net.minecraft.world.item.ArmorItem;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.entity.Entity;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.sounds.SoundEvent;
import net.minecraft.resources.ResourceLocation;
import net.mcreator.nimsrandombullshit.procedures.OrichalcumArmorBootsTickEventProcedure;
import net.mcreator.nimsrandombullshit.init.NimsRandomBullshitModItems;
@@ -38,7 +40,7 @@ public abstract class OrichalcumArmorItem extends ArmorItem {
@Override
public SoundEvent getEquipSound() {
return SoundEvents.EMPTY;
return ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("item.armor.equip_netherite"));
}
@Override
@@ -70,7 +72,7 @@ public abstract class OrichalcumArmorItem extends ArmorItem {
@Override
public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlot slot, String type) {
return "nims_random_bullshit:textures/models/armor/orichalcum_layer_1.png";
return "nims_random_bullshit:textures/models/armor/orichalcum_armor_layer_1.png";
}
}
@@ -81,7 +83,7 @@ public abstract class OrichalcumArmorItem extends ArmorItem {
@Override
public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlot slot, String type) {
return "nims_random_bullshit:textures/models/armor/orichalcum_layer_1.png";
return "nims_random_bullshit:textures/models/armor/orichalcum_armor_layer_1.png";
}
}
@@ -92,7 +94,7 @@ public abstract class OrichalcumArmorItem extends ArmorItem {
@Override
public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlot slot, String type) {
return "nims_random_bullshit:textures/models/armor/orichalcum_layer_2.png";
return "nims_random_bullshit:textures/models/armor/orichalcum_armor_layer_2.png";
}
}
@@ -103,7 +105,7 @@ public abstract class OrichalcumArmorItem extends ArmorItem {
@Override
public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlot slot, String type) {
return "nims_random_bullshit:textures/models/armor/orichalcum_layer_1.png";
return "nims_random_bullshit:textures/models/armor/orichalcum_armor_layer_1.png";
}
@Override

View File

@@ -0,0 +1,18 @@
package net.mcreator.nimsrandombullshit.procedures;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.effect.MobEffectInstance;
public class NightVisionGogglesHelmetTickEventProcedure {
public static void execute(LevelAccessor world, Entity entity) {
if (entity == null)
return;
if (!world.isClientSide()) {
if (entity instanceof LivingEntity _entity && !_entity.level().isClientSide())
_entity.addEffect(new MobEffectInstance(MobEffects.NIGHT_VISION, 20, 0, false, false));
}
}
}

View File

@@ -0,0 +1,50 @@
package net.mcreator.nimsrandombullshit.procedures;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.eventbus.api.Event;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.level.Level;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.entity.monster.Creeper;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.Entity;
import net.minecraft.client.Minecraft;
import net.mcreator.nimsrandombullshit.init.NimsRandomBullshitModItems;
import javax.annotation.Nullable;
@Mod.EventBusSubscriber(value = Dist.CLIENT)
public class NightVisionGogglesShaderUpdateProcedure {
@SubscribeEvent
public static void onClientTick(TickEvent.ClientTickEvent event) {
Minecraft mc = Minecraft.getInstance();
if (mc.level == null)
return;
if (event.phase != TickEvent.Phase.END)
return;
execute(event, mc.level, mc.player);
}
public static void execute(LevelAccessor world, Entity entity) {
execute(null, world, entity);
}
private static void execute(@Nullable Event event, LevelAccessor world, Entity entity) {
if (entity == null)
return;
if ((entity instanceof LivingEntity _entGetArmor ? _entGetArmor.getItemBySlot(EquipmentSlot.HEAD) : ItemStack.EMPTY).getItem() == NimsRandomBullshitModItems.NIGHT_VISION_GOGGLES_HELMET.get()
&& !(Minecraft.getInstance().gameRenderer.currentEffect() != null)) {
Minecraft.getInstance().gameRenderer.checkEntityPostEffect(new Creeper(EntityType.CREEPER, (Level) world));
} else if (!((entity instanceof LivingEntity _entGetArmor ? _entGetArmor.getItemBySlot(EquipmentSlot.HEAD) : ItemStack.EMPTY).getItem() == NimsRandomBullshitModItems.NIGHT_VISION_GOGGLES_HELMET.get())
&& Minecraft.getInstance().gameRenderer.currentEffect() != null) {
Minecraft.getInstance().gameRenderer.shutdownEffect();
}
}
}

View File

@@ -0,0 +1,21 @@
package net.mcreator.nimsrandombullshit.procedures;
import net.minecraft.world.level.block.state.properties.IntegerProperty;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.level.Level;
import net.minecraft.core.BlockPos;
public class RaveBlockOnTickUpdateProcedure {
public static void execute(LevelAccessor world, double x, double y, double z, BlockState blockstate) {
if (!(world instanceof Level _level0 && _level0.hasNeighborSignal(BlockPos.containing(x, y, z)))) {
{
int _value = (int) ((blockstate.getBlock().getStateDefinition().getProperty("blockstate") instanceof IntegerProperty _getip2 ? blockstate.getValue(_getip2) : -1) % 5 + 1);
BlockPos _pos = BlockPos.containing(x, y, z);
BlockState _bs = world.getBlockState(_pos);
if (_bs.getBlock().getStateDefinition().getProperty("blockstate") instanceof IntegerProperty _integerProp && _integerProp.getPossibleValues().contains(_value))
world.setBlock(_pos, _bs.setValue(_integerProp, _value), 3);
}
}
}
}

View File

@@ -0,0 +1,45 @@
package net.mcreator.nimsrandombullshit.procedures;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.eventbus.api.Event;
import net.minecraftforge.event.entity.living.LivingAttackEvent;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.item.enchantment.EnchantmentHelper;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.damagesource.DamageTypes;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.core.registries.Registries;
import net.mcreator.nimsrandombullshit.init.NimsRandomBullshitModEnchantments;
import javax.annotation.Nullable;
@Mod.EventBusSubscriber
public class RuiningProcedureProcedure {
@SubscribeEvent
public static void onEntityAttacked(LivingAttackEvent event) {
if (event != null && event.getEntity() != null) {
execute(event, event.getEntity().level(), event.getSource(), event.getEntity(), event.getSource().getEntity());
}
}
public static void execute(LevelAccessor world, DamageSource damagesource, Entity entity, Entity sourceentity) {
execute(null, world, damagesource, entity, sourceentity);
}
private static void execute(@Nullable Event event, LevelAccessor world, DamageSource damagesource, Entity entity, Entity sourceentity) {
if (damagesource == null || entity == null || sourceentity == null)
return;
if (!world.isClientSide()) {
if (damagesource.is(DamageTypes.PLAYER_ATTACK)
&& EnchantmentHelper.getItemEnchantmentLevel(NimsRandomBullshitModEnchantments.RUINING_ENCHANTMENT.get(), (sourceentity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY)) != 0) {
entity.hurt(new DamageSource(world.registryAccess().registryOrThrow(Registries.DAMAGE_TYPE).getHolderOrThrow(DamageTypes.MAGIC), sourceentity), (float) ((entity instanceof LivingEntity _livEnt ? _livEnt.getHealth() : -1)
* (sourceentity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getEnchantmentLevel(NimsRandomBullshitModEnchantments.RUINING_ENCHANTMENT.get()) * 0.05));
}
}
}
}

View File

@@ -0,0 +1,45 @@
package net.mcreator.nimsrandombullshit.procedures;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.eventbus.api.Event;
import net.minecraftforge.event.entity.living.LivingAttackEvent;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.item.enchantment.EnchantmentHelper;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.damagesource.DamageTypes;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.core.registries.Registries;
import net.mcreator.nimsrandombullshit.init.NimsRandomBullshitModEnchantments;
import javax.annotation.Nullable;
@Mod.EventBusSubscriber
public class SunderingProcedureProcedure {
@SubscribeEvent
public static void onEntityAttacked(LivingAttackEvent event) {
if (event != null && event.getEntity() != null) {
execute(event, event.getEntity().level(), event.getSource(), event.getEntity(), event.getSource().getEntity());
}
}
public static void execute(LevelAccessor world, DamageSource damagesource, Entity entity, Entity sourceentity) {
execute(null, world, damagesource, entity, sourceentity);
}
private static void execute(@Nullable Event event, LevelAccessor world, DamageSource damagesource, Entity entity, Entity sourceentity) {
if (damagesource == null || entity == null || sourceentity == null)
return;
if (!world.isClientSide()) {
if (damagesource.is(DamageTypes.PLAYER_ATTACK)
&& EnchantmentHelper.getItemEnchantmentLevel(NimsRandomBullshitModEnchantments.SUNDERING_ENCHANTMENT.get(), (sourceentity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY)) != 0) {
entity.hurt(new DamageSource(world.registryAccess().registryOrThrow(Registries.DAMAGE_TYPE).getHolderOrThrow(DamageTypes.MAGIC), sourceentity), (float) ((entity instanceof LivingEntity _livEnt ? _livEnt.getMaxHealth() : -1)
* (sourceentity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getEnchantmentLevel(NimsRandomBullshitModEnchantments.SUNDERING_ENCHANTMENT.get()) * 0.02));
}
}
}
}

View File

@@ -0,0 +1,22 @@
{
"variants": {
"blockstate=0": {
"model": "nims_random_bullshit:block/rave_block"
},
"blockstate=1": {
"model": "nims_random_bullshit:block/rave_block_states_blockstate_0"
},
"blockstate=2": {
"model": "nims_random_bullshit:block/rave_block_states_blockstate_1"
},
"blockstate=3": {
"model": "nims_random_bullshit:block/rave_block_states_blockstate_2"
},
"blockstate=4": {
"model": "nims_random_bullshit:block/rave_block_states_blockstate_3"
},
"blockstate=5": {
"model": "nims_random_bullshit:block/rave_block_states_blockstate_4"
}
}
}

View File

@@ -27,6 +27,7 @@
"gui.nims_random_bullshit.mailbox_gui.outbox_y_coord": "0",
"item.nims_random_bullshit.wither_question_mark": "Wither...?",
"advancements.block_eater_advancement.descr": "Eat a block with the Block Eater",
"enchantment.nims_random_bullshit.ruining_enchantment": "Ruining",
"advancements.tux_advancement.title": "Tux!?",
"advancements.netherrack_juice_advancement.descr": "Obtain Netherrack Juice",
"block.nims_random_bullshit.condensed_condensed_netherrack": "Condensed Condensed Netherrack",
@@ -35,12 +36,14 @@
"advancements.shit_advancement.descr": "Shit",
"gui.nims_random_bullshit.bedrockifier_gui.button_empty": "-\u003e",
"block.nims_random_bullshit.hexa_condensed_netherrack": "Hexa-condensed Netherrack",
"enchantment.nims_random_bullshit.sundering_enchantment": "Sundering",
"item.nims_random_bullshit.sand_dust": "Sand Dust",
"entity.nims_random_bullshit.tux": "Tux",
"block.nims_random_bullshit.bedrockifier": "Bedrockifier",
"item.nims_random_bullshit.magic_flesh": "Magic Flesh",
"item.nims_random_bullshit.golden_berries": "Golden Berries",
"item.nims_random_bullshit.netherrack_juice_bucket": "Netherrack Juice Bucket",
"item.nims_random_bullshit.black_iron_ingot": "Black Iron Ingot",
"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.",
@@ -50,6 +53,7 @@
"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",
"item.nims_random_bullshit.night_vision_goggles_helmet": "Night Vision Goggles",
"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",
@@ -67,6 +71,7 @@
"advancements.orichalcum_advancement.title": "Folly Red Cum",
"item.nims_random_bullshit.ghoul_spawn_egg": "Ghoul Spawn Egg",
"block.nims_random_bullshit.magma_brick_walls": "Magma Brick Wall",
"block.nims_random_bullshit.rave_block": "Rave Block",
"gui.nims_random_bullshit.mailbox_gui.label_y": "Y:",
"gui.nims_random_bullshit.mailbox_gui.label_z": "Z:",
"item.nims_random_bullshit.tux_spawn_egg": "Tux Spawn Egg",

View File

@@ -0,0 +1,13 @@
{
"parent": "block/cube",
"textures": {
"down": "nims_random_bullshit:block/rave_block",
"up": "nims_random_bullshit:block/rave_block",
"north": "nims_random_bullshit:block/rave_block",
"east": "nims_random_bullshit:block/rave_block",
"south": "nims_random_bullshit:block/rave_block",
"west": "nims_random_bullshit:block/rave_block",
"particle": "nims_random_bullshit:block/rave_block"
},
"render_type": "solid"
}

View File

@@ -0,0 +1,13 @@
{
"parent": "block/cube",
"textures": {
"down": "nims_random_bullshit:block/rave_block_r",
"up": "nims_random_bullshit:block/rave_block_r",
"north": "nims_random_bullshit:block/rave_block_r",
"east": "nims_random_bullshit:block/rave_block_r",
"south": "nims_random_bullshit:block/rave_block_r",
"west": "nims_random_bullshit:block/rave_block_r",
"particle": "nims_random_bullshit:block/rave_block"
},
"render_type": "solid"
}

View File

@@ -0,0 +1,13 @@
{
"parent": "block/cube",
"textures": {
"down": "nims_random_bullshit:block/rave_block_y",
"up": "nims_random_bullshit:block/rave_block_y",
"north": "nims_random_bullshit:block/rave_block_y",
"east": "nims_random_bullshit:block/rave_block_y",
"south": "nims_random_bullshit:block/rave_block_y",
"west": "nims_random_bullshit:block/rave_block_y",
"particle": "nims_random_bullshit:block/rave_block"
},
"render_type": "solid"
}

View File

@@ -0,0 +1,13 @@
{
"parent": "block/cube",
"textures": {
"down": "nims_random_bullshit:block/rave_block_g",
"up": "nims_random_bullshit:block/rave_block_g",
"north": "nims_random_bullshit:block/rave_block_g",
"east": "nims_random_bullshit:block/rave_block_g",
"south": "nims_random_bullshit:block/rave_block_g",
"west": "nims_random_bullshit:block/rave_block_g",
"particle": "nims_random_bullshit:block/rave_block"
},
"render_type": "solid"
}

View File

@@ -0,0 +1,13 @@
{
"parent": "block/cube",
"textures": {
"down": "nims_random_bullshit:block/rave_block_b",
"up": "nims_random_bullshit:block/rave_block_b",
"north": "nims_random_bullshit:block/rave_block_b",
"east": "nims_random_bullshit:block/rave_block_b",
"south": "nims_random_bullshit:block/rave_block_b",
"west": "nims_random_bullshit:block/rave_block_b",
"particle": "nims_random_bullshit:block/rave_block"
},
"render_type": "solid"
}

View File

@@ -0,0 +1,13 @@
{
"parent": "block/cube",
"textures": {
"down": "nims_random_bullshit:block/rave_block_p",
"up": "nims_random_bullshit:block/rave_block_p",
"north": "nims_random_bullshit:block/rave_block_p",
"east": "nims_random_bullshit:block/rave_block_p",
"south": "nims_random_bullshit:block/rave_block_p",
"west": "nims_random_bullshit:block/rave_block_p",
"particle": "nims_random_bullshit:block/rave_block"
},
"render_type": "solid"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

View File

@@ -0,0 +1,20 @@
{
"type": "minecraft:block",
"random_sequence": "nims_random_bullshit:blocks/rave_block",
"pools": [
{
"rolls": 1.0,
"conditions": [
{
"condition": "minecraft:survives_explosion"
}
],
"entries": [
{
"type": "minecraft:item",
"name": "nims_random_bullshit:rave_block"
}
]
}
]
}

View File

@@ -0,0 +1,16 @@
{
"type": "minecraft:crafting_shapeless",
"category": "misc",
"ingredients": [
{
"item": "minecraft:iron_ingot"
},
{
"item": "minecraft:black_dye"
}
],
"result": {
"item": "nims_random_bullshit:black_iron_ingot",
"count": 1
}
}

View File

@@ -0,0 +1,21 @@
{
"type": "minecraft:crafting_shaped",
"category": "equipment",
"pattern": [
"a a",
"bab",
"a a"
],
"key": {
"a": {
"item": "nims_random_bullshit:black_iron_ingot"
},
"b": {
"item": "minecraft:lime_stained_glass_pane"
}
},
"result": {
"item": "nims_random_bullshit:night_vision_goggles_helmet",
"count": 1
}
}

View File

@@ -0,0 +1,37 @@
{
"type": "minecraft:crafting_shapeless",
"category": "building",
"ingredients": [
{
"item": "minecraft:white_concrete"
},
{
"item": "minecraft:red_dye"
},
{
"item": "minecraft:yellow_dye"
},
{
"item": "minecraft:lime_dye"
},
{
"item": "minecraft:light_blue_dye"
},
{
"item": "minecraft:magenta_dye"
},
{
"item": "minecraft:amethyst_shard"
},
{
"item": "minecraft:glow_ink_sac"
},
{
"item": "minecraft:redstone"
}
],
"result": {
"item": "nims_random_bullshit:rave_block",
"count": 9
}
}