Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

YoWazzup

Forge Modder
  • Posts

    66
  • Joined

  • Last visited

Everything posted by YoWazzup

  1. Thanks! But I also would like to have it in another class, so my mod file's smaller.
  2. I understood that part, but if this tries to use the config files before they're created, how does Helfull's configs work? This is the exact same way.
  3. It seems you are missing a class, named net.minecraft.src.ClientProxy
  4. Okay, and how would I do it correctly?
  5. Hello, I've used Helfull's tutorial on Properties files but my blocks always return a value of 0. This is my PropertyManager class: And this is my block declaration: public static final Block CocoStone = (new ModBlockOre(pm.CocoStoneID, 0)).setBlockName("CocoStone").setResistance(2F).setHardness(2F); public static final Block MithrilOre = (new ModBlockOre(pm.MithrilOreID, 1)).setBlockName("MithrilORe").setResistance(2F).setHardness(2F); public static final Block SilverOre = (new ModBlockOre(pm.SilverOreID, 2)).setBlockName("SilverOre").setResistance(2F).setHardness(2F); public static final Block AmethystOre = (new ModBlockOre(pm.AmethystOreID, 3)).setBlockName("Amethyst").setResistance(2F).setHardness(2F); FYI pm is PropertyManager Thanks in advance.
  6. Change to this: static Configuration config = new Configuration((new File(Minecraft.getMinecraftDir(), "config/EUIndustry/SteamPower.cfg")));
  7. As of Forge 4.0 you don't need mod_ files anymore, call them anything.
  8. Okay, but I still can't figure it out . Also I have another problem, since minecraft 1.3.2, the getchangedsrc.bat doesn't output all my files, any idea why?
  9. This will recompile, get the changed .java files (modsrc/) and the changed .class files (reobf/) thanks! I'm no batch expert, so is there a way to also move/copy it to a folder?
  10. Multiplayer needs to return a Container instead of a Gui.
  11. If you do, can you share it with me? I do it manually too.
  12. Well Minecraft uses random numbers for the spawn, so you need to get those and change them with code, I think those numbers are in World.java.
  13. Alright. This is a software GitHub recently developed. It makes Githubbing so much easier with GUI and all the good stuff. http://windows.github.com/ I hope this helps. Thanks, going to try this right now, see how it works out!.
  14. Hello, I've seen a lot of open source mods that use GitHub for their source, are there any tutorials on how to do this, I'd like to make my mod Open Source. Thanks.
  15. not that I know off, except if it has an EMC value, that would be quite and exploit.
  16. Welcome to CocoCraft, a mod with alot of different stuff, Ores, Tools, Machinery and Mobs! there are a few end-game items and alot of not end game items. Currently Ingame: - CocoStone, Mithril Ore, Silver Ore, Amethyst: they're all ores found underground, all except Amethyst drops the ore itself and can be smelted into Ingots, amethyst drops a gem. - Tools and Armor: Tools and Armor are made with the Ingots and Gems you mine underground. [More Info Soon] - Essence: Essence is also found underground, but I don't call it an ore, it is quite common and drops Wind Essence, this can be crafted into Fire, Earth and Water Essence. - Cocoa Flower and Reed: These can be found all over the place, The Flower is used to create Cocoa Powder, the Reed drops Cocoa Beans! - Magic Books: Magic books are, for now (spoilers) my favourite items in the game, They sort of have a magcal ability to change or, the World time to day or Night, Heal you or give you 40 experience! They are quite expensive and have limited uses on them. - The Machinery: There are 5 machines, the Crusher, Compressor, Silver Furnace, Duplicator and soon the Alloynizer. these machines are quite expensive, but they're totally worth their price. the Crusher crushes ores into 2 dust, which you can smelt into Ingots. The Compressor is used to compress Alloy, which is a new armor ingredient. The Silver Furnace is a furnace, but with 2 input slots, you can smelt 2 ores at the same time to double efficiency. This furnace is also used to make steel! Which I'll explain later. The Duplicator does exactly what it's called, duplicate stuff, but only one thing! It uses an Iron Block as fuel, and needs 1 Gold and diamond Block to function, these 3 items will be changed into 2 Diamond Blocks. the Alloynizer, still in development, not in the mod yet. It has 5 input slots, a fuel slot and an output slot. You need to add the 5 items to make 2 Raw Alloy, which then has to be Compressed. -Steel: Steel is made in the Silver Furnace with Coal Dust and an Iron Ingot, that will create Unworked steel, then you have to create a Hammer and place your unworked ingot and Hammer in your crafting, shapeless, and you get yourself a Steel ingot, it will return your hammer! - The Mobs: There are 2 mobs added by CocoCraft, the Choco Cow and Choco Pig, they drop Choco Beef and Choco Pork, which can be smelted into Choco Steak and Cooked Choco Pork. - DragonStone: DragonStone is a non-renewable resource, you get it by picking up the ender Egg, yes it is possible in vanilla, and putting it in a crafting recipe, you will get 11 Dragon Stone Shard, with these shard you can craft all tools, but you need Diamond sticks instead of regular sticks, and pick wisely, you have only 11 shards! Pictures: Ores And Blocks Crusher, Compressor, Silver Furnace and Duplicator CocoReed Crusher GUI Compressor All the tools All the Armor NOTE: Back then there was an ID conflict between some armor, so there's no Mithril Armor here. Now there is! The new implemented Shacks! They randomley generate You can find alot of the recipes here: Spotlights: http://youtu.be/dq8h8fwXBlA By DamnIcholasGamingSubscribe! Downloads: SinglePlayer: 1.9.6: http://goo.gl/OX6U1 MultiPlayer: 0.1: http://goo.gl/3rzJy Changelog: 1.9.6: - Added Book Of Lightning, spawns lightning at the position you're looking at on right click. Has a 2.5 seconds cool down. - Added SMP support! Soon: - Chocolate. - Ice Cream(?) Known Bugs: - Obsidian Multi Tool not functioning correctly. - SMP Machines don't work, so don't bother crafting them. - Magic books don't work, so don't other crafting them, it's a waste of resources. How To Install: SP: Locate your .minecraft . then open up your minecraft.jar located at /.minecraft/bin/minecrat.jar. And install ModLoader. and delete the META-INF. then Install the latest reccomended build of Minecraft Forge, also in the minecraft.jar . Then check if your minecraft still works, if not, try again. now you will have a folder called mods, put the downloaded .zip file in there, and you're good to go! MP: Install Forge in your minecraft_server.jar, don't delete the META-INF!!!!!! Then Run your server so it create s all the folders, then stop the server. Add the CocoCraftSmpV***.zip in the mods folder and you are done! NOTE: You will need Minecraft forge version 3.3.7.135 or higher! And you won't need ModLoader anymore! Copyrights: This mod (plugin, a patch to Minecraft source, henceforth "Mod" or "The Mod"), by the terms ofhttp://www.minecraft.net/copyright.jsp is sole property of the Mod author (, henceforth "Owner" or "The Owner"). By default it may only be distributed on minecraftforums.net, yowazzupmodding.webs.com. It may only be mirrored or reposted with advance written permission of the Owner. Electronic Mail is fine if you wait for a response. URL shorteners or other attempts to make money off The Owner's Mod are strictly forbidden without advance written permission Banners: Put this in your signature: [url=http://www.minecraftforum.net/topic/1186743-125cococraftv166magicbooks/][img=http://i.imgur.com/PuLSt.png][/url]
  17. I know, i use 2 modified versions of that, and with one item to a new item's simple. With 5 I just can't figure out.
  18. It might be easy to you, but I can't figure it out Can I have some more help?
  19. Okay, I'll try and mess with that!
  20. Thanks, but I don't see how that helps me with recipes that use 5 itemstacks? You only use one.
  21. Hey everybody! Last week or so I posted a topic here that showed my coed and my error, well no I fixed that and everything is working, but how do I add the recipes? Here's my code: TileEntity: package net.minecraft.src.CocoCraft.Misc; import java.util.List; import net.minecraft.src.*; public class TileEntityAlloynizer extends TileEntity implements IInventory { private ItemStack furnaceItemStacks[]; public int furnaceBurnTime; public int currentItemBurnTime; public int furnaceCookTime; public TileEntityAlloynizer() { furnaceItemStacks = new ItemStack[7]; furnaceBurnTime = 0; currentItemBurnTime = 0; furnaceCookTime = 0; } public int getSizeInventory() { return furnaceItemStacks.length; } 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 "Alloynizer"; } 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.appendTag(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-= 2; } if (!worldObj.isRemote) { if (furnaceBurnTime == 0 && canSmelt()) { currentItemBurnTime = furnaceBurnTime = getItemBurnTime(furnaceItemStacks[7]); 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+= 2; if (furnaceCookTime == 200) { furnaceCookTime = 0; smeltItem(); flag1 = true; } } else { furnaceCookTime = 0; } } if (flag1) { onInventoryChanged(); } } private boolean canSmelt() { ItemStack result = getRecipe(furnaceItemStacks[0], furnaceItemStacks[1], furnaceItemStacks[2], furnaceItemStacks[3], furnaceItemStacks[4]); if(result == null) return false; if(furnaceItemStacks[2] == null) return true; if(furnaceItemStacks[2] != null && furnaceItemStacks[2].itemID == result.itemID&& furnaceItemStacks[2].stackSize < (furnaceItemStacks[2].getMaxStackSize() - (result.stackSize-1))) return true; return false; } public void smeltItem() { if (!canSmelt()) { return; } ItemStack itemstack = getRecipe(furnaceItemStacks[0], furnaceItemStacks[1], furnaceItemStacks[2], furnaceItemStacks[3], furnaceItemStacks[4]); if (furnaceItemStacks[2] == null) { furnaceItemStacks[2] = itemstack.copy(); } else if (furnaceItemStacks[2].itemID == itemstack.itemID) { furnaceItemStacks[2].stackSize+= itemstack.stackSize; } if(furnaceItemStacks[0] != null){ furnaceItemStacks[0].stackSize--; if (furnaceItemStacks[0].stackSize <= 0) { furnaceItemStacks[0] = null; } } if(furnaceItemStacks[3] != null){ furnaceItemStacks[3].stackSize--; if (furnaceItemStacks[3].stackSize <= 0) { furnaceItemStacks[3] = null; } } } private int getItemBurnTime(ItemStack itemstack) { if (itemstack == null) { return 0; } int i = itemstack.getItem().shiftedIndex; if (i == mod_CocoCraft.MagicDust.shiftedIndex) { return 800; } else { return 0; } } 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() { } @Override public ItemStack getStackInSlotOnClosing(int var1) { return null; } private ItemStack getRecipe(ItemStack itemStack, ItemStack itemStack0, ItemStack itemStack1, ItemStack itemStack2, ItemStack itemStack3) { int i1; int i2; int i3; int i4; int i5; if(itemStack == null) i1 = 0; else i1 = itemStack.itemID; if(itemStack0 == null) i2 = 0; else i2 = itemStack0.itemID; if(itemStack1 == null) i3 = 0; else i3 = itemStack1.itemID; if(itemStack2 == null) i4 = 0; else i4 = itemStack2.itemID; if(itemStack3 == null) i5 = 0; else i5 = itemStack3.itemID; if(i1 == Block.blockDiamond.blockID && i2 == Block.blockGold.blockID) return new ItemStack(Block.blockDiamond, 2); if(i2 == Block.blockDiamond.blockID && i1 == Block.blockGold.blockID) return new ItemStack(Block.blockDiamond, 2); if(i1 == Item.diamond.shiftedIndex && i2 == mod_CocoCraft.CocoIngot.shiftedIndex && i3 == mod_CocoCraft.MithrilIngot.shiftedIndex && i4 == Item.coal.shiftedIndex && i5 == Item.coal.shiftedIndex) return new ItemStack(mod_CocoCraft.Alloy, 2); return null; } public ItemStack getStackInSlot(int var1) { return this.furnaceItemStacks[var1]; } } Block: package net.minecraft.src.CocoCraft.Blocks; import net.minecraft.src.CocoCraft.Misc.*; import net.minecraft.src.*; import java.util.ArrayList; import java.util.Random; public class BlockAlloynizer extends BlockContainer { private Random rand = new Random(); private final boolean isActive; private static boolean keepFurnaceInventory = false; public BlockAlloynizer(int id, boolean flag) { super(id, Material.rock); isActive = flag; } public boolean isOpaqueCube() { return false; } public void addCreativeItems(ArrayList itemList) { itemList.add(new ItemStack(this)); } public boolean renderAsNormalBlock() { return true; } /** * Called whenever the block is added into the world. Args: world, x, y, z */ public void onBlockAdded(World world, int x, int y, int z) { super.onBlockAdded(world, x, y, z); this.setDefaultDirection(world, x, y, z); } /** * set a blocks direction */ private void setDefaultDirection(World world, int x, int y, int z) { if (!world.isRemote) { int var5 = world.getBlockId(x, y, z - 1); int var6 = world.getBlockId(x, y, z + 1); int var7 = world.getBlockId(x - 1, y, z); int var8 = world.getBlockId(x + 1, y, z); byte var9 = 3; if (Block.opaqueCubeLookup[var5] && !Block.opaqueCubeLookup[var6]) { var9 = 3; } if (Block.opaqueCubeLookup[var6] && !Block.opaqueCubeLookup[var5]) { var9 = 2; } if (Block.opaqueCubeLookup[var7] && !Block.opaqueCubeLookup[var8]) { var9 = 5; } if (Block.opaqueCubeLookup[var8] && !Block.opaqueCubeLookup[var7]) { var9 = 4; } world.setBlockMetadataWithNotify(x, y, z, var9); } } public int getBlockTexture(IBlockAccess iblockaccess, int i, int j, int k, int l) { if(l == 1) { return mod_CocoCraft.DuplicatorSide; } if(l == 0) { return mod_CocoCraft.DuplicatorSide; } int i1 = iblockaccess.getBlockMetadata(i, j, k); if(l != i1) { return mod_CocoCraft.DuplicatorSide; } else { return mod_CocoCraft.DuplicatorFront; } } public int getBlockTextureFromSide(int side) { if (side == 3) { return mod_CocoCraft.DuplicatorFront; } else { return mod_CocoCraft.DuplicatorSide; } } /** * Called upon block activation (left or right click on the block.). The three integers represent x,y,z of the * block. */ public boolean blockActivated(World world, int x, int y, int z, EntityPlayer player) { if (world.isRemote) { return true; } else { TileEntityAlloynizer tile = (TileEntityAlloynizer)world.getBlockTileEntity(x, y, z); if (tile != null) { GuiAlloynizer GUI = new GuiAlloynizer(player.inventory, tile); ModLoader.openGUI(player, GUI); } return true; } } /** /** * Returns the TileEntity used by this block. */ public TileEntity getBlockEntity() { return new TileEntityAlloynizer(); } /** * Called when the block is placed in the world. */ public void onBlockPlacedBy(World world, int x, int y, int z, EntityLiving entity) { int var6 = MathHelper.floor_double((double)(entity.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; if (var6 == 0) { world.setBlockMetadataWithNotify(x, y, z, 2); } if (var6 == 1) { world.setBlockMetadataWithNotify(x, y, z, 5); } if (var6 == 2) { world.setBlockMetadataWithNotify(x, y, z, 3); } if (var6 == 3) { world.setBlockMetadataWithNotify(x, y, z, 4); } } /** * Called whenever the block is removed. */ public void onBlockRemoval(World world, int x, int y, int z) { if (!keepFurnaceInventory) { TileEntityAlloynizer tile = (TileEntityAlloynizer)world.getBlockTileEntity(x, y, z); if (tile != null) { for (int var6 = 0; var6 < tile.getSizeInventory(); ++var6) { ItemStack var7 = tile.getStackInSlot(var6); if (var7 != null) { float var8 = this.rand.nextFloat() * 0.8F + 0.1F; float var9 = this.rand.nextFloat() * 0.8F + 0.1F; float var10 = this.rand.nextFloat() * 0.8F + 0.1F; while (var7.stackSize > 0) { int var11 = this.rand.nextInt(21) + 10; if (var11 > var7.stackSize) { var11 = var7.stackSize; } var7.stackSize -= var11; EntityItem var12 = new EntityItem(world, (double)((float)x + var8), (double)((float)y + var9), (double)((float)z + var10), new ItemStack(var7.itemID, var11, var7.getItemDamage())); if (var7.hasTagCompound()) { var12.item.setTagCompound((NBTTagCompound)var7.getTagCompound().copy()); } float var13 = 0.05F; var12.motionX = (double)((float)this.rand.nextGaussian() * var13); var12.motionY = (double)((float)this.rand.nextGaussian() * var13 + 0.2F); var12.motionZ = (double)((float)this.rand.nextGaussian() * var13); world.spawnEntityInWorld(var12); } } } } } super.onBlockRemoval(world, x, y, z); } } Container: package net.minecraft.src.CocoCraft.Misc; import net.minecraft.src.CocoCraft.*; import net.minecraft.src.CocoCraft.Misc.TileEntityAlloynizer; import net.minecraft.src.*; import java.util.Random; public class ContainerAlloynizer extends Container { private TileEntityAlloynizer furnace; private int lastCookTime; private int lastBurnTime; private int lastItemBurnTime; public ContainerAlloynizer(InventoryPlayer inventoryplayer, TileEntityAlloynizer tile) { lastCookTime = 0; lastBurnTime = 0; lastItemBurnTime = 0; furnace = tile; //Fuel //input 6 this.addSlot(new Slot(tile, 1, 44, 62)); //Inputs //input 1 this.addSlot(new Slot(tile, 0, 11, 17)); //input 2 this.addSlot(new Slot(tile, 3, 33, 17)); //input 3 this.addSlot(new Slot(tile, 4, 56, 17)); //input 4 this.addSlot(new Slot(tile, 5, 22, 36)); //input 5 this.addSlot(new Slot(tile, 6, 44, 36)); this.addSlot(new SlotFurnace(inventoryplayer.player, tile, 2, 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 != furnace.furnaceCookTime) { icrafting.updateCraftingInventoryInfo(this, 0, furnace.furnaceCookTime); } if (lastBurnTime != furnace.furnaceBurnTime) { icrafting.updateCraftingInventoryInfo(this, 1, furnace.furnaceBurnTime); } if (lastItemBurnTime != furnace.currentItemBurnTime) { icrafting.updateCraftingInventoryInfo(this, 2, furnace.currentItemBurnTime); } } lastCookTime = furnace.furnaceCookTime; lastBurnTime = furnace.furnaceBurnTime; lastItemBurnTime = furnace.currentItemBurnTime; } public void updateProgressBar(int i, int j) { if (i == 0) { furnace.furnaceCookTime = j; } if (i == 1) { furnace.furnaceBurnTime = j; } if (i == 2) { furnace.currentItemBurnTime = j; } } public boolean canInteractWith(EntityPlayer entityplayer) { return furnace.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; } } Gui and Slot class aren't needed for this. Also as you may see in my TileEntity class there is a methods thas seems to add a recipe, but does not work, it does, however, work in another tile entity class, but thas furnace only has 2 inputs, this one 5. Help would really be appreciated. YoWazzup
  22. hmm, seems legit, but I can't figure out where, though.....
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.