Jump to content

failed to run processor: java.net.ConectionException;Connection timed out:connect (error de instalación de forge)


manuando

Recommended Posts

Me intente instalar el forge 1.19.2 y me salio este error, si alguien sabe como arreglarlo que me lo diga por favor

aqui teneis el registro

JVM info: Oracle Corporation - 1.8.0_361 - 25.361-b09
java.net.preferIPv4Stack=true
Found java version 1.8.0_361
Extracting json
Considering minecraft client jar
Downloading libraries
Found 0 additional library directories
Considering library cpw.mods:securejarhandler:2.1.4
  File exists: Checksum validated.
Considering library org.ow2.asm:asm:9.3
  File exists: Checksum validated.
Considering library org.ow2.asm:asm-commons:9.3
  File exists: Checksum validated.
Considering library org.ow2.asm:asm-tree:9.3
  File exists: Checksum validated.
Considering library org.ow2.asm:asm-util:9.3
  File exists: Checksum validated.
Considering library org.ow2.asm:asm-analysis:9.3
  File exists: Checksum validated.
Considering library net.minecraftforge:accesstransformers:8.0.4
  File exists: Checksum validated.
Considering library org.antlr:antlr4-runtime:4.9.1
  File exists: Checksum validated.
Considering library net.minecraftforge:eventbus:6.0.3
  File exists: Checksum validated.
Considering library net.minecraftforge:forgespi:6.0.0
  File exists: Checksum validated.
Considering library net.minecraftforge:coremods:5.0.1
  File exists: Checksum validated.
Considering library cpw.mods:modlauncher:10.0.8
  File exists: Checksum validated.
Considering library net.minecraftforge:unsafe:0.2.0
  File exists: Checksum validated.
Considering library com.electronwill.night-config:core:3.6.4
  File exists: Checksum validated.
Considering library com.electronwill.night-config:toml:3.6.4
  File exists: Checksum validated.
Considering library org.apache.maven:maven-artifact:3.8.5
  File exists: Checksum validated.
Considering library net.jodah:typetools:0.8.3
  File exists: Checksum validated.
Considering library net.minecrell:terminalconsoleappender:1.2.0
  File exists: Checksum validated.
Considering library org.jline:jline-reader:3.12.1
  File exists: Checksum validated.
Considering library org.jline:jline-terminal:3.12.1
  File exists: Checksum validated.
Considering library org.spongepowered:mixin:0.8.5
  File exists: Checksum validated.
Considering library org.openjdk.nashorn:nashorn-core:15.3
  File exists: Checksum validated.
Considering library net.minecraftforge:JarJarSelector:0.3.16
  File exists: Checksum validated.
Considering library net.minecraftforge:JarJarMetadata:0.3.16
  File exists: Checksum validated.
Considering library cpw.mods:bootstraplauncher:1.1.2
  File exists: Checksum validated.
Considering library net.minecraftforge:JarJarFileSystems:0.3.16
  File exists: Checksum validated.
Considering library net.minecraftforge:fmlloader:1.19.2-43.2.0
  File exists: Checksum validated.
Considering library com.github.jponge:lzma-java:1.3
  File exists: Checksum validated.
Considering library com.google.code.findbugs:jsr305:3.0.2
  File exists: Checksum validated.
Considering library com.google.code.gson:gson:2.8.7
  File exists: Checksum validated.
Considering library com.google.errorprone:error_prone_annotations:2.1.3
  File exists: Checksum validated.
Considering library com.google.guava:guava:20.0
  File exists: Checksum validated.
Considering library com.google.guava:guava:25.1-jre
  File exists: Checksum validated.
Considering library com.google.j2objc:j2objc-annotations:1.1
  File exists: Checksum validated.
Considering library com.nothome:javaxdelta:2.0.1
  File exists: Checksum validated.
Considering library com.opencsv:opencsv:4.4
  File exists: Checksum validated.
Considering library commons-beanutils:commons-beanutils:1.9.3
  File exists: Checksum validated.
Considering library commons-collections:commons-collections:3.2.2
  File exists: Checksum validated.
Considering library commons-io:commons-io:2.4
  File exists: Checksum validated.
Considering library commons-logging:commons-logging:1.2
  File exists: Checksum validated.
Considering library de.oceanlabs.mcp:mcp_config:1.19.2-20220805.130853@zip
  File exists: Checksum validated.
Considering library de.siegmar:fastcsv:2.0.0
  File exists: Checksum validated.
Considering library net.md-5:SpecialSource:1.11.0
  File exists: Checksum validated.
Considering library net.minecraftforge:ForgeAutoRenamingTool:0.1.22:all
  File exists: Checksum validated.
Considering library net.minecraftforge:binarypatcher:1.1.1
  File exists: Checksum validated.
Considering library net.minecraftforge:fmlcore:1.19.2-43.2.0
  File exists: Checksum validated.
Considering library net.minecraftforge:fmlloader:1.19.2-43.2.0
  File exists: Checksum validated.
Considering library net.minecraftforge:forge:1.19.2-43.2.0:universal
  File exists: Checksum validated.
