Jump to content

[Still need help] Gui with container, help!


PlatonCraft

Recommended Posts

There is an error.

 

i dont know what should i do

 

---- Minecraft Crash Report ----

// I bet Cylons wouldn't have this problem.

 

Time: 21.08.13 19:41

Description: Rendering screen

 

java.lang.ArrayIndexOutOfBoundsException: 2

at platon.mods.unenchant.TileEntityUnEnchTbl.getStackInSlot(TileEntityUnEnchTbl.java:25)

at net.minecraft.inventory.Slot.getStack(Slot.java:91)

at net.minecraft.client.gui.inventory.GuiContainer.drawSlotInventory(GuiContainer.java:404)

at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:150)

at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1036)

at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:934)

at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:826)

at net.minecraft.client.main.Main.main(Main.java:93)

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.minecraft.launchwrapper.Launch.launch(Launch.java:57)

at net.minecraft.launchwrapper.Launch.main(Launch.java:18)

 

 

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

---------------------------------------------------------------------------------------

 

-- Head --

Stacktrace:

at platon.mods.unenchant.TileEntityUnEnchTbl.getStackInSlot(TileEntityUnEnchTbl.java:25)

at net.minecraft.inventory.Slot.getStack(Slot.java:91)

at net.minecraft.client.gui.inventory.GuiContainer.drawSlotInventory(GuiContainer.java:404)

at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:150)

 

-- Screen render details --

Details:

Screen name: platon.mods.unenchant.GuiUnEnchTbl

Mouse location: Scaled: (213, 119). Absolute: (427, 240)

Screen size: Scaled: (427, 240). Absolute: (854, 480). Scale factor of 2

 

-- Affected level --

Details:

Level name: MpServer

All players: 1 total; [EntityClientPlayerMP['Player376'/313, l='MpServer', x=239,81, y=71,62, z=85,25]]

Chunk stats: MultiplayerChunkCache: 360

Level seed: 0

Level generator: ID 00 - default, ver 1. Features enabled: false

Level generator options:

Level spawn location: World: (240,64,124), Chunk: (at 0,4,12 in 15,7; contains blocks 240,0,112 to 255,255,127), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)

Level time: 231802 game time, 26783 day time

Level dimension: 0

Level storage version: 0x00000 - Unknown?

Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)

Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false

