Jump to content

[1.16.3] Test is item is on certain block


MrInfinity

Recommended Posts

Hi.

I'm making a hopper-like block, and In order to get the item into the gui, I need to be able to test if the item is on a block. I have this, and was wondering how to test what it collided with, or is there a better way to do it?

@SubscribeEvent
    public static void ItemPickup(ItemEvent event) {
        ItemEntity itemEntity = (ItemEntity) event.getItem();
        if (itemEntity.collidedVertically){
            
        }
    }
}

 

Link to comment
Share on other sites

This is wholly the wrong way to go about this.

Try looking at how the hopper picks up items.

Edited by Draco18s

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Ok so I looked at it, and wrote it into my block code. It still won't suck the item in, despite it being a copy of the hopperblock code. Here's what I put in:

@Override
public void onEntityCollision(BlockState state, World worldIn, BlockPos pos, Entity entityIn) {
    TileEntity tileentity  = worldIn.getTileEntity(pos);
    if (tileentity instanceof HopperTileEntity) {
        ((HopperTileEntity)tileentity).onEntityCollision(entityIn);
    }
}
Edited by MrInfinity
Typo
Link to comment
Share on other sites

When I load in the consol says that there is an invalid block entity at every position of the hopper block. Here's the full code:

public class ConveyorHopper extends Block {

    private static final DirectionProperty FACING = HorizontalBlock.HORIZONTAL_FACING;

    private static final VoxelShape SHAPE_N = Stream.of(
            Block.makeCuboidShape(0, 10, 0, 16, 16, 16),
            Block.makeCuboidShape(6, 0, 6, 10, 4, 10),
            Block.makeCuboidShape(4, 4, 4, 12, 10, 12)
    ).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);}).get();

    private static final VoxelShape SHAPE_E = Stream.of(
            Block.makeCuboidShape(0, 10, 0, 16, 16, 16),
            Block.makeCuboidShape(6, 0, 6, 10, 4, 10),
            Block.makeCuboidShape(4, 4, 4, 12, 10, 12)
    ).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);}).get();

    private static final VoxelShape SHAPE_S = Stream.of(
            Block.makeCuboidShape(0, 10, 0, 16, 16, 16),
            Block.makeCuboidShape(6, 0, 6, 10, 4, 10),
            Block.makeCuboidShape(4, 4, 4, 12, 10, 12)
    ).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);}).get();

    private static final VoxelShape SHAPE_W = Stream.of(
            Block.makeCuboidShape(0, 10, 0, 16, 16, 16),
            Block.makeCuboidShape(6, 0, 6, 10, 4, 10),
            Block.makeCuboidShape(4, 4, 4, 12, 10, 12)
    ).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);}).get();

    public ConveyorHopper() {
        super(AbstractBlock.Properties.create(Material.IRON)
                .hardnessAndResistance(4.0f, 5.0f)
                .sound(SoundType.METAL)
                .harvestLevel(2)
                .harvestTool(ToolType.PICKAXE));
    }

    @Override
    public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
        switch (state.get(FACING)) {
            case EAST:
                return SHAPE_E;
            case SOUTH:
                return SHAPE_S;
            case WEST:
                return SHAPE_W;
            default:
                return SHAPE_N;
        }
    }

    @Nullable
    @Override
    public BlockState getStateForPlacement(BlockItemUseContext context) {
        return this.getDefaultState().with(FACING, context.getPlacementHorizontalFacing().getOpposite());
    }

    @Override
    public BlockState rotate(BlockState state, Rotation rot) {
        return state.with(FACING, rot.rotate(state.get(FACING)));
    }

    @Override
    public BlockState mirror(BlockState state, Mirror mirrorIn) {
        return state.rotate(mirrorIn.toRotation(state.get(FACING)));
    }

    @Override
    protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) {
        builder.add(FACING);
    }

    @Override
    public float getAmbientOcclusionLightValue(BlockState state, IBlockReader worldIn, BlockPos pos) {
        return 0.5f;
    }

    @Override
    public boolean hasTileEntity(BlockState state) {
        return true;
    }

    @Nullable
    @Override
    public TileEntity createTileEntity(BlockState state, IBlockReader world) {
        return new HopperTileEntity();
    }

    @Override
    public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult trace) {
        if (!world.isRemote) {
            TileEntity tileEntity = world.getTileEntity(pos);
            if (tileEntity instanceof INamedContainerProvider) {
                NetworkHooks.openGui((ServerPlayerEntity) player, (INamedContainerProvider) tileEntity, tileEntity.getPos());
            }
            else {
                throw new IllegalStateException("Our named container provider is missing!");
            }
            return ActionResultType.SUCCESS;
        }
        return super.onBlockActivated(state, world, pos, player, hand, trace);
    }

    @Override
    public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) {
        if (!state.isIn(newState.getBlock())) {
            TileEntity tileentity = worldIn.getTileEntity(pos);
            if (tileentity instanceof HopperTileEntity) {
                InventoryHelper.dropInventoryItems(worldIn, pos, (HopperTileEntity)tileentity);
            }

            super.onReplaced(state, worldIn, pos, newState, isMoving);
        }
    }

    @Override
    public boolean hasComparatorInputOverride(BlockState state) {
        return true;
    }

    @Override
    public int getComparatorInputOverride(BlockState blockState, World worldIn, BlockPos pos) {
        return Container.calcRedstone(worldIn.getTileEntity(pos));
    }

    @Override
    public void onEntityCollision(BlockState state, World worldIn, BlockPos pos, Entity entityIn) {
        TileEntity tileentity  = worldIn.getTileEntity(pos);
        if (tileentity instanceof HopperTileEntity) {
            ((HopperTileEntity)tileentity).onEntityCollision(entityIn);
        }

    }

}

