Jump to content

WeeziMonkey

Members
  • Posts

    14
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

WeeziMonkey's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. Hi. Is there a way to change the mob attack range? Right now, they attack if you are in a 16 radius. I want mobs to attack you in a, lets say, 20 radius when sprinting. I've tried some things without succes. This is in the EntityMob class: protected Entity findPlayerToAttack() { EntityPlayer entityplayer = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D); return entityplayer != null && this.canEntityBeSeen(entityplayer) ? entityplayer : null; } It should be done in this: @ForgeSubscribe public void playerSprinting(LivingUpdateEvent event){ if (event.entityLiving.isSprinting()){ } }
  2. It should be like this: @ForgeSubscribe public void onEntityDrop(LivingDropsEvent event) { if (event.entityLiving instanceof EntityCow) { //The integer at the end relates to how many potato will be dropped. event.entityLiving.dropItem(LOZmod.greenTannedLeather.itemID, 1); } } } From: http://darkhaxspace.weebly.com/living-drops.html Took me 5 seconds googling.
  3. At @init you have this: hydrogen = (new ItemHydrogen(701)); Change it to this: hydrogen = (new ItemHydrogen(701).setUnlocalizedName("name"); Thats new in 1.5. The "name" should be the name of the .png file. Just 1 picture with ONLY your item. Not a spritesheet. Place that picture in your mcp>jars>bin>minecraft.jar>textures>items (if its an item)
  4. Sorry, doesnt work either. And return null makes the game crash.
  5. You mean like this? : public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { if (hamrInjurys.brokenFootBoolean==true){ --par1ItemStack.stackSize; par3EntityPlayer.inventoryContainer.detectAndSendChanges(); hamrInjurys.brokenFootBoolean = false; } return par1ItemStack; } Sorry, but it didnt chance anything in-game. The problem still happens.
  6. http://www.minecraftforum.net/topic/1412300-147forgeblaueseichoerns-gui-tutorial/
  7. Hi, i got a problem. Maybe first the code: public class ItemBandage extends Item { public ItemBandage(int par1) { super(par1); //par1 is ID setCreativeTab(CreativeTabs.tabMisc); } public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { if (hamrInjurys.brokenFootBoolean==true){ --par1ItemStack.stackSize; hamrInjurys.brokenFootBoolean = false; } return par1ItemStack; } } brokenFootBoolean gets true once a certain potion of mine is activated. That is working. So when rightclicked, --par1ItemStack.stackSize makes sure it gets removed from my inventory (it cant be stacked) And then setting brokenFootBoolean is for something else. So then, the spot where the bandage was is empty. But if i rightclick again once or twice, the item returns. You could see that as eating your food, right clicking with your hand in the air, and getting it back. How can i fix that? Edit, main class (RS_HAMR) : In class itself: public static Item bandage; In @init : bandage = new ItemBandage(7000).setUnlocalizedName("bandage").setMaxStackSize(1); LanguageRegistry.addName(bandage, "Bandage"); EDIT 2: Seems you only get it back when you rightclick a block, not the air.
  8. Try instead of GameRegistry.addSmelting(this.AquamarineGemID, new ItemStack(AquamarineDust), 1F); this: GameRegistry.addSmelting(AquamarineGemID.itemID, new ItemStack(AquamarineDust), 1F);
  9. Paint.NET is quite pixel-precise if you zoom in all the way. Also once you've selected something it will show you at the bottom the x and y, so if both are multiples of 16 you know that it's the start of a new sprite section, if you know what I mean. Also the rulers are quite handy as well. I know. But for know mostly i edit existing Minecraft icons, and then its hard to select the right 16x16 with a retangle tool when other icons are around it. And transparant backgrounds make it even harder.
  10. Is there a way to do something similliar like that in Forge? Because i have read multipile tutorials several times now to make an item, but the texture wont work. I have a blank 256x256 Spritesheet.png and a 16x16 DiamondNugget.png The only thing i can find is how to add that Spritesheet. But does that mean i have to place my 16x16 image into the spritesheet? Because Paint.NET isnt really pixel-precise..
  11. Mmm.. no sorry. Ive read that article but it doesnt work.
  12. Ive did everything there, but i dont understand how to make sure there is also a chance my gem gets dropped by a dead mob, along with their usual stuff. Can i just, and if so where, do something like "drop = Item.diamond"? (diamond just to test first) My event class: package nomar.extramod; import java.util.ArrayList; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.Item; import net.minecraft.util.DamageSource; import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.event.entity.living.LivingAttackEvent; import net.minecraftforge.event.entity.living.LivingDropsEvent; import net.minecraftforge.event.entity.player.PlayerSleepInBedEvent; public class AddEvents { @ForgeSubscribe public void mobDrops(LivingDropsEvent event) { EntityLiving aaEntity = event.entityLiving; DamageSource aaDamage = event.source; ArrayList<EntityItem> aaDrops = event.drops; if (event.isCancelable()) { event.setCanceled(true); } } } In my @init: MinecraftForge.EVENT_BUS.register(new AddEvents());
  13. And now more detail please? I found the class, and have been trying things for more than half a hour. How do i add that method? And exactly where?
  14. Hi, im making a mod, as probably most people here... For that i want to add a mob drop to monsters. For now lets say its just a gem. I will not show the class because i have yet to make, but lets say its a totally useless item for now, only exisiting and texture. The problem im having is that i want it to be dropped by monsters that die. If possibile a small chance. But i heared its a bad idea to edit base classes. So how can i do this?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.