-
[1.7.2] Sugar cane-like block?
This did the trick, thanks
-
[1.7.2] Sugar cane-like block?
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
-
[1.7.2] Custom Mob Sounds [SOLVED]
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()); } }
-
[1.7.2] Custom Mob Sounds [SOLVED]
Guess I should also say that the error is "event cannot be resolved to a variable".
-
[1.7.2] Custom Mob Sounds [SOLVED]
return return Dude, seriously?! :-P Yea I noticed that and fixed it, but it still gives me an error
-
[1.7.2] Custom Mob Sounds [SOLVED]
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
-
[1.7.2] Custom Mob Sounds [SOLVED]
After messing around a bit, I got the baby model working and babies are now babies However I'm still wondering about the sounds.
-
[1.7.2] Custom Mob Sounds [SOLVED]
Oh, I didn't even think of that. I'll try it out.
-
[1.7.2] Custom Mob Sounds [SOLVED]
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.
IPS spam blocked by CleanTalk.