Forced entities: 109 total; [EntityClientPlayerMP['Player376'/313, l='MpServer', x=239,81, y=71,62, z=85,25], EntitySkeleton['Скелет'/71, l='MpServer', x=160,91, y=54,00, z=11,53], EntityCreeper['Крипер'/76, l='MpServer', x=175,50, y=30,00, z=114,50], EntityCreeper['Крипер'/77, l='MpServer', x=169,38, y=32,00, z=121,59], EntitySkeleton['Скелет'/72, l='MpServer', x=173,66, y=17,00, z=20,53], EntityChicken['Курица'/73, l='MpServer', x=163,53, y=67,00, z=22,78], EntityCow['Корова'/74, l='MpServer', x=167,81, y=70,00, z=74,66], EntityZombie['Зомби'/75, l='MpServer', x=163,69, y=16,00, z=88,63], EntityCreeper['Крипер'/85, l='MpServer', x=182,56, y=52,00, z=12,03], EntityCreeper['Крипер'/84, l='MpServer', x=184,69, y=51,00, z=11,56], EntitySheep['Овца'/87, l='MpServer', x=191,06, y=70,00, z=21,41], EntityBat['Летучая мышь'/86, l='MpServer', x=195,45, y=10,03, z=16,57], EntityCreeper['Крипер'/83, l='MpServer', x=178,43, y=54,81, z=12,61], EntityZombie['Зомби'/93, l='MpServer', x=190,09, y=26,00, z=113,50], EntitySkeleton['Скелет'/92, l='MpServer', x=176,34, y=30,00, z=112,69], EntitySilverfish['Чешуйница'/95, l='MpServer', x=186,89, y=71,00, z=116,81], EntitySkeleton['Скелет'/94, l='MpServer', x=187,69, y=26,00, z=112,50], EntityBat['Летучая мышь'/89, l='MpServer', x=175,57, y=16,59, z=71,70], EntitySkeleton['Скелет'/88, l='MpServer', x=184,25, y=13,00, z=61,78], EntitySkeleton['Скелет'/91, l='MpServer', x=179,61, y=28,00, z=110,36], EntitySkeleton['Скелет'/90, l='MpServer', x=183,50, y=34,00, z=68,50], EntityBat['Летучая мышь'/103, l='MpServer', x=193,25, y=31,10, z=7,75], EntitySilverfish['Чешуйница'/96, l='MpServer', x=188,72, y=71,00, z=125,51], EntitySkeleton['Скелет'/110, l='MpServer', x=201,31, y=50,00, z=41,66], EntityCow['Корова'/111, l='MpServer', x=196,78, y=71,00, z=103,81], EntityZombie['Зомби'/108, l='MpServer', x=204,28, y=39,00, z=21,84], EntitySpider['Паук'/109, l='MpServer', x=208,56, y=52,00, z=22,75], EntityBat['Летучая мышь'/106, l='MpServer', x=196,31, y=13,10, z=16,25], EntitySkeleton['Скелет'/107, l='MpServer', x=207,50, y=40,00, z=24,50], EntityBat['Летучая мышь'/104, l='MpServer', x=192,07, y=45,75, z=7,49], EntitySilverfish['Чешуйница'/112, l='MpServer', x=201,46, y=72,00, z=114,82], EntitySlime['Слизень'/125, l='MpServer', x=211,31, y=38,00, z=102,31], EntityCow['Корова'/124, l='MpServer', x=217,91, y=70,00, z=17,50], EntityCow['Корова'/123, l='MpServer', x=222,22, y=69,00, z=24,78], EntitySkeleton['Скелет'/122, l='MpServer', x=223,41, y=44,00, z=21,00], EntityCow['Корова'/121, l='MpServer', x=220,13, y=69,00, z=8,09], EntitySkeleton['Скелет'/120, l='MpServer', x=209,50, y=49,00, z=9,50], EntityZombie['Зомби'/137, l='MpServer', x=238,03, y=40,00, z=84,56], EntityZombie['Зомби'/136, l='MpServer', x=238,31, y=43,00, z=93,84], EntityCreeper['Крипер'/139, l='MpServer', x=239,00, y=47,00, z=99,72], EntitySkeleton['Скелет'/138, l='MpServer', x=240,09, y=37,00, z=95,50], EntityBat['Летучая мышь'/141, l='MpServer', x=231,47, y=37,10, z=107,25], EntityZombie['Зомби'/140, l='MpServer', x=236,50, y=45,00, z=97,16], EntitySilverfish['Чешуйница'/143, l='MpServer', x=224,21, y=71,00, z=103,59], EntityCow['Корова'/142, l='MpServer', x=236,50, y=70,00, z=108,53], EntitySquid['Спрут'/128, l='MpServer', x=220,53, y=60,00, z=148,47], EntitySkeleton['Скелет'/133, l='MpServer', x=227,50, y=51,00, z=14,50], EntityZombie['Зомби'/135, l='MpServer', x=233,06, y=51,00, z=18,59], EntitySkeleton['Скелет'/134, l='MpServer', x=228,94, y=51,00, z=16,53], EntityPig['Свинья'/152, l='MpServer', x=252,50, y=63,00, z=145,25], EntityCow['Корова'/153, l='MpServer', x=245,13, y=63,00, z=162,69], EntityZombie['Зомби'/155, l='MpServer', x=258,00, y=39,00, z=9,50], EntityZombie['Зомби'/156, l='MpServer', x=263,21, y=38,67, z=10,47], EntityBat['Летучая мышь'/157, l='MpServer', x=258,66, y=41,10, z=12,75], EntityBat['Летучая мышь'/158, l='MpServer', x=267,25, y=38,00, z=12,44], EntityZombie['Зомби'/144, l='MpServer', x=233,50, y=36,00, z=113,50], EntitySkeleton['Скелет'/150, l='MpServer', x=240,94, y=49,00, z=22,31], EntityZombie['Зомби'/151, l='MpServer', x=248,09, y=35,00, z=98,38], EntityOcelot['Оцелот'/163, l='MpServer', x=265,22, y=69,00, z=66,69], EntityPig['Свинья'/162, l='MpServer', x=264,50, y=71,00, z=62,47], EntitySkeleton['Скелет'/161, l='MpServer', x=262,50, y=64,00, z=44,06], EntityCow['Корова'/160, l='MpServer', x=270,97, y=65,00, z=13,53], EntityPig['Свинья'/167, l='MpServer', x=260,47, y=56,00, z=156,50], EntityZombie['Зомби'/166, l='MpServer', x=263,47, y=46,00, z=127,97], EntityCreeper['Крипер'/165, l='MpServer', x=268,31, y=45,29, z=117,69], EntitySkeleton['Скелет'/164, l='MpServer', x=271,63, y=19,00, z=121,88], EntitySkeleton['Скелет'/186, l='MpServer', x=275,22, y=20,00, z=125,56], EntityItem['item.item.rottenFlesh'/187, l='MpServer', x=276,69, y=67,13, z=122,09], EntityBat['Летучая мышь'/184, l='MpServer', x=283,34, y=52,00, z=107,51], EntityCreeper['Крипер'/185, l='MpServer', x=279,00, y=21,00, z=127,41], EntityCow['Корова'/190, l='MpServer', x=287,16, y=66,00, z=143,56], EntityPig['Свинья'/191, l='MpServer', x=272,47, y=71,00, z=140,06], EntityBat['Летучая мышь'/188, l='MpServer', x=283,24, y=20,50, z=128,79], EntityBat['Летучая мышь'/189, l='MpServer', x=285,41, y=48,72, z=129,75], EntityCreeper['Крипер'/178, l='MpServer', x=287,00, y=36,00, z=14,37], EntityCreeper['Крипер'/179, l='MpServer', x=286,72, y=36,00, z=15,75], EntityZombie['Зомби'/176, l='MpServer', x=285,09, y=33,00, z=7,41], EntityEnderman['Эндермен'/177, l='MpServer', x=284,28, y=35,00, z=13,59], EntitySkeleton['Скелет'/182, l='MpServer', x=278,53, y=26,00, z=34,69], EntityCow['Корова'/183, l='MpServer', x=275,69, y=73,00, z=57,47], EntitySkeleton['Скелет'/180, l='MpServer', x=282,52, y=55,00, z=5,55], EntityCreeper['Крипер'/181, l='MpServer', x=274,94, y=38,00, z=24,53], EntitySheep['Овца'/205, l='MpServer', x=294,75, y=63,00, z=89,94], EntitySheep['Овца'/204, l='MpServer', x=296,19, y=63,00, z=90,19], EntityBat['Летучая мышь'/207, l='MpServer', x=288,22, y=49,77, z=106,41], EntitySheep['Овца'/206, l='MpServer', x=298,19, y=63,00, z=87,19], EntitySheep['Овца'/201, l='MpServer', x=302,50, y=68,00, z=37,53], EntityCreeper['Крипер'/200, l='MpServer', x=291,63, y=36,00, z=16,66], EntitySheep['Овца'/203, l='MpServer', x=295,91, y=63,00, z=73,38], EntitySheep['Овца'/202, l='MpServer', x=303,81, y=67,00, z=35,53], EntityZombie['Зомби'/198, l='MpServer', x=293,54, y=34,00, z=2,93], EntityBat['Летучая мышь'/193, l='MpServer', x=278,31, y=62,38, z=156,36], EntityPig['Свинья'/192, l='MpServer', x=274,53, y=59,00, z=155,50], EntityPig['Свинья'/194, l='MpServer', x=277,91, y=64,00, z=157,34], EntitySheep['Овца'/220, l='MpServer', x=311,50, y=71,00, z=67,50], EntityPig['Свинья'/221, l='MpServer', x=305,53, y=63,00, z=84,59], EntitySheep['Овца'/222, l='MpServer', x=304,50, y=69,00, z=95,50], EntitySheep['Овца'/223, l='MpServer', x=316,53, y=71,00, z=90,84], EntityCow['Корова'/216, l='MpServer', x=308,91, y=63,00, z=32,13], EntityOcelot['Оцелот'/217, l='MpServer', x=304,51, y=63,54, z=31,64], EntitySheep['Овца'/218, l='MpServer', x=313,30, y=75,00, z=46,45], EntitySheep['Овца'/219, l='MpServer', x=318,53, y=71,00, z=77,47], EntityZombie['Зомби'/213, l='MpServer', x=318,55, y=26,00, z=7,97], EntityPig['Свинья'/214, l='MpServer', x=318,63, y=75,00, z=15,53], EntityCow['Корова'/215, l='MpServer', x=307,03, y=63,00, z=31,50], EntitySheep['Овца'/208, l='MpServer', x=303,50, y=69,00, z=97,50], EntityZombie['Зомби'/209, l='MpServer', x=290,50, y=48,00, z=130,03], EntityPig['Свинья'/225, l='MpServer', x=321,52, y=66,00, z=164,85], EntityPig['Свинья'/224, l='MpServer', x=305,78, y=70,00, z=125,75]]

