Jump to content

[1.6.4] Another Problem... I can't take the items out of my inventory ._.


delemberen12

Recommended Posts

Like the title said:

|

|

V

 

Apr 17, 2014 65814 AM net.minecraft.launchwrapper.LogWrapper log

INFO Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker

Apr 17, 2014 65814 AM net.minecraft.launchwrapper.LogWrapper log

INFO Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker

Apr 17, 2014 65814 AM net.minecraft.launchwrapper.LogWrapper log

INFO Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker

2014-04-17 065814 [iNFO] [ForgeModLoader] Forge Mod Loader version 6.99.19.964 for Minecraft 1.6.4 loading

2014-04-17 065814 [iNFO] [ForgeModLoader] Java is Java HotSpot Client VM, version 1.7.0_51, running on Windows 7x866.1, installed at CProgram FilesJavajre7

2014-04-17 065814 [iNFO] [ForgeModLoader] Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation

2014-04-17 065814 [iNFO] [ForgeModLoader] Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker

2014-04-17 065814 [iNFO] [ForgeModLoader] Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker

2014-04-17 065814 [iNFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker

2014-04-17 065814 [iNFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker

2014-04-17 065814 [iNFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper

2014-04-17 065814 [iNFO] [sTDOUT] Loaded 40 rules from AccessTransformer config file fml_at.cfg

2014-04-17 065814 [sEVERE] [ForgeModLoader] The binary patch set is missing. Either you are in a development environment, or things are not going to work!

2014-04-17 065815 [sEVERE] [ForgeModLoader] The minecraft jar fileCUsersJERRY.gradlecachesminecraftnetminecraftforgeforge1.6.4-9.11.1.964forge-1.6.4-9.11.1.964-mcp.jar!netminecraftclientClientBrandRetriever.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!

2014-04-17 065815 [sEVERE] [ForgeModLoader] FML has been ordered to ignore the invalid or missing minecraft certificate. This is very likely to cause a problem!

2014-04-17 065815 [sEVERE] [ForgeModLoader] Technical information ClientBrandRetriever was at jarfileCUsersJERRY.gradlecachesminecraftnetminecraftforgeforge1.6.4-9.11.1.964forge-1.6.4-9.11.1.964-mcp.jar!netminecraftclientClientBrandRetriever.class, there were 0 certificates for it

2014-04-17 065815 [sEVERE] [ForgeModLoader] FML appears to be missing any signature data. This is not a good thing

2014-04-17 065815 [iNFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper

2014-04-17 065815 [iNFO] [sTDOUT] Loaded 110 rules from AccessTransformer config file forge_at.cfg

2014-04-17 065815 [iNFO] [ForgeModLoader] Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker

2014-04-17 065815 [iNFO] [ForgeModLoader] Launching wrapped minecraft {net.minecraft.client.main.Main}

2014-04-17 065816 [iNFO] [Minecraft-Client] Setting user Player511

2014-04-17 065817 [iNFO] [Minecraft-Client] LWJGL Version 2.9.0

2014-04-17 065818 [iNFO] [Minecraft-Client] Reloading ResourceManager Default

2014-04-17 065820 [iNFO] [MinecraftForge] Attempting early MinecraftForge initialization

2014-04-17 065820 [iNFO] [sTDOUT] MinecraftForge v9.11.1.964 Initialized

2014-04-17 065820 [iNFO] [ForgeModLoader] MinecraftForge v9.11.1.964 Initialized

2014-04-17 065820 [iNFO] [sTDOUT] Replaced 112 ore recipies

2014-04-17 065820 [iNFO] [MinecraftForge] Completed early MinecraftForge initialization

2014-04-17 065820 [iNFO] [ForgeModLoader] Reading custom logging properties from CUsersJERRYDesktopforge-1.6.4-9.11.1.964-srceclipseconfiglogging.properties

2014-04-17 065820 [OFF] [ForgeModLoader] Logging level for ForgeModLoader logging is set to ALL

2014-04-17 065820 [iNFO] [ForgeModLoader] Searching CUsersJERRYDesktopforge-1.6.4-9.11.1.964-srceclipsemods for mods

2014-04-17 065820 [WARNING] [CosmoCraft] Mod CosmoCraft is missing the required element 'version' and a version.properties file could not be found. Falling back to metadata version 0.0.0.6.08

2014-04-17 065823 [sEVERE] [ForgeModLoader] 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!

2014-04-17 065823 [sEVERE] [ForgeModLoader] 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!

2014-04-17 065823 [iNFO] [ForgeModLoader] Forge Mod Loader has identified 4 mods to load

2014-04-17 065823 [iNFO] [mcp] Activating mod mcp

2014-04-17 065823 [iNFO] [FML] Activating mod FML

2014-04-17 065823 [iNFO] [Forge] Activating mod Forge

2014-04-17 065823 [iNFO] [CosmoCraft] Activating mod CosmoCraft

2014-04-17 065823 [WARNING] [CosmoCraft] Mod CosmoCraft is missing a pack.mcmeta file, things may not work well

2014-04-17 065823 [iNFO] [Minecraft-Client] Reloading ResourceManager Default, FMLFileResourcePackForge Mod Loader, FMLFileResourcePackMinecraft Forge, FMLFileResourcePackCosmoCraft

2014-04-17 065823 [iNFO] [ForgeModLoader] Registering Forge Packet Handler

2014-04-17 065823 [iNFO] [ForgeModLoader] Succeeded registering Forge Packet Handler

2014-04-17 065823 [sEVERE] [ForgeModLoader] Detected an attempt by a mod FMLModCosmoCraft{0.0.0.6.08} to perform game activity during mod construction. This is a serious programming error.

2014-04-17 065823 [WARNING] [ForgeModLoader] Mod CosmoCraft attempted to register a gui network handler during a construction phase

2014-04-17 065823 [WARNING] [ForgeModLoader] The mod FMLModCosmoCraft{0.0.0.6.08} is attempting to register a block whilst it it being constructed. This is bad modding practice - please use a proper mod lifecycle event.

2014-04-17 065823 [WARNING] [ForgeModLoader] The mod FMLModCosmoCraft{0.0.0.6.08} is attempting to register a block whilst it it being constructed. This is bad modding practice - please use a proper mod lifecycle event.

2014-04-17 065823 [WARNING] [ForgeModLoader] The mod FMLModCosmoCraft{0.0.0.6.08} is attempting to register a block whilst it it being constructed. This is bad modding practice - please use a proper mod lifecycle event.

2014-04-17 065823 [WARNING] [ForgeModLoader] The mod FMLModCosmoCraft{0.0.0.6.08} is attempting to register a block whilst it it being constructed. This is bad modding practice - please use a proper mod lifecycle event.

2014-04-17 065823 [WARNING] [ForgeModLoader] The mod FMLModCosmoCraft{0.0.0.6.08} is attempting to register a block whilst it it being constructed. This is bad modding practice - please use a proper mod lifecycle event.

2014-04-17 065823 [WARNING] [ForgeModLoader] The mod FMLModCosmoCraft{0.0.0.6.08} is attempting to register a block whilst it it being constructed. This is bad modding practice - please use a proper mod lifecycle event.

2014-04-17 065823 [WARNING] [ForgeModLoader] The mod FMLModCosmoCraft{0.0.0.6.08} is attempting to register a block whilst it it being constructed. This is bad modding practice - please use a proper mod lifecycle event.

2014-04-17 065823 [iNFO] [ForgeModLoader] Configured a dormant chunk cache size of 0

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.ItemPStone with ID 1756 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.ItemTier1Fuel with ID 1757 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.ItemTier2Fuel with ID 1758 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.ItemTier3Fuel with ID 1759 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.Itemdark_matter with ID 1760 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.Itemred_matter with ID 1761 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.Itemblue_matter with ID 1762 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.Itemanti_matter with ID 1763 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.tools.ItemDarkPickaxe with ID 1768 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.tools.ItemDarkSpade with ID 1769 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.tools.ItemDarkSword with ID 1770 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.tools.ItemDarkAxe with ID 1771 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.tools.ItemDarkHoe with ID 1772 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.tools.ItemRedPickaxe with ID 1773 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.tools.ItemRedSpade with ID 1774 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.tools.ItemRedSword with ID 1775 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.tools.ItemRedAxe with ID 1776 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.tools.ItemRedHoe with ID 1777 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.armor.ArmorSetDark with ID 1778 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.armor.ArmorSetDark with ID 1779 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.armor.ArmorSetDark with ID 1780 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.armor.ArmorSetDark with ID 1781 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.armor.ArmorSetRed with ID 1782 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.armor.ArmorSetRed with ID 1783 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.armor.ArmorSetRed with ID 1784 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.armor.ArmorSetRed with ID 1785 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.armor.ArmorSetBlue with ID 1786 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.armor.ArmorSetBlue with ID 1787 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.armor.ArmorSetBlue with ID 1788 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.armor.ArmorSetBlue with ID 1789 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.tools.ItemBluePickaxe with ID 1790 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.tools.ItemBlueSpade with ID 1791 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.tools.ItemBlueSword with ID 1792 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.tools.ItemBlueAxe with ID 1793 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.tools.ItemBlueHoe with ID 1794 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.Itemfallenstar0 with ID 1796 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.ItemTopaz_shard with ID 1797 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.food.ItemrawBacon with ID 1798 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.food.ItemcookedBacon with ID 1799 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065823 [sEVERE] [ForgeModLoader] Found anonymous item of class cc.core.item.ItemTopaz_diamond with ID 1801 owned by mod CosmoCraft, this item will NOT survive a 1.7 upgrade!

2014-04-17 065824 [iNFO] [ForgeModLoader] Forge Mod Loader has successfully loaded 4 mods

2014-04-17 065824 [WARNING] [CosmoCraft] Mod CosmoCraft is missing a pack.mcmeta file, things may not work well

2014-04-17 065824 [iNFO] [Minecraft-Client] Reloading ResourceManager Default, FMLFileResourcePackForge Mod Loader, FMLFileResourcePackMinecraft Forge, FMLFileResourcePackCosmoCraft

2014-04-17 065824 [iNFO] [sTDOUT]

2014-04-17 065824 [iNFO] [sTDOUT] Starting up SoundSystem...

2014-04-17 065825 [iNFO] [sTDOUT] Initializing LWJGL OpenAL

2014-04-17 065825 [iNFO] [sTDOUT]    (The LWJGL binding of OpenAL.  For more information, see httpwww.lwjgl.org)

2014-04-17 065825 [iNFO] [sTDOUT] OpenAL initialized.

2014-04-17 065825 [iNFO] [sTDOUT]

2014-04-17 065825 [sEVERE] [Minecraft-Client] Realms Server not available!

2014-04-17 065905 [iNFO] [Minecraft-Server] Starting integrated minecraft server version 1.6.4

2014-04-17 065905 [iNFO] [Minecraft-Server] Generating keypair

2014-04-17 065906 [iNFO] [ForgeModLoader] Loading dimension 0 (Test World) (net.minecraft.server.integrated.IntegratedServer@f938fc)

2014-04-17 065906 [iNFO] [ForgeModLoader] Loading dimension 1 (Test World) (net.minecraft.server.integrated.IntegratedServer@f938fc)

2014-04-17 065906 [iNFO] [ForgeModLoader] Loading dimension -1 (Test World) (net.minecraft.server.integrated.IntegratedServer@f938fc)

2014-04-17 065906 [iNFO] [Minecraft-Server] Preparing start region for level 0

2014-04-17 065907 [iNFO] [Minecraft-Server] Preparing spawn area 47%

2014-04-17 065908 [iNFO] [sTDOUT] loading single player

2014-04-17 065908 [iNFO] [Minecraft-Server] Player511[127.0.0.10] logged in with entity id 8 at (526.6999999880791, 4.0, -361.9713013103919)

2014-04-17 065908 [iNFO] [Minecraft-Server] Player511 joined the game

2014-04-17 065908 [iNFO] [sTDOUT] Setting up custom skins

 

Developer of MechanicalCraft.

 

Sadly not available to public yet :(

Link to comment
Share on other sites

Gui class

|

|

V

 

package cc.core.gui.DMFurance;

 

import org.lwjgl.opengl.GL11;

 

import net.minecraft.client.Minecraft;

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

import net.minecraft.client.resources.I18n;

import net.minecraft.entity.player.InventoryPlayer;

import net.minecraft.util.ResourceLocation;

import cc.core.block.solid.ContainerDMFurnace;

 

 

public class GuiDMFurance extends GuiContainer {

 

public static final ResourceLocation texture = new ResourceLocation("CosmoCraft:textures/gui/DMFurnace");

 

public TileEntityDMFurnace DMFurnace;

 

public GuiDMFurance(InventoryPlayer inventoryPlayer, TileEntityDMFurnace entity) {

super(new ContainerDMFurnace(inventoryPlayer, entity));

 

this.DMFurnace = entity;

 

this.xSize = 176;

this.ySize = 166;

}

 

public void drawGuiContainerForegroundLayer(int par1, int par2) {

String name = this.DMFurnace.isInvNameLocalized() ? this.DMFurnace.getInvName() : I18n.getString(this.DMFurnace.getInvName());

 

this.fontRenderer.drawString(name, this.xSize / 2 - this.fontRenderer.getStringWidth(name) / 2, 6, 4210752);

this.fontRenderer.drawString(I18n.getString("container.inventory"), 8, this.ySize - 96 + 2, 4210752);

 

 

}

 

 

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

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

 

Minecraft.getMinecraft().getTextureManager().bindTexture(texture);

 

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

}

 

 

}

 

 

 

gui Handler

|

|

V

 

 

package cc.core.gui.DMFurance;

 

import cc.core.CosmoCraft;

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.tileentity.TileEntity;

import net.minecraft.world.World;

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

 

public class GUIHandler implements IGuiHandler {

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

TileEntity entity = world.getBlockTileEntity(x, y, z);

 

if(entity != null) {

switch(ID) {

case CosmoCraft.guiIdDMFurnace:

if(entity instanceof TileEntityDMFurnace) {

//return new ContainerDMFurance(player.inventory, (TileEntityDMFurnace) entity);

 

}

}

 

}

 

 

 

return null;

}

 

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

TileEntity entity = world.getBlockTileEntity(x, y, z);

 

if(entity != null) {

switch(ID) {

case CosmoCraft.guiIdDMFurnace:

if(entity instanceof TileEntityDMFurnace) {

return new GuiDMFurance(player.inventory, (TileEntityDMFurnace) entity);

 

}

}

 

}

 

 

 

return null;

}

 

}

 

 

 

TileEntity

|

|

V

 

package cc.core.gui.DMFurance;

 

import net.minecraft.block.Block;

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.inventory.ISidedInventory;

import net.minecraft.item.Item;

import net.minecraft.item.ItemBlock;

import net.minecraft.item.ItemStack;

import net.minecraft.item.crafting.FurnaceRecipes;

import net.minecraft.tileentity.TileEntity;

import cc.core.CosmoCraft;

import cc.core.block.solid.BlockDMFurnace;

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

 

public class TileEntityDMFurnace extends TileEntity implements ISidedInventory {

 

private String localizedName;

 

private static final int[] slots_top = new int[]{0};

private static final int[] slots_bottom = new int[]{2, 1};

private static final int[] slots_sides = new int[]{1};

 

/** Furnace speed */

public int furnaceSpeed = 50;

 

/** Time left for this furnace to burn */

public int burnTime;

 

/** start time for this fuel */

public int currentItemBurnTime;

 

/** how long time left before cooked*/

public int cookTime;

 

 

private ItemStack[] slots = new ItemStack[3];

 

public int getSizeInventory() {

return this.slots.length;

}

 

public String getInvName() {

return this.isInvNameLocalized() ? this.localizedName : "container.DMFurnace";

}

 

public boolean isInvNameLocalized() {

return this.localizedName != null && this.localizedName.length() > 0;

}

 

public void setGuiDisplayName(String displayName) {

this.localizedName = displayName;

 

}

 

public ItemStack getStackInSlot(int i) {

return this.slots;

}

 

public ItemStack decrStackSize(int i, int j) {

if(this.slots != null){

ItemStack itemstack;

 

if(this.slots.stackSize <= j) {

itemstack = this.slots;

this.slots = null;

return itemstack;

}else{

itemstack = this.slots.splitStack(j);

 

if(this.slots.stackSize == 0) {

this.slots = null;

}

 

return itemstack;

}

}

 

return null;

 

}

 

public ItemStack getStackInSlotOnClosing(int i) {

if(this.slots != null) {

ItemStack itemstack = this.slots;

this.slots = null;

return itemstack;

}

 

return null;

}

 

public void setInventorySlotContents(int i, ItemStack itemstack) {

this.slots = itemstack;

 

 

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

itemstack.stackSize = this.getInventoryStackLimit();

}

 

}

 

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)this.xCoord + 0.5D, (double)this.yCoord + 0.5D, (double)this.zCoord + 0.5D) <= 64.0D;

}

 

