Jump to content

Recommended Posts

Posted

I want to make a GUI, I have the textures the code gives no error but it doesn't work.

The main class:

 

 

package com.BI.Main_Package;

 

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.item.Item;

import net.minecraftforge.common.MinecraftForge;

import net.minecraftforge.common.util.EnumHelper;

 

import com.BI.Blocks.Mod_Blocks;

import com.BI.Events.Drop_Event;

import com.BI.Interfaces.Gui_Handeler;

import com.BI.Items.Mod_Items;

import com.BI.Lib.Reference;

import com.BI.Registers.Game_Registry;

import com.BI.WorldGen.TelotriteWG;

 

import cpw.mods.fml.common.FMLCommonHandler;

import cpw.mods.fml.common.FMLLog;

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.NetworkRegistry;

 

@Mod(modid = Reference.MOD_ID, version = Reference.MOD_VERSION, name = Reference.MOD_NAME)

public class Main_Class

{

@Instance(Reference.MOD_ID)

public static Main_Class instance;

private Gui_Handeler guiHandler = new Gui_Handeler();

public static CreativeTabs CMTab = new CMTab(CreativeTabs.getNextID(), "Chaos Magic");

public static final Item.ToolMaterial DagerM = EnumHelper.addToolMaterial("DagerM", 3, 151, 12.0F, 3.5F, 22);

public static TelotriteWG TelotriteOreWG = new TelotriteWG();

    @EventHandler

    public void init(FMLInitializationEvent event)

    {

    FMLLog.info("Chaos Magic " + Reference.MOD_VERSION + ">> is initializating!");

    NetworkRegistry.INSTANCE.registerGuiHandler(this, new Gui_Handeler());

Mod_Blocks.BlocksInit();

Mod_Items.ItemsInit();

Game_Registry.RegistersInitItems();

Game_Registry.RegistersInitBlocks();

Game_Registry.RegistersEvents();

Game_Registry.RegistersTileEntitys();

Game_Registry.RegistersWorldGenerator();

FMLLog.info("Chaos Magic " + Reference.MOD_VERSION + ">> has succesfully initialized all the modules!");

    }

}

 

 

The TileEntity:

 

 

package com.BI.Blocks.TileEntitys;

 

import net.minecraft.block.Block;

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.init.Blocks;

import net.minecraft.inventory.IInventory;

import net.minecraft.item.ItemStack;

import net.minecraft.nbt.NBTBase;

import net.minecraft.nbt.NBTTagCompound;

import net.minecraft.nbt.NBTTagList;

import net.minecraft.tileentity.TileEntity;

import net.minecraft.world.World;

 

public class PowderingMachineTileEntity extends TileEntity implements IInventory{

private ItemStack[] items;

int k;

public PowderingMachineTileEntity(){

items = new ItemStack[1];

}

public boolean search(World world, int x, int y, int z,Block block){

boolean variabila = false;

for (int i = x - 2; i <= x + 2; ++i)

{

for (int k = z - 2; k <= z + 2; ++k)

{

for (int j = y - 1; j <= y + 1; ++j)

{

if (i!=0 || k != 0 || j != 0)

{

if (world.getBlock(i, j, k) == block)

{

// System.out.println("The block has been detected!");

variabila = true;

}

}

}

}

}

return variabila;

}

@Override

public void updateEntity() {

if(search(worldObj, xCoord, yCoord, zCoord, Blocks.water)){

if(worldObj.isDaytime()){

///////////TO DO INCEREASE ITEM

}

}

}

@Override

public void closeInventory() {}

@Override

public ItemStack decrStackSize(int i, int count) {

ItemStack itemstack = getStackInSlot(i);

if(itemstack != null){

if(itemstack.stackSize <= count){

setInventorySlotContents(i, null);

}else{

itemstack = itemstack.splitStack(count);

markDirty();

}

}

return itemstack;

}

@Override

public String getInventoryName() {

return "Powdering Machine";

}

@Override

public int getInventoryStackLimit() {

return 64;

}

@Override

public int getSizeInventory() {

return items.length;

}

@Override

public ItemStack getStackInSlot(int i) {

return items;

}

@Override

public ItemStack getStackInSlotOnClosing(int i) {

ItemStack item = getStackInSlot(i);

setInventorySlotContents(i, null);

return item;

}

@Override

public boolean hasCustomInventoryName() {

return false;

}

@Override

public boolean isItemValidForSlot(int var1, ItemStack var2) {

return true;

}

@Override

public boolean isUseableByPlayer(EntityPlayer player) {

return player.getDistanceSq(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5) <= 64;

}

@Override

public void openInventory() {}

@Override

public void setInventorySlotContents(int i, ItemStack itemstack) {

items = itemstack;

if(itemstack != null && itemstack.stackSize > getInventoryStackLimit()){

itemstack.stackSize = getInventoryStackLimit();

}

markDirty();

}

@Override

public void writeToNBT(NBTTagCompound compound) {

super.writeToNBT(compound);

NBTTagList items = new NBTTagList();

for(int i = 0; i < getSizeInventory(); i++){

ItemStack stack = getStackInSlot(i);

if(stack != null){

NBTTagCompound item = new NBTTagCompound();

item.setByte("Slot", (byte)i);

stack.writeToNBT(item);

items.appendTag(item);

}

}

compound.setTag("Items", items);

}

@Override

public void readFromNBT(NBTTagCompound compound) {

super.readFromNBT(compound);

NBTTagList items = compound.getTagList("Items", compound.getId()); 

for (int i = 0; i < items.tagCount(); ++i) {

NBTTagCompound item = items.getCompoundTagAt(i);

byte slot = item.getByte("Slot");

if (slot >= 0 && slot < getSizeInventory()) {

setInventorySlotContents(slot, ItemStack.loadItemStackFromNBT(item));

}

}

}

}

 

 

