Everything posted by Moritz
-
Item/Block/Gui Name Problem
It happens again i did find my way out. The problem was at the config:
-
Item/Block/Gui Name Problem
It displays but the problem when you change it in the config (the static String) then he still stays at the old point (the String does not change).
-
Item/Block/Gui Name Problem
public String getItemDisplayName(ItemStack par1). This function acts as LanguageRegistry.addName(Object, String) and with that you also can use it for meta. And it does not need a setItemName(String) function^^"
-
Item/Block/Gui Name Problem
I ask here because i found no other way. I do not really like the fml- & Modloader languagepack System. Saw another way in IC2. Which was like that i want. I tried to make my own look like this: public class Language { public static Configuration cc; public static String itemTesting = "Test"; public void load() { try { itemTesting = cc.get("names", "testItem", "Test").getName(); } catch(Exeption e) { } finally { cc.safe; } } public class ItemTesting extends Item { public ItemTesting(int par1) { super(par1); } public String getItemDisplayName(ItemStack par1) { return Language.itemTesting; } } Now my Problem is the config does not work. He does not change the name^^" Whats the trouble?
-
Furnace block issues (No tileentity or GUI)
Good idea^^" i know what the problem is. You are using the wrong function for the RightClicking. It has to be look like this: public boolean onBlockActivated(World par1, int par2, int par3, int par4, EntityPlayer par5, int par6, float par7, float par8, float par9) { ItemStack item = par5.getCurrentEquippedItem(); if(item != null && par5.inventory.hasItem(Item.coal.itemID) { int size = item.getItem().stackSize; if(size > { ItemStack output = FurnaceRecipes.smelting().getRecipeOutput(item); if(output != null) { ItemStack realOutput = output; realOutput.stackSize = 8; if(!(par5.inventor.addItemStackToInventory(realOutput))) { par5.entityDropItem(realoutput, 0.0F); par5.getCurrentEquippedItem()getItem().stacksize-=8; } else { par5.addItemStackToInventory(realoutput); par5.getCurrentEquippedItem().getItem().stacksize-=8; } } } } else { par5.setFire(4); return true; } return true; } It had to look like this. There could be some mistakes in my code because i wrote it free out of my mind (i am at my mobilephone). But i think that is the way you should go^^" I hope it helps
-
[1.4.7]Transfer stack in slot problems [solved]
ok. Sry i can not show you what i've done . Its a big machine^^"
-
[1.4.7]Transfer stack in slot problems [solved]
I've been checking this post for the past day or so hoping to find a solution to this same problem... can you share how you did it at least, if not your code? Or PM me? there is a little problem. The Container ask very much the tileEntity What is todo. And you have to read the tile entity to understand. And i will not show it until i can released in my mod^^" I am afraid of someone steals my code. What i did was extending only the furnace stacking. I made it modular. Not more.
-
[1.4.7]Transfer stack in slot problems [solved]
It happends again I solved by myself. But how i can not explain it without showing my sourcecode. And i do not want to show it^^" but thanks fro reading^^
-
[Unsolved]6 Output Furnace
did you configure the ItemStack? like this: private HashMap<Integer, ItemStack[]> smeltingList = new HashMap<Integer, ItemStack[6]>; or is that not needed?
-
Finishing my mod.
Whats the problem? Does it give error messages when you recompile it? Does it crash the game when you try to test it? Explain it^^" And if you can not explain it show what you made^^
-
I have an odd question.
but i hope only if you got an achivement and only 1 time
-
[UNSOLVED] Making the player move forward?
i wrote with an item a little jump assitent (maybe i spell it wrong but it helps you with jumping) i write it in a small class. Thats the easy way i would do. But you should make the hard why then you can make a good catapult. Make it like this. And make it in a tile Entity: public class TileEntityCatapult extends TileEntity { public boolean active = false; public void updateEntity() { EntityPlayer par1 = worldObj.getClostestPlayer(xCoord, yCoord, zCoord, 2); if(par1 != null && active) //You must do it or the game crashes { par5.motionY = 5; //He Fly Up about 20 Blocks par5.motionZ = 20; //He flys in the direction about 200 blocks really fast^^" active = false; } } } But there are better ways like this: public class TileCatapultHardWay extends TileEntity { public boolean active = false; public boolean step1 = false; public boolean step2 = false; public EntityPlayer flyer = null; public void updateEntity() { EntityPlayer par1 = worldObj.getClosestPlayer(xCoord, yCoord, zCoord, 2); if(isActive && par1 != null) { flyer = par1; isActive = false; } if(flyer != null) { step1 = true; } if(step1) { flyer.motionY = 5; between = 10; step1 = false; step2 = true; } if(step2 && between == 0) { flyer.motionX = 10; flyer = null; step2 = false; } if(step2 && between > 0) { between--; // there must be a delay. try it without you will see the problem. } } } yeah thats the way i would do.
-
I have an odd question.
Ok thats a cool idea. But i do not think that will work pretty well. Because i think that will make a lot of lag. Maybe i am wrong.
-
I have an odd question.
Why are you judging him for a mod idea? You have no idea what his mod is going to achieve, it might help immersion. Saying anyones idea is "stupid" on these forums certainly wont earn you friends. It's supposed to be a place to support modders, not criticize them if you don't like their idea. Grow up. @OP, sorry got no idea how to do it, I just wanted to reply to that guy. I'm sure it's possible, but you may need to edit base files to do it (or override the pause screen) There are mods which are using pause and if then it plays a video then you cant use the other mods^^" Like Craftingguild.
-
I have an odd question.
Sry but videos plays when your pressing pause. Thats stupid! And the youtuber cuts the video inside the video when he is pressing pause^^
-
[Unsolved]6 Output Furnace
Do you really want to make 6 differend outputs with 1 recipe? I could not beleve that this could be very usefull.
-
[Solved] Game world age?
there is a function in the worldclass. Name of it is getTotalWorldTime() i think that is what you're watching for
-
Help with Tile Entity Basics
You do not need a special renderer. You need it only if you have a custom model
-
Dynamic-Size Container
That thing is something what i want to know too. Is it possible to change the container with a number inside of an tile? i mean if in the tile is something like that: int containermode = -1; if(containermode == 0) { loadContainerSize1; } else if(containermode == 1) { loadContainerSize2; } else { loadContainerSize0; } is this possible?
-
Unofficial Ore Dictionary Listing
my mod is not released now but i hope when all works how i want my mod with my api does get released 20-22 of this month. My API (SpmodAPI) has an oredictionary in it. The Iredictionary is for Bones. name = "bone"; I added the vanilla bone, also my bones (chicken/pig/sheep/cow/mooshroombones) Also there is a recipe in my API which is unsing the boneoredictionary.
-
Item damage in contructor
In the modloader class it looks like this: public static void addRecipe(ItemStack par1, Object... params) { GameRegistry.addRecipe(par1, params); } nothing else does modloader in forge do its like mine pathproxy but for modloader mods^^
-
Control blocks that can be place in a custom dimension
That's sounds like a solution but I don't think that's the best one. But thanks anyway, I'm gonna try that out. Btw,aren't those xCoord and zCoord always the same? That way it would only check the blocks above and below. And do a layer of only the blocks with this tile entity would be kinda stupid Why x and z coord are the same because badrock is the lowest Level and every block on the bottom are badrock^^ With that you can make a check it easy^^. The other ways are good to but what is when a player find a way to jump over the place function?
-
Control blocks that can be place in a custom dimension
I never had think about that^^" Hmmm thats hard. But i got an idea. Why dont you make an block which is in your dimemsion and search for all blocks from top to the bottom after special blockids. like this: public class TileEntityYourBlock extends TileEntity { public void updateEntity() { for(int i = 0; i<=255; i++) { if(!getValidBlockID(i)) { world.setBlockWithNotify(xCoord, i, zCoord, 0); } } } public boolean getValidBlockID(int i) { int blockId = worldObj.getBlockID(xCoord, i, zCoord); if(blockId = Block.planks.blockID) { return true; } return false; } } So what this code does it checks (in a tileEntity) the world from the bottom to the hight. And if there is a not valid BlockID then he set the blockID to 0. That the way i would do it when i have my own dimension^^ i hope that is what you want.
-
Item damage in contructor
My Pathproxy is on both sides! Trust me! When mine does not work then it will not work with every pathproxy (gameregistry, modloader) Here my PathProxy: package speiger.src.api.common.functions; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.List; import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.block.Block; import net.minecraft.client.settings.GameSettings; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.ShapedRecipes; import net.minecraft.src.ModLoader; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.ForgeDirection; public class PathProxy { public static void registerTile(Class<? extends TileEntity> tileEntityClass, String id) { TileEntity.addMapping(tileEntityClass, id); } public static void addRecipe(ItemStack output, Object... params) { CraftingManager.getInstance().func_92051_a(output, params); } public static void addSRecipe(ItemStack output, Object... params) { CraftingManager.getInstance().addShapelessRecipe(output, params); } public static void addRecipe(IRecipe recipe) { CraftingManager.getInstance().getRecipeList().add(recipe); } public static void addSmelting(int input, ItemStack output, float xp) { FurnaceRecipes.smelting().addSmelting(input, output, xp); } public static void registItem(Item id, String name) { GameRegistry.registerItem(id, name); } public static void registBlock(Block block, Class<? extends ItemBlock> itemclass, String name) { GameRegistry.registerBlock(block, itemclass, name); } public static void addSmelting(int itemID, int metadata, ItemStack itemstack, float experience) { FurnaceRecipes.smelting().addSmelting(itemID, metadata, itemstack, experience); } public static int getFuel(ItemStack par1) { // TODO Auto-generated method stub return 0; } public static void removeRecipe(ItemStack resultItem) { List<IRecipe> recipes = CraftingManager.getInstance().getRecipeList(); for (int i = 0; i < recipes.size(); i++) { IRecipe tmpRecipe = recipes.get(i); if (tmpRecipe instanceof ShapedRecipes) { ShapedRecipes recipe = (ShapedRecipes)tmpRecipe; ItemStack recipeResult = recipe.getRecipeOutput(); if (ItemStack.areItemStacksEqual(resultItem, recipeResult)) { recipes.remove(i--); } } } } public static int setNextFacing(int i) { if(i == ForgeDirection.NORTH.ordinal())return ForgeDirection.EAST.ordinal(); else if(i == ForgeDirection.EAST.ordinal())return ForgeDirection.SOUTH.ordinal(); else if(i == ForgeDirection.SOUTH.ordinal())return ForgeDirection.WEST.ordinal(); else if(i == ForgeDirection.WEST.ordinal())return ForgeDirection.NORTH.ordinal(); else return 0; } public static void addBlockRecipe(ItemStack par1, ItemStack par2) { CraftingManager.getInstance().func_92051_a(par1, new Object[]{"XXX", "XXX", "XXX", 'X', par2}); } }
-
Item damage in contructor
When i understood it right you want it when you craft that item/tool that it is half broken? When you mean that you could tell that the Itemdamage is at the recipe is like that you want: Like this: ModLoader.addRecipe(new ItemStack(yourItem, 1, damage), new Object[] {"X", 'X', Block.dirt}); Important for everyone who want to tell modloader sucks/isbad use gameregisty: ModLoader is a PathProxy To gameRegisty and Gameregisty goes to the crafting manager so it does not matter if it is gameregistry or Modloader. I personaly made my own PathProxy and does even not use Both of them
IPS spam blocked by CleanTalk.