Jump to content

[1.7.10][SOLVED] GUI + Player Inventory Interaction


Arkoonius

Recommended Posts

Hello all. I would like some help with my GUI. Tutorials I see are mostly just plain code for copy/pasting and I have no idea whether if my issue is specific or not to do that. I want the player to be able to open up a GUI and click on buttons or icons to craft items. This crafting consists of checking the players inventory if it contains the necessary components, destroying them if everything exists, and directly adding the result item to the players inventory. As an example. The player clicks on the "Iron Sword" button on the GUI. The GUI checks the player's inventory that it contains a stick and 2 iron ingots. If the checks return true, a stick and 2 iron ingots are removed from the player's inventory, and the player is given an iron sword as a result.

 

The issues I'm having isn't within the drawing of the GUI, but the actual changes in the player's inventory. In order for what I want to work, I have to do things server-side as well, else everything doesn't work and gets out of sync. I have no idea how to do this, and I'm sure packet handling is required. Could any please explain, in detail, what I have to do? I would normal say "please point me in the right direction," but giving a simple link to another's tutorial, as I've experienced in the past.

 

This GUI is opened by right clicking on a specific block, but it will have no inventory of sorts (e.g. a chest) or even slots (e.g. villager trading). Just simple buttons, textures, and texts.

Link to comment
Share on other sites

The GUI checks the player's inventory that it contains a stick and 2 iron ingots

You are approaching this from wrong direction. Gui is on client side and remember that client can let the gui know exactly what it wants (hacking). So you really need to do that on server side and I would do this like this way:

 

