Guff
Members-
Posts
159 -
Joined
-
Last visited
-
Days Won
1
Everything posted by Guff
-
For pickaxe you'll want to change the way it handles blocks being harvested/destroyed. It should be handled to check whether the item being dropped has a smelting recipe, and if it does, it should drop that instead of the normal drop (look at FurnaceRecipes.java). For axe just check all above blocks and see if they are also wood/logs, etc, and have them affected as well.
-
Show MoreTools.java.
-
Woops try + 1 instead of - 1. Also: @Override public boolean hasContainerItem() { return true; }
-
No need for a crafting handler. In your ItemKnife.java: @Override public ItemStack getContainerItemStack(ItemStack itemStack) { int alter = itemStack.getItemDamage() - 1; if(alter >= itemStack.getMaxDamage()) { return null; } itemStack.setItemDamage(alter); return itemStack; } Will return the same stack that was used with the damage minus 1. If the changed damage is greater/equal compared to the maximum allowed damage, will 'break' the item by returning null.
-
[Solved]get username of player from LivingHurtEvent.
Guff replied to BigDaveNz's topic in Modder Support
Same thing. In your processing: if(event.entityLiving instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) event.entityLiving; String name = player.username; } -
Show me the new ResourceLocation you are using, and the Exception it is showing in the console again.
-
[Solved]get username of player from LivingHurtEvent.
Guff replied to BigDaveNz's topic in Modder Support
if(event.entityLiving instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer) event.entityLiving; //do stuff here } -
Files names should be what the file names are. Just change your mschouses to lowercase and also change the folder to lowercase.
-
Make sure your tick handler is Client side, and Minecraft.getMinecraft() will work fine.
-
Minecraft is not a variable, it is a class. getMinecraft() will return the running instance of the client which is a field.
-
Anywhere you have: iconRegister.registerIcon("MscHouses:ingotcopper"); MscHouses needs to be all lowercase: iconRegister.registerIcon("mschouses:ingotcopper");
-
When you package your mod, make sure your assets folder and class folders are separate from one another. I use these: com/mod/modname/.class files assets/modname/textures/items,blocks,gui/.png files So when it is packaged, the two are distinguished. I don't know about your items, I'd have to see how you are initializing them.
-
Do a clean install and copy over your source.
-
I'm asking if you did. If you didn't, something else screwed them up. I'd recommend a clean install of forge and copy over your source.
-
Like I said, change: ResourceFile.houseGen_Img = new ResourceLocation("MscHouses:BlockBase.png"); to ResourceFile.houseGen_Img = new ResourceLocation("mschouses", "directory/to/BlockBase.png);
-
My guess is that Forge didn't set up correctly, unless you changed any of these files: Packet133TileEditorOpen.java WorldClientINNER3.java WorldClientINNER4.java
-
ResourceLocation texture = new ResourceLocation("mschouses", "directory/to/BlockBase.png); And in your src, you will have a package like this: assets.mschouses.directory.to, containing BlockBase.png. Here's the setup I use: ResourceLocation texture = new ResourceLocation("mymod", "textures/gui/myGuiTexture.png") muGuiTexture.png is located in assets.mymod.textures.gui.
-
Easy. Make a class that extends ItemPickaxe, and copy the code from ItemSnowball (onItemRightClick) and paste it into your class. Then change the code to fit what you want, it changing anything like EntitySnowball, etc. to EntityPickaxe, then copy and paste EntitySnowball/RenderSnowball and name it EntityPickaxe and RenderPickaxe, and change it. it's not hard, really just a bunch of copy and paste.
-
Show me the stack trace.
-
Only client-side: GameSettings settings = Minecraft.getMinecraft().gameSettings; KeyBinding jump = settings.keyBindJump;
-
You are trying to add a name to an object that is not a Block, Item, or ItemStack. LanguageRegistry.addName(Block.stone, "Stone"); //works LanguageRegistry.addName(new HashMap(), "Some Map"); //first param is not an instance of Block, Item, or ItemStack, will not work
-
Here is the easiest return for you: modID:textures/armor/armorType_" + (this.armorType == 2 ? 2 : 1) + ".png"
-
Did you add a mapping to your tile entity? During an FMLEvent: TileEntity.addMapping(TileEntityPipe.class, "TileEntityPipe")
-
Did you install Risugami's ModLoader? I would assume you did and you shouldn't do that if you're using. Get the version of forge (src) you want from the downloads, extract the forge folder somewhere, then open it and run install.cmd.
-
Items are static objects that are used to define behavior of that item, and ItemStacks are the actual Item. When you look in your inventory, you're actually looking at ItemStack instances that have the data of the Item or Block that is passed to them. The addSmelting() method requires an ItemStack parameter as the output, so give it one that contains the data of the item you want to receive (new ItemStack(myFoodCooked)).