Gui Handeler:

 

 

package com.BI.Interfaces;

 

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.tileentity.TileEntity;

import net.minecraft.world.World;

 

import com.BI.Blocks.TileEntitys.PowderingMachineTileEntity;

import com.BI.Interfaces.PowderingMachine.ContainerPowderingMachine;

 

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

 

public class Gui_Handeler implements IGuiHandler{

 

@Override

public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {

TileEntity te = world.getTileEntity(x, y, z);

switch(ID){

case 1: if(te !=null && te instanceof PowderingMachineTileEntity){

return new ContainerPowderingMachine(player.inventory, (PowderingMachineTileEntity)te);

}

}

return null;

}

 

@Override

public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {

TileEntity te = world.getTileEntity(x, y, z);

switch(ID){

case 1: if(te !=null && te instanceof PowderingMachineTileEntity){

return new ContainerPowderingMachine(player.inventory, (PowderingMachineTileEntity)te);

}

}

return null;

}

 

}

 

 

Container:

 

 

package com.BI.Interfaces.PowderingMachine;

 

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.entity.player.InventoryPlayer;

import net.minecraft.inventory.Container;

import net.minecraft.inventory.Slot;

 

import com.BI.Blocks.TileEntitys.PowderingMachineTileEntity;

 

public class ContainerPowderingMachine extends Container{

 

PowderingMachineTileEntity machine;

 

public  ContainerPowderingMachine(InventoryPlayer invPlayer, PowderingMachineTileEntity machine){

this.machine = machine;

for(int x = 0; x<9; x++){

addSlotToContainer(new Slot(invPlayer,x,8+18*x,142));

}

for(int y = 0;y<3;y++){

for(int x = 0;x<9;x++){

addSlotToContainer(new Slot(invPlayer,x + y * 9 + 9,8 + 18 * x,84 + y * 18));

}

}

for(int x =0; x < 1; x++){

addSlotToContainer(new Slot(machine,x,80 + 18 * x,33));

}

}

 

@Override

public boolean canInteractWith(EntityPlayer entityplayer) {

return machine.isUseableByPlayer(entityplayer);

}

 

}

 

 

Gui:

 

 

package com.BI.Interfaces.PowderingMachine;

 

import org.lwjgl.opengl.GL11;

 

import com.BI.Blocks.TileEntitys.PowderingMachineTileEntity;

 

import net.minecraft.client.Minecraft;

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

import net.minecraft.entity.player.InventoryPlayer;

import net.minecraft.inventory.Container;

import net.minecraft.util.ResourceLocation;

import cpw.mods.fml.relauncher.Side;

import cpw.mods.fml.relauncher.SideOnly;

 

@SideOnly(Side.CLIENT)