public void openChest() {}

public void closeChest() {}

 

public boolean isBurning() {

return this.burnTime > 0;

}

 

public void updateEntity() {

boolean flag = this.burnTime > 0;

boolean flag1 = false;

 

if(this.burnTime > 0) {

this.burnTime--;

}

 

if(!this.worldObj.isRemote) {

if(this.burnTime == 0 && this.canSmelt()) {

this.currentItemBurnTime = this.burnTime = getItemBurnTime(this.slots[1]);

 

if(this.burnTime > 0) {

flag1 = true;

 

if(this.slots[1] != null) {

this.slots[1].stackSize--;

 

if(this.slots[1].stackSize == 0) {

this.slots[1] = this.slots[1].getItem().getContainerItemStack(this.slots[1]);

}

}

}

}

 

if(this.isBurning() && this.canSmelt()) {

this.cookTime++;

 

if(this.cookTime == this.furnaceSpeed) {

this.cookTime = 0;

this.smeltItem();

flag1 = true;

}

 

}else{

this.cookTime = 0;

 

}

 

if(flag != this.isBurning()) {

flag1 = true;

BlockDMFurnace.updateDMFurnaceBlockState(this.burnTime > 0, this.worldObj, this.xCoord, this.yCoord, this.zCoord);

}

 

}

 

if(flag1) {

this.onInventoryChanged();

}

}

 