- Player presses gui button -> onActionPerformed() get called. It sends request to server (can be your own packet or same way as item enchant is done so look for that. That request contains the name of requested item/block to craft.

 

- Server gets this requests and gets player from server side container (EntityPlayerMP#opencontainer)

- Server "scans" player inventory with for-loop and checks every slot of players inventory looking for items/blocks needed for requested crafting. Server knows needed items by getting it's recipe from GameRegistry (or was it somewhere else). It can find recipe by getting correct item for recipe with Item.getItemByName(requested item name)

- If the correct items have been found, server subtracts itemstacks on player inventory as needed.

- Now server sets requested item to slot, it can be slot in gui or in player inventory. If its in player inventory server finds first free slot with for-loop and is trying to find slot that is null. When its found then it can be set, and for cases that there is no free space left in player inventory, server can spawn item next to your block so player can pick it up.

Link to comment
Share on other sites

Just like you would do it on client side. You can set itemstacks and check player inventory on server-side same way as on client side, you just need to use server-side player (EntityPlayerMP).

The first thing you need to do is to let server know which button was pressed and this is where the packet is needed. So you need packet and handlers. There is great tutorial at http://www.minecraftforge.net/forum/index.php/topic,20135.0.html

 

When the packet is received by server, you can get EntityPlayerMP from MessageContext#getServerHandler().playerEntity and server-side container from player EntityPlayerMP#openContainer which is the container you have returned in your IGuiHandler#getServerGuiElement when player opened the gui.

Link to comment
Share on other sites

Just like you would do it on client side. You can set itemstacks and check player inventory on server-side same way as on client side, you just need to use server-side player (EntityPlayerMP).

The first thing you need to do is to let server know which button was pressed and this is where the packet is needed. So you need packet and handlers. There is great tutorial at http://www.minecraftforge.net/forum/index.php/topic,20135.0.html

 

When the packet is received by server, you can get EntityPlayerMP from MessageContext#getServerHandler().playerEntity and server-side container from player EntityPlayerMP#openContainer which is the container you have returned in your IGuiHandler#getServerGuiElement when player opened the gui.

 

Alright. So on button press send a packet to the server and when that is received I can make use of EntityPlayerMP. I can make sense to that, but I'm confused about after that as I have yet to work with containers. From what I understand by reading on the wiki (and please correct me if I'm interpreting this incorrectly), a Container allows interaction between player and TileEntity inventories via GUIs, and TileEntities are simply blocks that can hold extra data beyond just plain metadata (inventory and such). So what I'm thinking what needs to be done is connect the player's inventory with the TileEntity and that TileEntity with the container. Then from there I can mess around with the inventory as needed. But then again, isn't that all serverside? Unless this method has some auto-syncing in the background, I'm seeing this to cause sync issues between server and client player inventories.

Link to comment
Share on other sites

Here's how I think of Guis on a high level, which might help.

 

Most Guis have 2 parts: something that extends GuiContainer and something that extends Container. The GuiContainer is on the client side, so it should handle all of the drawing. The Container is on the server side, so it should handle all of the logic. These two components are "registered" using the getClientGuiElement/getServerGuiElement methods.

 

When you're instantiating your GuiContainer and Container, you should pass the tile entity to both of them, and also the player inventory if needed.

 

So it's more accurate to say that you "connect" the Container to both the player inventory and the tile entity. However, you don't connect the tile entity to the player inventory, since the Container acts like a "mediator" between the two. (For example, the Container can "take" something from the player's inventory and "put it into" the tile entity's inventory.)

 

Since the GuiContainer also has the reference to the player inventory and tile entity, it automatically knows whenever the player inventory or tile entity changes. (The client/server things are done under the hood, so it's sufficient to just say that it magically works.)

Link to comment
Share on other sites

Thanks for the help you two. I've managed to make some form of progress. Upon opening up the player's inventory, I'm able to give the player an item. Sorta... every time I bring up the GUI the game crashes and I'm left with a TickingMemoryException and NullPointerException within the console. Wiki and forge source documentation is unhelpful due to them being barren in terms of comments and relevant argument names. Though I DO have the item in my inventory when I start the game back up.

 

So how exactly do I properly make changes to the player's inventory within the Container?

Link to comment
Share on other sites

If you use Eclipse, you can set a breakpoint on the line of code where it crashes (look in your error log/stack trace for the exact line). Then you can run Minecraft in debug mode, and it'll pause right before executing that line. When it pauses, you can check the values of all variables by hovering over them.

 

I'm not 100% sure, but your null pointer probably isn't relevant to the actual problem. (It's more likely that you actually solved your problem, but a small mistake somewhere causes a null pointer which crashes the game.)

Link to comment
Share on other sites

Well, let's first ask this question: am I doing anything wrong in the first place?

 

Here's the relevant code:

[spoiler=TestGui.java]

public class TestGui extends GuiContainer
{

int bgWidth = 256;
int bgHeight = 145;

//calc positions to place gui in middle of screen
int guiXPos = 0;
int guiYPos = 0;

int buttonWidth = 40;
int buttonHeight = 20;

GuiButton btnBalls;

boolean mousedOver = false;

//for drawing buttons and other GUI elements, keep everything in one image file and work with it
//as if you would with a sprite sheet (see drawTexturedModalRect comment)

public TestGui(InventoryPlayer inv) 
{
	super(new TestGuiContainer(inv));
}

@Override
public void initGui()
{
	guiXPos = (width - bgWidth) / 2;
	guiYPos = (height - bgHeight) / 2;

	buttonList.clear();
	//add button                           id      xPos        yPos      width height text
	buttonList.add(btnBalls = new GuiButton(0, guiXPos + 10, guiYPos + 70, 40, 20, "Things"));

	super.initGui();
}

@Override
public void actionPerformed(GuiButton button)
{
	switch (button.id)
	{
	case 0:
		button.displayString = "Butts";
	}

	super.actionPerformed(button);
}

@Override
public void keyTyped(char what, int keyCode)
{
	switch (keyCode)
	{
	case Keyboard.KEY_E:
		mc.displayGuiScreen(null);
	}

	super.keyTyped(what, keyCode);
}

@Override
public void mouseClicked(int x, int y, int mouseButton)
{
	if (mouseOver(x, y, guiXPos + 10, guiYPos + 50, buttonHeight, buttonWidth))
	{
		mousedOver = true;
	}
	else mousedOver = false;

	super.mouseClicked(x, y, mouseButton);
}

public boolean mouseOver(int mouseX, int mouseY, int posX, int posY, int height, int width)
{
	if ((mouseX >= posX) & (mouseY >= posY))
	{
		if ((mouseX <= (posX + width)) & (mouseY <= (posY + height)))
		{
			return true;
		}
	}

	return false;
}

@Override
protected void drawGuiContainerBackgroundLayer(float arg0, int arg1, int arg2) 
{
	guiXPos = (width - bgWidth) / 2;
	guiYPos = (height - bgHeight) / 2;

	GL11.glColor4f(1.f, 1.f, 1.f, 1.f); //RGBA
	drawDefaultBackground();
	mc.renderEngine.bindTexture(new ResourceLocation("runeblock", "textures/gui/CraftingGuiBackground.png")); //bind GUI texture
	//drawing GUI background
	drawTexturedModalRect(guiXPos, guiYPos, 0, 0, bgWidth, bgHeight); //0s are starting position with texture to draw (think sprite sheets)

	if (!mousedOver) drawTexturedModalRect(guiXPos + 10, guiYPos + 50, 0, bgHeight, buttonWidth, buttonHeight);
	else drawTexturedModalRect(guiXPos + 10, guiYPos + 50, 0, bgHeight + buttonHeight, buttonWidth, buttonHeight);
}

@Override
protected void drawGuiContainerForegroundLayer(int arg1, int arg2)
{
	fontRendererObj.drawString("Things", guiXPos + 10, guiYPos + 10, 0x000000); //last arg is hex for color
}

}

 

 

[spoiler=TestGuiContainer.java]

public class TestGuiContainer extends Container
{
InventoryPlayer playerInv;

public TestGuiContainer(InventoryPlayer inv)
{
	inv.mainInventory[3] = new ItemStack(RBItems.runiteOre, 1);
}


@Override
public boolean canInteractWith(EntityPlayer arg0) {
	// TODO Auto-generated method stub
	return false;
}
}

 

 

Perhaps not relevant, but I'll include these as well.

[spoiler=GuiHandler.java]

public class GuiHandler implements IGuiHandler
{

@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) 
{
	switch (ID)
	{
	case 0: return new TestGui(player.inventory);
	}

	return null;
}

@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) 
{
	switch (ID)
	{
	case 0: return new TestGuiContainer(player.inventory);
	}

	return null;
}

}

 

 

And this is how I'm opening the GUI

[spoiler=GoldBar.java]

public class GoldBar extends Item
{
public GoldBar()
{
	setMaxStackSize(1);
	setCreativeTab(runeBlock.lib.ModInfo.runeBlockTab);
	setUnlocalizedName("goldBar");
	setTextureName("runeblock:GoldBar");
}

@Override
public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z,
            int par7, float par8, float par9, float par10)
{
	player.openGui(RuneBlock.instance, 0, world, x, y, z);
	return false;
}	

}

 

Link to comment
Share on other sites

Here's the log starting from me joining the game.

 

