• Recently Browsing

    No registered users viewing this page.

  • Posts

    • You should really keep installations separate. How exactly are you launching server?
    • Those are for separate installations.
    • So I'm trying to override/recreate vanilla cauldron's mechanic. I end up with this... My Cauldron Code: package me.gleep.oreexpansion.blocks; import me.gleep.oreexpansion.util.RegistryHandler; import me.gleep.oreexpansion.util.CustomBlockStatePropeties; import net.minecraft.block.*; import net.minecraft.block.material.Material; import net.minecraft.block.material.MaterialColor; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.item.*; import net.minecraft.potion.PotionUtils; import net.minecraft.potion.Potions; import net.minecraft.state.IntegerProperty; import net.minecraft.state.StateContainer; import net.minecraft.stats.Stats; import net.minecraft.tileentity.BannerTileEntity; import net.minecraft.util.ActionResultType; import net.minecraft.util.Hand; import net.minecraft.util.SoundCategory; import net.minecraft.util.SoundEvents; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.MathHelper; import net.minecraft.world.World; import org.jetbrains.annotations.Nullable; public class Cauldron extends CauldronBlock { public static final IntegerProperty CONTENT = CustomBlockStatePropeties.CONTENTS_0_2; public Cauldron() { super(AbstractBlock.Properties.create(Material.IRON, MaterialColor.STONE).setRequiresTool().hardnessAndResistance(2.0F).notSolid()); } @Override public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { ItemStack itemstack = player.getHeldItem(handIn); if (itemstack.isEmpty()) { return ActionResultType.PASS; } else { int i = state.get(LEVEL); int j = state.get(CONTENT); Item item = itemstack.getItem(); if (item == RegistryHandler.LEAD_BLOCK_ITEM.get()) { if (!worldIn.isRemote && j == 0) { /*if (!player.abilities.isCreativeMode) { player.setHeldItem(handIn, new ItemStack(Items.BUCKET)); }*/ player.addStat(Stats.FILL_CAULDRON); this.setInside(worldIn, pos, state, 2); this.setLeadLevel(worldIn, pos, state, 1); worldIn.playSound((PlayerEntity) null, pos, SoundEvents.BLOCK_STONE_BREAK, SoundCategory.BLOCKS, 1.0F, 1.0F); } return ActionResultType.func_233537_a_(worldIn.isRemote); } /*else if (item == RegistryHandler.LEAD_BUCKET.get()) { if (j == 0 && i < 3 && !worldIn.isRemote) { if (!player.abilities.isCreativeMode) { player.setHeldItem(handIn, new ItemStack(Items.BUCKET)); } player.addStat(Stats.FILL_CAULDRON); this.setInside(worldIn, pos, state, 0); this.setLeadLevel(worldIn, pos, state, 0); worldIn.playSound((PlayerEntity)null, pos, SoundEvents.ITEM_BUCKET_EMPTY_LAVA, SoundCategory.BLOCKS, 1.0F, 1.0F); } return ActionResultType.func_233537_a_(worldIn.isRemote); }*/ else if (item == Items.WATER_BUCKET) { if (j < 2 && i < 3 && !worldIn.isRemote) { if (!player.abilities.isCreativeMode) { player.setHeldItem(handIn, new ItemStack(Items.BUCKET)); } player.addStat(Stats.FILL_CAULDRON); this.setInside(worldIn, pos, state, 1); this.setWaterLevel(worldIn, pos, state, 3); worldIn.playSound((PlayerEntity) null, pos, SoundEvents.ITEM_BUCKET_EMPTY, SoundCategory.BLOCKS, 1.0F, 1.0F); } return ActionResultType.func_233537_a_(worldIn.isRemote); } else if (item == Items.BUCKET) { if (j > 0 && i == 3 && !worldIn.isRemote) { if (j == 1) { if (!player.abilities.isCreativeMode) { itemstack.shrink(1); if (itemstack.isEmpty()) { player.setHeldItem(handIn, new ItemStack(Items.WATER_BUCKET)); } else if (!player.inventory.addItemStackToInventory(new ItemStack(Items.WATER_BUCKET))) { player.dropItem(new ItemStack(Items.WATER_BUCKET), false); } } player.addStat(Stats.USE_CAULDRON); this.setInside(worldIn, pos, state, 0); this.setWaterLevel(worldIn, pos, state, 0); worldIn.playSound((PlayerEntity) null, pos, SoundEvents.ITEM_BUCKET_FILL, SoundCategory.BLOCKS, 1.0F, 1.0F); } else { return ActionResultType.PASS; /*if (!player.abilities.isCreativeMode) { itemstack.shrink(1); if (itemstack.isEmpty()) { player.setHeldItem(handIn, new ItemStack(Items.WATER_BUCKET)); } else if (!player.inventory.addItemStackToInventory(new ItemStack(Items.WATER_BUCKET))) { player.dropItem(new ItemStack(Items.WATER_BUCKET), false); } } player.addStat(Stats.USE_CAULDRON); this.setInside(worldIn, pos, state, 0); this.setWaterLevel(worldIn, pos, state, 0); worldIn.playSound((PlayerEntity) null, pos, SoundEvents.ITEM_BUCKET_FILL_LAVA, SoundCategory.BLOCKS, 1.0F, 1.0F);*/ } } return ActionResultType.func_233537_a_(worldIn.isRemote); } else if (item == Items.GLASS_BOTTLE) { if (j == 1 && i > 0 && !worldIn.isRemote) { if (!player.abilities.isCreativeMode) { ItemStack itemstack4 = PotionUtils.addPotionToItemStack(new ItemStack(Items.POTION), Potions.WATER); player.addStat(Stats.USE_CAULDRON); itemstack.shrink(1); if (itemstack.isEmpty()) { player.setHeldItem(handIn, itemstack4); } else if (!player.inventory.addItemStackToInventory(itemstack4)) { player.dropItem(itemstack4, false); } else if (player instanceof ServerPlayerEntity) { ((ServerPlayerEntity) player).sendContainerToPlayer(player.container); } } worldIn.playSound((PlayerEntity) null, pos, SoundEvents.ITEM_BOTTLE_FILL, SoundCategory.BLOCKS, 1.0F, 1.0F); if (i - 1 == 0) this.setInside(worldIn, pos, state, 0); this.setWaterLevel(worldIn, pos, state, i - 1); } return ActionResultType.func_233537_a_(worldIn.isRemote); } else if (item == Items.POTION && PotionUtils.getPotionFromItem(itemstack) == Potions.WATER) { if (j < 2 && i < 3 && !worldIn.isRemote) { if (!player.abilities.isCreativeMode) { ItemStack itemstack3 = new ItemStack(Items.GLASS_BOTTLE); player.addStat(Stats.USE_CAULDRON); player.setHeldItem(handIn, itemstack3); if (player instanceof ServerPlayerEntity) { ((ServerPlayerEntity) player).sendContainerToPlayer(player.container); } } worldIn.playSound((PlayerEntity) null, pos, SoundEvents.ITEM_BOTTLE_EMPTY, SoundCategory.BLOCKS, 1.0F, 1.0F); this.setWaterLevel(worldIn, pos, state, i + 1); } return ActionResultType.func_233537_a_(worldIn.isRemote); } else { if (j == 1) { if (i > 0 && item instanceof IDyeableArmorItem) { IDyeableArmorItem idyeablearmoritem = (IDyeableArmorItem) item; if (idyeablearmoritem.hasColor(itemstack) && !worldIn.isRemote) { idyeablearmoritem.removeColor(itemstack); if (i - 1 == 0) this.setInside(worldIn, pos, state, 0); this.setWaterLevel(worldIn, pos, state, i - 1); player.addStat(Stats.CLEAN_ARMOR); return ActionResultType.SUCCESS; } } else if (i > 0 && item instanceof BannerItem) { if (BannerTileEntity.getPatterns(itemstack) > 0 && !worldIn.isRemote) { ItemStack itemstack2 = itemstack.copy(); itemstack2.setCount(1); BannerTileEntity.removeBannerData(itemstack2); player.addStat(Stats.CLEAN_BANNER); if (!player.abilities.isCreativeMode) { itemstack.shrink(1); this.setWaterLevel(worldIn, pos, state, i - 1); } if (itemstack.isEmpty()) { player.setHeldItem(handIn, itemstack2); } else if (!player.inventory.addItemStackToInventory(itemstack2)) { player.dropItem(itemstack2, false); } else if (player instanceof ServerPlayerEntity) { ((ServerPlayerEntity) player).sendContainerToPlayer(player.container); } } return ActionResultType.func_233537_a_(worldIn.isRemote); } else if (i > 0 && item instanceof BlockItem) { Block block = ((BlockItem) item).getBlock(); if (block instanceof ShulkerBoxBlock && !worldIn.isRemote()) { ItemStack itemstack1 = new ItemStack(Blocks.SHULKER_BOX, 1); if (itemstack.hasTag()) { itemstack1.setTag(itemstack.getTag().copy()); } player.setHeldItem(handIn, itemstack1); this.setWaterLevel(worldIn, pos, state, i - 1); player.addStat(Stats.CLEAN_SHULKER_BOX); return ActionResultType.SUCCESS; } else { return ActionResultType.CONSUME; } } else return ActionResultType.PASS; } } } return ActionResultType.PASS; } public void setInside(World worldIn, BlockPos pos, BlockState state, int content) { worldIn.setBlockState(pos, state.with(CONTENT, Integer.valueOf(MathHelper.clamp(content, 0, 2))), 2); } public void setLeadLevel(World worldIn, BlockPos pos, BlockState state, int level) { worldIn.setBlockState(pos, state.with(LEVEL, Integer.valueOf(MathHelper.clamp(level, 0, 3))), 2); } @Override public void fillWithRain(World worldIn, BlockPos pos) { if (worldIn.getBlockState(pos).get(CONTENT) < 2) { super.fillWithRain(worldIn, pos); } } } and something I hoped that will work: package me.gleep.oreexpansion.util; import net.minecraft.state.IntegerProperty; import net.minecraft.state.properties.BlockStateProperties; public class CustomBlockStatePropeties extends BlockStateProperties { public static final IntegerProperty CONTENTS_0_2 = IntegerProperty.create("content", 0, 2); }   It worked but I wanted to add textures and I ran into a problem. I need apparently add custom block state so I added thisto the Cauldron code: @Override protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) { super.fillStateContainer(builder); builder.add(CONTENT); } @Nullable @Override public BlockState getStateForPlacement(BlockItemUseContext context) { return this.getDefaultState().with(CONTENT, 0).getBlockState(); }   And end up with error: ---- Minecraft Crash Report ---- // Daisy, daisy... Time: 3.12.20 14:17 Description: Mod loading error has occurred java.lang.Exception: Mod Loading has failed at net.minecraftforge.fml.CrashReportExtender.dumpModLoadingCrashReport(CrashReportExtender.java:85) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading} at net.minecraftforge.fml.client.ClientModLoader.completeModLoading(ClientModLoader.java:188) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.lambda$null$1(Minecraft.java:513) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.util.Util.acceptOrElse(Util.java:323) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading} at net.minecraft.client.Minecraft.lambda$new$2(Minecraft.java:509) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.gui.ResourceLoadProgressGui.render(ResourceLoadProgressGui.java:113) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.renderer.GameRenderer.updateCameraAndRender(GameRenderer.java:492) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1002) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.run(Minecraft.java:612) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.main(Main.java:184) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_162] {} at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_162] {} at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_162] {} at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_162] {} at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:52) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.6.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.6.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.6.jar:?] {} at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.6.jar:?] {} at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.6.jar:?] {} at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105) [forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace: at net.minecraftforge.registries.GameData$BlockCallbacks.onAdd(GameData.java:455) ~[?:?] {re:classloading} -- MOD oreexpansion -- Details: Mod File: main Failure message: Ore Expansion (oreexpansion) encountered an error during the load_registries event phase java.lang.RuntimeException: Invalid vanilla replacement. See log for details. Mod Version: 1.16.4-0.0.1-alpha Mod Issue URL: http://my.issue.tracker/ Exception message: java.lang.RuntimeException: Invalid vanilla replacement. See log for details. Stacktrace: at net.minecraftforge.registries.GameData$BlockCallbacks.onAdd(GameData.java:455) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading} at net.minecraftforge.registries.GameData$BlockCallbacks.onAdd(GameData.java:425) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading} at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:404) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading} at net.minecraftforge.registries.ForgeRegistry.add(ForgeRegistry.java:335) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading} at net.minecraftforge.registries.ForgeRegistry.register(ForgeRegistry.java:142) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading} at net.minecraftforge.registries.DeferredRegister.addEntries(DeferredRegister.java:200) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading} at net.minecraftforge.registries.DeferredRegister.access$000(DeferredRegister.java:61) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading} at net.minecraftforge.registries.DeferredRegister$EventDispatcher.handleEvent(DeferredRegister.java:172) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading} at net.minecraftforge.eventbus.ASMEventHandler_0_EventDispatcher_handleEvent_Register.invoke(.dynamic) ~[?:?] {} at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-3.0.5-service.jar:?] {} at net.minecraftforge.eventbus.EventBus.post(EventBus.java:297) ~[eventbus-3.0.5-service.jar:?] {} at net.minecraftforge.fml.javafmlmod.FMLModContainer.acceptEvent(FMLModContainer.java:120) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:35.1] {re:classloading} at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:121) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading} at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1626) ~[?:1.8.0_162] {} at net.minecraftforge.fml.ModWorkManager$SyncExecutor.driveOne(ModWorkManager.java:56) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading} at net.minecraftforge.fml.ModWorkManager$DrivenExecutor.drive(ModWorkManager.java:40) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading} at net.minecraftforge.fml.ModLoader.waitForTransition(ModLoader.java:243) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading} at net.minecraftforge.fml.ModLoader.dispatchAndHandleError(ModLoader.java:230) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading} at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:196) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading} at net.minecraftforge.fml.client.ClientModLoader.lambda$begin$1(ClientModLoader.java:103) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraftforge.fml.client.ClientModLoader.lambda$createRunnableWithCatch$4(ClientModLoader.java:123) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraftforge.fml.client.ClientModLoader.begin(ClientModLoader.java:103) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at net.minecraft.client.Minecraft.<init>(Minecraft.java:442) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A} at net.minecraft.client.main.Main.main(Main.java:149) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A} at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_162] {} at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_162] {} at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_162] {} at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_162] {} at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:52) ~[forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.0.6.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.0.6.jar:?] {} at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.0.6.jar:?] {} at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.0.6.jar:?] {} at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.0.6.jar:?] {} at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:105) [forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-recomp.jar:?] {} -- System Details -- Details: Minecraft Version: 1.16.4 Minecraft Version ID: 1.16.4 Operating System: Windows 10 (amd64) version 10.0 Java Version: 1.8.0_162, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 1359560424 bytes (1296 MB) / 1725956096 bytes (1646 MB) up to 3817865216 bytes (3641 MB) CPUs: 4 JVM Flags: 2 total; -Xmx4G -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump ModLauncher: 8.0.6+85+master.325de55 ModLauncher launch target: fmluserdevclient ModLauncher naming: mcp ModLauncher services: /mixin-0.8.2.jar mixin PLUGINSERVICE /eventbus-3.0.5-service.jar eventbus PLUGINSERVICE /forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-launcher.jar object_holder_definalize PLUGINSERVICE /forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-launcher.jar runtime_enum_extender PLUGINSERVICE /accesstransformers-2.2.0-shadowed.jar accesstransformer PLUGINSERVICE /forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-launcher.jar capability_inject_definalize PLUGINSERVICE /forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-launcher.jar runtimedistcleaner PLUGINSERVICE /mixin-0.8.2.jar mixin TRANSFORMATIONSERVICE /forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.3-launcher.jar fml TRANSFORMATIONSERVICE FML: 35.1 Forge: net.minecraftforge:35.1.2 FML Language Providers: javafml@35.1 minecraft@1 Mod List: client-extra.jar |Minecraft |minecraft |1.16.4 |COMMON_SET|a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f main |Ore Expansion |oreexpansion |1.16.4-0.0.1-alpha |VALIDATE |NOSIGNATURE forge-1.16.4-35.1.2_mapped_snapshot_20201028-1.16.|Forge |forge |35.1.0 |COMMON_SET|NOSIGNATURE Crash Report UUID: edc69e6a-8785-4dfb-9c50-38b392e2f432     My question is if I could and how to make my custom block states or if I theres some other way or I made something wrong?  
    • Hi, I made a pickaxe in my mod that I actually want it to break ore veins more easily, so I made a blockbreakevent, and then a script that checks for every block around the ore you broke if there are any blocks of the same type, and if there are, then break them. My script is actually not working, and I don't really know why 😅, so I post this for any help, I would really appreciate it. Thanks !   Here is my event : @SubscribeEvent public static void onBreakEventWithPickaxe(BlockEvent.BreakEvent e) { PlayerEntity playerIn = e.getPlayer(); Item pickaxe = ModItems.NETHER_STAR_PICKAXE.get(); Block block = e.getState().getBlock(); IWorld world = e.getWorld(); if (e.getState().getBlock() instanceof OreBlock && playerIn.getHeldItemMainhand().getItem() == pickaxe) { int radius = 3; int height = 6; int posX = e.getPos().getX() - radius; int posY = e.getPos().getY() - radius; int posZ = e.getPos().getZ() - (height / 2); for (int i = 0; i < radius * 2 * radius * 2 * height; i++) { BlockPos pos = new BlockPos(posX, posY, posZ); if (world.getBlockState(pos).getBlock() == block) { world.destroyBlock(pos, true); } posX++; if (posX == radius * 2 + 1) { posY++; posX = e.getPos().getX() - radius; } if (posY == radius * 2 + 1) { posZ++; posY = e.getPos().getY() - radius; posX = e.getPos().getX() - radius; } } } }  
  • Topics

  • Who's Online (See full list)