public class Gui_PowderingMachine extends GuiContainer{

 

public Gui_PowderingMachine(InventoryPlayer invPlayer, PowderingMachineTileEntity machine) {

super(new ContainerPowderingMachine(invPlayer, machine));

xSize = 176;

ySize = 166;

}

 

// private static final ResourceLocation texture = new ResourceLocation("minecraft", "textures/gui/GuiEssenceReceiver.jpg");

 

@Override

protected void drawGuiContainerBackgroundLayer(float f, int i, int j) {

GL11.glColor4f(1, 1, 1, 1);

this.mc.renderEngine.bindTexture(new ResourceLocation("minecraft", "textures/gui/GuiPowderingMachine.jpg"));

drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);

 

}

 

}

 

 

Can someone help me?

Woking at my first mod, Blocks & Items Revolution : https://github.com/megabitus98/Blocks-Items-Revolution

Posted

  true using that instead and let me know if it got you anywhere

 

@Override

  public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {

      TileEntity te = world.getTileEntity(x, y, z);

      switch(ID){

      case 1: if(te !=null && te instanceof PowderingMachineTileEntity){

        return new Gui_PowderingMachine(player.inventory, (PowderingMachineTileEntity)te);

      }

      }

      return null;

  }

Posted

Now it crashes, that's a start and here is

Block:

 

 

package com.BI.Blocks.Classes;

 

import net.minecraft.block.BlockContainer;

import net.minecraft.block.material.Material;

import net.minecraft.entity.item.EntityItem;

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.inventory.IInventory;

import net.minecraft.item.ItemStack;

import net.minecraft.tileentity.TileEntity;

import net.minecraft.world.World;

 

import com.BI.Blocks.TileEntitys.PowderingMachineTileEntity;

import com.BI.Lib.Names;

import com.BI.Main_Package.Main_Class;

 

import cpw.mods.fml.common.network.internal.FMLNetworkHandler;

 

public class PowderingMachineBlock extends BlockContainer {

 

public PowderingMachineBlock(Material p_i45394_1_) {

super(Material.rock);

this.setCreativeTab(Main_Class.CMTab);

this.setBlockName(Names.PowderingMachine);

this.setBlockTextureName(Names.PowderingMachine);

}

 

@Override

public TileEntity createNewTileEntity(World var1, int var2) {

return new PowderingMachineTileEntity();

}

@Override

public boolean onBlockActivated(World world,int x,int y, int z, EntityPlayer player,int side,float hitX,float hitY, float hitZ){

if(!world.isRemote){

FMLNetworkHandler.openGui(player, Main_Class.instance, 1, world, x, y, z);

}

return true;

}

 

}

 

 

Game_Registry

 

 

package com.BI.Registers;

 

import net.minecraftforge.common.MinecraftForge;

 

import com.BI.Blocks.Mod_Blocks;

import com.BI.Blocks.TileEntitys.PowderingMachineTileEntity;

import com.BI.Events.Drop_Event;

import com.BI.Items.Mod_Items;

import com.BI.Lib.Names;

import com.BI.Lib.Reference;

import com.BI.Main_Package.Main_Class;

 

import cpw.mods.fml.common.FMLLog;

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

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

 

public class Game_Registry {

public static void RegistersInitItems(){

LanguageRegistry.addName(Mod_Items.DagerOfSight, Names.DagerOfSight);

GameRegistry.registerItem(Mod_Items.DagerOfSight, Names.DagerOfSight);

 

LanguageRegistry.addName(Mod_Items.Eye, Names.Eye);

GameRegistry.registerItem(Mod_Items.Eye, Names.Eye);

 

FMLLog.info("Chaos Magic " + Reference.MOD_VERSION + ">> succesfully registrated the items!");

}

public static void RegistersInitBlocks(){

LanguageRegistry.addName(Mod_Blocks.TelotriteOre, Names.TelotriteOre);

GameRegistry.registerBlock(Mod_Blocks.TelotriteOre, Names.TelotriteOre);

 

LanguageRegistry.addName(Mod_Blocks.PowderingMachine, Names.PowderingMachine);

GameRegistry.registerBlock(Mod_Blocks.PowderingMachine, Names.PowderingMachine);

 

FMLLog.info("Chaos Magic " + Reference.MOD_VERSION + ">> succesfully registrated the blocks!");

}

public static void RegistersEvents(){

MinecraftForge.EVENT_BUS.register(new Drop_Event());

 

FMLLog.info("Chaos Magic " + Reference.MOD_VERSION + ">> succesfully registrated the events!");

}

public static void RegistersTileEntitys(){

GameRegistry.registerTileEntity(PowderingMachineTileEntity.class, Names.PowderingMachine);

 

FMLLog.info("Chaos Magic " + Reference.MOD_VERSION + ">> succesfully registrated the TileEntitys!");

}

public static void RegistersWorldGenerator(){

GameRegistry.registerWorldGenerator(Main_Class.TelotriteOreWG, 1);

 

FMLLog.info("Chaos Magic " + Reference.MOD_VERSION + ">> succesfully registrated the World Generator!");

}

 

}

 

 