Retry entities: 0 total; []

Server brand: fml,forge

Server type: Integrated singleplayer server

Stacktrace:

at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:440)

at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2298)

at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:844)

at net.minecraft.client.main.Main.main(Main.java:93)

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.minecraft.launchwrapper.Launch.launch(Launch.java:57)

at net.minecraft.launchwrapper.Launch.main(Launch.java:18)

 

-- System Details --

Details:

Minecraft Version: 1.6.2

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.7.0_25, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 788159232 bytes (751 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)

JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M

AABB Pool Size: 17636 (987616 bytes; 0 MB) allocated, 1473 (82488 bytes; 0 MB) used

Suspicious classes: FML and Forge are installed

IntCache: cache: 15, tcache: 0, allocated: 3, tallocated: 63

FML: MCP v8.04 FML v6.2.35.804 Minecraft Forge 9.10.0.804 8 mods loaded, 8 mods active

mcp{8.04} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

FML{6.2.35.804} [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

Forge{9.10.0.804} [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

CodeChickenCore{0.9.0.1}

[CodeChicken Core] (coremods) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
NotEnoughItems{1.6.0.5} [Not Enough Items] (NotEnoughItems 1.6.0.5.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
IronChest{1.0} [iron Chests] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
flintstonetools{1.1.3a} [Flintstone Tools] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
unenchtbl{0.1.1} [unenchanting Table] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available
Launched Version: 1.6
LWJGL: 2.9.0
OpenGL: AMD Radeon HD 6800 Series GL version 4.3.12414 Compatibility Profile Context 13.150.100.1000, ATI Technologies Inc.
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Pack: Default
Current Language: Р СѓСЃСЃРєРёР№ (Р РѕСЃСЃРёСЏ)
Profiler Position: N/A (disabled)
Vec3 Pool Size: 1077 (60312 bytes; 0 MB) allocated, 316 (17696 bytes; 0 MB) used[/spoiler]
I found a tutorial, but i still dont know what should i do
here it is: http://www.minecraftforum.net/topic/1924178-forge-162-micros-furnace-tutorials/



[spoiler= Base]
package platon.mods.unenchant;

import platon.mods.flintstonetools.FlintBase;
import platon.mods.flintstonetools.ItemFlintHoe;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkMod.SidedPacketHandler;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import net.minecraft.block.Block;
import net.minecraft.client.entity.EntityClientPlayerMP;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.src.BaseMod;
import net.minecraft.src.ModLoader;
@Mod (modid = EnchantBase.modid, name = "Unenchanting Table", version = "0.1.1") 
@NetworkMod (clientSideRequired = true, serverSideRequired = false)
public class EnchantBase extends BaseMod{

public static Block unenchtbl = new BlockUnEnchTbl(648).setUnlocalizedName("unenchtbl");

public static final String modid = "unenchtbl";

public static EnchantBase instance = new EnchantBase();

@EventHandler
public void init(FMLInitializationEvent event)
{
GameRegistry.registerBlock(unenchtbl);
//GameRegistry.addRecipe(new ItemStack(FlintBase.flinthoe, 1), new Object[]{ " XX", " # ", " # ", Character.valueOf('X'), Item.flint, ('#'), Item.stick});
GameRegistry.registerTileEntity(TileEntityUnEnchTbl.class, "tileEntityUnEnchTbl");
LanguageRegistry.instance().addNameForObject(unenchtbl, "en_US", "Unenchantment Table");
LanguageRegistry.instance().addNameForObject(unenchtbl, "ru_RU", "Стол снятий зачарований");
ModLoader.registerContainerID(this, 1);
}

public GuiContainer getContainerGUI(EntityClientPlayerMP player,int id, int x, int y, int z)
{
switch(id){
	case 1:
		return new GuiUnEnchTbl (player, player.worldObj, x, y, z);
	default:
		return null;
}
}

public String getVersion(){return "0.1.1";}
public void load(){}
}

 

 

[spoiler=Block]

package platon.mods.unenchant;


import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.inventory.IInventory;
import net.minecraft.src.ModLoader;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;

public class BlockUnEnchTbl extends BlockContainer {

public BlockUnEnchTbl(int par1)
{
super(par1, Material.rock);
this.setHardness(3.0F);
this.setCreativeTab(CreativeTabs.tabDecorations);
this.setResistance(5.0F);
this.setLightValue(0.0F);
}

@Override
public void registerIcons(IconRegister reg){
this.blockIcon = reg.registerIcon("unenchant:BlockUnEnchTbl");
}

public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int i, float a, float b, float c)
{
TileEntityUnEnchTbl unenchtbl = (TileEntityUnEnchTbl) world.getBlockTileEntity(x, y, z);

if(player instanceof EntityPlayerMP && unenchtbl !=null)
{
	ModLoader.serverOpenWindow((EntityPlayerMP) player, new ContainerUnEnchTbl(player, world, x, y, z), 1, x, y, z);
}
else
{
	ModLoader.openGUI((EntityPlayerSP) player, new GuiUnEnchTbl(player, world, x, y, z));
}
return true;
}

public TileEntity createNewTileEntity(World par1World)
{
return new TileEntityUnEnchTbl();
}
}

 

 

 

[spoiler=TileEntity]

package platon.mods.unenchant;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;

public class TileEntityUnEnchTbl extends TileEntity implements ISidedInventory {

ItemStack[] itemslots = new ItemStack[2];

private String localizedName;

public int playersCurrentlyUsingTbl;

private String StuffName;

public int getSizeInventory() {
	return this.itemslots.length;
}

public ItemStack getStackInSlot(int j) {
	return this.itemslots[j];
}

public ItemStack decrStackSize(int i, int j) {
	return null;
}

public ItemStack getStackInSlotOnClosing(int i) {
	return null;
}

public void setInventorySlotContents(int i, ItemStack itemstack) {

}

@Override
public void writeToNBT(NBTTagCompound nbt){
	super.writeToNBT(nbt);
	NBTTagList nbttaglist = new NBTTagList();

	for(int i = 0; i < this.itemslots.length; i++){
		if(this.itemslots[i] !=null){
			NBTTagCompound tag = new NBTTagCompound();
			tag.setByte("Slot", (byte) i);

			this.itemslots[i].writeToNBT(tag);

			nbttaglist.appendTag(tag);
		}
	}

	nbt.setTag("Stuff", nbttaglist);

	if(this.isInvNameLocalized()){
		nbt.setString("StuffName", this.StuffName);
	}
}
@Override
public void readFromNBT(NBTTagCompound nbt){
	super.readFromNBT(nbt);

	NBTTagList nbttaglist = nbt.getTagList("Stuff");
	this.itemslots = new ItemStack[this.getSizeInventory()];

	for(int i = 0; i < nbttaglist.tagCount(); i++){
		int var1 = nbt.getByte("Slot") & 255;

		if(var1 <= 0 && var1 < this.itemslots.length){
			this.itemslots[var1] = ItemStack.loadItemStackFromNBT(nbt);
		}
	}

	if(nbt.hasKey("StuffName")){
		this.StuffName = nbt.getString("StuffName");
	}
}

public String getInvName() {
	return this.isInvNameLocalized() ? this.localizedName : "container.UnEnchTbl";
}

public boolean isInvNameLocalized() {
	return this.localizedName != null && this.localizedName.length() > 0;
}

/**
 * Setting the localizedName Variable
 * @param localizedName
 */
public void func_94043_a(String par1Str){
	this.localizedName = par1Str;
}

public int getInventoryStackLimit() {
	return 64;
}

public boolean isUseableByPlayer(EntityPlayer entityplayer) {
	return this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : entityplayer.getDistanceSq((double)xCoord+0.5D, (double)yCoord+0.5D, (double)zCoord+0.5D) <= 64.0D ;
}

public void openChest() {
}

public void closeChest() {

}

public boolean isItemValidForSlot(int i, ItemStack itemstack) {
	return true;
}

public int[] getAccessibleSlotsFromSide(int var1) {
	return null;
}

public boolean canInsertItem(int i, ItemStack itemstack, int j) {
	return false;
}

public boolean canExtractItem(int i, ItemStack itemstack, int j) {
	return false;
}

}

 

 

 

[spoiler=Container]

package platon.mods.unenchant;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;

public class ContainerUnEnchTbl extends Container {

private IInventory itemSlot;

public ContainerUnEnchTbl(EntityPlayer player, World world, int x, int y, int z){
	TileEntityUnEnchTbl unenchtbl = (TileEntityUnEnchTbl) world.getBlockTileEntity(x, y, z);
	IInventory inv = player.inventory;

	for(int j = 0; j < unenchtbl.getSizeInventory();j++){
		inv.setInventorySlotContents(j, null);
	}

	for(int j = 0; j < unenchtbl.getSizeInventory();j++)
	{
		inv.setInventorySlotContents(j, unenchtbl.getStackInSlot(j));
	}

	this.itemSlot = unenchtbl;
	int var3;


		this.addSlotToContainer(new Slot(unenchtbl, 1, 14, 15));
		this.addSlotToContainer(new Slot(unenchtbl, 2, 14, 10));

         for (var3 = 0; var3 < 3; ++var3)
         {
                 for (int var4 = 0; var4 < 9; ++var4)
                 {
                         this.addSlotToContainer(new Slot(inv, var4 + var3 * 9 + 9, 8 + var4 * 18, 84 + var3 * 18));
                 }
         }
         for (var3 = 0; var3 < 9; ++var3)
         {
                 this.addSlotToContainer(new Slot(inv, var3, 8 + var3 * 18, 142));
         }
	}

public boolean canInteractWith(EntityPlayer entityplayer) {
	return this.itemSlot.isUseableByPlayer(entityplayer);
}

@Override
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2)
{
         ItemStack var3 = null;
         Slot var4 = (Slot)this.inventorySlots.get(par2);
         if (var4 != null && var4.getHasStack())
         {
                 ItemStack var5 = var4.getStack();
                 var3 = var5.copy();
                 if (par2 == 2)
                 {
                         if (!this.mergeItemStack(var5, 3, 39, true))
                         {
                                 return null;
                         }
                         var4.onSlotChange(var5, var3);
                 }
                 else if (par2 != 1 && par2 != 0)
                 {
                	 if (par2 >= 3 && par2 < 30)
                         {
                                 if (!this.mergeItemStack(var5, 30, 39, false))
                                 {
                                         return null;
                                 }
                         }
                         else if (par2 >= 30 && par2 < 39 && !this.mergeItemStack(var5, 3, 30, false))
                         {
                                 return null;
                         }
                 }
                 else if (!this.mergeItemStack(var5, 3, 39, false))
                 {
                         return null;
                 }
                 if (var5.stackSize == 0)
                 {
                         var4.putStack((ItemStack)null);
                 }
                 else
                 {
                         var4.onSlotChanged();
                 }
                 if (var5.stackSize == var3.stackSize)
                 {
                         return null;
                 }
                 var4.onPickupFromSlot(par1EntityPlayer, var5);
         }
         return var3;
}
}

 

 

[spoiler=Gui]

package platon.mods.unenchant;

import org.lwjgl.opengl.GL11;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.texture.DynamicTexture;
import net.minecraft.client.renderer.texture.TextureUtil;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.IInventory;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.World;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

@SideOnly(Side.CLIENT)
public class GuiUnEnchTbl extends GuiContainer{

public GuiUnEnchTbl(EntityPlayer player, World world, int x, int y, int z) {

	super(new ContainerUnEnchTbl(player, world, x, y, z));

}

@Override
protected void drawGuiContainerForegroundLayer(int par1, int par2)
{
	this.fontRenderer.drawString("Стол Снятия Зачарований", 0, 0, 4210752);
	this.fontRenderer.drawString("Инвентарь", 0, 0, 4210752);
}

protected void drawGuiContainerBackgroundLayer(float f, int i, int j)
{
	GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
	this.mc.renderEngine.func_110577_a(new ResourceLocation("unenchant", "gui/unenchtblgui.png"));

	this.xSize=176;
	this.ySize=166;

	int var1 = (this.width-this.xSize)/2;
	int var2 = (this.height-this.ySize)/2;

	this.drawTexturedModalRect(var1, var2, 0, 0, this.xSize, this.ySize);
}

}

 

[spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler]LOL,Its nothing interesting here

[spoiler=Spoiler]And here too

[spoiler=Spoiler]But that image is pretty good

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

well start by posting the error...

 

 

Sorry, my bad. I have already. :)

[spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler]LOL,Its nothing interesting here

[spoiler=Spoiler]And here too

[spoiler=Spoiler]But that image is pretty good

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

You are genius, i am stupid. I thought that index is not should be in array.

[spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler]LOL,Its nothing interesting here

[spoiler=Spoiler]And here too

[spoiler=Spoiler]But that image is pretty good

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

I have one more question: When i put item to created by me slot it destoyes the item. how can i fix that?

[spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler]LOL,Its nothing interesting here

[spoiler=Spoiler]And here too

[spoiler=Spoiler]But that image is pretty good

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

I have one more question: When i put item to created by me slot it destoyes the item. how can i fix that?

You are opening your GUI wrongly. You need an IGUiHandler and then use EntityPlayer.openGui

 

 

I created following class

[spoiler=IGUIHandler]

package platon.mods.unenchant;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityFurnace;
import net.minecraft.world.World;
import cpw.mods.fml.common.network.IGuiHandler;

public class GuiHandlerUnEnchant implements IGuiHandler
{
@Override
public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z)
{
TileEntity tile_entity = world.getBlockTileEntity(x, y, z);
switch(id)
{
case 0: return new ContainerUnEnchTbl(player, world, x, y, z);
}
return null;
}
@Override
public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z)
{
TileEntity tile_entity = world.getBlockTileEntity(x, y, z);
switch(id)
{
case 0: return new GuiUnEnchTbl(player, world, x, y, z);
}
return null;
}
}

 

 

 

