
ocomobock
Members-
Posts
27 -
Joined
-
Last visited
Converted
-
Gender
Undisclosed
-
Personal Text
I am new!
ocomobock's Achievements

Tree Puncher (2/8)
0
Reputation
-
I really wish I could figure these things out. I can only make simple things like new mobs and items and stuff, I wish I could make something unique for once But yeah, I pretty much give up on this unless anyone else wants to help.
-
Minecraft.getMinecraft().renderEngine.textureMapItems.setTextureEntry("playercompass:playercompass", new TextureStitchedPlayer()); This line gives me two errors. setTextureEntry basically says the arguments don't match (String, TextureStitched) and (String, TextureStitchedPlayer). 'new TextureStitchedPlayer()' wants me to add a String as an argument. Maybe I could add "playercompass:playercompass" to the second error, and for the first one I'm not really sure. I can't just use TextureStitched. Maybe I could make a new TextureMap class (where setTextureEntry is from). I'll try to do both of those and see if they work. EDIT: Okay, making a new TextureMap class didn't work at all. But I made TextureStitchedPlayer extend TextureStitched and that fixed the first error. And I fixed (maybe) the second error by putting "playercompass:playercompass". EDIT 2: Nothing I'm trying is working at all and now I have "missing texture" as the texture.
-
I didn't think I needed to do that because I added this in the main class: playercompass = (new Item(3841)).setUnlocalizedName("playercompass:playercompass").setCreativeTab(CreativeTabs.tabTools); I guess I forgot to add that. Also, sorry I took 3 days to reply, I forgot about this thread somehow.
-
Does anyone wanna help with this? I wasn't able to figure it out and I have no idea what I could be doing wrong. If someone wants to really try and help (unlikely) you could get TeamViewer and remotely edit my code. That would be a lot more efficient than through replies and stuff. You don't have to get TeamViewer, but it would probably be a lot easier that way
-
Thank you, that seemed to have worked. EDIT: The compass is spinning randomly now. But, nobody else probably has any experience with this so I'll just try to figure it out on my own. My guess is that it somehow isn't finding the proper way to animate the texture and reverts to the default animation, which just goes through each panel every few ticks. But I have no idea why <_<
-
I'm trying to create a new compass that points at a random player on the server when you right click with it. My current problem is that it doesn't recognize my file because it's 16x512. This is the error I get when it tries to load the texture: [WARNING] [Minecraft-Client] TextureManager.createTexture: Skipping mods/combatbars/textures/items/playercompass.png because of broken aspect ratio and not animation I can't figure out how the original compass can use a 16x512 png without getting any errors. Does anyone know how to do this? Here's all my code: Outside of the load method public static Item playercompass; In the load method playercompass = (new ItemPlayerCompass(3841)).setUnlocalizedName("combatbars:playercompass").setCreativeTab(CreativeTabs.tabTools); LanguageRegistry.addName(playercompass, "Player Compass"); TexturePlayerCompass Original TextureCompass ItemPlayerCompass The original compass is just a normal item with no special class. Mine obviously has one just because of the onItemRightClick method. Anyway, if anyone could help that would be awesome. EDIT: I was testing stuff in ItemPlayerCompass, but that class isn't really important right now.
-
Item textures won't show up when other mods are installed?
ocomobock replied to ocomobock's topic in General Discussion
Wow, that was a mistake.. I went to edit the post cause I forgot something and must have accidentally made both of the images the same. I fixed it now. -
Item textures won't show up when other mods are installed?
ocomobock replied to ocomobock's topic in General Discussion
I looked through the mod_ file and the Item files and I can't really find anything similar to what hotrods is talking about. Anyways, I figured out a lot of mods have this problem, and is caused by Optifine. I uninstalled Optifine (replacing and deleting files in my minecraft.jar took forever <_<) which seemed to fix it. So I'll probably just end up letting everyone know that if they wanna use this mod, they either can't have Optifine installed, or have to deal with the missing textures. Without Optifine: With Optifine: -
Item textures won't show up when other mods are installed?
ocomobock replied to ocomobock's topic in General Discussion
The texture is still invisible. package net.minecraft.src; import net.minecraft.src.forge.ITextureProvider; public class ItemScoaletonKatana extends Item implements ITextureProvider { private int weaponDamage; public ItemScoaletonKatana(int par1) { super(par1); this.maxStackSize = 1; this.setMaxDamage(mod_Scoaleton.KatanaDurability); this.weaponDamage = 10; } -
Item textures won't show up when other mods are installed?
ocomobock replied to ocomobock's topic in General Discussion
package net.minecraft.src; public class ItemScoaletonKatana extends Item { private int weaponDamage; public ItemScoaletonKatana(int par1) { super(par1); this.maxStackSize = 1; this.setMaxDamage(mod_Scoaleton.KatanaDurability); this.weaponDamage = 10; } /** * Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if * sword */ public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block) { return par2Block.blockID == Block.web.blockID ? 15.0F : 1.5F; } /** * Current implementations of this method in child classes do not use the entry argument beside ev. They just raise * the damage on the stack. */ public boolean hitEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving) { par1ItemStack.damageItem(1, par3EntityLiving); par2EntityLiving.setFire(mod_Scoaleton.KatanaFireTime); return true; } public boolean onBlockDestroyed(ItemStack par1ItemStack, int par2, int par3, int par4, int par5, EntityLiving par6EntityLiving) { par1ItemStack.damageItem(2, par6EntityLiving); return true; } /** * Returns the damage against a given entity. */ public int getDamageVsEntity(Entity par1Entity) { return this.weaponDamage; } /** * Returns True is the item is renderer in full 3D when hold. */ public boolean isFull3D() { return true; } /** * returns the action that specifies what animation to play when the items is being used */ public EnumAction getItemUseAction(ItemStack par1ItemStack) { return EnumAction.block; } /** * How long it takes to use or consume an item */ public int getMaxItemUseDuration(ItemStack par1ItemStack) { return 72000; } /** * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer */ public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack)); return par1ItemStack; } /** * Returns if the item (tool) can harvest results from the block type. */ public boolean canHarvestBlock(Block par1Block) { return par1Block.blockID == Block.web.blockID; } public String getTextureFile() { return "/ocomo/katana.png"; } } -
Item textures won't show up when other mods are installed?
ocomobock replied to ocomobock's topic in General Discussion
I used the quick fix to set it to null because an error kept appearing on that line. I wasn't really sure why it wanted to do that. I just figured out why that was happening now though and changed it. I'm pretty sure it's because I copied the code from the sword class, and since the sword class is looking for the tool material, it wanted me to add a value. I also noticed that there wasn't a / at the beginning of the path in MinecraftForgeClient.preloadTexture, but I fixed that. The texture still isn't loading. -
Item textures won't show up when other mods are installed?
ocomobock replied to ocomobock's topic in General Discussion
So like this? public static Item scoaletonKatana = (new ItemScoaletonKatana(657, null)); public static Item darkBones = (new ItemDarkBones(656).setItemName("bonesDark")); public static Item darkBoneMeal = (new ItemDarkBoneMeal(655).setItemName("bonemealDark")); public static final Block darkSoil = (new BlockDarkSoil(146)).setHardness(0.7F).setStepSound(Block.soundGravelFootstep).setResistance(2000F).setBlockName("soilDark").setLightOpacity(1).setRequiresSelfNotify(); public static final Block darkSoil2 = (new BlockDarkSoil(145)).setHardness(0.7F).setStepSound(Block.soundGravelFootstep).setResistance(2000F).setBlockName("soilDark").setLightOpacity(1).setRequiresSelfNotify(); public static Item scoaletonSpawner = (new ItemScoaletonEgg(658)).setItemName("testSpawner"); public void load() { ModLoader.addSpawn(EntityScoaleton.class, ScoaletonMaximumGroupSize, ScoaletonMinimumGroupSize, ScoaletonSpawnRate, EnumCreatureType.monster); ModLoader.registerEntityID(EntityScoaleton.class, "Scoaleton", 85); MinecraftForgeClient.preloadTexture("ocomo/katana.png"); ModLoader.addName(scoaletonSpawner, "Spawn Scoaleton"); scoaletonSpawner.iconIndex = ModLoader.addOverride("/gui/items.png", "/ocomo/scoaletonegg.png"); ModLoader.addName(darkBones, "Dark Bones"); darkBones.iconIndex = ModLoader.addOverride("/gui/items.png", "/ocomo/darkbones.png"); ModLoader.addName(darkBoneMeal, "Dark Bone Meal"); darkBoneMeal.iconIndex = ModLoader.addOverride("/gui/items.png", "/ocomo/darkbonemeal.png"); ModLoader.addName(scoaletonKatana, "Katana"); scoaletonKatana.setTextureFile("/ocomo/katana.png"); Cause that isn't working. Sorry I keep asking questions >_< -
Item textures won't show up when other mods are installed?
ocomobock replied to ocomobock's topic in General Discussion
That didn't seem to do anything. -
Item textures won't show up when other mods are installed?
ocomobock replied to ocomobock's topic in General Discussion
I tried putting that in the Item file itself, and the mod_XXXXX file. public ItemScoaletonKatana(int par1, EnumToolMaterial par2EnumToolMaterial) { super(par1); this.maxStackSize = 1; this.setMaxDamage(mod_Scoaleton.KatanaDurability); this.weaponDamage = 10; setTextureFile("/ocomo/katana.png"); } It doesn't show the item name either. public static Item scoaletonKatana = (new ItemScoaletonKatana(657, null).setItemName("katanaScoaleton")); public static Item darkBones = (new ItemDarkBones(656).setItemName("bonesDark")); public static Item darkBoneMeal = (new ItemDarkBoneMeal(655).setItemName("bonemealDark")); public static final Block darkSoil = (new BlockDarkSoil(146)).setHardness(0.7F).setStepSound(Block.soundGravelFootstep).setResistance(2000F).setBlockName("soilDark").setLightOpacity(1).setRequiresSelfNotify(); public static final Block darkSoil2 = (new BlockDarkSoil(145)).setHardness(0.7F).setStepSound(Block.soundGravelFootstep).setResistance(2000F).setBlockName("soilDark").setLightOpacity(1).setRequiresSelfNotify(); public static Item scoaletonSpawner = (new ItemScoaletonEgg(658)).setItemName("testSpawner"); public void load() { ModLoader.addSpawn(EntityScoaleton.class, ScoaletonMaximumGroupSize, ScoaletonMinimumGroupSize, ScoaletonSpawnRate, EnumCreatureType.monster); ModLoader.registerEntityID(EntityScoaleton.class, "Scoaleton", 85); ModLoader.addName(scoaletonSpawner, "Spawn Scoaleton"); scoaletonSpawner.iconIndex = ModLoader.addOverride("/gui/items.png", "/ocomo/scoaletonegg.png"); ModLoader.addName(darkBones, "Dark Bones"); darkBones.iconIndex = ModLoader.addOverride("/gui/items.png", "/ocomo/darkbones.png"); ModLoader.addName(darkBoneMeal, "Dark Bone Meal"); darkBoneMeal.iconIndex = ModLoader.addOverride("/gui/items.png", "/ocomo/darkbonemeal.png"); scoaletonKatana.setTextureFile("/ocomo/katana.png"); I tried putting it in the item file itself: public String getTextureFile() { return "/ocomo/katana.png"; } But that didn't work either. -
Item textures won't show up when other mods are installed?
ocomobock replied to ocomobock's topic in General Discussion
Alright, thank you. I'll fix it tomorrow, I'm really tired right now I'm not quite sure how item textures work in forge, but I'm sure I'll figure it out.