And the crash:

 

 

[15:11:36] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker

[15:11:36] [main/INFO]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker

[15:11:36] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker

[15:11:36] [main/INFO]: Forge Mod Loader version 7.2.156.1056 for Minecraft 1.7.2 loading

[15:11:36] [main/INFO]: Java is Java HotSpot 64-Bit Server VM, version 1.7.0_51, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre7

[15:11:36] [main/INFO]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation

[15:11:36] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker

[15:11:36] [main/INFO]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker

[15:11:36] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker

[15:11:36] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker

[15:11:36] [main/INFO]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper

[15:11:36] [main/ERROR]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!

[15:11:38] [main/ERROR]: The minecraft jar file:/C:/Users/Megabitus/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.2-10.12.0.1056/forgeBin-1.7.2-10.12.0.1056.jar!/net/minecraft/client/ClientBrandRetriever.class appears to be corrupt! There has been CRITICAL TAMPERING WITH MINECRAFT, it is highly unlikely minecraft will work! STOP NOW, get a clean copy and try again!

[15:11:38] [main/ERROR]: FML has been ordered to ignore the invalid or missing minecraft certificate. This is very likely to cause a problem!

[15:11:38] [main/ERROR]: Technical information: ClientBrandRetriever was at jar:file:/C:/Users/Megabitus/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.2-10.12.0.1056/forgeBin-1.7.2-10.12.0.1056.jar!/net/minecraft/client/ClientBrandRetriever.class, there were 0 certificates for it

[15:11:38] [main/ERROR]: FML appears to be missing any signature data. This is not a good thing

[15:11:38] [main/INFO]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper

[15:11:38] [main/INFO]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker

[15:11:38] [main/INFO]: Launching wrapped minecraft {net.minecraft.client.main.Main}

[15:11:41] [main/INFO]: Setting user: Megabitus

[15:11:42] [Client thread/INFO]: LWJGL Version: 2.9.0

[15:11:42] [Client thread/INFO]: Attempting early MinecraftForge initialization

[15:11:42] [Client thread/INFO]: MinecraftForge v10.12.0.1056 Initialized

[15:11:42] [Client thread/INFO]: Replaced 141 ore recipies

[15:11:42] [Client thread/INFO]: Completed early MinecraftForge initialization

[15:11:43] [Client thread/INFO]: Searching C:\Users\Megabitus\Desktop\Making A Mod\forge-1.7.2-10.12.0.1056-src\eclipse\mods for mods

[15:11:44] [Client thread/ERROR]: FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.FMLRenderAccessLibrary. This is generally a severe programming error.  There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!

[15:11:44] [Client thread/ERROR]: FML has detected a mod that is using a package name based on 'net.minecraft.src' : net.minecraft.src.Start. This is generally a severe programming error.  There should be no mod code in the minecraft namespace. MOVE YOUR MOD! If you're in eclipse, select your source code and 'refactor' it into a new package. Go on. DO IT NOW!

[15:11:46] [Client thread/INFO]: Forge Mod Loader has identified 4 mods to load

[15:11:46] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Block and Items Reloaded

[15:11:46] [Client thread/INFO]: Configured a dormant chunk cache size of 0

 

Starting up SoundSystem...

Initializing LWJGL OpenAL

    (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)

OpenAL initialized.

 

[15:11:48] [sound Library Loader/INFO]: Sound engine started

[15:11:48] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas

[15:11:48] [Client thread/INFO]: Created: 256x256 textures/items-atlas