[18:44:14] [server thread/INFO]: Player680 joined the game
[18:44:14] [server thread/INFO]: [runeBlock.network.ServerPacket:sendPacketToClient:46]: sending packet to client
[18:44:14] [Client thread/INFO]: [Client thread] Client side modded connection established
[18:44:14] [Client thread/INFO]: [runeBlock.network.ClientPacketHandler:onClientPacket:23]: packet received
[18:44:14] [server thread/INFO]: Saving and pausing game...
[18:44:14] [server thread/INFO]: Saving chunks for level 'New World'/Overworld
[18:44:14] [server thread/INFO]: Saving chunks for level 'New World'/Nether
[18:44:14] [server thread/INFO]: Saving chunks for level 'New World'/The End
[18:44:17] [server thread/ERROR]: Encountered an unexpected exception
net.minecraft.util.ReportedException: Ticking memory connection
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:181) ~[NetworkSystem.class:?]
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:659) ~[MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:547) ~[MinecraftServer.class:?]
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:111) ~[integratedServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685) [MinecraftServer$2.class:?]
Caused by: java.lang.NullPointerException
at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:620) ~[NetHandlerPlayServer.class:?]
at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(SourceFile:60) ~[C08PacketPlayerBlockPlacement.class:?]
at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(SourceFile:9) ~[C08PacketPlayerBlockPlacement.class:?]
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:212) ~[NetworkManager.class:?]
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:165) ~[NetworkSystem.class:?]
... 5 more
[18:44:17] [server thread/ERROR]: This crash report has been saved to: C:\Users\Owner\Desktop\my mc mods\RuneBlock\eclipse\.\crash-reports\crash-2015-01-08_18.44.17-server.txt
[18:44:17] [server thread/INFO]: Stopping server
[18:44:17] [server thread/INFO]: Saving players
[18:44:17] [server thread/INFO]: Saving worlds
[18:44:17] [server thread/INFO]: Saving chunks for level 'New World'/Overworld
[18:44:17] [Client thread/INFO]: [net.minecraft.client.Minecraft:displayCrashReport:349]: ---- Minecraft Crash Report ----
// You're mean.

Time: 1/8/15 6:44 PM
Description: Ticking memory connection

java.lang.NullPointerException: Ticking memory connection
at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:620)
at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(SourceFile:60)
at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(SourceFile:9)
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:212)
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:165)
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:659)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:547)
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:111)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:620)
at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(SourceFile:60)
at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(SourceFile:9)
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:212)

-- Ticking connection --
Details:
Connection: net.minecraft.network.NetworkManager@203ab1e1
Stacktrace:
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:165)
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:659)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:547)
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:111)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)

-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 7 (amd64) version 6.1
Java Version: 1.7.0_51, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 862425928 bytes (822 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.05 FML v7.10.85.1230 Minecraft Forge 10.13.2.1230 4 mods loaded, 4 mods active
mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
FML{7.10.85.1230} [Forge Mod Loader] (forgeBin-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Forge{10.13.2.1230} [Minecraft Forge] (forgeBin-1.7.10-10.13.2.1230.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Ark_RuneBlock{v0.1} [RuneBlock] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Profiler Position: N/A (disabled)
Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Player Count: 1 / 8; [EntityPlayerMP['Player680'/183, l='New World', x=286.37, y=4.00, z=-1259.41]]
Type: Integrated Server (map_client.txt)
Is Modded: Definitely; Client brand changed to 'fml,forge'
[18:44:17] [Client thread/INFO]: [net.minecraft.client.Minecraft:displayCrashReport:354]: #@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2015-01-08_18.44.17-server.txt
[18:44:17] [Client thread/INFO]: Waiting for the server to terminate/save.
[18:44:17] [server thread/INFO]: Saving chunks for level 'New World'/Nether
[18:44:17] [server thread/INFO]: Saving chunks for level 'New World'/The End
[18:44:17] [server thread/INFO]: Unloading dimension 0
[18:44:17] [server thread/INFO]: Unloading dimension -1
[18:44:17] [server thread/INFO]: Unloading dimension 1
[18:44:17] [server thread/INFO]: Applying holder lookups
[18:44:17] [server thread/INFO]: Holder lookups applied
[18:44:17] [server thread/INFO]: The state engine was in incorrect state SERVER_STOPPING and forced into state SERVER_STOPPED. Errors may have been discarded.
[18:44:17] [Client thread/INFO]: Server terminated.
AL lib: (EE) alc_cleanup: 1 device not closed

 

I tried debugging, but it doesn't crash during debug if I put a breakpoint on the the Container being instantiated and then stepping through the code line by line. Going into debug mode and having the code run it's course without any breakpoints still crashes the game, however.

Link to comment
Share on other sites

If you step through all the breakpoints, it should crash. You probably just didn't step through enough. If there's a breakpoint on a line, the program pauses before executing that line.

 

I would look here:

Caused by: java.lang.NullPointerException
at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:620) ~[NetHandlerPlayServer.class:?]

 

Go into the NetHandlerPlayServer class, and put breakpoints around line 620, on every line inside the

processPlayerBlockPlacement()

method.

Link to comment
Share on other sites

Alright. I figured out the issue and the GUI opens/closes without crashing as well as giving the player an item when opened.

 

Final thing: buttons. Making changes to the GUI client side when a button is pressed is easy enough, but how to detect a button press server side? Need to make a button press detectable by the container so that, upon button press, the container can handle giving the player an item. Packets are needed I'm sure, so I got started on that. Once I was nearly done for testing, I realized I had no idea how to "connect" the server side packet and the container.

Link to comment
Share on other sites

On the server when you receive the packet it gives you the player so you can get the container from player.openContainer.

 

Remember to use null checks

Could you elaborate more on those? I've never done this and trying to learn how to, so I'm going to need it more spelled out than the average guy.

 

Well. It doesn't seem I actually need access to the container. As soon as the packet is received (previously sent by clicking a button), I can just add items to the EntityPlayerMP's inventory no problem. EDIT:: Thought this was working, but the inventory gets unsync'd. Figured as much to begin with.

 

I asked about getting access to the container because I figured I would put whatever logic there to handle adding/removing items and just call the functions to do so from the container itself.

Link to comment
Share on other sites

Alright. I figured out the issue and the GUI opens/closes without crashing as well as giving the player an item when opened.

 

Final thing: buttons. Making changes to the GUI client side when a button is pressed is easy enough, but how to detect a button press server side? Need to make a button press detectable by the container so that, upon button press, the container can handle giving the player an item. Packets are needed I'm sure, so I got started on that. Once I was nearly done for testing, I realized I had no idea how to "connect" the server side packet and the container.

 

-> Server gets packet (that has pressed button ID for example)

-> Packet has MessageContext ctx, so ctx.getServerHandler().playerEntity gives you server-side player (EntityPlayerMP)

-> playerEntity.openContainer gives you container you have defined in your IGuiHandler (getClientGuiElement you returned GuiContainer for client-side and getServerGuiElement Container for server-side)

-> You can set ItemStack to player inventory by getting player's inventory either from Container (if you have passed InventoryPlayer as an argument when constructing Container for server in IGuiHandler, that would be easiest because InventoryPlayer has good methods for handling player's inventory) or from EntityPlayerMP#getInventory() (which returns inventory as ItemStack array).

Link to comment
Share on other sites

Alright. I figured out the issue and the GUI opens/closes without crashing as well as giving the player an item when opened.

 

Final thing: buttons. Making changes to the GUI client side when a button is pressed is easy enough, but how to detect a button press server side? Need to make a button press detectable by the container so that, upon button press, the container can handle giving the player an item. Packets are needed I'm sure, so I got started on that. Once I was nearly done for testing, I realized I had no idea how to "connect" the server side packet and the container.

 

-> Server gets packet (that has pressed button ID for example)

-> Packet has MessageContext ctx, so ctx.getServerHandler().playerEntity gives you server-side player (EntityPlayerMP)

-> playerEntity.openContainer gives you container you have defined in your IGuiHandler (getClientGuiElement you returned GuiContainer for client-side and getServerGuiElement Container for server-side)

-> You can set ItemStack to player inventory by getting player's inventory either from Container (if you have passed InventoryPlayer as an argument when constructing Container for server in IGuiHandler, that would be easiest because InventoryPlayer has good methods for handling player's inventory) or from EntityPlayerMP#getInventory() (which returns inventory as ItemStack array).

 

