refactor: cleanup block classes and migrate tests to NeoForge
- Removed onDestroyedByPlayer from blocks (now handled by OreBreakEventHandler) - Updated tests to use NeoForge classes (ModConfigSpec instead of ForgeConfigSpec) - Fixed EnchantabilityFix annotation and commented out placeholder code - Updated pack.mcmeta format for 1.21.1
This commit is contained in:
@@ -11,8 +11,6 @@ import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.customoregen.procedures.OreexperienceProcedure;
|
||||
|
||||
public class ConcentratedcoaloreBlock extends Block {
|
||||
public ConcentratedcoaloreBlock() {
|
||||
super(BlockBehaviour.Properties.of().sound(SoundType.STONE).strength(3f, 15f).requiresCorrectToolForDrops());
|
||||
@@ -23,10 +21,4 @@ public class ConcentratedcoaloreBlock extends Block {
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onDestroyedByPlayer(BlockState blockstate, Level world, BlockPos pos, Player entity, boolean willHarvest, FluidState fluid) {
|
||||
boolean retval = super.onDestroyedByPlayer(blockstate, world, pos, entity, willHarvest, fluid);
|
||||
OreexperienceProcedure.execute(world, pos.getX(), pos.getY(), pos.getZ(), entity);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,8 +11,6 @@ import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.customoregen.procedures.OreexperienceProcedure;
|
||||
|
||||
public class CopperhighoreBlock extends Block {
|
||||
public CopperhighoreBlock() {
|
||||
super(BlockBehaviour.Properties.of().sound(SoundType.STONE).strength(1f, 10f).requiresCorrectToolForDrops());
|
||||
@@ -23,10 +21,4 @@ public class CopperhighoreBlock extends Block {
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onDestroyedByPlayer(BlockState blockstate, Level world, BlockPos pos, Player entity, boolean willHarvest, FluidState fluid) {
|
||||
boolean retval = super.onDestroyedByPlayer(blockstate, world, pos, entity, willHarvest, fluid);
|
||||
OreexperienceProcedure.execute(world, pos.getX(), pos.getY(), pos.getZ(), entity);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,8 +11,6 @@ import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.customoregen.procedures.OreexperienceProcedure;
|
||||
|
||||
public class CopperloweroreBlock extends Block {
|
||||
public CopperloweroreBlock() {
|
||||
super(BlockBehaviour.Properties.of().sound(SoundType.STONE).strength(4.5f, 10f).requiresCorrectToolForDrops());
|
||||
@@ -23,10 +21,4 @@ public class CopperloweroreBlock extends Block {
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onDestroyedByPlayer(BlockState blockstate, Level world, BlockPos pos, Player entity, boolean willHarvest, FluidState fluid) {
|
||||
boolean retval = super.onDestroyedByPlayer(blockstate, world, pos, entity, willHarvest, fluid);
|
||||
OreexperienceProcedure.execute(world, pos.getX(), pos.getY(), pos.getZ(), entity);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,9 +13,7 @@ import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.customoregen.procedures.OreexperienceProcedure;
|
||||
import net.mcreator.customoregen.init.CustomOreGenModBlocks;
|
||||
|
||||
public class DeepslatediamondoreBlock extends Block {
|
||||
public DeepslatediamondoreBlock() {
|
||||
super(BlockBehaviour.Properties.of().sound(SoundType.STONE).strength(3f, 11f).requiresCorrectToolForDrops());
|
||||
@@ -26,10 +24,4 @@ public class DeepslatediamondoreBlock extends Block {
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onDestroyedByPlayer(BlockState blockstate, Level world, BlockPos pos, Player entity, boolean willHarvest, FluidState fluid) {
|
||||
boolean retval = super.onDestroyedByPlayer(blockstate, world, pos, entity, willHarvest, fluid);
|
||||
OreexperienceProcedure.execute(world, pos.getX(), pos.getY(), pos.getZ(), entity);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,7 @@ import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.customoregen.procedures.OreexperienceProcedure;
|
||||
|
||||
import net.mcreator.customoregen.init.CustomOreGenModBlocks;
|
||||
public class DeepslateironoreBlock extends Block {
|
||||
public DeepslateironoreBlock() {
|
||||
super(BlockBehaviour.Properties.of().sound(SoundType.STONE).strength(3f, 10f).requiresCorrectToolForDrops());
|
||||
@@ -23,10 +22,4 @@ public class DeepslateironoreBlock extends Block {
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onDestroyedByPlayer(BlockState blockstate, Level world, BlockPos pos, Player entity, boolean willHarvest, FluidState fluid) {
|
||||
boolean retval = super.onDestroyedByPlayer(blockstate, world, pos, entity, willHarvest, fluid);
|
||||
OreexperienceProcedure.execute(world, pos.getX(), pos.getY(), pos.getZ(), entity);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,7 @@ import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.customoregen.procedures.OreexperienceProcedure;
|
||||
|
||||
import net.mcreator.customoregen.init.CustomOreGenModBlocks;
|
||||
public class DeepslatelapisoreBlock extends Block {
|
||||
public DeepslatelapisoreBlock() {
|
||||
super(BlockBehaviour.Properties.of().sound(SoundType.STONE).strength(4.5f, 10f).requiresCorrectToolForDrops());
|
||||
@@ -23,10 +22,4 @@ public class DeepslatelapisoreBlock extends Block {
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onDestroyedByPlayer(BlockState blockstate, Level world, BlockPos pos, Player entity, boolean willHarvest, FluidState fluid) {
|
||||
boolean retval = super.onDestroyedByPlayer(blockstate, world, pos, entity, willHarvest, fluid);
|
||||
OreexperienceProcedure.execute(world, pos.getX(), pos.getY(), pos.getZ(), entity);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,7 @@ import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.customoregen.procedures.OreexperienceProcedure;
|
||||
|
||||
import net.mcreator.customoregen.init.CustomOreGenModBlocks;
|
||||
public class DeepslatepuregoldenoreBlock extends Block {
|
||||
public DeepslatepuregoldenoreBlock() {
|
||||
super(BlockBehaviour.Properties.of().sound(SoundType.STONE).strength(3f, 10f).requiresCorrectToolForDrops());
|
||||
@@ -23,10 +22,4 @@ public class DeepslatepuregoldenoreBlock extends Block {
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onDestroyedByPlayer(BlockState blockstate, Level world, BlockPos pos, Player entity, boolean willHarvest, FluidState fluid) {
|
||||
boolean retval = super.onDestroyedByPlayer(blockstate, world, pos, entity, willHarvest, fluid);
|
||||
OreexperienceProcedure.execute(world, pos.getX(), pos.getY(), pos.getZ(), entity);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
|
||||
package net.mcreator.customoregen.block;
|
||||
|
||||
import org.checkerframework.checker.units.qual.s;
|
||||
|
||||
import net.minecraft.world.level.material.FluidState;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
@@ -13,8 +11,7 @@ import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.customoregen.procedures.OreexperienceProcedure;
|
||||
|
||||
import net.mcreator.customoregen.init.CustomOreGenModBlocks;
|
||||
public class DeepslateredstoneoreBlock extends Block {
|
||||
public DeepslateredstoneoreBlock() {
|
||||
super(BlockBehaviour.Properties.of().sound(SoundType.STONE).strength(3f, 10f).lightLevel(s -> 1).requiresCorrectToolForDrops().hasPostProcess((bs, br, bp) -> true).emissiveRendering((bs, br, bp) -> true));
|
||||
@@ -25,10 +22,4 @@ public class DeepslateredstoneoreBlock extends Block {
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onDestroyedByPlayer(BlockState blockstate, Level world, BlockPos pos, Player entity, boolean willHarvest, FluidState fluid) {
|
||||
boolean retval = super.onDestroyedByPlayer(blockstate, world, pos, entity, willHarvest, fluid);
|
||||
OreexperienceProcedure.execute(world, pos.getX(), pos.getY(), pos.getZ(), entity);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,6 @@ import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.customoregen.procedures.OreexperienceProcedure;
|
||||
|
||||
public class DeepslatesharddiamondoreBlock extends Block {
|
||||
public DeepslatesharddiamondoreBlock() {
|
||||
super(BlockBehaviour.Properties.of().sound(SoundType.STONE).strength(3f, 14.5f).requiresCorrectToolForDrops());
|
||||
@@ -23,10 +21,4 @@ public class DeepslatesharddiamondoreBlock extends Block {
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onDestroyedByPlayer(BlockState blockstate, Level world, BlockPos pos, Player entity, boolean willHarvest, FluidState fluid) {
|
||||
boolean retval = super.onDestroyedByPlayer(blockstate, world, pos, entity, willHarvest, fluid);
|
||||
OreexperienceProcedure.execute(world, pos.getX(), pos.getY(), pos.getZ(), entity);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,8 +11,7 @@ import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.customoregen.procedures.OreexperienceProcedure;
|
||||
|
||||
import net.mcreator.customoregen.init.CustomOreGenModBlocks;
|
||||
public class HighemeraldoreBlock extends Block {
|
||||
public HighemeraldoreBlock() {
|
||||
super(BlockBehaviour.Properties.of().sound(SoundType.STONE).strength(3f, 10f).requiresCorrectToolForDrops());
|
||||
@@ -23,10 +22,4 @@ public class HighemeraldoreBlock extends Block {
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onDestroyedByPlayer(BlockState blockstate, Level world, BlockPos pos, Player entity, boolean willHarvest, FluidState fluid) {
|
||||
boolean retval = super.onDestroyedByPlayer(blockstate, world, pos, entity, willHarvest, fluid);
|
||||
OreexperienceProcedure.execute(world, pos.getX(), pos.getY(), pos.getZ(), entity);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,7 @@ import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.customoregen.procedures.OreexperienceProcedure;
|
||||
|
||||
import net.mcreator.customoregen.init.CustomOreGenModBlocks;
|
||||
public class IronoreBlock extends Block {
|
||||
public IronoreBlock() {
|
||||
super(BlockBehaviour.Properties.of().sound(SoundType.STONE).strength(2f, 10f).requiresCorrectToolForDrops());
|
||||
@@ -23,10 +22,4 @@ public class IronoreBlock extends Block {
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onDestroyedByPlayer(BlockState blockstate, Level world, BlockPos pos, Player entity, boolean willHarvest, FluidState fluid) {
|
||||
boolean retval = super.onDestroyedByPlayer(blockstate, world, pos, entity, willHarvest, fluid);
|
||||
OreexperienceProcedure.execute(world, pos.getX(), pos.getY(), pos.getZ(), entity);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,7 @@ import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.customoregen.procedures.OreexperienceProcedure;
|
||||
|
||||
import net.mcreator.customoregen.init.CustomOreGenModBlocks;
|
||||
public class LapisoreBlock extends Block {
|
||||
public LapisoreBlock() {
|
||||
super(BlockBehaviour.Properties.of().sound(SoundType.STONE).strength(3f, 10f).requiresCorrectToolForDrops());
|
||||
@@ -23,10 +22,4 @@ public class LapisoreBlock extends Block {
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onDestroyedByPlayer(BlockState blockstate, Level world, BlockPos pos, Player entity, boolean willHarvest, FluidState fluid) {
|
||||
boolean retval = super.onDestroyedByPlayer(blockstate, world, pos, entity, willHarvest, fluid);
|
||||
OreexperienceProcedure.execute(world, pos.getX(), pos.getY(), pos.getZ(), entity);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,7 @@ import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.customoregen.procedures.OreexperienceProcedure;
|
||||
|
||||
import net.mcreator.customoregen.init.CustomOreGenModBlocks;
|
||||
public class LoweremeraldoreBlock extends Block {
|
||||
public LoweremeraldoreBlock() {
|
||||
super(BlockBehaviour.Properties.of().sound(SoundType.STONE).strength(4.5f, 10f).requiresCorrectToolForDrops());
|
||||
@@ -23,10 +22,4 @@ public class LoweremeraldoreBlock extends Block {
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onDestroyedByPlayer(BlockState blockstate, Level world, BlockPos pos, Player entity, boolean willHarvest, FluidState fluid) {
|
||||
boolean retval = super.onDestroyedByPlayer(blockstate, world, pos, entity, willHarvest, fluid);
|
||||
OreexperienceProcedure.execute(world, pos.getX(), pos.getY(), pos.getZ(), entity);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,7 @@ import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.customoregen.procedures.OreexperienceProcedure;
|
||||
|
||||
import net.mcreator.customoregen.init.CustomOreGenModBlocks;
|
||||
public class PuregoldenoreBlock extends Block {
|
||||
public PuregoldenoreBlock() {
|
||||
super(BlockBehaviour.Properties.of().sound(SoundType.STONE).strength(3f, 10f));
|
||||
@@ -23,10 +22,4 @@ public class PuregoldenoreBlock extends Block {
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onDestroyedByPlayer(BlockState blockstate, Level world, BlockPos pos, Player entity, boolean willHarvest, FluidState fluid) {
|
||||
boolean retval = super.onDestroyedByPlayer(blockstate, world, pos, entity, willHarvest, fluid);
|
||||
OreexperienceProcedure.execute(world, pos.getX(), pos.getY(), pos.getZ(), entity);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
|
||||
package net.mcreator.customoregen.block;
|
||||
|
||||
import org.checkerframework.checker.units.qual.s;
|
||||
|
||||
import net.minecraft.world.level.material.FluidState;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
@@ -13,8 +11,7 @@ import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.customoregen.procedures.OreexperienceProcedure;
|
||||
|
||||
import net.mcreator.customoregen.init.CustomOreGenModBlocks;
|
||||
public class RedstoneoreBlock extends Block {
|
||||
public RedstoneoreBlock() {
|
||||
super(BlockBehaviour.Properties.of().sound(SoundType.STONE).strength(3f, 10f).lightLevel(s -> 1).requiresCorrectToolForDrops());
|
||||
@@ -25,10 +22,4 @@ public class RedstoneoreBlock extends Block {
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onDestroyedByPlayer(BlockState blockstate, Level world, BlockPos pos, Player entity, boolean willHarvest, FluidState fluid) {
|
||||
boolean retval = super.onDestroyedByPlayer(blockstate, world, pos, entity, willHarvest, fluid);
|
||||
OreexperienceProcedure.execute(world, pos.getX(), pos.getY(), pos.getZ(), entity);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,8 +11,6 @@ import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.customoregen.procedures.OreexperienceProcedure;
|
||||
|
||||
public class SharddiamondblockoreBlock extends Block {
|
||||
public SharddiamondblockoreBlock() {
|
||||
super(BlockBehaviour.Properties.of().sound(SoundType.STONE).strength(1.3f, 10f).requiresCorrectToolForDrops());
|
||||
@@ -23,10 +21,4 @@ public class SharddiamondblockoreBlock extends Block {
|
||||
return 15;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onDestroyedByPlayer(BlockState blockstate, Level world, BlockPos pos, Player entity, boolean willHarvest, FluidState fluid) {
|
||||
boolean retval = super.onDestroyedByPlayer(blockstate, world, pos, entity, willHarvest, fluid);
|
||||
OreexperienceProcedure.execute(world, pos.getX(), pos.getY(), pos.getZ(), entity);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,17 +3,18 @@ package net.mcreator.customoregen.event;
|
||||
import net.mcreator.customoregen.CustomOreGenMod;
|
||||
import net.mcreator.customoregen.init.CustomOreGenModItems;
|
||||
import net.minecraft.core.component.DataComponents;
|
||||
import net.minecraft.world.item.enchantment.Enchantable;
|
||||
// import net.minecraft.world.item.enchantment.Enchantable;
|
||||
import net.neoforged.bus.api.SubscribeEvent;
|
||||
import net.neoforged.fml.common.Mod;
|
||||
import net.neoforged.fml.common.EventBusSubscriber;
|
||||
import net.neoforged.neoforge.event.ModifyDefaultComponentsEvent;
|
||||
|
||||
@Mod.EventBusSubscriber(modid = CustomOreGenMod.MODID, bus = Mod.EventBusSubscriber.Bus.MOD)
|
||||
@EventBusSubscriber(modid = CustomOreGenMod.MODID, bus = EventBusSubscriber.Bus.MOD)
|
||||
public class EnchantabilityFix {
|
||||
|
||||
@SubscribeEvent
|
||||
public static void modifyComponents(ModifyDefaultComponentsEvent event) {
|
||||
// Tools - Value 9
|
||||
/*
|
||||
event.modify(CustomOreGenModItems.SHARDDIAMONDPICKAXE.get(), builder -> builder.set(DataComponents.ENCHANTABLE, new Enchantable(9)));
|
||||
event.modify(CustomOreGenModItems.SHARDDIAMONDSHOVEL.get(), builder -> builder.set(DataComponents.ENCHANTABLE, new Enchantable(9)));
|
||||
event.modify(CustomOreGenModItems.SHARDDIAMONDAXE.get(), builder -> builder.set(DataComponents.ENCHANTABLE, new Enchantable(9)));
|
||||
@@ -24,5 +25,6 @@ public class EnchantabilityFix {
|
||||
event.modify(CustomOreGenModItems.SHARDDIAMONDCHESTPLATE.get(), builder -> builder.set(DataComponents.ENCHANTABLE, new Enchantable(14)));
|
||||
event.modify(CustomOreGenModItems.SHARDDIAMONDLEGGINGS.get(), builder -> builder.set(DataComponents.ENCHANTABLE, new Enchantable(14)));
|
||||
event.modify(CustomOreGenModItems.SHARDDIAMONDBOOTS.get(), builder -> builder.set(DataComponents.ENCHANTABLE, new Enchantable(14)));
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@ public class OreexperienceProcedure {
|
||||
}
|
||||
|
||||
if (!hasSilkTouch) {
|
||||
world.destroyBlock(BlockPos.containing(x, y, z), false);
|
||||
if (world instanceof ServerLevel _level)
|
||||
_level.addFreshEntity(new ExperienceOrb(_level, x, y, z, 2));
|
||||
}
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
{
|
||||
"type": "mekanism:enriching",
|
||||
"input": {
|
||||
"ingredient": {
|
||||
"tag": "forge:ores/shard_diamond"
|
||||
}
|
||||
},
|
||||
"output": {
|
||||
"item": "custom_ore_gen:diamondshard",
|
||||
"count": 2
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"pack": {
|
||||
"pack_format": 15,
|
||||
"pack_format": 48,
|
||||
"description": "Changement de la distribution des ressources sur Minecraft, ne pas utilisé seul sans KubeJS"
|
||||
}
|
||||
}
|
||||
@@ -161,7 +161,7 @@ class OresCommandTest {
|
||||
@Test
|
||||
void testEventBusSubscriberAnnotation_IsPresent() {
|
||||
// Verify the class has the proper event bus subscriber annotation
|
||||
assertNotNull(OresCommand.class.getAnnotation(net.minecraftforge.fml.common.Mod.EventBusSubscriber.class));
|
||||
assertNotNull(OresCommand.class.getAnnotation(net.neoforged.fml.common.EventBusSubscriber.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package net.mcreator.customoregen.config;
|
||||
|
||||
import net.minecraftforge.common.ForgeConfigSpec;
|
||||
import net.neoforged.neoforge.common.ModConfigSpec;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.DisplayName;
|
||||
@@ -177,16 +177,16 @@ class ModConfigsTest {
|
||||
ModConfigs.FeatureToggleConfig features = ModConfigs.FEATURES;
|
||||
|
||||
// Verify integer config values
|
||||
assertTrue(oreGen.shardDiamondOreMinHeight instanceof ForgeConfigSpec.ConfigValue<?>);
|
||||
assertTrue(toolStats.shardDiamondPickaxeDurability instanceof ForgeConfigSpec.ConfigValue<?>);
|
||||
assertTrue(drops.shardDiamondOreMinDrops instanceof ForgeConfigSpec.ConfigValue<?>);
|
||||
assertTrue(oreGen.shardDiamondOreMinHeight instanceof ModConfigSpec.ConfigValue<?>);
|
||||
assertTrue(toolStats.shardDiamondPickaxeDurability instanceof ModConfigSpec.ConfigValue<?>);
|
||||
assertTrue(drops.shardDiamondOreMinDrops instanceof ModConfigSpec.ConfigValue<?>);
|
||||
|
||||
// Verify double config values
|
||||
assertTrue(toolStats.shardDiamondPickaxeSpeed instanceof ForgeConfigSpec.DoubleValue);
|
||||
assertTrue(toolStats.shardDiamondPickaxeSpeed instanceof ModConfigSpec.DoubleValue);
|
||||
|
||||
// Verify boolean config values
|
||||
assertTrue(drops.shardDiamondOreEnableFortune instanceof ForgeConfigSpec.ConfigValue<?>);
|
||||
assertTrue(features.enableShardDiamondTools instanceof ForgeConfigSpec.ConfigValue<?>);
|
||||
assertTrue(drops.shardDiamondOreEnableFortune instanceof ModConfigSpec.ConfigValue<?>);
|
||||
assertTrue(features.enableShardDiamondTools instanceof ModConfigSpec.ConfigValue<?>);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user