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. This is the way how i would do it. That make it easy extendable. Oh now i understand. You want to add craftdamage to your thingy^^ Easy Enough. You have to convert the code a little bit but its not that hard. (its a tile code)(just change it to a container code) ContainerClass public void onCraftMatrixChanged(IInventory par1IInventory) { this.craftResult.setInventorySlotContents(0, CraftingManager.getInstance().findMatchingRecipe(this.craftMatrix, this.worldObj)); DamageModifire(); } public void DamageModifier() { if(modifireslot[id] != null && modifireslot[id].getItem() instanceof ModifireTool) { ModifireTool mt = (ModifireTool)modifireslot[id].getItem(); modifireslot[id] = mt.damageTool(modifireslot[id], 1); } } ItemClass public class ModifireTool extends Item { public ModifireTool(int id) { super(id); setMaxDamage(3); } public ItemStack damageTool(ItemStack tool, int damage) { tool.setItemDamage(tool.getItemDamage()+damage); if(tool.getItemDamage() > tool.getMaxDamage()) { return null; } return tool; } } I hope that helps^^
  2. Hello Forge Team. I have big problems with textures. I do not have any idea where to place it. Well the Textures are loaded but Minecraft-Client says that he do not find the textures. Well kinda stupid but i know when a error message comes i should fix it. So now i read muchmuch tutorials. Some IronChestCode. And tested a lot. Well i give up with these .... resourcepacks. (Maybe its a good thing but i already do not like it) Back To the problem. So here are the codes where are the problems: By the way. I made a easy way to add textures. So do not wonder. Config: package minecraftwero.common.config; import minecraftwero.Bacon; import minecraftwero.common.blocks.BlockBaconMaker; import minecraftwero.common.items.BaconArmor; import minecraftwero.common.items.BaconRecords; import minecraftwero.common.items.BaconSword; import minecraftwero.common.items.BaconTool; import minecraftwero.common.items.CraftingFood; import minecraftwero.common.items.ItemBaconFood; import minecraftwero.common.items.ItemBlade; import minecraftwero.common.items.ItemBlockBaconMachine; import minecraftwero.common.items.ItemFineSword; import minecraftwero.common.lib.BaconTextures; import minecraftwero.common.tile.BaconMaker; import net.minecraft.potion.Potion; import net.minecraft.potion.PotionEffect; import cpw.mods.fml.common.registry.GameRegistry; public class BaconItemConfig { public static BaconItems bi; public static BaconConfig bc; public static BaconTextures bt; public static void loadItems() { //Core bi.gayBacon = (new ItemBaconFood(bc.getItem(bc.items, "Gay Bacon", 23999), 4, true, "Gay Bacon", bt.gayBacon)); GameRegistry.registerItem(bi.gayBacon, "Gay Bacon"); //Core bi.rawBacon = (new ItemBaconFood(bc.getItem(bc.items, "Raw Bacon", 24000), 3, true, "Raw Bacon", bt.rawBacon)); GameRegistry.registerItem(bi.rawBacon, "Raw Bacon"); //Core bi.cookedBacon = (new ItemBaconFood(bc.getItem(bc.items, "Cooked Bacon", 24001), 5, true, "Cooked Bacon", bt.cookedBacon)); GameRegistry.registerItem(bi.cookedBacon, "Cooked Bacon"); //Core bi.baconBoots = (new BaconArmor(bc.getItem(bc.items, "Bacon Boots", 24002), bi.baconArmor, Bacon.core.getArmorTexture("bacon"), 3, bt.baconBoots, "Bacon Boots")); GameRegistry.registerItem(bi.baconBoots, "Bacon Boots"); //Core bi.baconLegs = (new BaconArmor(bc.getItem(bc.items, "Bacon Leggings", 24003), bi.baconArmor, Bacon.core.getArmorTexture("bacon"), 2, bt.baconLegs, "Bacon Leggings")); GameRegistry.registerItem(bi.baconLegs, "Bacon Legs"); //Core bi.baconPlate = (new BaconArmor(bc.getItem(bc.items, "Bacon Chest Plate", 24004), bi.baconArmor, Bacon.core.getArmorTexture("bacon"), 1, bt.baconPlate, "Bacon Chest Plate")); GameRegistry.registerItem(bi.baconPlate, "Bacon Plate"); //Core bi.baconHelmet = (new BaconArmor(bc.getItem(bc.items, "Bacon Helmet", 24005), bi.baconArmor, Bacon.core.getArmorTexture("bacon"), 0, bt.baconHelmet, "Bacon Helmet")); GameRegistry.registerItem(bi.baconHelmet, "Bacon Helmet"); //Core bi.baconPickaxe = new BaconTool(bc.getItem(bc.items, "Bacon Pickaxe", 24006), bt.baconPickAxe, "Bacon Pickaxe", "pickaxe", 1, 5F, 100); GameRegistry.registerItem(bi.baconPickaxe, "Bacon Pickaxe"); //Core bi.baconAxe = new BaconTool(bc.getItem(bc.items, "Bacon Axe", 24007), bt.baconAxe, "Bacon Axe", "axe", 1, 5F, 100); GameRegistry.registerItem(bi.baconAxe, "Bacon Axe"); //Core bi.baconSpade = new BaconTool(bc.getItem(bc.items, "Bacon Shovel", 24008), bt.baconSpade, "Bacon Shovel", "shovel", 1, 5F, 100); GameRegistry.registerItem(bi.baconSpade, "Bacon Spade"); //Core bi.baconSword = new BaconSword(bc.getItem(bc.items, "Bacon Sword", 24009), "Bacon Sword", bt.baconSword); GameRegistry.registerItem(bi.baconSword, "Bacon Sword"); //Core bi.baconHoe = new BaconTool(bc.getItem(bc.items, "Bacon Hoe", 24010), bt.baconHoe, "Bacon Hoe", "hoe", 1, 5F, 100); GameRegistry.registerItem(bi.baconHoe, "Bacon Hoe"); //Core bi.fineSword = (new ItemFineSword(bc.getItem(bc.items, "Fine Sword", 24011),bt.fineSword ,"Fine Sword")); GameRegistry.registerItem(bi.fineSword, "Fine Sword"); //Core bi.baconDisk = new BaconRecords (bc.getItem(bc.items, "Bacon Disk", 24012), "Bacon Pancakes", "Bacon Disc", bt.baconDisc); GameRegistry.registerItem(bi.baconDisk, "BaconPancakes"); //Core bi.sawMill = new ItemBlade (bc.getItem(bc.items, "Saw Blade", 24015), 6000, "Saw Blade", bt.sawMill); GameRegistry.registerItem(bi.sawMill, "Saw Blade"); //Core bi.rottedBacon = new ItemBaconFood(bc.getItem(bc.items, "Poisen Bacon", 24016), 2, false, "Poisend Bacon", bt.rottedBacon, new PotionEffect(Potion.hunger.id, 1, 200)); GameRegistry.registerItem(bi.rottedBacon, "Poisoned Bacon"); //Core bi.rottedPorkChop = new ItemBaconFood(bc.getItem(bc.items, "Poisen Porkchop", 24017), 2, false, "Poisend Porkchop", bt.rottedPorkChop , new PotionEffect(Potion.hunger.id, 1, 200)); GameRegistry.registerItem(bi.rottedPorkChop, "Poisoned Porkchop"); //Core bi.baconMachine = new BlockBaconMaker(bc.getBlock(bc.blocks, "Bacon Maker", 1000), "Bacon Maker", bt.baconMaker); GameRegistry.registerBlock(bi.baconMachine, ItemBlockBaconMachine.class, "Bacon Converter"); GameRegistry.registerTileEntity(BaconMaker.class, "BM"); bi.cheeseWheel = new CraftingFood(bc.getItem(bc.items, "Cheese Wheel", 24018), 8, 1, true, "Cheese Wheel", bt.cheeseWheel); bi.cheeseWheel.setContainerItem(bi.cheeseWheel); GameRegistry.registerItem(bi.cheeseWheel, "Cheese Wheel"); bi.baconNutella = (new ItemBaconFood(bc.getItem(bc.items, "Nutella on Bacon", 23998), 6, true, "Nutella on Bacon", bt.baconNutella)); GameRegistry.registerItem(bi.baconNutella, "Nutella on Bacon"); bi.nutella = new CraftingFood(bc.getItem(bc.items, "Nutella", 24014), 10, 1, true, "Nutella", bt.nutella); bi.nutella.setContainerItem(bi.nutella); GameRegistry.registerItem(bi.nutella, "Nutella"); } } ItemClass package minecraftwero.common.items; import minecraftwero.Bacon; import minecraftwero.common.lib.BaconTextures; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraft.potion.PotionEffect; import net.minecraft.world.World; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; /** * * @author Speiger * */ public class ItemBaconFood extends ItemFood { private String name; public String texture; private PotionEffect[] potion; public ItemBaconFood(int par1, int par2, boolean par3, String par4, String par5, PotionEffect...par7) { super(par1, par2, par3); this.setCreativeTab(Bacon.baconMod); name = par4; texture = par5; potion = par7; this.func_111206_d(par5); } public ItemBaconFood(int par1, int par2, boolean par3, String par4, String par5) { this(par1, par2, par3, par4, par5, new PotionEffect(0, 0, 0)); } public String getItemDisplayName(ItemStack par1) { return name; } @SideOnly(Side.CLIENT) @Override public void registerIcons(IconRegister par1IconRegister) { this.itemIcon = par1IconRegister.registerIcon(texture); } @Override public ItemStack onEaten(ItemStack par1, World par2, EntityPlayer par3) { --par1.stackSize; par3.getFoodStats().addStats(this); par2.playSoundAtEntity(par3, "random.burp", 0.5F, par2.rand.nextFloat() * 0.1F + 0.9F); addPotions(par1, par2, par3); return par1; } public void addPotions(ItemStack par1, World par2, EntityPlayer par3) { for(int i = 0; i<potion.length;i++) { if(potion[i] != null && potion[i].getPotionID() > 0 && !par2.isRemote) { par3.addPotionEffect(new PotionEffect(potion[i])); } } } } TextureLoaderClass package minecraftwero.common.lib; /** * * @author MinecraftWero, Speiger * */ public class BaconTextures { public static String rawBacon = getTexture("rawBacon"); public static String cookedBacon = getTexture("cookedBacon"); public static String baconHelmet = getTexture("baconHelmet"); public static String baconLegs = getTexture("baconLegs"); public static String baconBoots = getTexture("baconBoots"); public static String baconPlate = getTexture("baconPlate"); public static String baconPickAxe = getTexture("baconPickaxe"); public static String baconAxe = getTexture("baconAxe"); public static String baconSpade = getTexture("baconSpade"); public static String baconSword = getTexture("baconSword"); public static String baconHoe = getTexture("baconHoe"); public static String gayBacon = getTexture("gayBacon"); public static String fineSword = getTexture("fineSword"); public static String baconDisc = getTexture("baconDisc"); public static String nutella = getTexture("nutella"); public static String baconNutella = getTexture("baconNutella"); public static String sawMill = getTexture("sawMill"); public static String rottedBacon = getTexture("rottedBacon"); public static String rottedPorkChop = getTexture("rottedPorkChop"); public static String cheeseWheel = getTexture("cheeseWheel"); public static String[] baconMaker = getMultiTexture(6, "BaconMakerBottom", "BaconMakerTop", "BaconMakerFront", "BaconMakerBack", "BaconMakerSide", "BaconMakerFrontActive"); /** * @Example: public static String itemName = getTexture("pictureName"); * @param par1 Texture Name * @return Icon Texture String */ public static String getTexture(String par1) { return BaconLib.modID+":"+par1; } public static String[] getMultiTexture(int par1, String...par2) { String[] output = new String[par1]; for(int i = 0; i<par1;i++) { output[i] = BaconLib.modID+":"+par2[i]; } return output; } } What is the problem? Oh i forgot to tell the texturePath Path: /src/minecraft/assets/minecraftwero/textures/items/anyThing.png codePath: /src/minecraft/minecraftwero/ModStarts. A picture to see where to place it would be nice. I do not use the package view. i use the navigations view its easier to find something. Thanks for Reading. Answer would be nice
  3. I have a answer^^ i made a 5 input furnace but the system can Be extended as much as you want. I post the code later i have to find the right words for it^^
  4. Moritz replied to invizzble's topic in Modder Support
    Ok your code is ok but i explain you the constructor so you see your error by yourself. public ItemStack onItemRightClick(ItemStack par1, World par2, EntityPlayer par3); par1 = ItemStack which is the player Currently holding. par2 = World of the player par3 = The Player which is holding this stack your errors are everytime you using this insteadof par1 Hope it helps
  5. world.getBlockMetadata(x,y,z); or inside of an ItemBlock: public int getBlockMetadata(int par1) { return par1; }
  6. hmmm here: Read the tileEntity and change it: /** * Side Sensitive getBlockTileEntityFunction * @param par0 World * @param par1 xCoord * @param par2 yCoord * @param par3 zCoord * @param par4 Side * @return TileEntity of the tile entity */ now In your tile Entity Place something like that: public void updateEntity() { for(int i = 0; i<6;i++) { TileEntity tile = this.getTileEntity(worldObj, xCoord, yCoord, zCoord, i); if(tile != null && tile instanceof YourTile) { YourTile machine = (YourTile)tile; machine.fuel+= this.energy; this.energy-=this.energy; } } } so it is sending the whole energy to your machine. This is only raw code. You have to make a view additions to it because that thing will only sending power (if needed or not). And by the way
  7. cool idea^^ you should not use onAddedBlock. Use onBlockPlacedBy because that onAddedBlock activatet everytime you place a block around him that would make a view problems. hmmm and you could make a transferfunction, That would help to than you can transfer the energy into the furnacemachine. And the furnacemachine would do less lag. I hope that helps
  8. If you want the IC2 Source. Decompile it. (but all above 1.2.5 is not working) because they download files when you star minecraft at the first time. Also you could look at Universal Electric Energy. They do have a way which is nearly at that place of IC2. I am working on my own power/liquidtransport too. Its very hard thats why i tried a easier way. ^^" But that buts very much I hope i could help you with that.
  9. Just make the 3 input slotids and 3output next to each other. and make a for loop. That should help.
  10. Ask the Gravitysuit maker how he solved the problem. Maybe he has a way. And if you want a realistic Flying (like with a jetpack) than you could look into the IC2 Sources they have it. The bad thing is google which comes at 1.4 (maybe bevor) so you only can get the 1.2 source^^ better than nothing^^"
  11. Why not sneakRightClick. Only a idea but rightClick for shooting and then just sneak and reload it. Its easier to make and less work^^"
  12. he means when you shoot he uses the gun and makes the gun empty. Than you have to refill it (with whatever he uses). And i know we are here to help people but that bow code will make it harder to code^^. Thats why i said this!
  13. There is a easier way to do it. Just when the player place it inside of his inventory the item transmute randomly in a ingot. Just use for this the update function and a random. That should help^^
  14. ok^^ But i still need someone who teach me how to code entities (living Entities) . Also i have a big source Libary. My most readed sources are IC2, BC, Redpower, Forestry, Mekanismen/Obsidian Ingots. (They are the same mod only differend Names)
  15. you mean that secret tractor? Yeah i readed that^^. I but with living entities its a little differend. I simple want make the ki of thaumcraft goblins but much more smater^^ I found a good source. Its Minecolony. I do understand the code. thats not my problem. My Problem is. How do i use it. Thats why i ask for something like a tutorial^^" Also the rotation and the movement are problems form me. Movement like zombies^^
  16. an answer would be nice^^
  17. Thanks for helping!
  18. Ok cool idea to make something like a reload system which also add alot of thigs for the detecting. First of all. Delete all Code! A bow in a gun = Thats not god. Make it like that: when you rightclick (and he can shoot) than he shood instandly! Like the old vanilla bow. And when the weapon is not loaded than he starts to refuel them. You can do this in 1 function or 2 functions^^" how you want to do it but delete the bow. Thats not good. Also enchantments are not good on weapons. Make differend kind of Munition. Which have differend effects. i hope that helps you a little bit^^
  19. Hello first. I want to make a custom Entity which live like a villager and (out of the mod millinaire) can chop dow trees, craft a view items, and build his own house, talk with the user and has a good memory. I know thats a lot of work. And i did start testing out how to spawn enitys (try and error) now my problem is with that way ill need about 6 months to get a kinda buggy not really working version of it. Thats why ill ask here. I know its a big question (and if you say no its no problem)but is there someone who can explain me or show me what i do have to know about entities? I did read a lot of entitys but how they really works. I do not know^^" Thanks for Reading^^". Speiger
  20. Just drag the buildcraft api inside eclipse and eclipse ask you do you want to copy it or link it than say link it and you have it installed like pahimar^^
  21. There is a ModLoader Mod which can help you alot. It also implemented Forge. PowerCraft. Or Read how the skulls are get Placed^^ i do not have the time (and i do not waste my time with coding for other for free). Find it out yourself. I can tell you what you need. You need: Block & ItemBlock (which have the submeta inside(submeta can big as you want)) Thats the block now for the placeing. You simply need an item which is placeing your Block. and changes the tileentity. That the way ic2 make it with his cables. Its only 1 cable tile and the items changes only the value. If you ask more than i just everytime read it from vannila there is all you need!
  22. Thats good! Now you only need an itemBlock which has this function in it to return the metadata public static ItemBlockMulitBlock extends ItemBlock { public ItemBlockMultiBlock(int par1) { super(par1); setHasSubtypes(true) } @Override public int getBlockMetadata(int par1) { return par1; } } than you also need an extra item which changes the tileentity when your placing the block. Than you can have. The Rest you have to find out yourself^^
  23. I saw something interesting in Tinkers Constructs, Dynamic Tools (not my old silly mod) And their texture change when you add modifires to it. Now my Question. Is it possible (in Minecraft) to overlap Textures? If it is does it work only on 1.5 or does it work bevore too? Thanks for answering.
  24. You Register a crafting handler (there should be a tutorial outside there) And than you say everytime you craft your item you get a new Dragonegg^^.
  25. It happens again i did find my way out. The problem was at the config: itemTesting = cc.get("names", "testItem", "test").getName(); The getName() was the problem so he always load the default. so i changed into this: itemTesting = cc.get("names", "testItem", "test").value; And it works good. Its working YAY!

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.