public boolean canSmelt() {

if(this.slots[0] == null) {

return false;

}else{

ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.slots[0]);

 

if(itemstack == null) return false;

if(this.slots[2] == null) return true;

if(!this.slots[2].isItemEqual(itemstack)) return false;

 

int result = this.slots[2].stackSize + itemstack.stackSize;

 

return (result <= getInventoryStackLimit() && result <= itemstack.getMaxStackSize());

 

}

 

}

 

public void smeltItem() {

if(this.canSmelt()) {

ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(this.slots[0]);

 

if(this.slots[2] == null) {

this.slots[2] = itemstack.copy();

}else if (this.slots[2].isItemEqual(itemstack)) {

this.slots[2].stackSize += itemstack.stackSize;

}

 

 

this.slots[0].stackSize--;

 

if(this.slots[0].stackSize <= 0) {

}this.slots[0] = null;

}

}

 

public static int getItemBurnTime(ItemStack itemstack) {

if(itemstack == null) {

return 0;

}else{

int i = itemstack.getItem().itemID;

Item item = itemstack.getItem();

 

if(item instanceof ItemBlock && Block.blocksList != null) {

Block block = Block.blocksList;

}

 

 

if (i == CosmoCraft.Tier1Fuel.itemID) return 1000;

if (i == CosmoCraft.Tier2Fuel.itemID) return 2500;

if (i == CosmoCraft.Tier3Fuel.itemID) return 2000;

 

 

// not a real recipe

if(itemstack.itemID == Item.diamond.itemID) return 100;

 

return GameRegistry.getFuelValue(itemstack);

}

}

 