How to register it? And where should i call EntityPlayer.openGui. Tell me fullly, please.

[spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler]LOL,Its nothing interesting here

[spoiler=Spoiler]And here too

[spoiler=Spoiler]But that image is pretty good

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

I did it. When i click any thing in inventory it doesnt moving and i getting error  "A mod tried to open a gui on the server without being a NetworkMod" And when come out yo menu there is an error

 

 

2013-08-22 00:41:17 [sEVERE] [ForgeModLoader] A TileEntity type platon.mods.unenchant.TileEntityUnEnchTbl has throw an exception trying to write state. It will not persist. Report this to the mod author

java.lang.IllegalArgumentException: Empty string not allowed

at net.minecraft.nbt.NBTTagString.<init>(NBTTagString.java:24)

at net.minecraft.nbt.NBTTagCompound.setString(NBTTagCompound.java:145)

at platon.mods.unenchant.TileEntityUnEnchTbl.writeToNBT(TileEntityUnEnchTbl.java:60)

at net.minecraft.world.chunk.storage.AnvilChunkLoader.writeChunkToNBT(AnvilChunkLoader.java:317)

at net.minecraft.world.chunk.storage.AnvilChunkLoader.saveChunk(AnvilChunkLoader.java:127)

at net.minecraft.world.gen.ChunkProviderServer.safeSaveChunk(ChunkProviderServer.java:232)

at net.minecraft.world.gen.ChunkProviderServer.saveChunks(ChunkProviderServer.java:284)

at net.minecraft.world.WorldServer.saveAllChunks(WorldServer.java:897)

at net.minecraft.server.MinecraftServer.saveAllWorlds(MinecraftServer.java:358)

at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:591)

at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:129)

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482)

at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)

 

 

I fixed it by setting  "private String StuffName" equal to "StuffName". Now error dissapeared but I do not know whether it was possible to do so.

[spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler]LOL,Its nothing interesting here

[spoiler=Spoiler]And here too

[spoiler=Spoiler]But that image is pretty good

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

What i need to do to be a @NetworkMod

 

I have @NetworkMod (clientSideRequired = true, serverSideRequired = false) this.

[spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler]LOL,Its nothing interesting here

[spoiler=Spoiler]And here too

[spoiler=Spoiler]But that image is pretty good

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

[spoiler=EnchantBase]

package platon.mods.unenchant;

 

import platon.mods.flintstonetools.FlintBase;

import platon.mods.flintstonetools.ItemFlintHoe;

import cpw.mods.fml.common.Mod;

import cpw.mods.fml.common.Mod.EventHandler;

import cpw.mods.fml.common.Mod.Instance;

import cpw.mods.fml.common.event.FMLInitializationEvent;

import cpw.mods.fml.common.event.FMLPreInitializationEvent;

import cpw.mods.fml.common.network.NetworkMod;

import cpw.mods.fml.common.network.NetworkMod.SidedPacketHandler;

import cpw.mods.fml.common.network.NetworkRegistry;

import cpw.mods.fml.common.registry.GameRegistry;

import cpw.mods.fml.common.registry.LanguageRegistry;

import net.minecraft.block.Block;

import net.minecraft.client.entity.EntityClientPlayerMP;

import net.minecraft.client.gui.inventory.GuiContainer;

import net.minecraft.item.Item;

import net.minecraft.item.ItemStack;

