Jump to content

What the problem kind of weird


MstDominik

Recommended Posts

[00:27:78] [main/INFO]: ModLauncher running: args [--username, MstDominik, --version, Forge 1.19, --gameDir, C:\Users\kulya\AppData\Roaming\.minecraft, --assetsDir, C:\Users\kulya\AppData\Roaming\.minecraft\assets, --assetIndex, 1.19, --uuid, e004b4fe-7aea-11ec-9a38-f02f74958c02, --accessToken, вќ„вќ„вќ„вќ„вќ„вќ„вќ„вќ„, --clientId, ${clientid}, --xuid, ${auth_xuid}, --userType, mojang, --versionType, modified, --width, 925, --height, 530, --launchTarget, forgeclient, --fml.forgeVersion, 41.1.0, --fml.mcVersion, 1.19, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220607.102129]
[00:27:79] [main/INFO]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.3 by Microsoft; OS Windows 10 arch amd64 version 10.0
[00:27:98] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/C:/Users/kulya/AppData/Roaming/.minecraft/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2390!/ Service=ModLauncher Env=CLIENT
[00:27:31] [main/INFO]: Found mod file AmbientSounds_FORGE_v5.2.1_mc1.19.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:31] [main/INFO]: Found mod file Architectury-Forge-1.19-v5.12.42.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:31] [main/INFO]: Found mod file autoreglib-1.8-54.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:31] [main/INFO]: Found mod file balm-4.5.1-1.19.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file betterfpsdist-1.19.1-1.6.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file Blueprint-1.19-6.0.6.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file Bookshelf-Forge-1.19-14.2.10.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file citadel-1.12.7-1.19.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file ClothConfig-Forge-1.19-v7.0.74.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file Clumps-forge-1.19.1-9.0.0-10.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file CodeChickenLib.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file collective-1.19.0-4.30.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file CreativeCore_FORGE_v2.7.4_mc1.19.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file deuf-1.19-1.3.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file geckolib-forge-1.19-3.1.17.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file iceberg-1.19-1.0.46.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file krypton-0.2.0-1.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file Mod(МОБЫ=производительность).jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file Mod(Не вижу моба +ФПС).jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file Mod(Оптимизация запуска).jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file Mod(Плавный запуск игры).jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file Mod(РЎРІРѕСЏ РїСЂРѕСЂРёСЃРѕРІРєР°).jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file Mod(Технический(Колония)).jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file Mod(Фурнитура модерн).jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file Mod(Фурнитуры 7 из 10).jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file Mod(Фэнтези фурнитура).jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file Mod(Ядро лифта+).jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file Mod(Ядро техническая библиотека(Лифта)).jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file Mod(РЇРґСЂРѕ техническое  фэнтези фурнитура).jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file Nekoration.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file Not-Enough-Crashes-4.1.8-1.19.1-Forge.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file Patchouli-1.19-75.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file polylib-forge-1900.0.2-build.19.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file prism-1.19.1-1.0.1.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file puzzleslib-v4.0.18-1.19-forge.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file radium-0.8.1a.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file Radon-mc1.19-0.8.2.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file Rubidium-mc1.19.2-0.6.1.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file sophisticatedcore-1.19-0.4.10.87.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file tl_skin_cape_forge_1.19_1.19.2-1.27.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file Upgrade Core.jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:32] [main/INFO]: Found mod file РАСЫ(Каелус).jar of type MOD with provider {mods folder locator at C:\Users\kulya\AppData\Roaming\.minecraft\mods}
[00:27:45] [main/WARN]: Mod file C:\Users\kulya\AppData\Roaming\.minecraft\libraries\net\minecraftforge\fmlcore\1.19-41.1.0\fmlcore-1.19-41.1.0.jar is missing mods.toml file
[00:27:45] [main/WARN]: Mod file C:\Users\kulya\AppData\Roaming\.minecraft\libraries\net\minecraftforge\javafmllanguage\1.19-41.1.0\javafmllanguage-1.19-41.1.0.jar is missing mods.toml file
[00:27:46] [main/WARN]: Mod file C:\Users\kulya\AppData\Roaming\.minecraft\libraries\net\minecraftforge\lowcodelanguage\1.19-41.1.0\lowcodelanguage-1.19-41.1.0.jar is missing mods.toml file
[00:27:46] [main/WARN]: Mod file C:\Users\kulya\AppData\Roaming\.minecraft\libraries\net\minecraftforge\mclanguage\1.19-41.1.0\mclanguage-1.19-41.1.0.jar is missing mods.toml file
[00:27:48] [main/INFO]: Found mod file fmlcore-1.19-41.1.0.jar of type LIBRARY with provider net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@4f449e8f
[00:27:48] [main/INFO]: Found mod file javafmllanguage-1.19-41.1.0.jar of type LANGPROVIDER with provider net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@4f449e8f
[00:27:48] [main/INFO]: Found mod file lowcodelanguage-1.19-41.1.0.jar of type LANGPROVIDER with provider net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@4f449e8f
[00:27:48] [main/INFO]: Found mod file mclanguage-1.19-41.1.0.jar of type LANGPROVIDER with provider net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@4f449e8f
[00:27:48] [main/INFO]: Found mod file client-1.19-20220607.102129-srg.jar of type MOD with provider net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@4f449e8f
[00:27:48] [main/INFO]: Found mod file forge-1.19-41.1.0-universal.jar of type MOD with provider net.minecraftforge.fml.loading.moddiscovery.MinecraftLocator@4f449e8f
[00:27:60] [main/WARN]: Attempted to select a dependency jar for JarJar which was passed in as source: apexcore. Using Mod File: C:\Users\kulya\AppData\Roaming\.minecraft\mods\Mod(РЇРґСЂРѕ техническое  фэнтези фурнитура).jar
[00:27:60] [main/INFO]: Found 2 dependencies adding them to mods collection
[00:27:60] [main/INFO]: Found mod file commonality-1.19-2.3.0.jar of type MOD with provider net.minecraftforge.fml.loading.moddiscovery.JarInJarDependencyLocator@3104351d
[00:27:60] [main/INFO]: Found mod file Registrate-MC1.19-1.1.5.jar of type GAMELIBRARY with provider net.minecraftforge.fml.loading.moddiscovery.JarInJarDependencyLocator@3104351d
[00:27:68] [main/ERROR]: Missing mandatory dependencies: cfm
[00:27:99] [main/INFO]: Compatibility level set to JAVA_17
[00:27:99] [main/ERROR]: Mixin config radon.mixins.json does not specify "minVersion" property
[00:27:99] [main/ERROR]: Mixin config radium.mixins.json does not specify "minVersion" property
[00:27:01] [main/ERROR]: Mixin config rubidium.mixins.json does not specify "minVersion" property
[00:27:04] [main/ERROR]: Mixin config polylib.mixins.json does not specify "minVersion" property
[00:27:29] [main/INFO]: Successfully loaded Mixin Connector [org.tlauncher.MixinConnector]
[00:27:29] [main/INFO]: Launching target 'forgeclient' with arguments [--version, Forge 1.19, --gameDir, C:\Users\kulya\AppData\Roaming\.minecraft, --assetsDir, C:\Users\kulya\AppData\Roaming\.minecraft\assets, --uuid, e004b4fe-7aea-11ec-9a38-f02f74958c02, --username, MstDominik, --assetIndex, 1.19, --accessToken, вќ„вќ„вќ„вќ„вќ„вќ„вќ„вќ„, --clientId, ${clientid}, --xuid, ${auth_xuid}, --userType, mojang, --versionType, modified, --width, 925, --height, 530]
[00:27:32] [main/ERROR]: Option entity.collisions.fluid for dependency 'entity.collisions.fluid depends on chunk=true' not found. Skipping.
[00:27:32] [main/ERROR]: Option entity.collisions.fluid for dependency 'entity.collisions.fluid depends on chunk.block_counting=true' not found. Skipping.
[00:27:32] [main/INFO]: Loaded configuration file for Radium: 93 options available, 0 override(s) found
[00:27:35] [main/INFO]: Loaded configuration file for Rubidium: 29 options available, 0 override(s) found
[00:27:29] [main/INFO]: Smooth Boot (Reloaded) config initialized
[00:27:33] [main/INFO]: Mixing TextColorMixin from iceberg.mixins.json into net.minecraft.network.chat.TextColor
[00:27:03] [main/INFO]: Mixing MinecraftMixin from iceberg.mixins.json into net.minecraft.client.Minecraft
[00:27:17] [main/INFO]: Mixing ScreenMixin from iceberg.mixins.json into net.minecraft.client.gui.screens.Screen
[00:27:38] [main/WARN]: @Inject(@At("HEAD")) Shift.BY=1 on blueprint.mixins.json:EntityMixin::handler$zlp000$baseTick exceeds the maximum allowed value: 0. Increase the value of maxShiftBy to suppress this warning.
Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:32)
    at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53)
    at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71)
    at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:106)
    at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:77)
    at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
    at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
    at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141)