I am passing InventoryPlayer into the constructor, but I can't access it via player.openContainer.

public InventoryPlayer playerInv;

public TestGuiContainer(InventoryPlayer inv)
{
playerInv = inv;
}

Link to comment
Share on other sites

You should pass it into the constructor of your Container, not GuiContainer(which is on the client-side).

So in IGuiHandler#getServerGuiElement when you return new Container for server, you'll pass InventoryPlayer (I think you can get it from EntityPlayer#inventory) to your Container constructor.

 

 

Link to comment
Share on other sites

You should pass it into the constructor of your Container, not GuiContainer(which is on the client-side).

So in IGuiHandler#getServerGuiElement when you return new Container for server, you'll pass InventoryPlayer (I think you can get it from EntityPlayer#inventory) to your Container constructor.

 

Rofl, sorry. I get lazy with naming when I'm simply trying to figure things out. TestGuiContainer IS the container, while TestGui is the GuiContainer.

 

public class TestGuiContainer extends Container
{
public InventoryPlayer playerInv;

public TestGuiContainer(InventoryPlayer inv)
{
	playerInv = inv;
}

public void giveOre()
{
	for (int i = 0; i < playerInv.mainInventory.length; i++)
	{
		if (playerInv.mainInventory[i] == null) 
		{
			playerInv.mainInventory[i] = new ItemStack(RBItems.runiteOre, 1);
			break;
		}
	}
}

@Override
public boolean canInteractWith(EntityPlayer arg0) {
	// TODO Auto-generated method stub
	return false;
}
}

 