public static boolean isItemFuel(ItemStack itemstack) {

return getItemBurnTime(itemstack) > 0;

}

 

public boolean isItemValidForSlot(int i, ItemStack itemstack) {

 

return i == 2 ? false : (i == 1 ? isItemFuel(itemstack) : true);

}

 

public int[] getAccessibleSlotsFromSide(int var1) {

 

return var1 == 0 ? slots_bottom : (var1 == 1 ? slots_top : slots_sides);

}

 

public boolean canInsertItem(int i, ItemStack itemstack, int j) {

 

return this.isItemValidForSlot(i, itemstack);

}

 

public boolean canExtractItem(int i, ItemStack itemstack, int j) {

 

return j != 0 || i != 1 || itemstack.itemID == Item.bucketEmpty.itemID;

}

 

}

 

 

 

 

BTW im making a custom furnace

Developer of MechanicalCraft.

 

Sadly not available to public yet :(

Link to comment
Share on other sites

c) What's with those stupid arrows?

 

lol, wanted to ask the exact same question...

 

thats how you use the draw texture thing:

this.drawTexturedModalRect(where to draw lefttop corner X, where to draw lefttop corner Y, From where to take image lefttop corner X,  From where to take image lefttop corner Y, image width, image height);

 

And heres an example how to use it:


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

	Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
        int k = (this.width - this.xSize) / 2;
        int l = (this.height - this.ySize) / 2;
        
        
        
        
	this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);

