• 1

    posted a message on Does minecraft use the TCP or UDP protocol for port forwarding?
    ResilientHosting is not wrong. TCP is a non-optimal choice for networked multiplayer, because it adds an incredibly heavy framework over the standard IP interface. UDP may lose packets, but there's no framework demanding that they all be received, and that they're in the right order. TCP does not supply a direct connection, but emulates one, and that involves sending lots of unnecessary data, and resending lots of potentially large packets(for multiplayer games. Most other services need that structure). And mixing UDP and TCP isn't a solution, because TCP has a tendency to greatly increase packet loss in UDP.

    tl;dr TCP is not unviable for online multiplayer, but it is DEFINITELY not optimal (like a lot of minecraft code). Mojang's use of TCP would explain why minecraft servers have a tendency to be incredibly laggy, as well... More so than other games...
    Posted in: Server Support and Administration
  • 0

    posted a message on Uncooperative Slots in a machine's GUI
    I do still need help with this. If anyone knows how to program a GUI, and would like to toss out a few suggestions, it'd be REALLY appreciated.
    Posted in: Modification Development
  • 0

    posted a message on Uncooperative Slots in a machine's GUI
    Uncooperative Slots

    I'm making a block that has a GUI that's supposed to take a maximum of four inputs, do an operation on them, and put them all into one output. The problems I'm having all revolve around the slots.
    The slots don't wanna line up right.
    The slots don't wanna hold the items I place in them(or they don't want to render them).
    The slots don't wanna move when I resize the screen unless I close and reopen the GUI(unacceptable in any respectable mod).
    All the slots' ID's are for some unfathomable reason shifted by 4!(I click what I think is one item, and it gives me an item from the slot with 4 less than the ID of the slot I clicked on).

    Right now, NONE of these things work, this is just my plan for the block. My first order of business is getting the slots' positions updating properly on screen resize(like the furnace's), and get this nonsense with the mismatched IDs out of the way. I think I've narrowed the issue on slot placement down to my Container class. The problem is that the slots are all declared in the Constructor, but no repositioning occurs when I resize the window until AFTER I restart the GUI(thus calling it's constructor again).

    public RR_Container_AltarCore(InventoryPlayer invPlayer, RR_TileEntity_AltarCore altarEntity)
    {
    int width = ModLoader.getMinecraftInstance().displayWidth;
    int height = ModLoader.getMinecraftInstance().displayHeight;
    this.altar = altarEntity;
    this.addSlot(new Slot(altarEntity, 0, width/4 - 8, height/4 - 91));//top
    this.addSlot(new Slot(altarEntity, 1, width/4 - 8, height/4 + 10));//bottom
    this.addSlot(new Slot(altarEntity, 2, width/4 - 60, height/4 - 41));//left
    this.addSlot(new Slot(altarEntity, 3, width/4 + 45, height/4 - 41));//right
    this.addSlot(new RR_Slot_AltarCore(invPlayer.player, altarEntity, 4, width/4 - 8, height/4 - 41));//output


    I need a way to reset those values dynamically on window resize, and what really gets me is that the ContainerFurnace class has no such problems! It resizes dynamically with nothing but plain ints as it's arguments!
    public ContainerFurnace(InventoryPlayer par1InventoryPlayer, TileEntityFurnace par2TileEntityFurnace)
        {
    	    this.furnace = par2TileEntityFurnace;
    	    this.addSlot(new Slot(par2TileEntityFurnace, 0, 56, 17));
    	    this.addSlot(new Slot(par2TileEntityFurnace, 1, 56, 53));
    	    this.addSlot(new SlotFurnace(par1InventoryPlayer.player, par2TileEntityFurnace, 2, 116, 35));


    I mean, seriously! That's not fair! What is it doing that I'm not?
    I used all six of the furnace's classes to build my block, it should function like a furnace!(Not the final use, but not exactly the point right now...)

    If anyone knows what's going on and would like to scrutinize a more significant piece of my source code,
    just comment.Thank you in advance. :Pig:
    Posted in: Modification Development
  • 0

    posted a message on "Distance between player and Structure" calculation
    I am currently working on a mod and one of the things i need to be able to do is determine the structure of a certain type that is closest to the player, specifically the center block, when the player right-clicks with an item. I'm using ModLoader, so I really don't want to edit base classes. If anyone knows of a method to find the closest block of a certain type to a player, then output it's distance, that'd be great.
    Posted in: Modification Development
  • 0

    posted a message on Blocks dont keep dmg value when placed down.
    I've got this same error my ModLoader.registerBlock declaration looks like this.
      ModLoader.registerBlock(AltarCore, net.minecraft.src.RR_Altar_Core.class);
    I'm having the same problem and my code is similar
      ModLoader.registerBlock(AltarCore, net.minecraft.src.RR_Altar_Core.class);
    Posted in: Modification Development
  • 0

    posted a message on inLanoche's Tutorials [1.8] [ModLoader]
    Quote from inlanoche

    I just made a horse and found that CASE does matter. I called the texture Horse.png, but was calling it as horse.png. Could be that mcp is more sentitive when it comes to case sensitivity.

    It's not case. I've checked and re-checked EVERYTHING. MCP is just being deliberately irritating. Nothing big, so I guess i can just ignore it.
    Now onto that "viciously slaughter everything" block:)

    Please?
    Posted in: Tutorials
  • 0

    posted a message on inLanoche's Tutorials [1.8] [ModLoader]
    Quote from fligabob

    I've bolded the key bits. It means you've not put your image into a folder called ILN inside your minecraft.jar

    The funny thing is, I did. This error only occurs when i try to run the minecraft client through MCP. If i actually install the mod in my minecraft.jar file in AppData, it works fine. Otherwise, it throws this error and i have no idea why! I'm gonna try to reinstall MCP and see what happens...

    Also, do you have any idea how to make a block viciously slaughter anything that touches it, while counting how much damage it does?
    Posted in: Tutorials
  • 0

    posted a message on inLanoche's Tutorials [1.8] [ModLoader]
    My mod's Item texture isn't replacing properly, and i followed the tutorial exactly.
    Absolute URL of texture:"C:\Documents and Settings\stephans\Desktop\Minecraft Crap\MCP 1.8.1\temp\bin\minecraft\ILN\CustomOre1.png"
    Absolute URL of standard:"C:\Documents and Settings\stephans\Desktop\Minecraft Crap\MCP 1.8.1\temp\bin\minecraft\gui\items.png"
    Error Message:
    Mods loaded: 2
    ModLoader Beta 1.8.1
    net.minecraft.src.mod_ILN ILN v0.1 for Minecraft 1.8.1 ModLoader
    
          Minecraft has crashed!      
          ----------------------      
    
    Minecraft has stopped running because it encountered a problem.
    
    If you wish to report this, please copy this entire text and email it to [email protected].
    Please include a description of what you did when the error occured.
    
    
    
    --- BEGIN ERROR REPORT 10dac840 --------
    Generated 10/11/11 7:25 AM
    
    Minecraft: Minecraft Beta 1.8.1
    OS: Windows XP (x86) version 5.1
    Java: 1.6.0_16, Sun Microsystems Inc.
    VM: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
    LWJGL: 2.4.2
    OpenGL: ATI Radeon HD 3450 - Dell Optiplex version 2.1.8304 Release, ATI Technologies Inc.
    
    java.lang.RuntimeException: java.lang.Exception: Image not found: /ILN/CustomOre1.png
    	at net.minecraft.src.ModLoader.RegisterAllTextureOverrides(ModLoader.java:1166)
    	at net.minecraft.src.ModLoader.OnTick(ModLoader.java:887)
    	at net.minecraft.src.EntityRendererProxy.updateCameraAndRender(EntityRendererProxy.java:24)
    	at net.minecraft.client.Minecraft.run(Minecraft.java:517)
    	at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.Exception: Image not found: /ILN/CustomOre1.png
    	at net.minecraft.src.ModLoader.loadImage(ModLoader.java:851)
    	at net.minecraft.src.ModLoader.RegisterAllTextureOverrides(ModLoader.java:1158)
    	... 4 more
    --- END ERROR REPORT 92b1054a ----------
    Code that keeps breaking!:
    package net.minecraft.src;
    
    import java.util.Iterator;
    import java.util.Map;
    import java.util.Random;
    
    import java.awt.List;
    import java.lang.reflect.Constructor;
    import java.util.*;
    import net.minecraft.client.Minecraft;
    import net.minecraft.src.Gui;
    import org.lwjgl.opengl.GL11;
    import java.awt.Color;
    
    public class mod_ILN extends BaseMod
    {
    	//------------------------Start Block Definition Code--------------------------------------------
    	public static Block ILNSpawner = new ILN_BlockSpawner(200,16).setHardness(0.2F).setStepSound(Block.soundStoneFootstep).setBlockName("ILNSpawner");
    	
    	private void MakeBlocks()
    	{
    		ModLoader.RegisterBlock(ILNSpawner);
    		ModLoader.AddName(ILNSpawner, "ILNSPawner Block");
    	}
    	//------------------------End Block Definition Code----------------------------------------
    	
    	//--------------------------Start Terrain Generation Code----------------------------------
    	public void GenerateSurface(World world,Random random, int chunkX, int chunkZ)
    	{
    		//how much to generate on a 16*16*128 chunk of space in the world
    		int posX;   //16 across
    		int posY;   //128 down
    		int posZ;   //16 deep
    		
    		int tries = 10;
    		int vein  = 30;
    		
    		for (int i = 0; i < tries; i++)
    		{
    			posX = chunkX + random.nextInt(16);
    			posY = random.nextInt(30);
    			posZ = chunkZ + random.nextInt(16);
    			(new WorldGenMinable(ILNSpawner.blockID, vein)).generate(world, random, posX, posY, posZ);
    		}
    	}
    	//---------------------End Terrain Generation Code------------------------------------------
    	
    	//--------------------------Start Recipe Definition Code------------------------------------
    	private void MakeRecipes()
    	{
    		ModLoader.AddRecipe(new ItemStack(ILNSpawner, 1), new Object[]{
    			"#", Character.valueOf('#'),Block.dirt});
    		ModLoader.AddSmelting(mod_ILN.ILNSpawner.blockID, new ItemStack (mod_ILN.SpawnIngot));
    	}
    	//-------------------------End Recipe Definition Code---------------------------------------
    	
    	//---------------------------Start Item Creation Code---------------------------------------
    	public static final Item SpawnIngot = new Item(8000).setItemName("SpawnIngot");
    	
    	private void MakeItems()
    	{
    		ModLoader.AddName(SpawnIngot, "Spawn Ingot");
    		ModLoader.addOverride("/gui/items.png", "/ILN/CustomOre1.png");
    	}
    	//------------------------End Item Creation Code--------------------------------------------
    	
    	public String Version()
    	{
    		return "ILN v0.1 for Minecraft 1.8.1 ModLoader";
    	}
    	
    	public mod_ILN()
    	{
    		MakeBlocks();
    		MakeRecipes();
    		MakeItems();
    	}
    }
    Any Insight is greatly appreciated! Until then, my item will have to look like a leather helmet... :sad.gif:

    P.S. Yay! I got the tags to work! As least something's going right :\
    Posted in: Tutorials
  • To post a comment, please .