Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Moritz

Forge Modder
  • Joined

  • Last visited

Everything posted by Moritz

  1. Sorry to say. i figuret out from alone. And you did not read my source. Because then you would see that i never used if(world.isRemote). But thanks for reading^^"
  2. Yeah i have a big problem. its just visuell. What it exactly is i can not discribe it. if my integer (MaxStackSize) is above a Short.MaxValue. than it turns it into a Short.MinValue. here my code: package speiger.src.tinychest.common.tileentity.tinychest; 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.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.network.INetworkManager; import net.minecraft.network.packet.Packet; import net.minecraft.network.packet.Packet132TileEntityData; import net.minecraft.world.World; import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ISidedInventory; import speiger.src.api.common.tile.TileFacing; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class TransDimensionaleTinyChest extends TileFacing implements IInventory, ISidedInventory { public ItemStack[] chest; public String invName; public int facing = 0; public int[] storedItemStackSize = new int[9]; public ItemStack[] ID = new ItemStack[9]; public int sizes; public int MaxStackSize = 64; public boolean update = false; public TransDimensionaleTinyChest(String name, int size) { chest = new ItemStack[(size*3)]; invName = name; sizes = size; } public int getInventorySizes() { return sizes; } @SideOnly(Side.CLIENT) public int getStorage(int par1) { return (int)storedItemStackSize[par1]; } @Override public int getSizeInventory() { return chest.length; } public ItemStack getStackInSlot(int par1) { return this.chest[par1]; } public ItemStack decrStackSize(int par1, int par2) { if (this.chest[par1] != null) { ItemStack var3; if (this.chest[par1].stackSize <= par2) { var3 = this.chest[par1]; this.chest[par1] = null; return var3; } else { var3 = this.chest[par1].splitStack(par2); if (this.chest[par1].stackSize == 0) { this.chest[par1] = null; } return var3; } } else { return null; } } public ItemStack getStackInSlotOnClosing(int par1) { if (this.chest[par1] != null) { ItemStack var2 = this.chest[par1]; this.chest[par1] = null; return var2; } else { return null; } } public void setInventorySlotContents(int par1, ItemStack par2ItemStack) { this.chest[par1] = par2ItemStack; if (par2ItemStack != null && par2ItemStack.stackSize > this.getInventoryStackLimit()) { par2ItemStack.stackSize = this.getInventoryStackLimit(); } } public String getInvName() { return invName; } public boolean isUseableByPlayer(EntityPlayer var1) { return true; } public void openChest() { } @Override public void readFromNBT(NBTTagCompound par1NBTTagCompound) { super.readFromNBT(par1NBTTagCompound); NBTTagList var5 = par1NBTTagCompound.getTagList("Items2"); this.ID = new ItemStack[this.getSizeInventory()]; for (int var6 = 0; var6 < var5.tagCount(); ++var6) { NBTTagCompound var7 = (NBTTagCompound)var5.tagAt(var6); byte var8 = var7.getByte("Slot2"); if (var8 >= 0 && var8 < this.ID.length) { this.ID[var8] = ItemStack.loadItemStackFromNBT(var7); } } NBTTagList var2 = par1NBTTagCompound.getTagList("Items"); this.chest = new ItemStack[this.getSizeInventory()]; for (int var3 = 0; var3 < var2.tagCount(); ++var3) { NBTTagCompound var4 = (NBTTagCompound)var2.tagAt(var3); byte var6 = var4.getByte("Slot"); if (var6 >= 0 && var6 < this.chest.length) { this.chest[var6] = ItemStack.loadItemStackFromNBT(var4); } } for(int i = 0;i<this.storedItemStackSize.length;i++) { this.storedItemStackSize[i] = par1NBTTagCompound.getInteger("StoredItems"+i); } facing = par1NBTTagCompound.getInteger("faceing"); MaxStackSize = par1NBTTagCompound.getInteger("MaxStackSizes"); } /** * Writes a tile entity to NBT. */ @Override public void writeToNBT(NBTTagCompound par1NBTTagCompound) { super.writeToNBT(par1NBTTagCompound); NBTTagList var5 = new NBTTagList(); for (int var6 = 0; var6 < this.ID.length; ++var6) { if (this.ID[var6] != null) { NBTTagCompound var7 = new NBTTagCompound(); var7.setByte("Slot2", (byte)var6); this.ID[var6].writeToNBT(var7); var5.appendTag(var7); } } par1NBTTagCompound.setTag("Items2", var5); NBTTagList var2 = new NBTTagList(); for (int var3 = 0; var3 < this.chest.length; ++var3) { if (this.chest[var3] != null) { NBTTagCompound var4 = new NBTTagCompound(); var4.setByte("Slot", (byte)var3); this.chest[var3].writeToNBT(var4); var2.appendTag(var4); } } par1NBTTagCompound.setTag("Items", var2); for(int i = 0;i<this.storedItemStackSize.length;i++) { par1NBTTagCompound.setInteger("StoredItems"+i, this.storedItemStackSize[i]); } par1NBTTagCompound.setInteger("faceing", facing); par1NBTTagCompound.setInteger("MaxStackSizes", MaxStackSize); } public void closeChest() { } @Override public int getInventoryStackLimit() { return 64; } @Override public Packet getDescriptionPacket() { NBTTagCompound var1 = new NBTTagCompound(); super.writeToNBT(var1); var1.setInteger("faceing", facing); for(int i = 0;i<this.storedItemStackSize.length;i++) { var1.setInteger("StoredItems"+i, this.storedItemStackSize[i]); } this.worldObj.markBlockForRenderUpdate(this.xCoord, this.yCoord, this.zCoord); return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, var1); } @Override public void onDataPacket(INetworkManager net, Packet132TileEntityData pkt) { this.readFromNBT(pkt.customParam1); } public void updateBlock() { int var1 = this.worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord); this.worldObj.markBlockForRenderUpdate(this.xCoord, this.yCoord, this.zCoord); markBlockDirty(this.worldObj, this.xCoord, this.yCoord, this.zCoord); } public void markBlockDirty(World var0, int var1, int var2, int var3) { if (var0.blockExists(var1, var2, var3)) { var0.getChunkFromBlockCoords(var1, var3).setChunkModified(); } } @Override public void updateEntity() { super.updateEntity(); updateBlock(); addItems(); eatItems(); if(update) { update = false; this.onInventoryChanged(); } } public void shootoutEntitys(World par0, int par1, int par2, int par3, ItemStack outputed) { float f = par0.rand.nextFloat() * 0.8F + 0.1F; float f1 = par0.rand.nextFloat() * 0.8F + 0.1F; float f2 = par0.rand.nextFloat() * 0.8F + 0.1F; EntityItem entityitem = new EntityItem(par0, par1 + f, par2 + f1 + 0.5F, par3 + f2, outputed); entityitem.delayBeforeCanPickup = 10; float f3 = 0.05F; entityitem.motionX = (float) par0.rand.nextGaussian() * f3; entityitem.motionY = (float) par0.rand.nextGaussian() * f3 + 1.0F; entityitem.motionZ = (float) par0.rand.nextGaussian() * f3; par0.spawnEntityInWorld(entityitem); } public void eatItems() { for(int i = 0; i<sizes;i++) { if(chest[i] != null && chest[i].hasTagCompound()) { shootoutEntitys(worldObj, xCoord, yCoord, zCoord, chest[i]); chest[i] = null; } if(storedItemStackSize[i] < MaxStackSize) { ItemStack current = ID[i]; if(chest[i] != null) { if(current != null && chest[i].itemID == current.itemID && chest[i].getItemDamage() == current.getItemDamage()) { if(storedItemStackSize[i] + 1 <= MaxStackSize) { storedItemStackSize[i]+=1; chest[i].stackSize--; update = true; if(chest[i].stackSize <= 0) { chest[i] = null; update = true; } } } else if(current == null) { ID[i] = new ItemStack(chest[i].getItem(), 1, chest[i].getItemDamage()); storedItemStackSize[i]+=1; chest[i+(sizes*2)] = new ItemStack(chest[i].itemID, 1, chest[i].getItemDamage()); chest[i].stackSize--; update = true; if(chest[i].stackSize <= 0) { chest[i] = null; update = true; } } } } } } public void addItems() { for(int i = 0; i<sizes;i++) { ItemStack current = ID[i]; if(current != null) { if(this.storedItemStackSize[i] > 0) { if(chest[i+sizes] != null && chest[i+sizes].itemID == current.itemID && chest[i+sizes].getItemDamage() == current.getItemDamage()) { if(chest[i+sizes].stackSize + 1 <= 64 && chest[i+sizes].stackSize + 1 <= chest[i+sizes].getMaxStackSize()) { chest[i+sizes].stackSize++; this.storedItemStackSize[i]-=1; update = true; if(this.storedItemStackSize[i] <= 0) { ID[i] = null; chest[i+(sizes*2)] = null; update = true; } } } else if(chest[i+sizes] == null) { chest[i+sizes] = new ItemStack(current.itemID, 1, current.getItemDamage()); this.storedItemStackSize[i]-=1; update = true; if(this.storedItemStackSize[i] <= 0) { ID[i] = null; chest[i+(sizes*2)] = null; update = true; } } } } } } public void addStorage(int storage) { int between = 64; between *= storage; int secand = between / sizes; this.MaxStackSize += secand; } @Override public int getStartInventorySide(ForgeDirection side) { if(side == ForgeDirection.UP) { return 0; } if(side == ForgeDirection.DOWN) { return sizes; } return 0; } @Override public int getSizeInventorySide(ForgeDirection side) { if(side == ForgeDirection.UP) { return sizes; } if(side == ForgeDirection.DOWN) { return sizes; } return 0; } } Here a video so you can see it: Do you know what the trouble is? Its also a bug on 1.6. this code here is more stable. i am still on the update at 1.6
  3. Moritz replied to Moritz's topic in Modder Support
    I think if found the bug. When you rightclick it then he copy the Item. Now the problem is: That when the item is getting copied then the NBT needs 1-3 ticks longer. Because the item has exsist before the nbt can be copied. And i had on the on update function a if which tell if the Item Has noNbt than add the starting NBT^^" And this is the problem^^" Now problem solved^^". . Thanks.
  4. Moritz replied to Moritz's topic in Modder Support
    2: Yeah 1.6.2 is stable. But i also make it for someone else which is using 1.4 Maybe you know him: Redled72y 1: Emmmm Yeah. Thats a good thing. I make an examplecode because the original does no longer there. But that needs time. ^^ i should be more prepaired^^". But i figured out that it happends always when i rightclick the Item. But why it happends I do not have a clue^^"
  5. Moritz posted a topic in Modder Support
    I found an interessting bug with the NBT and the Rightclick Item. But before i explain a view things before. I worked on my mod and than i had the thinking that: Chickenbones wirless redstone is awsome but very expensive and only transmit to one side. That is sometimes usefull but most times a pain. So i made my own version of a wirless redstone. Its a full block which create a redstone signal to any side. Or to the front of the block. With less frequenzes (1024 Frequenzes) But i also added that it can be exendet into infinite. Just added a block which create extra 1024 frequnzes to 1 player. But thats not part of interessting. I just created wireless redstone. Now i tried to add a wireless remote which stores the information with nbt. The problem is now every time i rightclick the item the NBTData rest.^^" I am still working 1.4.7. i know its outdated but its a stable version^^"
  6. Ok my block activate function which has client/server packet inside is only for extending the storage. (MaxStackSize). That is what my packet handler does. The sizes*3 is the is only the thing what my chest. I made the same system as ironchest. The size of the chest has always 3 or you can / 3. But thats not the problem. Now to the ID thing. The ID stores the id of the item which is iniside of the inifinet extende able storage. Thats it. Now Mazetars comments: I use an extra slot for the items. And i do block the slot so you can not click on it. Thats why i could not get items out of my inventory as i opened the big version of the Transdimensional tiny chest^^" So what could be the problem^^?
  7. Now i have a problem with my Ghost item. It does Dissapier after you relog the game. Here is my code. i did find out which function it is but not directly what directly the problem is. Here my Tile Entity. I know it is a tile problem. package speiger.src.tinychest.common.tileentity.tinychest; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.network.INetworkManager; import net.minecraft.network.packet.Packet; import net.minecraft.network.packet.Packet132TileEntityData; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class TransDimensionaleTinyChest extends TileEntity implements IInventory { public ItemStack[] chest; public String invName; public int facing = 0; public int[] storedItemStackSize = new int[9]; public ItemStack[] ID = new ItemStack[9]; public int sizes; public int MaxStackSize = 64; public boolean update = false; public TransDimensionaleTinyChest(String name, int size) { chest = new ItemStack[(size*3)]; invName = name; sizes = size; } @SideOnly(Side.CLIENT) public int getStorage(int par1) { return (int)storedItemStackSize[par1]; } @Override public int getSizeInventory() { return chest.length; } public ItemStack getStackInSlot(int par1) { return this.chest[par1]; } public ItemStack decrStackSize(int par1, int par2) { if (this.chest[par1] != null) { ItemStack var3; if (this.chest[par1].stackSize <= par2) { var3 = this.chest[par1]; this.chest[par1] = null; return var3; } else { var3 = this.chest[par1].splitStack(par2); if (this.chest[par1].stackSize == 0) { this.chest[par1] = null; } return var3; } } else { return null; } } public ItemStack getStackInSlotOnClosing(int par1) { if (this.chest[par1] != null) { ItemStack var2 = this.chest[par1]; this.chest[par1] = null; return var2; } else { return null; } } public void setInventorySlotContents(int par1, ItemStack par2ItemStack) { this.chest[par1] = par2ItemStack; if (par2ItemStack != null && par2ItemStack.stackSize > this.getInventoryStackLimit()) { par2ItemStack.stackSize = this.getInventoryStackLimit(); } } public String getInvName() { return invName; } public boolean isUseableByPlayer(EntityPlayer var1) { return true; } public void openChest() { } @Override public void readFromNBT(NBTTagCompound par1NBTTagCompound) { super.readFromNBT(par1NBTTagCompound); NBTTagList var5 = par1NBTTagCompound.getTagList("Items2"); this.ID = new ItemStack[this.getSizeInventory()]; for (int var6 = 0; var6 < var5.tagCount(); ++var6) { NBTTagCompound var7 = (NBTTagCompound)var5.tagAt(var6); byte var8 = var7.getByte("Slot2"); if (var8 >= 0 && var8 < this.ID.length) { this.ID[var8] = ItemStack.loadItemStackFromNBT(var7); } } NBTTagList var2 = par1NBTTagCompound.getTagList("Items"); this.chest = new ItemStack[this.getSizeInventory()]; for (int var3 = 0; var3 < var2.tagCount(); ++var3) { NBTTagCompound var4 = (NBTTagCompound)var2.tagAt(var3); byte var6 = var4.getByte("Slot"); if (var6 >= 0 && var6 < this.chest.length) { this.chest[var6] = ItemStack.loadItemStackFromNBT(var4); } } for(int i = 0;i<this.storedItemStackSize.length;i++) { this.storedItemStackSize[i] = par1NBTTagCompound.getInteger("StoredItems"+i); } facing = par1NBTTagCompound.getInteger("faceing"); MaxStackSize = par1NBTTagCompound.getInteger("MaxStackSizes"); } /** * Writes a tile entity to NBT. */ @Override public void writeToNBT(NBTTagCompound par1NBTTagCompound) { super.writeToNBT(par1NBTTagCompound); NBTTagList var5 = new NBTTagList(); for (int var6 = 0; var6 < this.ID.length; ++var6) { if (this.ID[var6] != null) { NBTTagCompound var7 = new NBTTagCompound(); var7.setByte("Slot2", (byte)var6); this.ID[var6].writeToNBT(var7); var5.appendTag(var7); } } par1NBTTagCompound.setTag("Items2", var5); NBTTagList var2 = new NBTTagList(); for (int var3 = 0; var3 < this.chest.length; ++var3) { if (this.chest[var3] != null) { NBTTagCompound var4 = new NBTTagCompound(); var4.setByte("Slot", (byte)var3); this.chest[var3].writeToNBT(var4); var2.appendTag(var4); } } par1NBTTagCompound.setTag("Items", var2); for(int i = 0;i<this.storedItemStackSize.length;i++) { par1NBTTagCompound.setInteger("StoredItems"+i, this.storedItemStackSize[i]); } par1NBTTagCompound.setInteger("faceing", facing); par1NBTTagCompound.setInteger("MaxStackSizes", MaxStackSize); } public void closeChest() { } @Override public int getInventoryStackLimit() { return 64; } @Override public Packet getDescriptionPacket() { NBTTagCompound var1 = new NBTTagCompound(); super.writeToNBT(var1); var1.setInteger("faceing", facing); for(int i = 0;i<this.storedItemStackSize.length;i++) { var1.setInteger("StoredItems"+i, this.storedItemStackSize[i]); } return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, var1); } @Override public void onDataPacket(INetworkManager net, Packet132TileEntityData pkt) { this.readFromNBT(pkt.customParam1); } //Eloraams code (1.2.5) public void updateBlock() { int var1 = this.worldObj.getBlockMetadata(this.xCoord, this.yCoord, this.zCoord); this.worldObj.markBlockForRenderUpdate(this.xCoord, this.yCoord, this.zCoord); markBlockDirty(this.worldObj, this.xCoord, this.yCoord, this.zCoord); } public void markBlockDirty(World var0, int var1, int var2, int var3) { if (var0.blockExists(var1, var2, var3)) { var0.getChunkFromBlockCoords(var1, var3).setChunkModified(); } } @Override public void updateEntity() { super.updateEntity(); updateBlock(); addItems(); eatItems(); showItems(); if(update) { update = false; this.onInventoryChanged(); } } //This function is the problem public void showItems() { for(int i = 0;i<sizes;i++) { if(ID[i] != null) { chest[i+(sizes*2)] = new ItemStack(ID[i].itemID, 1, ID[i].getItemDamage()); update = true; } else { chest[i+(sizes*2)] = null; update = true; } } } public void eatItems() { for(int i = 0; i<sizes;i++) { if(storedItemStackSize[i] < MaxStackSize) { ItemStack current = ID[i]; if(chest[i] != null) { if(current != null && chest[i].itemID == current.itemID && chest[i].getItemDamage() == current.getItemDamage()) { if(storedItemStackSize[i] + 1 <= MaxStackSize) { storedItemStackSize[i]+=1; chest[i].stackSize--; update = true; if(chest[i].stackSize <= 0) { chest[i] = null; update = true; } } } else if(current == null) { ID[i] = new ItemStack(chest[i].getItem(), 1, chest[i].getItemDamage()); storedItemStackSize[i]+=1; chest[i].stackSize--; update = true; if(chest[i].stackSize <= 0) { chest[i] = null; update = true; } } } } } } public void addItems() { for(int i = 0; i<sizes;i++) { ItemStack current = ID[i]; if(current != null) { if(this.storedItemStackSize[i] > 0) { if(chest[i+sizes] != null && chest[i+sizes].itemID == current.itemID && chest[i+sizes].getItemDamage() == current.getItemDamage()) { if(chest[i+sizes].stackSize + 1 <= 64 && chest[i+sizes].stackSize + 1 <= chest[i+sizes].getMaxStackSize()) { chest[i+sizes].stackSize++; this.storedItemStackSize[i]-=1; update = true; if(this.storedItemStackSize[i] <= 0) { ID[i] = null; update = true; } } } else if(chest[i+sizes] == null) { chest[i+sizes] = new ItemStack(current.itemID, 1, current.getItemDamage()); this.storedItemStackSize[i]-=1; update = true; if(this.storedItemStackSize[i] <= 0) { ID[i] = null; update = true; } } } } } } //This function is will called by my packethandler public void addStorage(int storage) { int between = 64; between *= storage; between = between / 2; int secand = between / sizes; this.MaxStackSize += secand; } } Here an extra video what showes the problem. i hope you can help me. Speiger.
  8. Hi. Sorry for need so much time for solve the problem. I had so much trouble and i did not came to code. Now a perfect solved. It removes recipes. public static void removeRecipe(ItemStack par1) { List<IRecipe> recipeList = CraftingManager.getInstance().getRecipeList(); for(int i=0;i<recipeList.size();i++) { IRecipe currentRecipe = recipeList.get(i); if(currentRecipe instanceof ShapedRecipes) { ShapedRecipes shape = (ShapedRecipes)currentRecipe; ItemStack output = shape.getRecipeOutput(); if(ItemStack.areItemStacksEqual(par1, output)) { recipeList.remove(i); } } if(currentRecipe instanceof ShapelessRecipes) { ShapelessRecipes shapeless = (ShapelessRecipes)currentRecipe; ItemStack output = shapeless.getRecipeOutput(); if(ItemStack.areItemStacksEqual(par1, output)) { recipeList.remove(i); } } } } I am current to busy to make more options. I hope it helps^^"
  9. Hi. You want to make extendet metadata? First: Extendet meta is something which has bad effects at longer time. I mean with that it create more lag then a normal meta. So do not forget that. another question. How much blocks do you want to create? We now have enough blockIDs )over 3000 are free. If you still want to create extendet blocks send me a pn. Speiger.
  10. My mind has an idea but i have to test it before. I have to sleep now. Good night^^"
  11. To create a TagCompound. NBTTagCompound tag = new NBTTagCompound(); tag.setTagCompound("tagName", new NBTTagCompound()); tag.getTagCompound("tagName").setInteger("YourInteger"); ItemStack.setTagCompound(tag); To Read An tagCompound NBTTagCompound tag = ItemStack.getTagCompound("tagName"); int i = tag.getInteger("YourInteger"); Thats it!
  12. ^^ ill check it how to solve that. ^^"
  13. Hmmm maybe because you are implement your referenceclass for the Items instead your Items^^"
  14. What is the exact problem?
  15. nope. My mod does not need lowercase. it works too.
  16. Your first code is right! I do it the same way! But he can not find the textures. Just create these folders inside of your eclipse: assets/yourmodnameinsmall/textures/blocks/yourTexture.png. Then he should find your texture. And that way you did it is perfect! But it could be easier .
  17. Moritz replied to kenoba10's topic in Modder Support
    Does eclipse tell you the block class? if thats true just click on the error (the blue letters) then eclipse showes you the exact line what does crash the game^^.
  18. Moritz replied to kenoba10's topic in Modder Support
    Nope that problem has something todo with your common and client proxy! Maybe your path is not right^^. Check that!
  19. You want to change the username ingame? Don't do that this make much more trouble as you think! Because a player still stays at that place as you bin before! Its like freezing the game. And when you rejoin it yoi come out as the normal username. I had a lot of crashes in the game. To find the username: EntityPlayer.username = wtf; i hope it helps.
  20. i did not read it perfect . I have an idea. I tell it if it did work^^ or if i failed .
  21. Cool would that work with renderpasses? I mean is that convertable to icons?
  22. Yeah getAnIcon is not the problem i make it like this: IModulClass: public interface IModul { Icon getIconFormModulID(int modulID); } ModulRegisterClass public class ModulRegister { public static IModul modul; public List<IModul> modules = new ArrayList<IModul>(); public static void RegisterModul(IModul par1) { modules.add(par1); } public static Icon getIconFromID(int modulID) { Icon output = null; for(IModul icons : modules) { if(icons.getIconFormModulID(modulID) != null) { output = icons.getIconFormModulID(modulID); } } return output; } } Now the problem is how register an icon ? I know that you have to register it befor it can be loaded. That is my Problem!
  23. Nope i am not a genius. I only read the errorlog and also i had the same problem. No problem. Just read the error log and click on the class:line which is colored blue. Than he show you exactly what is the problem. But do not use always the first error. Look which errors goes to your classes!^^"
  24. Eclipse says you what is not right^^ Just click on the errors. To help you with that^^ One of the recipes bug a little bit^^ FotEMod Line 316.
  25. Wow cool idea! Its not that hard! If you use an TileEntity than its very easy: public int delay = 0; public void updateEntity() { if(worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)) { EntityPlayer player = worldObj.getClosestVulnerablePlayer(xCoord, yCoord, zCoord, 3); //Gets the clostet player in a 3 blocks range; if(player != null) { if(delay >= 100) { delay = 0; player.openGui(modInstance, GuiID, xCoord, yCoord, zCoord); } else { delay++; } } else { delay = 0; } } else { delay = 0; } } The Delay is needed that the player can still close the gui. Else the spam would be bad. But thats all code. You search for a redstone signal. Get the player (closest) check if its not null (safe function) than you open the gui. I hope it helps'

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.