Here could be your advertisement!

Link to comment
Share on other sites

Thx that worked but now I have one more problem... I can't get the item out of my inventory??

 

Container thing class

 

 

package cc.core.block.solid;

 

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.entity.player.InventoryPlayer;

import net.minecraft.inventory.Container;

import net.minecraft.inventory.ICrafting;

import net.minecraft.inventory.Slot;

import net.minecraft.inventory.SlotFurnace;

import net.minecraft.item.ItemStack;

import cc.core.gui.DMFurance.TileEntityDMFurnace;

import cpw.mods.fml.relauncher.Side;

import cpw.mods.fml.relauncher.SideOnly;

 

public class ContainerDMFurnace extends Container {

 

private TileEntityDMFurnace DMFurnace;

/** Time left for this furnace to burn */

public int lastBurnTime;

 

/** start time for this fuel */

public int lastItemBurnTime;

 

/** how long time left before cooked*/

public int lastCookTime;

 

public ContainerDMFurnace(InventoryPlayer inventory, TileEntityDMFurnace tileentity) {

this.DMFurnace = tileentity;

 

this.addSlotToContainer(new Slot(tileentity, 0, 56, 17));

this.addSlotToContainer(new Slot(tileentity, 1, 56, 53));

this.addSlotToContainer(new SlotFurnace(inventory.player, tileentity, 2, 116, 35));

 

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

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

this.addSlotToContainer(new Slot(inventory, j + i*9 + 9, 8 + j*18, 84 + i*18));

}

}

 

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