Caused by: java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:568)
    at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:27)
    at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30)
    ... 7 more
Caused by: java.lang.RuntimeException: java.lang.IllegalAccessError: class me.jellysquid.mods.lithium.common.shapes.VoxelShapeSimpleCube tried to access method 'void net.minecraft.world.phys.shapes.VoxelShape.<init>(net.minecraft.world.phys.shapes.DiscreteVoxelShape)' (me.jellysquid.mods.lithium.common.shapes.VoxelShapeSimpleCube is in module [email protected] of loader 'TRANSFORMER' @47e51549; net.minecraft.world.phys.shapes.VoxelShape is in module [email protected] of loader 'TRANSFORMER' @47e51549)
    at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.BackgroundWaiter.runAndTick(BackgroundWaiter.java:29)
    at TRANSFORMER/[email protected]/net.minecraft.client.main.Main.main(Main.java:139)
    ... 13 more
Caused by: java.lang.IllegalAccessError: class me.jellysquid.mods.lithium.common.shapes.VoxelShapeSimpleCube tried to access method 'void net.minecraft.world.phys.shapes.VoxelShape.<init>(net.minecraft.world.phys.shapes.DiscreteVoxelShape)' (me.jellysquid.mods.lithium.common.shapes.VoxelShapeSimpleCube is in module [email protected] of loader 'TRANSFORMER' @47e51549; net.minecraft.world.phys.shapes.VoxelShape is in module [email protected] of loader 'TRANSFORMER' @47e51549)
    at TRANSFORMER/[email protected]/me.jellysquid.mods.lithium.common.shapes.VoxelShapeSimpleCube.<init>(VoxelShapeSimpleCube.java:31)
    at TRANSFORMER/[email protected]/net.minecraft.world.phys.shapes.Shapes.m_166049_(Shapes.java:1601)
    at TRANSFORMER/[email protected]/net.minecraft.world.phys.shapes.Shapes.m_83048_(Shapes.java:50)
    at TRANSFORMER/[email protected]/net.minecraft.world.phys.shapes.Shapes.<clinit>(Shapes.java:26)
    at TRANSFORMER/[email protected]/net.minecraft.world.level.block.Block.m_49796_(Block.java:140)
    at TRANSFORMER/[email protected]/net.minecraft.world.level.block.SaplingBlock.<clinit>(SaplingBlock.java:20)
    at TRANSFORMER/[email protected]/net.minecraft.world.level.block.Blocks.<clinit>(Blocks.java:59)
    at TRANSFORMER/[email protected]/net.minecraft.world.level.levelgen.carver.CarverDebugSettings.<clinit>(CarverDebugSettings.java:9)
    at TRANSFORMER/[email protected]/net.minecraft.world.level.levelgen.carver.CarverConfiguration.m_224838_(CarverConfiguration.java:20)
    at MC-BOOTSTRAP/[email protected]/com.mojang.serialization.codecs.RecordCodecBuilder.mapCodec(RecordCodecBuilder.java:76)
    at TRANSFORMER/[email protected]/net.minecraft.world.level.levelgen.carver.CarverConfiguration.<clinit>(CarverConfiguration.java:16)
    at TRANSFORMER/[email protected]/net.minecraft.world.level.levelgen.carver.WorldCarver.<clinit>(WorldCarver.java:32)
    at TRANSFORMER/[email protected]/net.minecraft.data.worldgen.Carvers.<clinit>(Carvers.java:21)
    at TRANSFORMER/[email protected]/net.minecraft.data.BuiltinRegistries.m_236012_(BuiltinRegistries.java:53)
    at TRANSFORMER/[email protected]/net.minecraft.data.BuiltinRegistries.m_236009_(BuiltinRegistries.java:87)
    at TRANSFORMER/[email protected]/net.minecraft.data.BuiltinRegistries.m_236004_(BuiltinRegistries.java:114)
    at java.base/java.util.LinkedHashMap.forEach(LinkedHashMap.java:721)
    at TRANSFORMER/[email protected]/net.minecraft.data.BuiltinRegistries.<clinit>(BuiltinRegistries.java:113)
    at TRANSFORMER/[email protected]/net.minecraft.core.Registry.<clinit>(Registry.java:665)
    at TRANSFORMER/[email protected]/net.minecraft.server.Bootstrap.m_135870_(Bootstrap.java:43)
    at TRANSFORMER/[email protected]/net.minecraft.client.main.Main.lambda$main$0(Main.java:139)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)