Considering library net.minecraftforge:installertools:1.3.0
  File exists: Checksum validated.
Considering library net.minecraftforge:jarsplitter:1.1.4
  File exists: Checksum validated.
Considering library net.minecraftforge:javafmllanguage:1.19.2-43.2.0
  File exists: Checksum validated.
Considering library net.minecraftforge:lowcodelanguage:1.19.2-43.2.0
  File exists: Checksum validated.
Considering library net.minecraftforge:mclanguage:1.19.2-43.2.0
  File exists: Checksum validated.
Considering library net.minecraftforge:srgutils:0.4.11
  File exists: Checksum validated.
Considering library net.minecraftforge:srgutils:0.4.3
  File exists: Checksum validated.
Considering library net.minecraftforge:srgutils:0.4.9
  File exists: Checksum validated.
Considering library net.sf.jopt-simple:jopt-simple:5.0.4
  File exists: Checksum validated.
Considering library net.sf.jopt-simple:jopt-simple:6.0-alpha-3
  File exists: Checksum validated.
Considering library org.apache.commons:commons-collections4:4.2
  File exists: Checksum validated.
Considering library org.apache.commons:commons-lang3:3.8.1
  File exists: Checksum validated.
Considering library org.apache.commons:commons-text:1.3
  File exists: Checksum validated.
Considering library org.checkerframework:checker-qual:2.0.0
  File exists: Checksum validated.
Considering library org.codehaus.mojo:animal-sniffer-annotations:1.14
  File exists: Checksum validated.
Considering library org.ow2.asm:asm-analysis:9.2
  File exists: Checksum validated.
Considering library org.ow2.asm:asm-analysis:9.3
  File exists: Checksum validated.
Considering library org.ow2.asm:asm-commons:9.2
  File exists: Checksum validated.
Considering library org.ow2.asm:asm-commons:9.3
  File exists: Checksum validated.
Considering library org.ow2.asm:asm-tree:9.2
  File exists: Checksum validated.
Considering library org.ow2.asm:asm-tree:9.3
  File exists: Checksum validated.
Considering library org.ow2.asm:asm:9.2
  File exists: Checksum validated.
Considering library org.ow2.asm:asm:9.3
  File exists: Checksum validated.
Considering library trove:trove:1.0.2
  File exists: Checksum validated.
Created Temporary Directory: C:\Users\Usuario\AppData\Local\Temp\forge_installer4280935078379445274
  Extracting: /data/client.lzma
Building Processors
===============================================================================
  MainClass: net.minecraftforge.installertools.ConsoleTool
  Classpath:
    F:\Usuario\AppData\Roaming\.minecraft\libraries\net\minecraftforge\installertools\1.3.0\installertools-1.3.0.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\net\md-5\SpecialSource\1.11.0\SpecialSource-1.11.0.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\net\sf\jopt-simple\jopt-simple\5.0.4\jopt-simple-5.0.4.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\com\google\code\gson\gson\2.8.7\gson-2.8.7.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\de\siegmar\fastcsv\2.0.0\fastcsv-2.0.0.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\net\minecraftforge\srgutils\0.4.11\srgutils-0.4.11.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\org\ow2\asm\asm-commons\9.3\asm-commons-9.3.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\com\google\guava\guava\20.0\guava-20.0.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\com\opencsv\opencsv\4.4\opencsv-4.4.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\org\ow2\asm\asm-analysis\9.3\asm-analysis-9.3.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\org\ow2\asm\asm-tree\9.3\asm-tree-9.3.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\org\ow2\asm\asm\9.3\asm-9.3.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\org\apache\commons\commons-text\1.3\commons-text-1.3.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\org\apache\commons\commons-lang3\3.8.1\commons-lang3-3.8.1.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\commons-beanutils\commons-beanutils\1.9.3\commons-beanutils-1.9.3.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\org\apache\commons\commons-collections4\4.2\commons-collections4-4.2.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\commons-logging\commons-logging\1.2\commons-logging-1.2.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar
  Args: --task, MCP_DATA, --input, F:\Usuario\AppData\Roaming\.minecraft\libraries\de\oceanlabs\mcp\mcp_config\1.19.2-20220805.130853\mcp_config-1.19.2-20220805.130853.zip, --output, F:\Usuario\AppData\Roaming\.minecraft\libraries\de\oceanlabs\mcp\mcp_config\1.19.2-20220805.130853\mcp_config-1.19.2-20220805.130853-mappings.txt, --key, mappings