Link to comment
Share on other sites

That's because your block is not in the list of valid blocks for vanilla hopper tileentity when it is registered.

Check

net.minecraft.tileentity.TileEntityType

And your block does not have boolean property

ENABLED

Therefore it won't respond to your own hopper.

Inherit from existing resource instead of copy and pasting, then override the things you want to modify with.

Edited by poopoodice
Link to comment
Share on other sites

Well I added the ENABLED property by typing it in, and now it crashes whever I try to place the block. Here's the code with the enabled:

package com.mrinfinity.motionblocks.blocks;

import net.minecraft.block.*;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.ItemEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.InventoryHelper;
import net.minecraft.inventory.container.Container;
import net.minecraft.inventory.container.INamedContainerProvider;
import net.minecraft.item.BlockItemUseContext;
import net.minecraft.item.ItemStack;
import net.minecraft.state.BooleanProperty;
import net.minecraft.state.DirectionProperty;
import net.minecraft.state.StateContainer;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.tileentity.HopperTileEntity;
import net.minecraft.tileentity.IHopper;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.*;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.shapes.IBooleanFunction;
import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.LockCode;
import net.minecraft.world.World;
import net.minecraftforge.common.ToolType;
import net.minecraftforge.fml.network.NetworkHooks;

import javax.annotation.Nullable;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import static net.minecraft.tileentity.HopperTileEntity.captureItem;
import static net.minecraft.tileentity.IHopper.COLLECTION_AREA_SHAPE;

public class ConveyorHopper extends Block {

    private NonNullList<ItemStack> inventory = NonNullList.withSize(5, ItemStack.EMPTY);
    private static final DirectionProperty FACING = HorizontalBlock.HORIZONTAL_FACING;
    private static final BooleanProperty ENABLED = BlockStateProperties.ENABLED;
    private int transferCooldown = -1;
    private LockCode code = LockCode.EMPTY_CODE;