[15:11:48] [Client thread/INFO]: Chaos Magic 0.1>> is initializating!

[15:11:48] [Client thread/INFO]: Chaos Magic 0.1>> initialized succesfully the blocks!

[15:11:48] [Client thread/INFO]: Chaos Magic 0.1>> initialized succesfully the items!

[15:11:48] [Client thread/INFO]: Chaos Magic 0.1>> succesfully registrated the items!

[15:11:48] [Client thread/INFO]: Chaos Magic 0.1>> succesfully registrated the blocks!

[15:11:48] [Client thread/INFO]: Chaos Magic 0.1>> succesfully registrated the events!

[15:11:48] [Client thread/INFO]: Chaos Magic 0.1>> succesfully registrated the TileEntitys!

[15:11:48] [Client thread/INFO]: Chaos Magic 0.1>> succesfully registrated the World Generator!

[15:11:48] [Client thread/INFO]: Chaos Magic 0.1>> has succesfully initialized all the modules!

[15:11:48] [Client thread/INFO]: Forge Mod Loader has successfully loaded 4 mods

[15:11:48] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Block and Items Reloaded

[15:11:49] [Client thread/INFO]: Created: 256x256 textures/items-atlas

[15:11:49] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/blocks/Powdering Machine.png

java.io.FileNotFoundException: minecraft:textures/blocks/Powdering Machine.png

at net.minecraft.client.resources.FallbackResourceManager.getResource(SourceFile:51) ~[FallbackResourceManager.class:?]

at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SourceFile:55) ~[simpleReloadableResourceManager.class:?]

at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:125) [TextureMap.class:?]

at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:90) [TextureMap.class:?]

at net.minecraft.client.renderer.texture.TextureManager.loadTexture(SourceFile:72) [TextureManager.class:?]

at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(SourceFile:136) [TextureManager.class:?]

at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SourceFile:104) [simpleReloadableResourceManager.class:?]

at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SourceFile:92) [simpleReloadableResourceManager.class:?]

at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:566) [Minecraft.class:?]

at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:283) [FMLClientHandler.class:?]

at net.minecraft.client.Minecraft.startGame(Minecraft.java:525) [Minecraft.class:?]

at net.minecraft.client.Minecraft.run(Minecraft.java:813) [Minecraft.class:?]

at net.minecraft.client.main.Main.main(SourceFile:103) [Main.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]

at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]

at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]

[15:11:49] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas

 

SoundSystem shutting down...

    Author: Paul Lamb, www.paulscode.com

 

 

Starting up SoundSystem...

Initializing LWJGL OpenAL

    (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)

OpenAL initialized.

 

[15:11:50] [sound Library Loader/INFO]: Sound engine started

[15:11:51] [MCO Availability Checker #1/ERROR]: Couldn't connect to Realms

[15:11:54] [server thread/INFO]: Starting integrated minecraft server version 1.7.2

[15:11:54] [server thread/INFO]: Generating keypair

[15:11:54] [server thread/INFO]: Injecting existing block and item data into this server instance

[15:11:54] [server thread/INFO]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@12b6d1b8)

[15:11:54] [server thread/INFO]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@12b6d1b8)

[15:11:54] [server thread/INFO]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@12b6d1b8)

[15:11:54] [server thread/INFO]: Preparing start region for level 0

[15:11:55] [server thread/INFO]: Preparing spawn area: 69%