import net.minecraft.src.BaseMod;

import net.minecraft.src.ModLoader;

import net.minecraftforge.common.Configuration;

@Mod (modid = EnchantBase.modid, name = "Unenchanting", version = "0.1.1")

@NetworkMod (clientSideRequired = true, serverSideRequired = false)

public class EnchantBase extends BaseMod{

 

@Instance("EnchantBase")

public static EnchantBase instance = new EnchantBase();

 

public static Block unenchtbl = new BlockUnEnchTbl(648).setUnlocalizedName("unenchtbl");

 

public static final String modid = "EnchantBase";

 

public static String unenchtblname = "Unenchantment Table";

 

private GuiHandlerUnEnchant guiHandler = new GuiHandlerUnEnchant();

 

@EventHandler

public void preinit(FMLPreInitializationEvent event)

{

Configuration config = new Configuration(event.getSuggestedConfigurationFile());

config.load();

config.addCustomCategoryComment("unenchtbl", "You may change the default name of Unenchantment Table to whatever you want");

unenchtblname = config.get("unenchtbl", "unenchtbllocalizedname", unenchtblname).getString();

config.save();

}

 

@EventHandler

public void init(FMLInitializationEvent event)

{

GameRegistry.registerBlock(unenchtbl);

//GameRegistry.addRecipe(new ItemStack(FlintBase.flinthoe, 1), new Object[]{ " XX", " # ", " # ", Character.valueOf('X'), Item.flint, ('#'), Item.stick});

GameRegistry.registerTileEntity(TileEntityUnEnchTbl.class, "tileEntityUnEnchTbl");

LanguageRegistry.addName(unenchtbl, unenchtblname);

LanguageRegistry.instance().addNameForObject(unenchtbl, "ru_RU", "Стол снятия зачарований");

ModLoader.registerContainerID(this, 1);

NetworkRegistry.instance().registerGuiHandler(this, guiHandler);

 

if (unenchtbl.getLocalizedName() == "Стол снятия зачарований"){

TileEntityUnEnchTbl.func_94043_a(unenchtblname);

}

else{

    TileEntityUnEnchTbl.func_94043_a("Стол снятия зачаровани");

}

}

 

public GuiContainer getContainerGUI(EntityClientPlayerMP player,int id, int x, int y, int z)

{

switch(id){

case 1:

return new GuiUnEnchTbl (player, player.worldObj, x, y, z);

default:

return null;

}

}

 

public String getVersion(){return "0.1.1";}

public void load(){}

}

 

 

 

[spoiler=Block]

package platon.mods.unenchant;


import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.inventory.IInventory;
import net.minecraft.src.ModLoader;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;

public class BlockUnEnchTbl extends BlockContainer {

public BlockUnEnchTbl(int par1)
{
super(par1, Material.rock);
this.setHardness(3.0F);
this.setCreativeTab(CreativeTabs.tabDecorations);
this.setResistance(5.0F);
this.setLightValue(0.0F);
}

@Override
public void registerIcons(IconRegister reg){
this.blockIcon = reg.registerIcon("unenchant:BlockUnEnchTbl");
}

public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int i, float a, float b, float c)
{
TileEntityUnEnchTbl unenchtbl = (TileEntityUnEnchTbl) world.getBlockTileEntity(x, y, z);
if(player instanceof EntityPlayerMP && unenchtbl !=null)
{
	player.openGui(EnchantBase.modid, 1, world, x, y, z);
	ModLoader.serverOpenWindow((EntityPlayerMP) player, new ContainerUnEnchTbl(player, world, x, y, z), 1, x, y, z);
}
else
{
	ModLoader.openGUI((EntityPlayerSP) player, new GuiUnEnchTbl(player, world, x, y, z));
}
return true;
}

public TileEntity createNewTileEntity(World par1World)
{
return new TileEntityUnEnchTbl();
}
}

 

[spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler]LOL,Its nothing interesting here

[spoiler=Spoiler]And here too

[spoiler=Spoiler]But that image is pretty good

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

But if i'll delete all ModLoader strings, what should i paste instead of them?

[spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler]LOL,Its nothing interesting here

[spoiler=Spoiler]And here too

[spoiler=Spoiler]But that image is pretty good

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

Now my OnBlockUse is

public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int i, float a, float b, float c)
{
player.openGui(EnchantBase.instance, 1, world, x, y, z);
return true;
}

I didn't changed anything else

When i click my block, animation does but gui doesn't opens and no errors

What should i change also?

[spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler]LOL,Its nothing interesting here

[spoiler=Spoiler]And here too

[spoiler=Spoiler]But that image is pretty good

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

I copied OnBlockActivated from tutorial, now in opens, but when i open it , items from first and second slot disappears.

When i trying to put item to my own slots in blocks they're also disappears

 

My code in archive https://mega.co.nz/#!jccCwKJL!aZ1C0jbz_KFPz-9SaNJQ41TWESxUy7h5BDrO6SdEhwM

[spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler]LOL,Its nothing interesting here

[spoiler=Spoiler]And here too

[spoiler=Spoiler]But that image is pretty good

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

I changed id from 0 to 1 which i registereg and block stopped to open completely

I registering id with this  "ModLoader.registerContainerID(this, 1);"

 

I changed 0 to 1 in GuiHandler, problem is pre previous. Things disapperars

 

http://pastebin.com/ttPWwvji

http://pastebin.com/nSMjqfFF

http://pastebin.com/2As32ubj

[spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler]LOL,Its nothing interesting here

[spoiler=Spoiler]And here too

[spoiler=Spoiler]But that image is pretty good

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

removed, nothing changed.

 

I fixed one problem. Now the only problem is when i put something to slots in block(both of them) that disappears

[spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler]LOL,Its nothing interesting here

[spoiler=Spoiler]And here too

[spoiler=Spoiler]But that image is pretty good

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

I fixed a half of second problem. Now i can put items in the slots, but i cant get 'em out of slots  :)  :)

 

[spoiler=TileEntity]

package platon.mods.unenchant;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;