    private static final VoxelShape SHAPE_N = Stream.of(
            Block.makeCuboidShape(0, 10, 0, 16, 16, 16),
            Block.makeCuboidShape(6, 0, 6, 10, 4, 10),
            Block.makeCuboidShape(4, 4, 4, 12, 10, 12)
    ).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);}).get();

    private static final VoxelShape SHAPE_E = Stream.of(
            Block.makeCuboidShape(0, 10, 0, 16, 16, 16),
            Block.makeCuboidShape(6, 0, 6, 10, 4, 10),
            Block.makeCuboidShape(4, 4, 4, 12, 10, 12)
    ).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);}).get();

    private static final VoxelShape SHAPE_S = Stream.of(
            Block.makeCuboidShape(0, 10, 0, 16, 16, 16),
            Block.makeCuboidShape(6, 0, 6, 10, 4, 10),
            Block.makeCuboidShape(4, 4, 4, 12, 10, 12)
    ).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);}).get();

    private static final VoxelShape SHAPE_W = Stream.of(
            Block.makeCuboidShape(0, 10, 0, 16, 16, 16),
            Block.makeCuboidShape(6, 0, 6, 10, 4, 10),
            Block.makeCuboidShape(4, 4, 4, 12, 10, 12)
    ).reduce((v1, v2) -> {return VoxelShapes.combineAndSimplify(v1, v2, IBooleanFunction.OR);}).get();

    public ConveyorHopper() {
        super(Properties.create(Material.IRON)
                .hardnessAndResistance(4.0f, 5.0f)
                .sound(SoundType.METAL)
                .harvestLevel(2)
                .harvestTool(ToolType.PICKAXE));
    }

    @Override
    public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) {
        switch (state.get(FACING)) {
            case EAST:
                return SHAPE_E;
            case SOUTH:
                return SHAPE_S;
            case WEST:
                return SHAPE_W;
            default:
                return SHAPE_N;
        }
    }

    @Nullable
    @Override
    public BlockState getStateForPlacement(BlockItemUseContext context) {
        return this.getDefaultState().with(FACING, context.getPlacementHorizontalFacing().getOpposite()).with(ENABLED, Boolean.TRUE);
    }

    @Override
    public BlockState rotate(BlockState state, Rotation rot) {
        return state.with(FACING, rot.rotate(state.get(FACING)));
    }

    @Override
    public BlockState mirror(BlockState state, Mirror mirrorIn) {
        return state.rotate(mirrorIn.toRotation(state.get(FACING)));
    }

    @Override
    protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) {
        builder.add(FACING);
    }

    @Override
    public float getAmbientOcclusionLightValue(BlockState state, IBlockReader worldIn, BlockPos pos) {
        return 0.5f;
    }

    @Override
    public boolean hasTileEntity(BlockState state) {
        return true;
    }

    private void updateState(World worldIn, BlockPos pos, BlockState state) {
        boolean flag = !worldIn.isBlockPowered(pos);
        if (flag != state.get(ENABLED)) {
            worldIn.setBlockState(pos, state.with(ENABLED, flag), 4);
        }

    }

    @Nullable
    @Override
    public TileEntity createTileEntity(BlockState state, IBlockReader world) {
        return new HopperTileEntity();
    }

    @Override
    public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult trace) {
        if (!world.isRemote) {
            TileEntity tileEntity = world.getTileEntity(pos);
            if (tileEntity instanceof INamedContainerProvider) {
                NetworkHooks.openGui((ServerPlayerEntity) player, (INamedContainerProvider) tileEntity, tileEntity.getPos());
            }
            else {
                throw new IllegalStateException("Our named container provider is missing!");
            }
            return ActionResultType.SUCCESS;
        }
        return super.onBlockActivated(state, world, pos, player, hand, trace);
    }

    @Override
    public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) {
        if (!state.isIn(newState.getBlock())) {
            TileEntity tileentity = worldIn.getTileEntity(pos);
            if (tileentity instanceof HopperTileEntity) {
                InventoryHelper.dropInventoryItems(worldIn, pos, (HopperTileEntity)tileentity);
            }

            super.onReplaced(state, worldIn, pos, newState, isMoving);
        }
    }

    @Override
    public boolean hasComparatorInputOverride(BlockState state) {
        return true;
    }

    private boolean isOnTransferCooldown() {
        return this.transferCooldown > 0;
    }

    public int getSizeInventory() {
        return this.inventory.size();
    }

    @Override
    public int getComparatorInputOverride(BlockState blockState, World worldIn, BlockPos pos) {
        return Container.calcRedstone(worldIn.getTileEntity(pos));
    }

    public static List<ItemEntity> getCaptureItems(IHopper p_200115_0_) {
        return p_200115_0_.getCollectionArea().toBoundingBoxList().stream().flatMap((p_200110_1_) -> {
            return Objects.requireNonNull(p_200115_0_.getWorld()).getEntitiesWithinAABB(ItemEntity.class, p_200110_1_.offset(p_200115_0_.getXPos() - 0.5D, p_200115_0_.getYPos() - 0.5D, p_200115_0_.getZPos() - 0.5D), EntityPredicates.IS_ALIVE).stream();
        }).collect(Collectors.toList());
    }

    VoxelShape getCollectionArea() {
        return COLLECTION_AREA_SHAPE;
    }


    public boolean onEntityCollision(Entity p_200113_1_, BlockPos pos, IHopper p_200115_0_) {
        if (p_200113_1_ instanceof ItemEntity) {
            if (VoxelShapes.compare(VoxelShapes.create(p_200113_1_.getBoundingBox().offset((double) (-pos.getX()), (double) (-pos.getY()), (double) (-pos.getZ()))), this.getCollectionArea(), IBooleanFunction.AND)) {
                    return captureItem((IInventory) this, (ItemEntity) p_200113_1_);
            }
        }
        assert p_200113_1_ instanceof ItemEntity;
        return captureItem((IInventory) this, (ItemEntity) p_200113_1_);
    }

    @Override
    public void onEntityCollision(BlockState state, World worldIn, BlockPos pos, Entity entityIn) {
        TileEntity tileentity = worldIn.getTileEntity(pos);
        if (tileentity instanceof HopperTileEntity) {
                ((HopperTileEntity) tileentity).onEntityCollision(entityIn);
        }

    }
}

