Everything posted by mardiff
-
Textures Not Being Found [Please Help]
You need to setTextureName() to getTextureName(). That's why it says you have a missing tile name in the error log. Simply add setTextureName("modid:blocktexturename") to the constructor.
-
[1.7.2] blockID and itemID
Reference your blocks and items as blocks and items, not as ids. Ids no longer exist in 1.7. Also, if you used override annotations you would realize that idDropped no longer exists and has been changed to this: public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) {
-
[1.6.2] GUI Help
First of all, you need to change the serverSideRequired in the network mod annotation to be true....
-
[1.7.2] Multi-Textured Block
Check CJLetsGame's comment on here: www.minecraftforge.net/forum/index.php/topic,14997.msg76326.html#msg76326
-
1.6.4 Gui slots not registered correctly
You never defined the length of furnaceItemStacks
-
1.7.2 Missing Source Code in Eclipse
If you just want to view a certain file then type it in in a class and control click it. This will open the declaration.
-
[1.7.2] Reading Tile Entity in GUI
And so how would I fix this? Packets?
-
[1.7.2] Reading Tile Entity in GUI
I was trying to read an integer that is stored in the tile entity from the gui. When I read it in the tile entity it reads the correct value, but in the gui it always returns 0. I'm not quite sure what's going on, and it's extremely frusturating. Thanks for the help.
-
[1.7.2] addNames
That should be correct as long as those names match the unlocalized name you registered. The problem is most likely in the file location. Make sure it's in assets/modid/lang/en_US.lang. Also make sure it's a .lang file, not a .lang.txt file.
-
[1.7.2] Armor (solved)
Can't fix your problem unless we know what you did wrong. Code please.
-
[1.7.2] Texturing block sides seperately!
If you're in eclipse and you see the name of a class, you can either right click on it and click open declaration, or control click on the name itself. Both will bring you to the class.
-
[1.7.2] Texturing block sides seperately!
If you don't know how to do something that's already in vanilla, look at the vanilla code.
-
[1.6.4]can't change id of item
Is there an item/block already occupying 875 or 1131? If not, try setting it to something above 4096.
-
[1.6.4]can't change id of item
I mean, the id in the config still says 31743 (and item ids take the number and add 256 to avoid conflicts with vanilla), so it doesn't seem like anything is wrong.
-
[1.6.4]Fortune Doesn't Affect Custom Ore [*SOLVED*]
I believe this is the method you're looking for: public int quantityDropped(int meta, int fortune, Random random) { return quantityDroppedWithBonus(fortune, random); }
-
Tile Entity On an Item
Thanks a lot guys. I actually didn't want NBT so it could be balanced, but anyways it works great now!
-
Tile Entity On an Item
My goal is to create a working handheld furnace. I've found workarounds to making the entity tick (the items onUpdate() method), but the tile entity is unable to read the item stacks in it's slot. I don't even know what to look for as this problem seems extremely weird to have. Any help would be appreciated. Here's the item code: package com.mardiff.handheld.item; import net.minecraft.block.BlockFurnace; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraft.world.chunk.Chunk; import com.mardiff.handheld.HandheldBase; import com.mardiff.handheld.inventory.ContainerHandheldFurnace; import com.mardiff.handheld.tileentity.TileHandheldFurnace; public class ItemHandheldFurnace extends Item { public ItemHandheldFurnace(int par1) { super(par1); setCreativeTab(CreativeTabs.tabMisc); setMaxStackSize(1); setTextureName("furnace_front_on"); } @Override /** * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer */ public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player) { System.out.println("clicked"); player.openGui(HandheldBase.instance, 0, world, (int)player.posX, (int)player.posY, (int)player.posZ); return itemstack; } @Override public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) { if(par3Entity != null && par3Entity instanceof EntityPlayer) { EntityPlayer player = (EntityPlayer)par3Entity; if(player.openContainer instanceof ContainerHandheldFurnace) { TileHandheldFurnace tilehandheld = new TileHandheldFurnace(); tilehandheld.beginUpdating(); tilehandheld.updateEntity(); tilehandheld.validate(); } } } } I realize that making a new tile entity every update may be the problem, but then how would I get the entity to randomly tick (since tile entities don't tick unless they're in block form)?
-
Assets ???
mcmod.info is in the src/minecraft folder too.
-
[1.6.4] Making a custom container block
Vswe does some great tutorials on GUIs. Coming from an established modder, it's entertaining, and it's both elaborate but to the point.
-
Custom Furnace not changing from idle to active
To be honest, I've never even looked through there. Using System.out.println is just a basic java function that doesn't require any knowledge of modding.
-
Custom Furnace not changing from idle to active
He says to use System.out.println to actually see which parts of your code are being called. If you don't know what that is, go learn java first. It may seem like a hassle, but you won't be able to do anything at all by yourself without it. As to pertaining to your problem with the furnace, your updateFurnaceBlockState is never actually being called. With vanilla furnaces, this is called in the updateEntity() method, and your updateEntity() method is both commented out and never actually calls the updateFurnaceBlockState method. Without that part, a block schedule is never actually called, and therefore your furnace will never change it's state.
-
[1.6.4] Textures not working
To dev909, the setTextureName takes a string without .png. The register icon method wants the string with .png at the end. Additionally, only one is needed, and it's also recommended to only use one.
-
[1.6.4] Textures not working
The .zip is just like being in the /src/Minecraft folder. It should directly open to the top package of your code and the assets, along with the mcmod.info
-
[1.6.4] Textures not working
/minecraft/assets. I'm doing this away from my computer so I'm bound to forget stuff like that.
-
[1.6.4] Textures not working
Actually, the folder doesn't have to match your modid. Most people like to, but you can just change the texture code to be lowercase and leave the modid in whatever you want.
IPS spam blocked by CleanTalk.