public class TileEntityUnEnchTbl extends TileEntity implements ISidedInventory {

ItemStack[] itemslots = new ItemStack[2];

public static String localizedName;

public int getSizeInventory() {
	return this.itemslots.length;
}

public ItemStack getStackInSlot(int i) {
	return this.itemslots[i];
}

public ItemStack decrStackSize(int i, int j) {
	return null;
}

public ItemStack getStackInSlotOnClosing(int i) {
	return null;
}

public void setInventorySlotContents(int par1, ItemStack par2ItemStack) {
	this.itemslots[par1] = par2ItemStack;
        if (par2ItemStack != null && par2ItemStack.stackSize > this.getInventoryStackLimit())
        {
                par2ItemStack.stackSize = this.getInventoryStackLimit();
        }
}

public void readFromNBT(NBTTagCompound par1NBTTagCompound)
{
         super.readFromNBT(par1NBTTagCompound);
         NBTTagList nbttaglist = par1NBTTagCompound.getTagList("Items");
         this.itemslots = new ItemStack[this.getSizeInventory()];
         for (int i = 0; i < nbttaglist.tagCount(); ++i)
         {
                 NBTTagCompound nbttagcompound1 = (NBTTagCompound)nbttaglist.tagAt(i);
                 byte b0 = nbttagcompound1.getByte("Slot");
                 if (b0 >= 0 && b0 < this.itemslots.length)
                 {
                         this.itemslots[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1);
                 }
         }
         
         if (par1NBTTagCompound.hasKey("CustomName"))
         {
                 this.localizedName = par1NBTTagCompound.getString("CustomName");
         }
}
/**
         * Writes a tile entity to NBT.
         */
public void writeToNBT(NBTTagCompound par1NBTTagCompound)
{
         super.writeToNBT(par1NBTTagCompound);
         NBTTagList nbttaglist = new NBTTagList();
         for (int i = 0; i < this.itemslots.length; ++i)
         {
                 if (this.itemslots[i] != null)
                 {
                         NBTTagCompound nbttagcompound1 = new NBTTagCompound();
                         nbttagcompound1.setByte("Slot", (byte)i);
                         this.itemslots[i].writeToNBT(nbttagcompound1);
                         nbttaglist.appendTag(nbttagcompound1);
                 }
         }
         par1NBTTagCompound.setTag("Items", nbttaglist);
         if (this.isInvNameLocalized())
         {
                 par1NBTTagCompound.setString("CustomName", this.localizedName);
         }
}


public String getInvName() {
	return this.isInvNameLocalized() ? this.localizedName : "container.UnEnchTbl";
}

public boolean isInvNameLocalized() {
	return this.localizedName != null && this.localizedName.length() > 0;
}

/**
 * Setting the localizedName Variable
 * @param localizedName
 */
public static void func_94043_a(String par1Str){
	localizedName = par1Str;
}

public int getInventoryStackLimit() {
	return 1;
}

public boolean isUseableByPlayer(EntityPlayer par1EntityPlayer)
{
         return this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : par1EntityPlayer.getDistanceSq((double)this.xCoord + 0.5D, (double)this.yCoord + 0.5D, (double)this.zCoord + 0.5D) <= 64.0D;
}

public void openChest() {
}

public void closeChest() {

}

public boolean isItemValidForSlot(int i, ItemStack itemstack) {
	return true;
}

public int[] getAccessibleSlotsFromSide(int var1) {
	return null;
}

public boolean canInsertItem(int i, ItemStack itemstack, int j) {
	return true;
}

public boolean canExtractItem(int i, ItemStack itemstack, int j) {
	return true;
}

}

 

[spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler]LOL,Its nothing interesting here

[spoiler=Spoiler]And here too

[spoiler=Spoiler]But that image is pretty good

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

Just implement? and what inventory? which class is it?

I misunderstood what i need to write to code and where.

[spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler]LOL,Its nothing interesting here

[spoiler=Spoiler]And here too

[spoiler=Spoiler]But that image is pretty good

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

Your inventory is your TileEntity. You have the method implemented but it just returns null.

 

Hah thanks man, i have one more problem i want to put to second slot only books and nothing else. How can i make it?

 

I writed that String and it doesn't work. Or i should call it from somewhere?

	public boolean isItemValidForSlot(int i, ItemStack itemstack) {
	return i == 0 ? true : (itemslots[i].getItem().itemID == ItemBook.book.itemID);
}

For that time i want to put if first slot with id 0 anything.

 

Also i writed that expression

	public int[] getAccessibleSlotsFromSide(int par1) {
	if (par1 == 0)
		return slot_top;
	else
		return slot_bottom;
}

Is it useful? And what it does?

 

[spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler]LOL,Its nothing interesting here

[spoiler=Spoiler]And here too

[spoiler=Spoiler]But that image is pretty good

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

You have to make a Slot subclass and use that instead. In there override isItemValid.

 

Am i need to create new SlotUnEnchTbl class that extends TileEntity? Or it must extends the Slot class. Am i need to replace

this.addSlotToContainer(new Slot(unenchtbl, 1, 16, 49));

to

this.addSlotToContainer(new SlotUnEnchTbl(unenchtbl, 1, 16, 49));

??

 

 

And in http://www.minecraftforum.net/topic/1924178-forge-162-micros-furnace-tutorials/ tutorial guy doesn't creates any Slot class, but he has definition that in bottom slot you can put only permitted things (they're also in the TileEntity class)

[spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler]LOL,Its nothing interesting here

[spoiler=Spoiler]And here too

[spoiler=Spoiler]But that image is pretty good

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

Doesn't works.  :( 

 

[spoiler=My TileEntity]

package platon.mods.unenchant;

import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.ISidedInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;