this.addSlotToContainer(new Slot(inventory, i, 8 + i*18, 142));

}

 

}

 

public void addCraftingToCrafters(ICrafting icrafting) {

super.addCraftingToCrafters(icrafting);

icrafting.sendProgressBarUpdate(this, 0, this.DMFurnace.cookTime);

icrafting.sendProgressBarUpdate(this, 1, this.DMFurnace.burnTime);

icrafting.sendProgressBarUpdate(this, 2, this.DMFurnace.currentItemBurnTime);

}

 

public void detectAndSendChanges() {

super.detectAndSendChanges();

}

 

@SideOnly(Side.CLIENT)

public void updateProgressBar(int slot, int newValue) {

if(slot == 0) this.DMFurnace.cookTime = newValue;

if(slot == 1) this.DMFurnace.burnTime = newValue;

if(slot == 2) this.DMFurnace.currentItemBurnTime = newValue;

 

}

 

public ItemStack transferStackInSlot(EntityPlayer player, int slot) {

return null;

 

}

 

public boolean canInteractWith(EntityPlayer entityplayer) {

return this.DMFurnace.isUseableByPlayer(entityplayer);

}

 

}

 

 

Developer of MechanicalCraft.

 

Sadly not available to public yet :(

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

    • One of my players is suddenly unable to join a locally hosted MC Eternal server. We have been playing on this server for about 2-3 weeks now. I have tried erasing his player files and his reputation file, and now it just coughs up this and kicks him out: [User Authenticator #5/INFO] [minecraft/NetHandlerLoginServer]: UUID of player EthosTheGod is 7692d8db-02c3-424f-a4ab-0e4e259b106b [20:25:36] [User Authenticator #4/INFO] [minecraft/NetHandlerLoginServer]: UUID of player EthosTheGod is 7692d8db-02c3-424f-a4ab-0e4e259b106b [20:29:35] [Server thread/WARN] [minecraft/MinecraftServer]: Can't keep up! Did the system time change, or is the server overloaded? Running 575849ms behind, skipping 11516 tick(s) [20:29:35] [Server thread/INFO] [minecraft/NetHandlerLoginServer]: com.mojang.authlib.GameProfile@4a6c63f1[id=7692d8db-02c3-424f-a4ab-0e4e259b106b,name=EthosTheGod,properties={textures=[com.mojang.authlib.properties.Property@241ea89e]},legacy=false] (/IP.ADDRESS) lost connection: Disconnected [20:29:35] [Server thread/INFO] [minecraft/NetHandlerLoginServer]: com.mojang.authlib.GameProfile@6ab6c661[id=7692d8db-02c3-424f-a4ab-0e4e259b106b,name=EthosTheGod,properties={textures=[com.mojang.authlib.properties.Property@7f19aae3]},legacy=false] (/IP.ADDRESS) lost connection: Disconnected It just says "connection timed out" on his end. Any ideas?
    • I'm trying to migrate my mod from 1.20 to 1.21. Some packages in the forge api were changed so my mod did have some classes not working. I've changed everything i needed but still is getting me the following error error: cannot access Registry DeferredRegister.create(ForgeRegistries.BLOCKS, FarmMod.MOD_ID); ^ class file for net.minecraft.core.Registry not found The piece of code that is wrong is   public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, FarmMod.MOD_ID); And here are my imports   import com.lucas.farmmod.FarmMod; import com.lucas.farmmod.block.custom.BaseIrrigatorBlock; import com.lucas.farmmod.item.ModItems; import com.lucas.farmmod.item.custom.BaseIrrigatorBlockItem; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.Item; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.RegistryObject; The class DeferredRegister is throwing the error in the print below     I've tried running rebuilding my project in every way possible, tried refreshing my dependencies but nothing works. What can i do?
    • It sounds like there might be a synchronization issue with your PartEntity. Ensure that the part entity’s position is updated in your entity's tick method to continuously match the main entity’s location.
    • For keyboard and mouse inputs, Minecraft Forge utilizes the event system to manage interactions, making it easier to handle across different mods. If you’re looking to bypass this and read inputs directly, you’d typically look into the KeyboardListener and MouseListener classes in the game's code. These classes process input events directly from the user's hardware. If you're experimenting with inputs a lot, you might find a compact keypad handy for quick commands. Check out numeric keyboard . It can speed up your coding workflow! Good luck!
  • Topics

×
×
  • Create New...

Important Information

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