public class TestGui extends GuiContainer
{

int bgWidth = 256;
int bgHeight = 145;

//calc positions to place gui in middle of screen
int guiXPos = 0;
int guiYPos = 0;

int buttonWidth = 40;
int buttonHeight = 20;

GuiButton btnBalls;

boolean mousedOver = false;

//for drawing buttons and other GUI elements, keep everything in one image file and work with it
//as if you would with a sprite sheet (see drawTexturedModalRect comment)

public TestGui(InventoryPlayer inv) 
{
	super(new TestGuiContainer(inv));
}

@Override
public void initGui()
{
	guiXPos = (width - bgWidth) / 2;
	guiYPos = (height - bgHeight) / 2;

	buttonList.clear();
	//add button                           id      xPos        yPos      width height text
	buttonList.add(btnBalls = new GuiButton(0, guiXPos + 10, guiYPos + 70, 40, 20, "Things"));

	super.initGui();
}

@Override
public void actionPerformed(GuiButton button)
{
	switch (button.id)
	{
	case 0:
		button.displayString = "Butts";
		ClientPacket.createGuiPacket("gui");
	}

	super.actionPerformed(button);
}

@Override
public void keyTyped(char what, int keyCode)
{
	switch (keyCode)
	{
	case Keyboard.KEY_E:
		mc.displayGuiScreen(null);
	}

	super.keyTyped(what, keyCode);
}

@Override
public void mouseClicked(int x, int y, int mouseButton)
{
	if (mouseOver(x, y, guiXPos + 10, guiYPos + 50, buttonHeight, buttonWidth))
	{
		mousedOver = true;
	}
	else mousedOver = false;

	super.mouseClicked(x, y, mouseButton);
}

public boolean mouseOver(int mouseX, int mouseY, int posX, int posY, int height, int width)
{
	if ((mouseX >= posX) & (mouseY >= posY))
	{
		if ((mouseX <= (posX + width)) & (mouseY <= (posY + height)))
		{
			return true;
		}
	}

	return false;
}

@Override
protected void drawGuiContainerBackgroundLayer(float arg0, int arg1, int arg2) 
{
	guiXPos = (width - bgWidth) / 2;
	guiYPos = (height - bgHeight) / 2;

	GL11.glColor4f(1.f, 1.f, 1.f, 1.f); //RGBA
	drawDefaultBackground();
	mc.renderEngine.bindTexture(new ResourceLocation("runeblock", "textures/gui/CraftingGuiBackground.png")); //bind GUI texture
	//drawing GUI background
	drawTexturedModalRect(guiXPos, guiYPos, 0, 0, bgWidth, bgHeight); //0s are starting position with texture to draw (think sprite sheets)

	if (!mousedOver) drawTexturedModalRect(guiXPos + 10, guiYPos + 50, 0, bgHeight, buttonWidth, buttonHeight);
	else drawTexturedModalRect(guiXPos + 10, guiYPos + 50, 0, bgHeight + buttonHeight, buttonWidth, buttonHeight);
}

@Override
protected void drawGuiContainerForegroundLayer(int arg1, int arg2)
{
	fontRendererObj.drawString("Things", guiXPos + 10, guiYPos + 10, 0x000000); //last arg is hex for color
}

}

 

public class GuiHandler implements IGuiHandler
{

@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) 
{
	switch (ID)
	{
	case 0: return new TestGui(player.inventory);
	}

	return null;
}

@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) 
{
	switch (ID)
	{
	case 0: return new TestGuiContainer(player.inventory);
	}

	return null;
}

 

That's everything directly relevant to my GUI. Once I get this figured (with your help), I'll be making the class names less confusing along with actually putting comments within the code.

Link to comment
Share on other sites

ClientPacket.createGuiPacket("gui");

 

Does this method send a packet to the server, or does it just create one?

If not, this is where you'd want to send your packet to the server. You'd probably also want to include information about the player and tile entity in the packet too.

 

It does both. And no tile entities are used because, as far as I'm concerned, they aren't needed.

 

The packet is getting received and the player is getting the item, but the inventories between client and server are unsync'd. In order to see the results, I have to click on the slots to update my inventory on the client. I recorded a quick video to show it visually.

 

Link to comment
Share on other sites

I might be completely wrong and not understand what you're trying to do.

 

In your class that extends GuiContainer, you pass the InventoryPlayer in your constructor. Save it as a field and change the slots when you click on the button.

I'm not sure if the changes get synced between client and gui, but you could try... :3

Link to comment
Share on other sites

You could try IInventory#setInventorySlotContents(int, ItemStack) and then IInventory#markDirty

Not sure if that would do the trick and I cannot check from my own sources how I did that syncing right now, but I can check next time when I'm back. But anyway, let me know if it doesn't work.

Link to comment
Share on other sites

I might be completely wrong and not understand what you're trying to do.

 

In your class that extends GuiContainer, you pass the InventoryPlayer in your constructor. Save it as a field and change the slots when you click on the button.

I'm not sure if the changes get synced between client and gui, but you could try... :3

 

facepalm.jpg

 