public class TileEntityUnEnchTbl extends TileEntity implements ISidedInventory {

ItemStack[] itemslots = new ItemStack[2];

public static String localizedName;

private static final int[] slot_top = {0};
private static final int[] slot_bottom = {1};

public int getSizeInventory() {
	return this.itemslots.length;
}

public ItemStack getStackInSlot(int i) {
	return this.itemslots[i];
}

public ItemStack decrStackSize(int par1, int par2)
{
         if (this.itemslots[par1] != null)
         {
                 ItemStack itemstack;
                 if (this.itemslots[par1].stackSize <= par2)
                 {
                         itemstack = this.itemslots[par1];
                         this.itemslots[par1] = null;
                         return itemstack;
                 }
                 else
                 {
                         itemstack = this.itemslots[par1].splitStack(par2);
                         if (this.itemslots[par1].stackSize == 0)
                         {
                                 this.itemslots[par1] = null;
                         }
                         return itemstack;
                 }
         }
         else
         {
                 return null;
         }
}

public ItemStack getStackInSlotOnClosing(int par1) {
        if (this.itemslots[par1] != null)
        {
                ItemStack itemstack = this.itemslots[par1];
                this.itemslots[par1] = null;
                return itemstack;
        }
        else
        {
                return null;
        }
}

public void setInventorySlotContents(int par1, ItemStack par2ItemStack) {
	this.itemslots[par1] = par2ItemStack;
        if (par2ItemStack != null && par2ItemStack.stackSize > this.getInventoryStackLimit())
        {
                par2ItemStack.stackSize = this.getInventoryStackLimit();
        }
}

public void readFromNBT(NBTTagCompound par1NBTTagCompound)
{
         super.readFromNBT(par1NBTTagCompound);
         NBTTagList nbttaglist = par1NBTTagCompound.getTagList("Items");
         this.itemslots = new ItemStack[this.getSizeInventory()];
         for (int i = 0; i < nbttaglist.tagCount(); ++i)
         {
                 NBTTagCompound nbttagcompound1 = (NBTTagCompound)nbttaglist.tagAt(i);
                 byte b0 = nbttagcompound1.getByte("Slot");
                 if (b0 >= 0 && b0 < this.itemslots.length)
                 {
                         this.itemslots[b0] = ItemStack.loadItemStackFromNBT(nbttagcompound1);
                 }
         }
         
         if (par1NBTTagCompound.hasKey("CustomName"))
         {
                 this.localizedName = par1NBTTagCompound.getString("CustomName");
         }
}
/**
         * Writes a tile entity to NBT.
         */
public void writeToNBT(NBTTagCompound par1NBTTagCompound)
{
         super.writeToNBT(par1NBTTagCompound);
         NBTTagList nbttaglist = new NBTTagList();
         for (int i = 0; i < this.itemslots.length; ++i)
         {
                 if (this.itemslots[i] != null)
                 {
                         NBTTagCompound nbttagcompound1 = new NBTTagCompound();
                         nbttagcompound1.setByte("Slot", (byte)i);
                         this.itemslots[i].writeToNBT(nbttagcompound1);
                         nbttaglist.appendTag(nbttagcompound1);
                 }
         }
         par1NBTTagCompound.setTag("Items", nbttaglist);
         if (this.isInvNameLocalized())
         {
                 par1NBTTagCompound.setString("CustomName", this.localizedName);
         }
}


public String getInvName() {
	return this.isInvNameLocalized() ? this.localizedName : "container.UnEnchTbl";
}

public boolean isInvNameLocalized() {
	return this.localizedName != null && this.localizedName.length() > 0;
}

/**
 * Setting the localizedName Variable
 * @param localizedName
 */
public static void func_94043_a(String par1Str){
	localizedName = par1Str;
}

public int getInventoryStackLimit() {
	return 1;
}

public boolean isUseableByPlayer(EntityPlayer par1EntityPlayer)
{
         return this.worldObj.getBlockTileEntity(this.xCoord, this.yCoord, this.zCoord) != this ? false : par1EntityPlayer.getDistanceSq((double)this.xCoord + 0.5D, (double)this.yCoord + 0.5D, (double)this.zCoord + 0.5D) <= 64.0D;
}

public void openChest() {
}

public void closeChest() {

}

public boolean isItemValidForSlot(int par1, ItemStack par2ItemStack) {
	return par2ItemStack != null ? par2ItemStack.getItem().itemID == Item.book.itemID : false;
}

public int[] getAccessibleSlotsFromSide(int par1) {
	if (par1 == 0)
		return slot_top;
	else
		return slot_bottom;
}

public boolean canInsertItem(int par1, ItemStack par2ItemStack, int par3){
	return isItemValidForSlot(1, par2ItemStack);
}

public boolean canExtractItem(int par1, ItemStack par2ItemStack, int par3) {
	return isItemValidForSlot(1, par2ItemStack);
}

}

 

 

I want to put only books in second slot with id 1.  By the way if i set canInsertItem and canExtractItem to false, i still may put and take things. What should i do to make it work?

[spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler]LOL,Its nothing interesting here

[spoiler=Spoiler]And here too

[spoiler=Spoiler]But that image is pretty good

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

Now I think that these methods are for calling only. Thing that i wanted isn't very important to me. So I'll ask another question if I'll get in trouble

[spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler]LOL,Its nothing interesting here

[spoiler=Spoiler]And here too

[spoiler=Spoiler]But that image is pretty good

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

Now I've got a problem

I created my own method is TileEntity

	public void UnEnchantment ()
{
	if (isItemValidForSlot(0, this.itemslots[0]))
	{
		System.out.println("HAHA!!");
	}
	else
	{
		System.out.println("Crying!!");
	}
}

 

And it doesn't works. I ain't see my Strings in console or anywhere else. What shoud i do to make mod call it?

[spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler]LOL,Its nothing interesting here

[spoiler=Spoiler]And here too

[spoiler=Spoiler]But that image is pretty good

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

public boolean isItemValidForSlot(int par1, ItemStack par2ItemStack) {
	return par1 == 1 && par2ItemStack != null ? par2ItemStack.getItem().itemID == Item.book.itemID : false;
}

 

Like that? Anyway, nevermind. It doesn't important for me. I'm just begian learning java. So my knowledge is small. i know how to call my own method. I don't know where from should i call it.

[spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler][spoiler=Spoiler]LOL,Its nothing interesting here

[spoiler=Spoiler]And here too

[spoiler=Spoiler]But that image is pretty good

 

 

 

 

 

 

 

 

 

 

 

 

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'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
    • I am unable to do that. Brigadier is a mojang library that parses commands.
  • Topics

×
×
  • Create New...

Important Information

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