Here I am!
[VersionManager] Refreshing versions locally...
[VersionManager] Versions has been refreshed (8 ms)
[Launcher] Launcher exited.
[Launcher] Minecraft closed with exit code: 1
flush now
flush now

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

    • I am creating a mod that adds new armor sets and changes how armor sets are crafted. When the player interacts with the block it fails to open the gui, but I get no error or stacktrace. All of my registration classes are being called correctly. LightArmorBenchScreen's constructor, render, and renderbg methods are not being called at all. Here is the code: package net.leeveygames.celestial.blocks.custom; import net.leeveygames.celestial.Celestial; import net.leeveygames.celestial.blocks.entity.CelestialBlockEntities; import net.leeveygames.celestial.blocks.entity.LightArmorBenchBlockEntity; import net.minecraft.core.BlockPos; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.BaseEntityBlock; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.RenderShape; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityTicker; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraftforge.network.NetworkHooks; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; public class LightArmorBenchBlock extends BaseEntityBlock { public static final VoxelShape SHAPE = Block.box(0, 0, 0, 16, 12, 16); public LightArmorBenchBlock(Properties pProperties) { super(pProperties); } @Override public VoxelShape getShape(BlockState pState, BlockGetter pLevel, BlockPos pPos, CollisionContext pContext) { return SHAPE; } @Override public RenderShape getRenderShape(BlockState pState) { return RenderShape.MODEL; } @Override public void onRemove(BlockState pState, Level pLevel, BlockPos pPos, BlockState pNewState, boolean pIsMoving) { if (pState.getBlock() != pNewState.getBlock()) { BlockEntity blockEntity = pLevel.getBlockEntity(pPos); if (blockEntity instanceof LightArmorBenchBlockEntity) { ((LightArmorBenchBlockEntity) blockEntity).drops(); } } super.onRemove(pState, pLevel, pPos, pNewState, pIsMoving); } @NotNull @Override public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHit) { if(pLevel.isClientSide()) return InteractionResult.SUCCESS; BlockEntity be = pLevel.getBlockEntity(pPos); if (be instanceof LightArmorBenchBlockEntity blockEntity) { ServerPlayer player = (ServerPlayer)pPlayer; Celestial.LOGGER.info("Opening Screen."); NetworkHooks.openScreen(player, blockEntity, pPos); } return InteractionResult.CONSUME; } @Nullable @Override public BlockEntity newBlockEntity(BlockPos pPos, BlockState pState) { return new LightArmorBenchBlockEntity(pPos, pState); } @Nullable @Override public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level pLevel, BlockState pState, BlockEntityType<T> pBlockEntityType) { if(pLevel.isClientSide()) { return null; } return createTickerHelper(pBlockEntityType, CelestialBlockEntities.LIGHT_ARMOR_BENCH_BLOCK_ENTITY.get(), (pLevel1, pPos, pState1, pBlockEntity) -> pBlockEntity.tick(pLevel1, pPos, pState1)); } }   package net.leeveygames.celestial.screen; import net.leeveygames.celestial.Celestial; import net.leeveygames.celestial.blocks.CelestialBlocks; import net.leeveygames.celestial.blocks.entity.LightArmorBenchBlockEntity; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.*; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraftforge.common.capabilities.ForgeCapabilities; import net.minecraftforge.items.SlotItemHandler; public class LightArmorBenchMenu extends AbstractContainerMenu { public final LightArmorBenchBlockEntity blockEntity; private final Level level; public LightArmorBenchMenu(int pContainerId, Inventory inv, FriendlyByteBuf extraData) { this(pContainerId, inv, inv.player.level().getBlockEntity(extraData.readBlockPos())); Celestial.LOGGER.info("Creating Light Armor Bench Menu. Client"); } public LightArmorBenchMenu(int pContainerId, Inventory inv, BlockEntity entity) { super(CelestialMenuTypes.LIGHT_ARMOR_BENCH_MENU.get(), pContainerId); Celestial.LOGGER.info("Creating Light Armor Bench Menu. Server"); checkContainerSize(inv, 2); blockEntity = ((LightArmorBenchBlockEntity) entity); this.level = inv.player.level(); addPlayerInventory(inv); addPlayerHotbar(inv); createLightArmorBenchSlots(blockEntity); } private void createLightArmorBenchSlots(LightArmorBenchBlockEntity blockEntity) { Celestial.LOGGER.info("Creating Light Armor Bench Slots."); this.blockEntity.getCapability(ForgeCapabilities.ITEM_HANDLER).ifPresent(iItemHandler -> { this.addSlot(new SlotItemHandler(iItemHandler, 0, 11, 15)); this.addSlot(new SlotItemHandler(iItemHandler, 1, 82, 33)); this.addSlot(new SlotItemHandler(iItemHandler, 2, 133, 33)); }); } // CREDIT GOES TO: diesieben07 | https://github.com/diesieben07/SevenCommons // must assign a slot number to each of the slots used by the GUI. // For this container, we can see both the tile inventory's slots as well as the player inventory slots and the hotbar. // Each time we add a Slot to the container, it automatically increases the slotIndex, which means // 0 - 8 = hotbar slots (which will map to the InventoryPlayer slot numbers 0 - 8) // 9 - 35 = player inventory slots (which map to the InventoryPlayer slot numbers 9 - 35) // 36 - 44 = TileInventory slots, which map to our TileEntity slot numbers 0 - 8) private static final int HOTBAR_SLOT_COUNT = 9; private static final int PLAYER_INVENTORY_ROW_COUNT = 3; private static final int PLAYER_INVENTORY_COLUMN_COUNT = 9; private static final int PLAYER_INVENTORY_SLOT_COUNT = PLAYER_INVENTORY_COLUMN_COUNT * PLAYER_INVENTORY_ROW_COUNT; private static final int VANILLA_SLOT_COUNT = HOTBAR_SLOT_COUNT + PLAYER_INVENTORY_SLOT_COUNT; private static final int VANILLA_FIRST_SLOT_INDEX = 0; private static final int TE_INVENTORY_FIRST_SLOT_INDEX = VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT; // THIS YOU HAVE TO DEFINE! private static final int TE_INVENTORY_SLOT_COUNT = 2; // must be the number of slots you have! @Override public ItemStack quickMoveStack(Player playerIn, int pIndex) { Slot sourceSlot = slots.get(pIndex); if (sourceSlot == null || !sourceSlot.hasItem()) return ItemStack.EMPTY; //EMPTY_ITEM ItemStack sourceStack = sourceSlot.getItem(); ItemStack copyOfSourceStack = sourceStack.copy(); // Check if the slot clicked is one of the vanilla container slots if (pIndex < VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT) { // This is a vanilla container slot so merge the stack into the tile inventory if (!moveItemStackTo(sourceStack, TE_INVENTORY_FIRST_SLOT_INDEX, TE_INVENTORY_FIRST_SLOT_INDEX + TE_INVENTORY_SLOT_COUNT, false)) { return ItemStack.EMPTY; // EMPTY_ITEM } } else if (pIndex < TE_INVENTORY_FIRST_SLOT_INDEX + TE_INVENTORY_SLOT_COUNT) { // This is a TE slot so merge the stack into the players inventory if (!moveItemStackTo(sourceStack, VANILLA_FIRST_SLOT_INDEX, VANILLA_FIRST_SLOT_INDEX + VANILLA_SLOT_COUNT, false)) { return ItemStack.EMPTY; } } else { System.out.println("Invalid slotIndex:" + pIndex); return ItemStack.EMPTY; } // If stack size == 0 (the entire stack was moved) set slot contents to null if (sourceStack.getCount() == 0) { sourceSlot.set(ItemStack.EMPTY); } else { sourceSlot.setChanged(); } sourceSlot.onTake(playerIn, sourceStack); return copyOfSourceStack; } @Override public boolean stillValid(Player pPlayer) { return stillValid(ContainerLevelAccess.create(level, blockEntity.getBlockPos()), pPlayer, CelestialBlocks.LIGHT_ARMOR_BENCH.get()); } private void addPlayerInventory(Inventory playerInventory) { Celestial.LOGGER.info("Creating Player Inventory."); for (int i = 0; i < 3; ++i) { for (int l = 0; l < 9; ++l) { this.addSlot(new Slot(playerInventory, l + i * 9 + 9, 8 + l * 18, 84 + i * 18)); } } } private void addPlayerHotbar(Inventory playerInventory) { Celestial.LOGGER.info("Creating Player Hotbar."); for (int i = 0; i < 9; ++i) { this.addSlot(new Slot(playerInventory, i, 8 + i * 18, 142)); } } }   package net.leeveygames.celestial.screen; import com.mojang.blaze3d.systems.RenderSystem; import net.leeveygames.celestial.Celestial; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; import net.minecraft.client.renderer.GameRenderer; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; public class LightArmorBenchScreen extends AbstractContainerScreen<LightArmorBenchMenu> { private static final ResourceLocation TEXTURE = new ResourceLocation(Celestial.MOD_ID, "textures/gui/LightArmorBenchGUI.png"); public LightArmorBenchScreen(LightArmorBenchMenu pMenu, Inventory pPlayerInventory, Component pTitle) { super(pMenu, pPlayerInventory, pTitle); Celestial.LOGGER.info("Creating Light Armor Bench Screen."); this.imageWidth = 176; this.imageHeight = 166; } @Override protected void init() { Celestial.LOGGER.info("Screen init."); super.init(); } @Override protected void renderBg(GuiGraphics guiGraphics, float pPartialTick, int pMouseX, int pMouseY) { Celestial.LOGGER.info("Render Background Method."); RenderSystem.setShader(GameRenderer::getPositionTexShader); RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); RenderSystem.setShaderTexture(0, TEXTURE); guiGraphics.blit(TEXTURE, this.leftPos, this.topPos, 0, 0, this.imageWidth, this.imageHeight); } @Override public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float delta) { Celestial.LOGGER.info("Render Method."); renderBackground(guiGraphics); super.render(guiGraphics, mouseX, mouseY, delta); renderTooltip(guiGraphics, mouseX, mouseY); } }   package net.leeveygames.celestial.blocks.entity; import net.leeveygames.celestial.screen.LightArmorBenchMenu; import net.minecraft.client.gui.screens.inventory.FurnaceScreen; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; import net.minecraft.world.Container; import net.minecraft.world.Containers; import net.minecraft.world.MenuProvider; import net.minecraft.world.SimpleContainer; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.inventory.ContainerData; import net.minecraft.world.inventory.FurnaceMenu; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.capabilities.ForgeCapabilities; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.ItemStackHandler; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; public class LightArmorBenchBlockEntity extends BlockEntity implements MenuProvider { private final ItemStackHandler itemHandler = new ItemStackHandler(3) { @Override protected void onContentsChanged(int slot) { super.onContentsChanged(slot); LightArmorBenchBlockEntity.this.setChanged(); } }; private static final int INPUT_SLOT = 0; private static final int OUTPUT_SLOT = 1; private LazyOptional<IItemHandler> lazyItemHandler = LazyOptional.empty(); public LightArmorBenchBlockEntity(BlockPos pPos, BlockState pBlockState) { super(CelestialBlockEntities.LIGHT_ARMOR_BENCH_BLOCK_ENTITY.get(), pPos, pBlockState); } @Override public @NotNull <T> LazyOptional<T> getCapability(@NotNull Capability<T> cap, @Nullable Direction side) { if(cap == ForgeCapabilities.ITEM_HANDLER) { return lazyItemHandler.cast(); } return super.getCapability(cap, side); } @Override public void onLoad() { super.onLoad(); lazyItemHandler = LazyOptional.of(() -> itemHandler); } @Override public void invalidateCaps() { super.invalidateCaps(); lazyItemHandler.invalidate(); } public void drops() { SimpleContainer inventory = new SimpleContainer(itemHandler.getSlots()); for(int i = 0; i < itemHandler.getSlots(); i++) { inventory.setItem(i, itemHandler.getStackInSlot(i)); } Containers.dropContents(this.level, this.worldPosition, inventory); } @Override public Component getDisplayName() { return Component.translatable("block.celestial.light_armor_bench"); } @Nullable @Override public AbstractContainerMenu createMenu(int pContainerId, Inventory pPlayerInventory, Player pPlayer) { return new LightArmorBenchMenu(pContainerId, pPlayerInventory, this); } @Override protected void saveAdditional(CompoundTag pTag) { pTag.put("inventory", itemHandler.serializeNBT()); super.saveAdditional(pTag); } @Override public void load(CompoundTag pTag) { super.load(pTag); itemHandler.deserializeNBT(pTag.getCompound("inventory")); } public void tick(Level pLevel, BlockPos pPos, BlockState pState) { } }   Here is the console output: https://pastebin.com/krgExnYT
  • Topics

×
×
  • Create New...

Important Information

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