Task: MCP_DATA
Input:  F:\Usuario\AppData\Roaming\.minecraft\libraries\de\oceanlabs\mcp\mcp_config\1.19.2-20220805.130853\mcp_config-1.19.2-20220805.130853.zip
Output: F:\Usuario\AppData\Roaming\.minecraft\libraries\de\oceanlabs\mcp\mcp_config\1.19.2-20220805.130853\mcp_config-1.19.2-20220805.130853-mappings.txt
Key:    mappings
Extracting: config/joined.tsrg
===============================================================================
  MainClass: net.minecraftforge.installertools.ConsoleTool
  Classpath:
    F:\Usuario\AppData\Roaming\.minecraft\libraries\net\minecraftforge\installertools\1.3.0\installertools-1.3.0.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\net\md-5\SpecialSource\1.11.0\SpecialSource-1.11.0.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\net\sf\jopt-simple\jopt-simple\5.0.4\jopt-simple-5.0.4.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\com\google\code\gson\gson\2.8.7\gson-2.8.7.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\de\siegmar\fastcsv\2.0.0\fastcsv-2.0.0.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\net\minecraftforge\srgutils\0.4.11\srgutils-0.4.11.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\org\ow2\asm\asm-commons\9.3\asm-commons-9.3.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\com\google\guava\guava\20.0\guava-20.0.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\com\opencsv\opencsv\4.4\opencsv-4.4.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\org\ow2\asm\asm-analysis\9.3\asm-analysis-9.3.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\org\ow2\asm\asm-tree\9.3\asm-tree-9.3.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\org\ow2\asm\asm\9.3\asm-9.3.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\org\apache\commons\commons-text\1.3\commons-text-1.3.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\org\apache\commons\commons-lang3\3.8.1\commons-lang3-3.8.1.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\commons-beanutils\commons-beanutils\1.9.3\commons-beanutils-1.9.3.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\org\apache\commons\commons-collections4\4.2\commons-collections4-4.2.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\commons-logging\commons-logging\1.2\commons-logging-1.2.jar
    F:\Usuario\AppData\Roaming\.minecraft\libraries\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar
  Args: --task, DOWNLOAD_MOJMAPS, --version, 1.19.2, --side, client, --output, F:\Usuario\AppData\Roaming\.minecraft\libraries\net\minecraft\client\1.19.2-20220805.130853\client-1.19.2-20220805.130853-mappings.txt
Task: DOWNLOAD_MOJMAPS
MC Version: 1.19.2
Side:       client
Output:     F:\Usuario\AppData\Roaming\.minecraft\libraries\net\minecraft\client\1.19.2-20220805.130853\client-1.19.2-20220805.130853-mappings.txt
java.net.ConnectException: Connection timed out: connect
    at java.net.TwoStacksPlainSocketImpl.socketConnect(Native Method)
    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at sun.security.ssl.SSLSocketImpl.connect(Unknown Source)
    at sun.security.ssl.BaseSSLSocketImpl.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
    at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
    at java.net.URL.openStream(Unknown Source)
    at net.minecraftforge.installertools.DownloadMojmaps.process(DownloadMojmaps.java:65)
    at net.minecraftforge.installertools.ConsoleTool.main(ConsoleTool.java:55)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.minecraftforge.installer.actions.PostProcessors.process(PostProcessors.java:226)
    at net.minecraftforge.installer.actions.ClientInstall.run(ClientInstall.java:144)
    at net.minecraftforge.installer.InstallerPanel.run(InstallerPanel.java:423)
    at net.minecraftforge.installer.SimpleInstaller.launchGui(SimpleInstaller.java:175)
    at net.minecraftforge.installer.SimpleInstaller.main(SimpleInstaller.java:147)
 

Link to comment
Share on other sites

In order to root out one of the more common issues, we'll need to see your hosts file. Here's the steps to getting this file.

1) Press the Win + R key on your keyboard.

2) Paste the following into the prompt that opens: notepad %windir%\system32\drivers\etc\hosts

3) Use Ctrl+A to select everything in the file, then Ctrl+C into the textbox to post to this thread.

Link to comment
Share on other sites

# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host
# localhost name resolution is handled within DNS itself.
#    127.0.0.1       localhost
#    ::1             localhost

134.209.132.126 authserver.mojang.com
134.209.132.126 sessionserver.mojang.com
134.209.132.126 launchermeta.mojang.com
 

Edited by manuando
Link to comment
Share on other sites

  • 1 year later...

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
    • I couldn't find much usage, I found this and attempted to implement it. It doesn't seem to do anything though. I have this linked to a server to client packet... I have been at this since September seventh and have not made any progress. Blockpos and Blockstate are all pre-assigned variables, as is pLevel. I took the vertex consumer directly from LevelRenderer where I got this code from anyways. I didn't know what number to put into the ModelBakery.DESTROY_TYPES.get() so I just put the breakTime I used in the above code. Am I missing something?
    • Problematic part: [net.minecraft.server.network.ServerGamePacketListenerImpl/]: Gu57 lost connection: Internal Exception: io.netty.handler.codec.EncoderException: java.lang.NullPointerException: Cannot invoke "net.minecraft.resources.ResourceLocation.toString()" because "p_130086_" is null There is no crash, single player works, sadly it's not Hexerei Debug log: (can't use pastebin, cause 10 mb) https://drive.google.com/file/d/16ikQIx7nYjJtF4aJLy5KqFQHh6-jBNrd/view?usp=sharing
    • Something in the Alex's Caves mod is preventing Distant Horizons from rendering. However, I don't want to get rid of Alex's Caves, as it is a part of my personal modded experience. Can someone please find the issue for me?
  • Topics

  • Who's Online (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

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