[15:11:56] [Netty Client IO #0/INFO]: Server protocol version 1

[15:11:56] [Netty IO #1/INFO]: Client protocol version 1

[15:11:56] [Netty IO #1/INFO]: Client attempting to join with 4 mods : [email protected],[email protected],[email protected],B&I [email protected]

[15:11:56] [Netty IO #1/INFO]: Attempting connection with missing mods [] at CLIENT

[15:11:56] [Netty Client IO #0/INFO]: Attempting connection with missing mods [] at SERVER

[15:11:56] [Client thread/INFO]: [Client thread] Client side modded connection established

[15:11:56] [server thread/INFO]: [server thread] Server side modded connection established

[15:11:56] [server thread/INFO]: Megabitus[local:E:7b7f80d6] logged in with entity id 212 at (-12.885577026445276, 72.57402747461207, 195.51463887209667)

[15:11:56] [server thread/INFO]: Megabitus joined the game

[15:12:00] [Client thread/WARN]: Failed to load texture: minecraft:textures/gui/GuiPowderingMachine.jpg

java.io.FileNotFoundException: minecraft:textures/gui/GuiPowderingMachine.jpg

at net.minecraft.client.resources.FallbackResourceManager.getResource(SourceFile:51) ~[FallbackResourceManager.class:?]

at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SourceFile:55) ~[simpleReloadableResourceManager.class:?]

at net.minecraft.client.renderer.texture.SimpleTexture.loadTexture(SourceFile:29) ~[simpleTexture.class:?]

at net.minecraft.client.renderer.texture.TextureManager.loadTexture(SourceFile:72) [TextureManager.class:?]

at net.minecraft.client.renderer.texture.TextureManager.bindTexture(SourceFile:40) [TextureManager.class:?]

at com.BI.Interfaces.PowderingMachine.Gui_PowderingMachine.drawGuiContainerBackgroundLayer(Gui_PowderingMachine.java:29) [Gui_PowderingMachine.class:?]

at net.minecraft.client.gui.inventory.GuiContainer.drawScreen(GuiContainer.java:78) [GuiContainer.class:?]

at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1059) [EntityRenderer.class:?]

at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:942) [Minecraft.class:?]

at net.minecraft.client.Minecraft.run(Minecraft.java:833) [Minecraft.class:?]

at net.minecraft.client.main.Main.main(SourceFile:103) [Main.class:?]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_51]

at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_51]

at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]

at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]

[15:12:00] [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:639) ~[MinecraftServer.class:?]

at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:527) ~[MinecraftServer.class:?]

at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:111) ~[integratedServer.class:?]

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414) [MinecraftServer.class:?]

at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:665) [MinecraftServer$2.class:?]

Caused by: java.lang.ClassCastException: com.BI.Interfaces.PowderingMachine.Gui_PowderingMachine cannot be cast to net.minecraft.inventory.Container

at cpw.mods.fml.common.network.NetworkRegistry.getRemoteGuiContainer(NetworkRegistry.java:241) ~[NetworkRegistry.class:?]

at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:75) ~[FMLNetworkHandler.class:?]

at com.BI.Blocks.Classes.PowderingMachineBlock.onBlockActivated(PowderingMachineBlock.java:34) ~[PowderingMachineBlock.class:?]

at net.minecraft.server.management.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:372) ~[itemInWorldManager.class:?]

at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:551) ~[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:197) ~[NetworkManager.class:?]

at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:165) ~[NetworkSystem.class:?]

... 5 more

[15:12:00] [server thread/ERROR]: This crash report has been saved to: C:\Users\Megabitus\Desktop\Making A Mod\forge-1.7.2-10.12.0.1056-src\eclipse\.\crash-reports\crash-2014-04-15_15.12.00-server.txt

[15:12:00] [server thread/INFO]: Stopping server

[15:12:00] [server thread/INFO]: Saving players

[15:12:00] [server thread/INFO]: Saving worlds

[15:12:00] [server thread/INFO]: Saving chunks for level 'New World'/Overworld

---- Minecraft Crash Report ----

// Why is it breaking :(

 

Time: 15.04.2014 15:12

Description: Ticking memory connection

 

java.lang.ClassCastException: com.BI.Interfaces.PowderingMachine.Gui_PowderingMachine cannot be cast to net.minecraft.inventory.Container

at cpw.mods.fml.common.network.NetworkRegistry.getRemoteGuiContainer(NetworkRegistry.java:241)

at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:75)

at com.BI.Blocks.Classes.PowderingMachineBlock.onBlockActivated(PowderingMachineBlock.java:34)

at net.minecraft.server.management.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:372)

at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:551)

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:197)

at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:165)

at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:639)

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

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

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

at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:665)

 

 

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

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

 

-- Head --

Stacktrace:

at cpw.mods.fml.common.network.NetworkRegistry.getRemoteGuiContainer(NetworkRegistry.java:241)

at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:75)

at com.BI.Blocks.Classes.PowderingMachineBlock.onBlockActivated(PowderingMachineBlock.java:34)

at net.minecraft.server.management.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:372)

at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:551)

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:197)

 

-- Ticking connection --

Details:

Connection: net.minecraft.network.NetworkManager@7417ad58

Stacktrace:

at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:165)

at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:639)

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

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

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

at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:665)

 

-- System Details --

Details:

Minecraft Version: 1.7.2

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.7.0_51, Oracle Corporation

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

Memory: 826113632 bytes (787 MB) / 1056309248 bytes (1007 MB) up to 2130051072 bytes (2031 MB)

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

AABB Pool Size: 5169 (289464 bytes; 0 MB) allocated, 4970 (278320 bytes; 0 MB) used

IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95

FML: MCP v9.01-pre FML v7.2.156.1056 Minecraft Forge 10.12.0.1056 4 mods loaded, 4 mods active

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

FML{7.2.156.1056} [Forge Mod Loader] (forgeBin-1.7.2-10.12.0.1056.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

Forge{10.12.0.1056} [Minecraft Forge] (forgeBin-1.7.2-10.12.0.1056.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

B&I Reloaded{0.1} [block and Items Reloaded] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available

Profiler Position: N/A (disabled)

Vec3 Pool Size: 2167 (121352 bytes; 0 MB) allocated, 2132 (119392 bytes; 0 MB) used

Player Count: 1 / 8; [EntityPlayerMP['Megabitus'/212, l='New World', x=-12,89, y=72,57, z=195,51]]

Type: Integrated Server (map_client.txt)

Is Modded: Definitely; Client brand changed to 'fml,forge'

#@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2014-04-15_15.12.00-server.txt

AL lib: (EE) alc_cleanup: 1 device not closed

 

 

Woking at my first mod, Blocks & Items Revolution : https://github.com/megabitus98/Blocks-Items-Revolution

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

    • Thank you so much Choonster! That's what i was missing! For now i added a folder assets/<mod_id>/items and put the model definition JSON file with the item name in it: { "model":{ "type": "minecraft:model", "model": "teleportpugmod:item/teleportpug" } }   Some log errors/warnings pointing me into the right direction would've been nice 😅 Haven't had much time to look into the DataGenerator and ModelProviders, because i'm still at work. But i guess these would would make more sense if have many custom items and want to generate these model definition files?
    • Minecraft 1.21.4 requires a new model definition file for each item, which you don't have. These can be created through Data Generation, specifically the ModelProvider, BlockModelGenerators and ItemModelGenerators classes.
    • Hi,  I'm using Forge 47.3.0 for Minecraft 1.20.1 I apologise if this is obvious I am very new to modding for Minecraft. I sucessfully made a mod that launched without errors or crashes (without it doing anything) but in order to add the features I need, I need to add "Custom Portal API [Forge]" as a dependency. However no matter the way I've tried to acheive this, it crashes. I am pretty sure it's not the way I'm putting it in the repositories, the dependencies or the way I'm refrencing it, as I've a hundred diffrent combinations and multiple Maven methods. And on all those diffrent variations I still get this crash: pastebin.com/UhumzZCZ Any tips would be invaluable as I've been loosing my mind over this!
    • Hi, i'm really having problems trying to set the texture to my custom item. I thought i'm doing everything correctly, but all i see is the missing texture block for my item. I am trying this for over a week now and getting really frustrated. The only time i could make the texture work, was when i used an older Forge version (52.0.1) for Minecraft (1.21.4). Was there a fundamental change for textures and models somewhere between versions that i'm missing? I started with Forge 54.1.0 and had this problem, so in my frustration i tried many things: Upgrading to Forge 54.1.1, created multiple new projects, workspaces, redownloaded everything and setting things up multiple times, as it was suggested in an older thread. Therea are no errors in the console logs, but maybe i'm blind, so i pasted the console logs to pastebin anyway: https://pastebin.com/zAM8RiUN The only time i see an error is when i change the models JSON file to an incorrect JSON which makes sense and that suggests to me it is actually reading the JSON file.   I set the github repository to public, i would be so thankful if anyone could take a look and tell me what i did wrong: https://github.com/xLorkin/teleport_pug_forge   As a note: i'm pretty new to modding, this is my first mod ever. But i'm used to programming. I had some up and downs, but through reading the documentation, using google and experimenting, i could solve all other problems. I only started modding for Minecraft because my son is such a big fan and wanted this mod.
    • Please read the FAQ (link in orange bar at top of page), and post logs as described there.
  • Topics

  • Who's Online (See full list)

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

Important Information

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