Jump to content

Got Gaming?

Members
  • Posts

    9
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Got Gaming?'s Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. This did the trick, thanks
  2. Alright, it's me again So I created a block that's pretty much sugar cane, except different texture and name...and I cannot get it stacking on top of itself The part that's supposed to make it stack is this: public boolean canPlaceBlockAt(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_) { Block block = p_149742_1_.getBlock(p_149742_2_, p_149742_3_ - 1, p_149742_4_); return block.canSustainPlant(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_, ForgeDirection.UP, this); } and I haven't altered the code above in any way, it's like that in the BlockReed file. However in-game, it won't stack. It places well on grass/dirt/sand next to water, but not on itself. It also doesn't seem to grow. Some help would be appreciated
  3. Oh gosh, you have no idea how much you helped me. I did go for a little work-around, which I'm not sure is necessary, but here's how I did it (for anyone else having issues). For the living sounds I replaced getLivingSound() with this: public void playLivingSound() { this.playSound(Strings.MODID + ":" + "mob.penguin.say", this.getSoundVolume(), this.getSoundPitch()); } And as I made the hurt/death sounds be the same as the living sounds, here's how I implemented them: public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) { if (this.getHealth() <= 0.0F) { this.playSound(Strings.MODID + ":" + "mob.penguin.say", this.getSoundVolume(), this.getSoundPitch()); } else { this.playSound(Strings.MODID + ":" + "mob.penguin.say", this.getSoundVolume(), this.getSoundPitch()); } }
  4. Guess I should also say that the error is "event cannot be resolved to a variable".
  5. return return Dude, seriously?! :-P Yea I noticed that and fixed it, but it still gives me an error
  6. Well, I have followed everything in this tutorial, but I cannot figure out how to implement it in the Entity code. If I make it protected String getLivingSound() { return return SoundHandler.onEntityPlay("mob.penguin.say", event.player.worldObj, event.player, 1, 1); } it just gives me an error
  7. After messing around a bit, I got the baby model working and babies are now babies However I'm still wondering about the sounds.
  8. Oh, I didn't even think of that. I'll try it out.
  9. Basically, I've been setting up this custom tamable mob, copying over code from the Wolf and other entities and then replacing it to what I need. It works, except for two little details - firstly: baby mobs. I'd like my mob to be able to breed, which it can - once I tame two and give them both fishes. They then engage to kiss and then a baby pops out...except it's not a baby and it's an adult...well the model is an adult, the bounds are for a baby, the shadow is for a baby etc... Basically it's a baby mob with the adult model. Here's my code for the createChild: public EntityPenguin createChild(EntityAgeable par1EntityAgeable) { EntityPenguin entitypenguin = new EntityPenguin(this.worldObj); String s = this.getOwnerName(); if (s != null && s.trim().length() > 0) { entitypenguin.setOwner(s); entitypenguin.setTamed(true); } return entitypenguin; } And the other problem I have is the sounds. I've looked around a bunch and found some tutorials, but afaik, the sound system is different for 1.7.x, rendering all 1.6.x tutorials useless. The only one I found didn't get me too far. So if anyone has any knowledge of the sounds in 1.7.x, I'd greatly appreciate it. EDIT: I have figured out the baby mobs, thanks to delpi. But I'm still unsure about the sounds, if anyone could help then that'd be awesome.
×
×
  • Create New...

Important Information

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