And here's what the crash report says at the top:

java.lang.IllegalArgumentException: Cannot set property BooleanProperty{name=enabled, clazz=class java.lang.Boolean, values=[true, false]} as it does not exist in Block{blocksthatmoveyou:conveyor_hopper}
Link to comment
Share on other sites

32 minutes ago, MrInfinity said:

private NonNullList<ItemStack> inventory = NonNullList.withSize(5, ItemStack.EMPTY);

private int transferCooldown = -1;

private LockCode code = LockCode.EMPTY_CODE;

These are not supposed to exist in your block class, at least not how like how you use it here.

You forgot to add the new state to the state container.

Edited by poopoodice
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • These are all 1.20.1 builds: https://www.curseforge.com/minecraft/mc-mods/skin-layers-3d/files/all?page=1&pageSize=20&version=1.20.1&gameVersionTypeId=1 Try version 1.6.4 or 1.5.4
    • @TileEntity thanks, it worked, but there's no other mods of skinlayers3d that works, does that mean I can't use it at all?
    • Make a test without skinlayers3d If this is working, try other 1.20.1 builds of this mod
    • unable to load curseforge due to "game crashed whilst rendering overlays", heres the crash report: https://pastebin.com/s1DN9hG8
    • ---- Minecraft Crash Report ---- // Why did you do that? Time: 2024-05-29 14:48:23 Description: Mod loading error has occurred java.lang.Exception: Mod Loading has failed     at net.minecraftforge.logging.CrashReportExtender.dumpModLoadingCrashReport(CrashReportExtender.java:60) ~[forge-1.20.1-47.2.32-universal.jar%23271!/:?] {re:classloading}     at net.minecraftforge.client.loading.ClientModLoader.completeModLoading(ClientModLoader.java:138) ~[forge-1.20.1-47.2.32-universal.jar%23271!/:?] {re:classloading,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.lambda$new$4(Minecraft.java:571) ~[client-1.20.1-20230612.114412-srg.jar%23266!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.Util.m_137521_(Util.java:421) ~[client-1.20.1-20230612.114412-srg.jar%23266!/:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}     at net.minecraft.client.Minecraft.lambda$new$5(Minecraft.java:564) ~[client-1.20.1-20230612.114412-srg.jar%23266!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraftforge.client.loading.ForgeLoadingOverlay.m_88315_(ForgeLoadingOverlay.java:146) ~[forge-1.20.1-47.2.32-universal.jar%23271!/:?] {re:classloading}     at net.minecraft.client.renderer.GameRenderer.m_109093_(GameRenderer.java:954) ~[client-1.20.1-20230612.114412-srg.jar%23266!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1146) ~[client-1.20.1-20230612.114412-srg.jar%23266!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:718) ~[client-1.20.1-20230612.114412-srg.jar%23266!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.main.Main.main(Main.java:218) ~[1.20.1-forge-47.2.32.jar:?] {re:mixin,pl:runtimedistcleaner:A,re:classloading,pl:mixin:APP:flywheel.mixins.json:ClientMainMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}     at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {}     at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:111) ~[fmlloader-1.20.1-47.2.32.jar:?] {}     at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.clientService(CommonLaunchHandler.java:99) ~[fmlloader-1.20.1-47.2.32.jar:?] {}     at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$makeService$0(CommonClientLaunchHandler.java:25) ~[fmlloader-1.20.1-47.2.32.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.Launcher.run(Launcher.java:108) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.Launcher.main(Launcher.java:78) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~[modlauncher-10.0.9.jar:?] {}     at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) ~[bootstraplauncher-1.1.2.jar:?] {} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Suspected Mods: NONE Stacktrace:     at com.electronwill.nightconfig.core.io.ParsingException.notEnoughData(ParsingException.java:22) ~[core-3.6.4.jar%2393!/:?] {} -- MOD terrablender -- Details:     Caused by 0: java.lang.ExceptionInInitializerError         at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?] {}         at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?] {}         at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?] {}         at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?] {}         at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?] {}         at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:70) ~[javafmllanguage-1.20.1-47.2.32.jar%23268!/:?] {}         at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:124) ~[fmlcore-1.20.1-47.2.32.jar%23267!/:?] {}         at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) ~[?:?] {}         at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796) ~[?:?] {}         at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] {}         at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] {}         at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] {}         at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] {}         at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] {}     Mod File: /C:/Users/FLOWUP/AppData/Roaming/.minecraft/mods/TerraBlender-forge-1.20.1-3.0.1.7.jar     Failure message: TerraBlender (terrablender) has failed to load correctly         java.lang.ExceptionInInitializerError: null     Mod Version: 3.0.1.7     Mod Issue URL: https://github.com/Glitchfiend/TerraBlender/issues     Exception message: com.electronwill.nightconfig.core.io.ParsingException: Not enough data available Stacktrace:     at com.electronwill.nightconfig.core.io.ParsingException.notEnoughData(ParsingException.java:22) ~[core-3.6.4.jar%2393!/:?] {}     at com.electronwill.nightconfig.core.io.ReaderInput.directReadChar(ReaderInput.java:36) ~[core-3.6.4.jar%2393!/:?] {}     at com.electronwill.nightconfig.core.io.AbstractInput.readChar(AbstractInput.java:49) ~[core-3.6.4.jar%2393!/:?] {}     at com.electronwill.nightconfig.core.io.AbstractInput.readCharsUntil(AbstractInput.java:123) ~[core-3.6.4.jar%2393!/:?] {}     at com.electronwill.nightconfig.toml.TableParser.parseKey(TableParser.java:166) ~[toml-3.6.4.jar%2394!/:?] {}     at com.electronwill.nightconfig.toml.TableParser.parseDottedKey(TableParser.java:145) ~[toml-3.6.4.jar%2394!/:?] {}     at com.electronwill.nightconfig.toml.TableParser.parseNormal(TableParser.java:55) ~[toml-3.6.4.jar%2394!/:?] {}     at com.electronwill.nightconfig.toml.TomlParser.parse(TomlParser.java:44) ~[toml-3.6.4.jar%2394!/:?] {}     at com.electronwill.nightconfig.toml.TomlParser.parse(TomlParser.java:37) ~[toml-3.6.4.jar%2394!/:?] {}     at com.electronwill.nightconfig.core.io.ConfigParser.parse(ConfigParser.java:113) ~[core-3.6.4.jar%2393!/:?] {}     at com.electronwill.nightconfig.core.io.ConfigParser.parse(ConfigParser.java:219) ~[core-3.6.4.jar%2393!/:?] {}     at com.electronwill.nightconfig.core.io.ConfigParser.parse(ConfigParser.java:202) ~[core-3.6.4.jar%2393!/:?] {}     at com.electronwill.nightconfig.core.file.WriteSyncFileConfig.load(WriteSyncFileConfig.java:73) ~[core-3.6.4.jar%2393!/:?] {}     at com.electronwill.nightconfig.core.file.AutosaveCommentedFileConfig.load(AutosaveCommentedFileConfig.java:85) ~[core-3.6.4.jar%2393!/:?] {}     at terrablender.config.ConfigFile.<init>(ConfigFile.java:34) ~[TerraBlender-forge-1.20.1-3.0.1.7.jar%23257!/:3.0.1.7] {re:classloading}     at terrablender.config.TerraBlenderConfig.<init>(TerraBlenderConfig.java:31) ~[TerraBlender-forge-1.20.1-3.0.1.7.jar%23257!/:3.0.1.7] {re:classloading}     at terrablender.core.TerraBlenderForge.<clinit>(TerraBlenderForge.java:30) ~[TerraBlender-forge-1.20.1-3.0.1.7.jar%23257!/:3.0.1.7] {re:classloading}     at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?] {}     at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?] {}     at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?] {}     at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?] {}     at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?] {}     at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:70) ~[javafmllanguage-1.20.1-47.2.32.jar%23268!/:?] {}     at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:124) ~[fmlcore-1.20.1-47.2.32.jar%23267!/:?] {}     at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) ~[?:?] {}     at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796) ~[?:?] {}     at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] {}     at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] {}     at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] {}     at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] {}     at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] {} -- System Details -- Details:     Minecraft Version: 1.20.1     Minecraft Version ID: 1.20.1     Operating System: Windows 11 (amd64) version 10.0     Java Version: 17.0.8, Microsoft     Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft     Memory: 458314904 bytes (437 MiB) / 973078528 bytes (928 MiB) up to 2147483648 bytes (2048 MiB)     CPUs: 16     Processor Vendor: AuthenticAMD     Processor Name: AMD Ryzen 7 5700X 8-Core Processor                  Identifier: AuthenticAMD Family 25 Model 33 Stepping 2     Microarchitecture: Zen 3     Frequency (GHz): 3.40     Number of physical packages: 1     Number of physical CPUs: 8     Number of logical CPUs: 16     Graphics card #0 name: AMD  Radeon RX 7800 XT     Graphics card #0 vendor: Advanced Micro Devices, Inc. (0x1002)     Graphics card #0 VRAM (MB): 4095.00     Graphics card #0 deviceId: 0x747e     Graphics card #0 versionInfo: DriverVersion=31.0.24033.1003     Memory slot #0 capacity (MB): 8192.00     Memory slot #0 clockSpeed (GHz): 2.13     Memory slot #0 type: DDR4     Memory slot #1 capacity (MB): 8192.00     Memory slot #1 clockSpeed (GHz): 2.13     Memory slot #1 type: DDR4     Virtual memory max (MB): 30134.09     Virtual memory used (MB): 16937.70     Swap memory total (MB): 13824.00     Swap memory used (MB): 104.09     JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M     Loaded Shaderpack: (off)     ModLauncher: 10.0.9+10.0.9+main.dcd20f30     ModLauncher launch target: forgeclient     ModLauncher naming: srg     ModLauncher services:          mixin-0.8.5.jar mixin PLUGINSERVICE          eventbus-6.0.5.jar eventbus PLUGINSERVICE          fmlloader-1.20.1-47.2.32.jar slf4jfixer PLUGINSERVICE          fmlloader-1.20.1-47.2.32.jar object_holder_definalize PLUGINSERVICE          fmlloader-1.20.1-47.2.32.jar runtime_enum_extender PLUGINSERVICE          fmlloader-1.20.1-47.2.32.jar capability_token_subclass PLUGINSERVICE          accesstransformers-8.0.4.jar accesstransformer PLUGINSERVICE          fmlloader-1.20.1-47.2.32.jar runtimedistcleaner PLUGINSERVICE          modlauncher-10.0.9.jar mixin TRANSFORMATIONSERVICE          modlauncher-10.0.9.jar fml TRANSFORMATIONSERVICE      FML Language Providers:          [email protected]         javafml@null         [email protected]         lowcodefml@null     Mod List:          Stellarity-v2-0e.jar                              |Stellarity                    |mr_stellarity                 |2.0d                |COMMON_SET|Manifest: NOSIGNATURE         AsgardShieldReloaded-1.20.1-0.2.jar               |Asgard Shield: Reloaded       |asr                           |0.2                 |COMMON_SET|Manifest: NOSIGNATURE         mowziesmobs-1.6.4.jar                             |Mowzie's Mobs                 |mowziesmobs                   |1.6.4               |COMMON_SET|Manifest: NOSIGNATURE         Big Swords R-1.20.1-0.8.jar                       |Big Swords R                  |big_swords                    |0.8                 |COMMON_SET|Manifest: NOSIGNATURE         blue_skies-1.20.1-1.3.31.jar                      |Blue Skies                    |blue_skies                    |1.3.31              |COMMON_SET|Manifest: NOSIGNATURE         geckolib-forge-1.20.1-4.4.4.jar                   |GeckoLib 4                    |geckolib                      |4.4.4               |COMMON_SET|Manifest: NOSIGNATURE         player-animation-lib-forge-1.0.2-rc1+1.20.jar     |Player Animator               |playeranimator                |1.0.2-rc1+1.20      |COMMON_SET|Manifest: NOSIGNATURE         jei-1.20.1-forge-15.3.0.4.jar                     |Just Enough Items             |jei                           |15.3.0.4            |COMMON_SET|Manifest: NOSIGNATURE         libraryferret-forge-1.20.1-4.0.0.jar              |Library ferret                |libraryferret                 |4.0.0               |COMMON_SET|Manifest: NOSIGNATURE         epicsamurai-0.0.44-1.20.1-neo.jar                 |Epic Samurai                  |epicsamurai                   |0.0.44-1.20.1-neo   |COMMON_SET|Manifest: NOSIGNATURE         caelus-forge-3.2.0+1.20.1.jar                     |Caelus API                    |caelus                        |3.2.0+1.20.1        |COMMON_SET|Manifest: NOSIGNATURE         obscure_api-15.jar                                |Obscure API                   |obscure_api                   |15                  |COMMON_SET|Manifest: NOSIGNATURE         waystones-forge-1.20-14.1.3.jar                   |Waystones                     |waystones                     |14.1.3              |COMMON_SET|Manifest: NOSIGNATURE         villagernames-1.20.1-7.3.jar                      |Villager Names                |villagernames                 |7.3                 |COMMON_SET|Manifest: NOSIGNATURE         citadel-2.5.4-1.20.1.jar                          |Citadel                       |citadel                       |2.5.4               |COMMON_SET|Manifest: NOSIGNATURE         alexsmobs-1.22.8.jar                              |Alex's Mobs                   |alexsmobs                     |1.22.8              |COMMON_SET|Manifest: NOSIGNATURE         travelersbackpack-forge-1.20.1-9.1.14.jar         |Traveler's Backpack           |travelersbackpack             |9.1.14              |COMMON_SET|Manifest: NOSIGNATURE         mixinextras-forge-0.3.5.jar                       |MixinExtras                   |mixinextras                   |0.3.5               |COMMON_SET|Manifest: NOSIGNATURE         Kambrik-6.1.1+1.20.1-forge.jar                    |Kambrik                       |kambrik                       |6.1.1+1.20.1        |COMMON_SET|Manifest: NOSIGNATURE         simpleplanes-1.20.1-5.2.7.jar                     |Simple Planes                 |simpleplanes                  |1.20.1-5.2.7        |COMMON_SET|Manifest: NOSIGNATURE         takesapillage-1.0.3-1.20.1.jar                    |It Takes A Pillage            |takesapillage                 |1.0.3               |COMMON_SET|Manifest: NOSIGNATURE         balm-forge-1.20.1-7.2.2.jar                       |Balm                          |balm                          |7.2.2               |COMMON_SET|Manifest: NOSIGNATURE         azurelib-neo-1.20.1-2.0.22.jar                    |AzureLib                      |azurelib                      |2.0.22              |COMMON_SET|Manifest: NOSIGNATURE         puzzlesaccessapi-forge-8.0.7.jar                  |Puzzles Access Api            |puzzlesaccessapi              |8.0.7               |COMMON_SET|Manifest: 9a:09:85:98:65:c4:8c:11:c5:49:f6:d6:33:23:39:df:8d:b4:ff:92:84:b8:bd:a5:83:9f:ac:7f:2a:d1:4b:6a         forge-1.20.1-47.2.32-universal.jar                |Forge                         |forge                         |47.2.32             |COMMON_SET|Manifest: 84:ce:76:e8:45:35:e4:0e:63:86:df:47:59:80:0f:67:6c:c1:5f:6e:5f:4d:b3:54:47:1a:9f:7f:ed:5e:f2:90         ctov-forge-3.4.3 (1).jar                          |ChoiceTheorem's Overhauled Vil|ctov                          |3.4.3               |COMMON_SET|Manifest: NOSIGNATURE         twilightforest-1.20.1-4.3.2145-universal.jar      |The Twilight Forest           |twilightforest                |4.3.2145            |COMMON_SET|Manifest: NOSIGNATURE         embeddium-0.3.19+mc1.20.1-all.jar                 |Embeddium                     |embeddium                     |0.3.19+mc1.20.1     |COMMON_SET|Manifest: NOSIGNATURE         ultris-v5.6.9c.jar                                |Ultris: Boss Expansion        |ultris_mr                     |5.6.9c              |COMMON_SET|Manifest: NOSIGNATURE         structure_gel-1.20.1-2.16.2.jar                   |Structure Gel API             |structure_gel                 |2.16.2              |COMMON_SET|Manifest: NOSIGNATURE         DungeonsArise-1.20.x-2.1.58-release.jar           |When Dungeons Arise           |dungeons_arise                |2.1.58-1.20.x       |COMMON_SET|Manifest: NOSIGNATURE         illagersweararmor-1.20.1-1.3.4.jar                |Illagers Wear Armor           |zillagersweararmor            |1.20.1-1.3.4        |COMMON_SET|Manifest: NOSIGNATURE         client-1.20.1-20230612.114412-srg.jar             |Minecraft                     |minecraft                     |1.20.1              |COMMON_SET|Manifest: 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         cofh_core-1.20.1-11.0.2.56.jar                    |CoFH Core                     |cofh_core                     |11.0.2              |COMMON_SET|Manifest: NOSIGNATURE         thermal_core-1.20.1-11.0.4.22.jar                 |Thermal Series                |thermal                       |11.0.4              |COMMON_SET|Manifest: NOSIGNATURE         TerraBlender-forge-1.20.1-3.0.1.7.jar             |TerraBlender                  |terrablender                  |3.0.1.7             |ERROR     |Manifest: NOSIGNATURE         BiomesOPlenty-1.20.1-18.0.0.598.jar               |Biomes O' Plenty              |biomesoplenty                 |18.0.0.598          |COMMON_SET|Manifest: NOSIGNATURE         Botania-1.20.1-444-FORGE.jar                      |Botania                       |botania                       |1.20.1-444-FORGE    |COMMON_SET|Manifest: NOSIGNATURE         Bountiful-6.0.3+1.20.1-forge.jar                  |Bountiful                     |bountiful                     |6.0.3+1.20.1        |COMMON_SET|Manifest: NOSIGNATURE         kffmod-4.10.0.jar                                 |Kotlin For Forge              |kotlinforforge                |4.10.0              |COMMON_SET|Manifest: NOSIGNATURE         notenoughanimations-forge-1.7.3-mc1.20.1.jar      |NotEnoughAnimations           |notenoughanimations           |1.7.3               |COMMON_SET|Manifest: NOSIGNATURE         curios-forge-5.9.1+1.20.1.jar                     |Curios API                    |curios                        |5.9.1+1.20.1        |COMMON_SET|Manifest: NOSIGNATURE         flywheel-forge-1.20.1-0.6.10-7.jar                |Flywheel                      |flywheel                      |0.6.10-7            |COMMON_SET|Manifest: NOSIGNATURE         oculus-flywheel-compat-1.20.1-0.2.5.jar           |Oculus Flywheel Compat        |irisflw                       |1.20.1-0.2.5        |COMMON_SET|Manifest: NOSIGNATURE         create-1.20.1-0.5.1.f.jar                         |Create                        |create                        |0.5.1.f             |COMMON_SET|Manifest: NOSIGNATURE         Patchouli-1.20.1-84-FORGE.jar                     |Patchouli                     |patchouli                     |1.20.1-84-FORGE     |COMMON_SET|Manifest: NOSIGNATURE         oculus-mc1.20.1-1.7.0.jar                         |Oculus                        |oculus                        |1.7.0               |COMMON_SET|Manifest: NOSIGNATURE         gravestone-forge-1.20.1-1.0.15.jar                |Gravestone Mod                |gravestone                    |1.20.1-1.0.15       |COMMON_SET|Manifest: NOSIGNATURE         collective-1.20.1-7.61.jar                        |Collective                    |collective                    |7.61                |COMMON_SET|Manifest: NOSIGNATURE         workers-1.20.1-1.7.8.jar                          |Workers Mod                   |workers                       |1.7.8               |COMMON_SET|Manifest: NOSIGNATURE         storagedrawers-1.20.1-12.0.3.jar                  |Storage Drawers               |storagedrawers                |12.0.3              |COMMON_SET|Manifest: NOSIGNATURE         irons_spellbooks-1.20.1-3.1.6.jar                 |Iron's Spells 'n Spellbooks   |irons_spellbooks              |1.20.1-3.1.6        |COMMON_SET|Manifest: NOSIGNATURE         thermal_foundation-1.20.1-11.0.4.68.jar           |Thermal Foundation            |thermal_foundation            |11.0.4              |COMMON_SET|Manifest: NOSIGNATURE         thermal_expansion-1.20.1-11.0.1.29.jar            |Thermal Expansion             |thermal_expansion             |11.0.1              |COMMON_SET|Manifest: NOSIGNATURE         deeperdarker-forge-1.20.1-1.2.1.jar               |Deeper and Darker             |deeperdarker                  |1.2.1               |COMMON_SET|Manifest: NOSIGNATURE         cfm-forge-1.20.1-7.0.0-pre36.jar                  |MrCrayfish's Furniture Mod    |cfm                           |7.0.0-pre36         |COMMON_SET|Manifest: 0d:78:5f:44:c0:47:0c:8c:e2:63:a3:04:43:d4:12:7d:b0:7c:35:37:dc:40:b1:c1:98:ec:51:eb:3b:3c:45:99         PuzzlesLib-v8.1.20-1.20.1-Forge.jar               |Puzzles Lib                   |puzzleslib                    |8.1.20              |COMMON_SET|Manifest: 9a:09:85:98:65:c4:8c:11:c5:49:f6:d6:33:23:39:df:8d:b4:ff:92:84:b8:bd:a5:83:9f:ac:7f:2a:d1:4b:6a         EnchantingInfuser-v8.0.2-1.20.1-Forge.jar         |Enchanting Infuser            |enchantinginfuser             |8.0.2               |COMMON_SET|Manifest: 9a:09:85:98:65:c4:8c:11:c5:49:f6:d6:33:23:39:df:8d:b4:ff:92:84:b8:bd:a5:83:9f:ac:7f:2a:d1:4b:6a         better_minecraft-1.14-forge-1.20.1.jar            |BetterMinecraft (Wearpon Mod) |better_minecraft              |1.14                |COMMON_SET|Manifest: NOSIGNATURE         aquamirae-6.API15.jar                             |Aquamirae                     |aquamirae                     |6.API15             |COMMON_SET|Manifest: NOSIGNATURE     Crash Report UUID: 4b90cf59-7993-4021-b47c-faba5a153a02     FML: 47.2     Forge: net.minecraftforge:47.2.32     Flywheel Backend: GL33 Instanced Arrays       Don't know how to fix it (i'm not good witht that) if someone can help me ?  
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.