• 0

    posted a message on auto crop planting
    allow dispensers to plant crops if there is tilled soil infront of it. similar to the way mine carts and rail works.

    this would allow for people to create more automated farms.
    Posted in: Suggestions
  • 0

    posted a message on [1.1]More Blocks[WIP]
    yes buggy i know and i might update this later but i have sorta gotten distracted from minecraft modding for a bit.

    Quote from tj00110

    I kept getting hurt while jumping on the slime, and they didnt seem to stack well, lol. Bugs?


    and i have fixed slime blocks
    Posted in: WIP Mods
  • 0

    posted a message on [FIX] Catacomb Snatch
    Quote from aGengar

    Now we can win. I don't understand what you mean....Did you fix the crash bug?


    no (i'm working on that now) it fixes when you retrieve the treasure from the center you gain points instead of your opponent gaining them.
    Posted in: General Gaming
  • 0

    posted a message on [FIX] Catacomb Snatch
    i just change 2 kines of code so you can win

    just place it in the mojam.jar like a minecraft mod.

    put it in the mob folder inside of the entity folder.

    here is the file
    Posted in: General Gaming
  • 0

    posted a message on strange fall damage
    i am going to give up on this if i dont get an answer soon
    Posted in: Modification Development
  • 0

    posted a message on furnace problems
    Quote from Julienlego

    Mine works brilliantly. And I go it from the same link that was posted on that forum.

    can you send me your code so i can look at it and see what i did wrong
    Posted in: Modification Development
  • 0

    posted a message on furnace problems
    ok just tell me if you get it to work
    Posted in: Modification Development
  • 0

    posted a message on furnace problems
    im guessing you dont have yours working yet
    Posted in: Modification Development
  • 0

    posted a message on strange fall damage
    anyone?
    Posted in: Modification Development
  • 0

    posted a message on furnace problems
    Quote from TechGuy543

    So putting dirt and sand in does nothing?

    yes
    Quote from TechGuy543

    Thanks for the link to that tutorial btw, I've been looking for one for ages. If I get mine working I'll try and compare my code to yours and see what the differences are.

    thanks
    Posted in: Modification Development
  • 0

    posted a message on furnace problems
    i made a 2 input furnace following this tut

    and i had a few bugs and i fixed them and i ran into that nothing smelts in it and there are no errors plz help

    TileEntityForge.java
    package net.minecraft.src;
    
    public class TileEntityFurnace extends TileEntity
        implements IInventory
    {
        private ItemStack furnaceItemStacks[];
        public int furnaceBurnTime;
        public int currentItemBurnTime;
        public int furnaceCookTime;
    
        public TileEntityFurnace()
        {
            furnaceItemStacks = new ItemStack[3];
            furnaceBurnTime = 0;
            currentItemBurnTime = 0;
            furnaceCookTime = 0;
        }
    
        public int getSizeInventory()
        {
            return furnaceItemStacks.length;
        }
    
        public ItemStack getStackInSlot(int i)
        {
            return furnaceItemStacks[i];
        }
    
        public ItemStack decrStackSize(int i, int j)
        {
            if (furnaceItemStacks[i] != null)
            {
                if (furnaceItemStacks[i].stackSize <= j)
                {
                    ItemStack itemstack = furnaceItemStacks[i];
                    furnaceItemStacks[i] = null;
                    return itemstack;
                }
                ItemStack itemstack1 = furnaceItemStacks[i].splitStack(j);
                if (furnaceItemStacks[i].stackSize == 0)
                {
                    furnaceItemStacks[i] = null;
                }
                return itemstack1;
            }
            else
            {
                return null;
            }
        }
    
        public void setInventorySlotContents(int i, ItemStack itemstack)
        {
            furnaceItemStacks[i] = itemstack;
            if (itemstack != null && itemstack.stackSize > getInventoryStackLimit())
            {
                itemstack.stackSize = getInventoryStackLimit();
            }
        }
    
        public String getInvName()
        {
            return "Furnace";
        }
    
        public void readFromNBT(NBTTagCompound nbttagcompound)
        {
            super.readFromNBT(nbttagcompound);
            NBTTagList nbttaglist = nbttagcompound.getTagList("Items");
            furnaceItemStacks = new ItemStack[getSizeInventory()];
            for (int i = 0; i < nbttaglist.tagCount(); i++)
            {
                NBTTagCompound nbttagcompound1 = (NBTTagCompound)nbttaglist.tagAt(i);
                byte byte0 = nbttagcompound1.getByte("Slot");
                if (byte0 >= 0 && byte0 < furnaceItemStacks.length)
                {
                    furnaceItemStacks[byte0] = ItemStack.loadItemStackFromNBT(nbttagcompound1);
                }
            }
    
            furnaceBurnTime = nbttagcompound.getShort("BurnTime");
            furnaceCookTime = nbttagcompound.getShort("CookTime");
            currentItemBurnTime = getItemBurnTime(furnaceItemStacks[1]);
        }
    
        public void writeToNBT(NBTTagCompound nbttagcompound)
        {
            super.writeToNBT(nbttagcompound);
            nbttagcompound.setShort("BurnTime", (short)furnaceBurnTime);
            nbttagcompound.setShort("CookTime", (short)furnaceCookTime);
            NBTTagList nbttaglist = new NBTTagList();
            for (int i = 0; i < furnaceItemStacks.length; i++)
            {
                if (furnaceItemStacks[i] != null)
                {
                    NBTTagCompound nbttagcompound1 = new NBTTagCompound();
                    nbttagcompound1.setByte("Slot", (byte)i);
                    furnaceItemStacks[i].writeToNBT(nbttagcompound1);
                    nbttaglist.setTag(nbttagcompound1);
                }
            }
    
            nbttagcompound.setTag("Items", nbttaglist);
        }
    
        public int getInventoryStackLimit()
        {
            return 64;
        }
    
        public int getCookProgressScaled(int i)
        {
            return (furnaceCookTime * i) / 200;
        }
    
        public int getBurnTimeRemainingScaled(int i)
        {
            if (currentItemBurnTime == 0)
            {
                currentItemBurnTime = 200;
            }
            return (furnaceBurnTime * i) / currentItemBurnTime;
        }
    
        public boolean isBurning()
        {
            return furnaceBurnTime > 0;
        }
    
        public void updateEntity()
        {
            boolean flag = furnaceBurnTime > 0;
            boolean flag1 = false;
            if (furnaceBurnTime > 0)
            {
                furnaceBurnTime--;
            }
            if (!worldObj.multiplayerWorld)
            {
                if (furnaceBurnTime == 0 && canSmelt())
                {
                    currentItemBurnTime = furnaceBurnTime = getItemBurnTime(furnaceItemStacks[1]);
                    if (furnaceBurnTime > 0)
                    {
                        flag1 = true;
                        if (furnaceItemStacks[1] != null)
                        {
                            if (furnaceItemStacks[1].getItem().func_46056_k())
                            {
                                furnaceItemStacks[1] = new ItemStack(furnaceItemStacks[1].getItem().setFull3D());
                            }
                            else
                            {
                                furnaceItemStacks[1].stackSize--;
                            }
                            if (furnaceItemStacks[1].stackSize == 0)
                            {
                                furnaceItemStacks[1] = null;
                            }
                        }
                    }
                }
                if (isBurning() && canSmelt())
                {
                    furnaceCookTime++;
                    if (furnaceCookTime == 200)
                    {
                        furnaceCookTime = 0;
                        smeltItem();
                        flag1 = true;
                    }
                }
                else
                {
                    furnaceCookTime = 0;
                }
                if (flag != (furnaceBurnTime > 0))
                {
                    flag1 = true;
                    BlockFurnace.updateFurnaceBlockState(furnaceBurnTime > 0, worldObj, xCoord, yCoord, zCoord);
                }
            }
            if (flag1)
            {
                onInventoryChanged();
            }
        }
    
        private boolean canSmelt()
        {
            if (furnaceItemStacks[0] == null)
            {
                return false;
            }
            ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(furnaceItemStacks[0].getItem().shiftedIndex);
            if (itemstack == null)
            {
                return false;
            }
            if (furnaceItemStacks[2] == null)
            {
                return true;
            }
            if (!furnaceItemStacks[2].isItemEqual(itemstack))
            {
                return false;
            }
            if (furnaceItemStacks[2].stackSize < getInventoryStackLimit() && furnaceItemStacks[2].stackSize < furnaceItemStacks[2].getMaxStackSize())
            {
                return true;
            }
            return furnaceItemStacks[2].stackSize < itemstack.getMaxStackSize();
        }
    
        public void smeltItem()
        {
            if (!canSmelt())
            {
                return;
            }
            ItemStack itemstack = FurnaceRecipes.smelting().getSmeltingResult(furnaceItemStacks[0].getItem().shiftedIndex);
            if (furnaceItemStacks[2] == null)
            {
                furnaceItemStacks[2] = itemstack.copy();
            }
            else if (furnaceItemStacks[2].itemID == itemstack.itemID)
            {
                furnaceItemStacks[2].stackSize++;
            }
            if (furnaceItemStacks[0].getItem().func_46056_k())
            {
                furnaceItemStacks[0] = new ItemStack(furnaceItemStacks[0].getItem().setFull3D());
            }
            else
            {
                furnaceItemStacks[0].stackSize--;
            }
            if (furnaceItemStacks[0].stackSize <= 0)
            {
                furnaceItemStacks[0] = null;
            }
        }
    
        private int getItemBurnTime(ItemStack itemstack)
        {
            if (itemstack == null)
            {
                return 0;
            }
            int i = itemstack.getItem().shiftedIndex;
            if (i < 256 && Block.blocksList[i].blockMaterial == Material.wood)
            {
                return 300;
            }
            if (i == Item.stick.shiftedIndex)
            {
                return 100;
            }
            if (i == Item.coal.shiftedIndex)
            {
                return 1600;
            }
            if (i == Item.bucketLava.shiftedIndex)
            {
                return 20000;
            }
            if (i == Block.sapling.blockID)
            {
                return 100;
            }
            if (i == Item.blazeRod.shiftedIndex)
            {
                return 2400;
            }
            else
            {
                return ModLoader.AddAllFuel(i, itemstack.getItemDamage());
            }
        }
    
        public boolean isUseableByPlayer(EntityPlayer entityplayer)
        {
            if (worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) != this)
            {
                return false;
            }
            return entityplayer.getDistanceSq((double)xCoord + 0.5D, (double)yCoord + 0.5D, (double)zCoord + 0.5D) <= 64D;
        }
    
        public void openChest()
        {
        }
    
        public void closeChest()
        {
        }
    }

    ContainerForge.java
    package net.minecraft.src;
    
    import java.util.List;
    
    public class ContainerForge extends Container
    {
        private TileEntityForge forge;
        private int lastCookTime;
        private int lastBurnTime;
        private int lastItemBurnTime;
    
        public ContainerForge(InventoryPlayer inventoryplayer, TileEntityForge tileentityforge)
        {
            lastCookTime = 0;
            lastBurnTime = 0;
            lastItemBurnTime = 0;
            forge = tileentityforge;
            addSlot(new Slot(tileentityforge, 0, 38, 17));
            addSlot(new Slot(tileentityforge, 1, 74, 17));
            addSlot(new Slot(tileentityforge, 2, 56, 53));
            addSlot(new SlotForge(inventoryplayer.player, tileentityforge, 3, 116, 35));
            for (int i = 0; i < 3; i++)
            {
                for (int k = 0; k < 9; k++)
                {
                    addSlot(new Slot(inventoryplayer, k + i * 9 + 9, 8 + k * 18, 84 + i * 18));
                }
            }
    
            for (int j = 0; j < 9; j++)
            {
                addSlot(new Slot(inventoryplayer, j, 8 + j * 18, 142));
            }
        }
    
        public void updateCraftingResults()
        {
            super.updateCraftingResults();
            for (int i = 0; i < crafters.size(); i++)
            {
                ICrafting icrafting = (ICrafting)crafters.get(i);
                if (lastCookTime != forge.forgeCookTime)
                {
                    icrafting.updateCraftingInventoryInfo(this, 0, forge.forgeCookTime);
                }
                if (lastBurnTime != forge.forgeBurnTime)
                {
                    icrafting.updateCraftingInventoryInfo(this, 1, forge.forgeBurnTime);
                }
                if (lastItemBurnTime != forge.currentItemBurnTime)
                {
                    icrafting.updateCraftingInventoryInfo(this, 2, forge.currentItemBurnTime);
                }
            }
    
            lastCookTime = forge.forgeCookTime;
            lastBurnTime = forge.forgeBurnTime;
            lastItemBurnTime = forge.currentItemBurnTime;
        }
    
        public void updateProgressBar(int i, int j)
        {
            if (i == 0)
            {
                forge.forgeCookTime = j;
            }
            if (i == 1)
            {
                forge.forgeBurnTime = j;
            }
            if (i == 2)
            {
                forge.currentItemBurnTime = j;
            }
        }
    
        public boolean canInteractWith(EntityPlayer entityplayer)
        {
            return forge.isUseableByPlayer(entityplayer);
        }
    
        public ItemStack transferStackInSlot(int i)
        {
            ItemStack itemstack = null;
            Slot slot = (Slot)inventorySlots.get(i);
            if (slot != null && slot.getHasStack())
            {
                ItemStack itemstack1 = slot.getStack();
                itemstack = itemstack1.copy();
                if (i == 2)
                {
                    if (!mergeItemStack(itemstack1, 3, 39, true))
                    {
                        return null;
                    }
                }
                else if (i >= 3 && i < 30)
                {
                    if (!mergeItemStack(itemstack1, 30, 39, false))
                    {
                        return null;
                    }
                }
                else if (i >= 30 && i < 39)
                {
                    if (!mergeItemStack(itemstack1, 3, 30, false))
                    {
                        return null;
                    }
                }
                else if (!mergeItemStack(itemstack1, 3, 39, false))
                {
                    return null;
                }
                if (itemstack1.stackSize == 0)
                {
                    slot.putStack(null);
                }
                else
                {
                    slot.onSlotChanged();
                }
                if (itemstack1.stackSize != itemstack.stackSize)
                {
                    slot.onPickupFromSlot(itemstack1);
                }
                else
                {
                    return null;
                }
            }
            return itemstack;
        }
    }

    ForgeRecipes.java
    package net.minecraft.src;
    import java.util.Arrays;
    import java.util.HashMap;
     
    public class ForgeRecipes
    {
         private HashMap recipes;
         private HashMap recipes1;
         
         public void addAllRecipes()
         {
              recipes = new HashMap();
              recipes1 = new HashMap();
              addRecipe(Block.sand.blockID, Block.dirt.blockID, new ItemStack(Block.glass, 2));
         }
          
         public void addRecipe(ItemStack itemstack, ItemStack itemstack1, ItemStack itemstack2)
         {
              recipes.put(Arrays.asList(itemstack.itemID, itemstack.getItemDamage()), itemstack2);
              recipes1.put(Arrays.asList(itemstack1.itemID, itemstack1.getItemDamage()), itemstack2);
         }
          
         public void addRecipe(int i, int j, ItemStack itemstack)
         {
              addRecipe(new ItemStack(i, 1, 0), new ItemStack(j, 1, 0), itemstack);
         }
         
         public ItemStack getOutput(ItemStack itemstack, ItemStack itemstack1)
         {
              ItemStack itemstack2 = (ItemStack)recipes.get(Arrays.asList(itemstack.itemID, itemstack.getItemDamage()));
              ItemStack itemstack3 = (ItemStack)recipes1.get(Arrays.asList(itemstack1.itemID, itemstack1.getItemDamage()));
              if(itemstack2 == null || itemstack3 == null)
              {
                   return null;
              }
              if(itemstack2.equals(itemstack3))
              {
                   return itemstack2;
              }
              return null;
         }
         
         public ForgeRecipes()
         {
              addAllRecipes();
         }
    }

    i do have the other files but i dont think they are part of the problem

    thanks if you help
    Posted in: Modification Development
  • 0

    posted a message on strange fall damage
    Quote from zachary572

    im not sure if this would work but maybe
    entity.stepHeight = 0;

    no i think that has to do with the hight of the block and even if not it didnt work
    Posted in: Modification Development
  • 0

    posted a message on strange fall damage
    Quote from Ian5133

    Well, I'm not sure about the fall damage thing, but I suggest you change 'mod_Blocks' to something less generic, so it's less likely that someone else with a mod that also uses a 'mod_Blocks' class will have conflicts. Oh, and also, I suggest making the fall damage about -0.5f instead of 0.0f, that might work. I'm working on a mod that also messes with fall damage a bit, but not like yours.

    yeh i know i was going to do that when i thought of a name

    and the -0.5 thing didn't work
    Posted in: Modification Development
  • 0

    posted a message on strange fall damage
    Quote from kiarules

    No idea now

    do you know anyone that might
    Posted in: Modification Development
  • 0

    posted a message on strange fall damage
    anyone?
    Posted in: Modification Development
  • To post a comment, please .