Yep. That fixed it. Thanks everyone! I'll hopefully be able to take it from here, unless someone else has something they'd like to input to help me out.

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

    • Hello, I want to add more memory to the RunClient gradle task. I added VM options into the configurations and put in "-Xms256m -Xmx2048m" but it doesn't work.
    • Hello, I'm trying to modify the effects of native enchantments for bows and arrows in Minecraft. After using a decompilation tool, I found that the specific implementations of native bow and arrow enchantments (including `ArrowDamageEnchantment`, `ArrowKnockbackEnchantment`, `ArrowFireEnchantment`, `ArrowInfiniteEnchantment`, `ArrowPiercingEnchantment`) do not contain any information about the enchantment effects (such as the `getDamageProtection` function for `ProtectionEnchantment`, `getDamageBonus` function for `DamageEnchantment`, etc.). Upon searching for the base class of arrows, `AbstractArrow`, I found a function named setEnchantmentEffectsFromEntity`, which seems to be used to retrieve the enchantment levels of the tool held by a `LivingEntity` and calculate the specific values of the enchantment effects. However, after testing with the following code, I found that this function is not being called:   @Mixin(AbstractArrow.class) public class ModifyArrowEnchantmentEffects {     private static final Logger LOGGER = LogUtils.getLogger();     @Inject(         method = "setEnchantmentEffectsFromEntity",         at = @At("HEAD")     )     private void logArrowEnchantmentEffectsFromEntity(CallbackInfo ci) {         LOGGER.info("Arrow enchantment effects from entity");     } }   Upon further investigation, I found that within the onHitEntity method, there are several lines of code:               if (!this.level().isClientSide &amp;&amp; entity1 instanceof LivingEntity) {                EnchantmentHelper.doPostHurtEffects(livingentity, entity1);                EnchantmentHelper.doPostDamageEffects((LivingEntity)entity1, livingentity);             }   These lines of code actually call the doPostHurt and doPostAttack methods of each enchantment in the enchantment list. However, this leads back to the issue because native bow and arrow enchantments do not implement these functions. Although their base class defines the functions, they are empty. At this point, I'm completely stumped and seeking assistance. Thank you.
    • I have been trying to make a server with forge but I keep running into an issue. I have jdk 22 installed as well as Java 8. here is the debug file  
    • it crashed again     What the console says : [00:02:03] [Server thread/INFO] [Easy NPC/]: [EntityManager] Server started! [00:02:03] [Server thread/INFO] [co.gi.al.ic.IceAndFire/]: {iceandfire:fire_dragon_roost=true, iceandfire:fire_lily=true, iceandfire:spawn_dragon_skeleton_fire=true, iceandfire:lightning_dragon_roost=true, iceandfire:spawn_dragon_skeleton_lightning=true, iceandfire:ice_dragon_roost=true, iceandfire:ice_dragon_cave=true, iceandfire:lightning_dragon_cave=true, iceandfire:cyclops_cave=true, iceandfire:spawn_wandering_cyclops=true, iceandfire:spawn_sea_serpent=true, iceandfire:frost_lily=true, iceandfire:hydra_cave=true, iceandfire:lightning_lily=true, iceandfireixie_village=true, iceandfire:myrmex_hive_jungle=true, iceandfire:myrmex_hive_desert=true, iceandfire:silver_ore=true, iceandfire:siren_island=true, iceandfire:spawn_dragon_skeleton_ice=true, iceandfire:spawn_stymphalian_bird=true, iceandfire:fire_dragon_cave=true, iceandfire:sapphire_ore=true, iceandfire:spawn_hippocampus=true, iceandfire:spawn_death_worm=true} [00:02:03] [Server thread/INFO] [co.gi.al.ic.IceAndFire/]: {TROLL_S=true, HIPPOGRYPH=true, AMPHITHERE=true, COCKATRICE=true, TROLL_M=true, DREAD_LICH=true, TROLL_F=true} [00:02:03] [Server thread/INFO] [ne.be.lo.WeaponRegistry/]: Encoded Weapon Attribute registry size (with package overhead): 41976 bytes (in 5 string chunks with the size of 10000) [00:02:03] [Server thread/INFO] [patchouli/]: Sending reload packet to clients [00:02:03] [Server thread/WARN] [voicechat/]: [voicechat] Running in offline mode - Voice chat encryption is not secure! [00:02:03] [VoiceChatServerThread/INFO] [voicechat/]: [voicechat] Using server-ip as bind address: 0.0.0.0 [00:02:03] [Server thread/WARN] [ModernFix/]: Dedicated server took 22.521 seconds to load [00:02:03] [VoiceChatServerThread/INFO] [voicechat/]: [voicechat] Voice chat server started at 0.0.0.0:25565 [00:02:03] [Server thread/WARN] [minecraft/SynchedEntityData]: defineId called for: class net.minecraft.world.entity.player.Player from class tschipp.carryon.common.carry.CarryOnDataManager [00:02:03] [Server thread/INFO] [ne.mi.co.AdvancementLoadFix/]: Using new advancement loading for net.minecraft.server.PlayerAdvancements@2941ffd5 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 0 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 1 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 2 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 3 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 4 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 5 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 6 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 7 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 8 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 9 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 10 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 11 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 12 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 13 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 14 [00:02:19] [Server thread/INFO] [ne.mi.co.AdvancementLoadFix/]: Using new advancement loading for net.minecraft.server.PlayerAdvancements@ebc7ef2 [00:02:19] [Server thread/INFO] [minecraft/PlayerList]: ZacAdos[/90.2.17.162:49242] logged in with entity id 1062 at (-1848.6727005281205, 221.0, -3054.2468255848935) [00:02:19] [Server thread/ERROR] [ModernFix/]: Skipping entity ID sync for com.talhanation.smallships.world.entity.ship.Ship: java.lang.NoClassDefFoundError: net/minecraft/client/CameraType [00:02:19] [Server thread/INFO] [minecraft/MinecraftServer]: - Gloop - ZacAdos joined the game [00:02:19] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Updating all forceload tickets for cc56befd-d376-3526-a760-340713c478bd [00:02:19] [Server thread/INFO] [se.mi.te.da.DataManager/]: Sending data to client: ZacAdos [00:02:19] [Server thread/INFO] [voicechat/]: [voicechat] Received secret request of - Gloop - ZacAdos (17) [00:02:19] [Server thread/INFO] [voicechat/]: [voicechat] Sent secret to - Gloop - ZacAdos [00:02:21] [VoiceChatPacketProcessingThread/INFO] [voicechat/]: [voicechat] Successfully authenticated player cc56befd-d376-3526-a760-340713c478bd [00:02:22] [VoiceChatPacketProcessingThread/INFO] [voicechat/]: [voicechat] Successfully validated connection of player cc56befd-d376-3526-a760-340713c478bd [00:02:22] [VoiceChatPacketProcessingThread/INFO] [voicechat/]: [voicechat] Player - Gloop - ZacAdos (cc56befd-d376-3526-a760-340713c478bd) successfully connected to voice chat stop [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Stopping the server [00:02:34] [Server thread/INFO] [mo.pl.ar.ArmourersWorkshop/]: stop local service [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Stopping server [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving players [00:02:34] [Server thread/INFO] [minecraft/ServerGamePacketListenerImpl]: ZacAdos lost connection: Server closed [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: - Gloop - ZacAdos left the game [00:02:34] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Updating all forceload tickets for cc56befd-d376-3526-a760-340713c478bd [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving worlds [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_end [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage (world): All chunks are saved [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage: All dimensions are saved [00:02:34] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Stopping IO worker... [00:02:34] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Stopped IO worker! [00:02:34] [Server thread/INFO] [Calio/]: Removing Dynamic Registries for: net.minecraft.server.dedicated.DedicatedServer@7dc879e1 [MineStrator Daemon]: Checking server disk space usage, this could take a few seconds... [MineStrator Daemon]: Updating process configuration files... [MineStrator Daemon]: Ensuring file permissions are set correctly, this could take a few seconds... [MineStrator Daemon]: Pulling Docker container image, this could take a few minutes to complete... [MineStrator Daemon]: Finished pulling Docker container image container@pterodactyl~ java -version openjdk version "17.0.10" 2024-01-16 OpenJDK Runtime Environment Temurin-17.0.10+7 (build 17.0.10+7) OpenJDK 64-Bit Server VM Temurin-17.0.10+7 (build 17.0.10+7, mixed mode, sharing) container@pterodactyl~ java -Xms128M -Xmx6302M -Dterminal.jline=false -Dterminal.ansi=true -Djline.terminal=jline.UnsupportedTerminal -p libraries/cpw/mods/bootstraplauncher/1.1.2/bootstraplauncher-1.1.2.jar:libraries/cpw/mods/securejarhandler/2.1.4/securejarhandler-2.1.4.jar:libraries/org/ow2/asm/asm-commons/9.5/asm-commons-9.5.jar:libraries/org/ow2/asm/asm-util/9.5/asm-util-9.5.jar:libraries/org/ow2/asm/asm-analysis/9.5/asm-analysis-9.5.jar:libraries/org/ow2/asm/asm-tree/9.5/asm-tree-9.5.jar:libraries/org/ow2/asm/asm/9.5/asm-9.5.jar:libraries/net/minecraftforge/JarJarFileSystems/0.3.16/JarJarFileSystems-0.3.16.jar --add-modules ALL-MODULE-PATH --add-opens java.base/java.util.jar=cpw.mods.securejarhandler --add-opens java.base/java.lang.invoke=cpw.mods.securejarhandler --add-exports java.base/sun.security.util=cpw.mods.securejarhandler --add-exports jdk.naming.dns/com.sun.jndi.dns=java.naming -Djava.net.preferIPv6Addresses=system -DignoreList=bootstraplauncher-1.1.2.jar,securejarhandler-2.1.4.jar,asm-commons-9.5.jar,asm-util-9.5.jar,asm-analysis-9.5.jar,asm-tree-9.5.jar,asm-9.5.jar,JarJarFileSystems-0.3.16.jar -DlibraryDirectory=libraries -DlegacyClassPath=libraries/cpw/mods/securejarhandler/2.1.4/securejarhandler-2.1.4.jar:libraries/org/ow2/asm/asm/9.5/asm-9.5.jar:libraries/org/ow2/asm/asm-commons/9.5/asm-commons-9.5.jar:libraries/org/ow2/asm/asm-tree/9.5/asm-tree-9.5.jar:libraries/org/ow2/asm/asm-util/9.5/asm-util-9.5.jar:libraries/org/ow2/asm/asm-analysis/9.5/asm-analysis-9.5.jar:libraries/net/minecraftforge/accesstransformers/8.0.4/accesstransformers-8.0.4.jar:libraries/org/antlr/antlr4-runtime/4.9.1/antlr4-runtime-4.9.1.jar:libraries/net/minecraftforge/eventbus/6.0.3/eventbus-6.0.3.jar:libraries/net/minecraftforge/forgespi/6.0.0/forgespi-6.0.0.jar:libraries/net/minecraftforge/coremods/5.0.1/coremods-5.0.1.jar:libraries/cpw/mods/modlauncher/10.0.8/modlauncher-10.0.8.jar:libraries/net/minecraftforge/unsafe/0.2.0/unsafe-0.2.0.jar:libraries/com/electronwill/night-config/core/3.6.4/core-3.6.4.jar:libraries/com/electronwill/night-config/toml/3.6.4/toml-3.6.4.jar:libraries/org/apache/maven/maven-artifact/3.8.5/maven-artifact-3.8.5.jar:libraries/net/jodah/typetools/0.8.3/typetools-0.8.3.jar:libraries/net/minecrell/terminalconsoleappender/1.2.0/terminalconsoleappender-1.2.0.jar:libraries/org/jline/jline-reader/3.12.1/jline-reader-3.12.1.jar:libraries/org/jline/jline-terminal/3.12.1/jline-terminal-3.12.1.jar:libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar:libraries/org/openjdk/nashorn/nashorn-core/15.3/nashorn-core-15.3.jar:libraries/net/minecraftforge/JarJarSelector/0.3.16/JarJarSelector-0.3.16.jar:libraries/net/minecraftforge/JarJarMetadata/0.3.16/JarJarMetadata-0.3.16.jar:libraries/net/minecraftforge/fmlloader/1.19.2-43.3.0/fmlloader-1.19.2-43.3.0.jar:libraries/net/minecraft/server/1.19.2-20220805.130853/server-1.19.2-20220805.130853-extra.jar:libraries/com/github/oshi/oshi-core/5.8.5/oshi-core-5.8.5.jar:libraries/com/google/code/gson/gson/2.8.9/gson-2.8.9.jar:libraries/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar:libraries/com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre.jar:libraries/com/mojang/authlib/3.11.49/authlib-3.11.49.jar:libraries/com/mojang/brigadier/1.0.18/brigadier-1.0.18.jar:libraries/com/mojang/datafixerupper/5.0.28/datafixerupper-5.0.28.jar:libraries/com/mojang/javabridge/1.2.24/javabridge-1.2.24.jar:libraries/com/mojang/logging/1.0.0/logging-1.0.0.jar:libraries/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar:libraries/io/netty/netty-buffer/4.1.77.Final/netty-buffer-4.1.77.Final.jar:libraries/io/netty/netty-codec/4.1.77.Final/netty-codec-4.1.77.Final.jar:libraries/io/netty/netty-common/4.1.77.Final/netty-common-4.1.77.Final.jar:libraries/io/netty/netty-handler/4.1.77.Final/netty-handler-4.1.77.Final.jar:libraries/io/netty/netty-resolver/4.1.77.Final/netty-resolver-4.1.77.Final.jar:libraries/io/netty/netty-transport/4.1.77.Final/netty-transport-4.1.77.Final.jar:libraries/io/netty/netty-transport-classes-epoll/4.1.77.Final/netty-transport-classes-epoll-4.1.77.Final.jar:libraries/io/netty/netty-transport-native-epoll/4.1.77.Final/netty-transport-native-epoll-4.1.77.Final-linux-x86_64.jar:libraries/io/netty/netty-transport-native-epoll/4.1.77.Final/netty-transport-native-epoll-4.1.77.Final-linux-aarch_64.jar:libraries/io/netty/netty-transport-native-unix-common/4.1.77.Final/netty-transport-native-unix-common-4.1.77.Final.jar:libraries/it/unimi/dsi/fastutil/8.5.6/fastutil-8.5.6.jar:libraries/net/java/dev/jna/jna/5.10.0/jna-5.10.0.jar:libraries/net/java/dev/jna/jna-platform/5.10.0/jna-platform-5.10.0.jar:libraries/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar:libraries/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar:libraries/org/apache/logging/log4j/log4j-api/2.17.0/log4j-api-2.17.0.jar:libraries/org/apache/logging/log4j/log4j-core/2.17.0/log4j-core-2.17.0.jar:libraries/org/apache/logging/log4j/log4j-slf4j18-impl/2.17.0/log4j-slf4j18-impl-2.17.0.jar:libraries/org/slf4j/slf4j-api/1.8.0-beta4/slf4j-api-1.8.0-beta4.jar cpw.mods.bootstraplauncher.BootstrapLauncher --launchTarget forgeserver --fml.forgeVersion 43.3.0 --fml.mcVersion 1.19.2 --fml.forgeGroup net.minecraftforge --fml.mcpVersion 20220805.130853 [00:02:42] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 43.3.0, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853] [00:02:42] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.10 by Eclipse Adoptium; OS Linux arch amd64 version 6.1.0-12-amd64 [00:02:43] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/home/container/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2363!/ Service=ModLauncher Env=SERVER [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/fmlcore/1.19.2-43.3.0/fmlcore-1.19.2-43.3.0.jar is missing mods.toml file [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/javafmllanguage/1.19.2-43.3.0/javafmllanguage-1.19.2-43.3.0.jar is missing mods.toml file [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/lowcodelanguage/1.19.2-43.3.0/lowcodelanguage-1.19.2-43.3.0.jar is missing mods.toml file [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/mclanguage/1.19.2-43.3.0/mclanguage-1.19.2-43.3.0.jar is missing mods.toml file [00:02:44] [main/WARN] [ne.mi.ja.se.JarSelector/]: Attempted to select two dependency jars from JarJar which have the same identification: Mod File: and Mod File: . Using Mod File: [00:02:44] [main/WARN] [ne.mi.ja.se.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: resourcefullib. Using Mod File: /home/container/mods/resourcefullib-forge-1.19.2-1.1.24.jar [00:02:44] [main/INFO] [ne.mi.fm.lo.mo.JarInJarDependencyLocator/]: Found 13 dependencies adding them to mods collection Latest log [29Mar2024 00:02:42.803] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 43.3.0, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853] [29Mar2024 00:02:42.805] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.10 by Eclipse Adoptium; OS Linux arch amd64 version 6.1.0-12-amd64 [29Mar2024 00:02:43.548] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/home/container/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2363!/ Service=ModLauncher Env=SERVER [29Mar2024 00:02:43.876] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/fmlcore/1.19.2-43.3.0/fmlcore-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:43.877] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/javafmllanguage/1.19.2-43.3.0/javafmllanguage-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:43.877] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/lowcodelanguage/1.19.2-43.3.0/lowcodelanguage-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:43.878] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/mclanguage/1.19.2-43.3.0/mclanguage-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:44.033] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select two dependency jars from JarJar which have the same identification: Mod File: and Mod File: . Using Mod File: [29Mar2024 00:02:44.034] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: resourcefullib. Using Mod File: /home/container/mods/resourcefullib-forge-1.19.2-1.1.24.jar [29Mar2024 00:02:44.034] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.JarInJarDependencyLocator/]: Found 13 dependencies adding them to mods collection
  • Topics

×
×
  • Create New...

Important Information

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