Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [SOLVED] [1.5.2.] Custom Mobs /w Custom Sounds.
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 1
DoorCloser

[SOLVED] [1.5.2.] Custom Mobs /w Custom Sounds.

By DoorCloser, December 29, 2013 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

DoorCloser    1

DoorCloser

DoorCloser    1

  • Creeper Killer
  • DoorCloser
  • Members
  • 1
  • 178 posts
Posted December 29, 2013

Hey mates. I've came here with another question about modding. I'm basicly modding my own mod(mobs, dimensions, items, blocks etc.). I've made one mob and i wanted to make it say my own sounds. I've watched alot of tutorials. It was said to put code like that in EntityName of your mob:

protected String getLivingSound() {
return "mob.mymob.bip";
}
protected String getHurtSound() {
return "mob.mymob.hurt";
}
protected String getDeathSound() {
return "mob.mymob.death";
}

 

 

So i've made that code, i only need to put sounds in folders. I tried to put them in [resources/sound3/mob/mymob]. Checked it out in the game...nothing works. I couldnt hear mymob make those sounds. I tried to put sounds in [resources/newsound/mob/mymob]. It didnt worked too! I also tried to convert them in .ogg format. Nothing changed! But when i try to set it like cow sounds, or chicken or enderman and etc. it works, but only with their sounds.

I dont know what to do, maybe you know?

P.S; I'm working with 1.5.2 version of minecraft.

Please Help me!

Thanks alot if you do. 

  • Quote

Share this post


Link to post
Share on other sites

DoorCloser    1

DoorCloser

DoorCloser    1

  • Creeper Killer
  • DoorCloser
  • Members
  • 1
  • 178 posts
Posted December 29, 2013

Anybody?plox

  • Quote

Share this post


Link to post
Share on other sites

DoorCloser    1

DoorCloser

DoorCloser    1

  • Creeper Killer
  • DoorCloser
  • Members
  • 1
  • 178 posts
Posted December 29, 2013

Anybode please!?

  • Quote

Share this post


Link to post
Share on other sites

GotoLink    381

GotoLink

GotoLink    381

  • World Shaper
  • GotoLink
  • Members
  • 381
  • 2012 posts
Posted December 29, 2013

See the mob tutorial.

  • Quote

Share this post


Link to post
Share on other sites

DoorCloser    1

DoorCloser

DoorCloser    1

  • Creeper Killer
  • DoorCloser
  • Members
  • 1
  • 178 posts
Posted December 29, 2013

I see you havent read even 1/4 part of my post. "I've watched alot of tutorials"

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    7599

diesieben07

diesieben07    7599

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7599
  • 55135 posts
Posted December 29, 2013

Your question is not any more important than any other question on here. Putting "Very important" in the title is a) not going to have the desired effect (more people reading) but the opposite and b) very insolent.

 

On topic: Post your sound registering code, it is important.

  • Quote

Share this post


Link to post
Share on other sites

CJLetsGame    27

CJLetsGame

CJLetsGame    27

  • Creeper Killer
  • CJLetsGame
  • Forge Modder
  • 27
  • 148 posts
Posted December 29, 2013

Making a clone topic wont make you get an answer faster.

  • Quote

Share this post


Link to post
Share on other sites

DoorCloser    1

DoorCloser

DoorCloser    1

  • Creeper Killer
  • DoorCloser
  • Members
  • 1
  • 178 posts
Posted December 30, 2013

Your question is not any more important than any other question on here. Putting "Very important" in the title is a) not going to have the desired effect (more people reading) but the opposite and b) very insolent.

 

On topic: Post your sound registering code, it is important.

 

Very important means  its important for me... Not for others.

  • Quote

Share this post


Link to post
Share on other sites

Draco18s    2406

Draco18s

Draco18s    2406

  • Reality Controller
  • Draco18s
  • Members
  • 2406
  • 15935 posts
Posted December 30, 2013

On topic: Post your sound registering code, it is important.

  • Quote

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Share this post


Link to post
Share on other sites

DoorCloser    1

DoorCloser

DoorCloser    1

  • Creeper Killer
  • DoorCloser
  • Members
  • 1
  • 178 posts
Posted December 30, 2013

Sound registering code?  I dont have one actually. Where i suppose to put it?

  • Quote

Share this post


Link to post
Share on other sites

Draco18s    2406

Draco18s

Draco18s    2406

  • Reality Controller
  • Draco18s
  • Members
  • 2406
  • 15935 posts
Posted December 30, 2013

Its an event handler class.

  • Quote

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Share this post


Link to post
Share on other sites

diesieben07    7599

diesieben07

diesieben07    7599

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7599
  • 55135 posts
Posted December 30, 2013

Sound registering code?  I dont have one actually. Where i suppose to put it?

There is your issue. Read up on how to add custom sounds.
  • Quote

Share this post


Link to post
Share on other sites

DoorCloser    1

DoorCloser

DoorCloser    1

  • Creeper Killer
  • DoorCloser
  • Members
  • 1
  • 178 posts
Posted December 31, 2013

Thanks. Could you give me any tutorial on how to do that, or code? I remember something about that, but that was ModLoader. Forge is another.

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    7599

diesieben07

diesieben07    7599

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7599
  • 55135 posts
Posted December 31, 2013

Thanks. Could you give me any tutorial on how to do that, or code? I remember something about that, but that was ModLoader. Forge is another.

Look on the wiki (link above) in the tutorials list.
  • Quote

Share this post


Link to post
Share on other sites

DoorCloser    1

DoorCloser

DoorCloser    1

  • Creeper Killer
  • DoorCloser
  • Members
  • 1
  • 178 posts
Posted January 2, 2014

Thanks. Could you give me any tutorial on how to do that, or code? I remember something about that, but that was ModLoader. Forge is another.

Look on the wiki (link above) in the tutorials list.

 

Seriously? Wiki? There is no answers on such questions. They only giv e answers on development if so.

  • Quote

Share this post


Link to post
Share on other sites

Draco18s    2406

Draco18s

Draco18s    2406

  • Reality Controller
  • Draco18s
  • Members
  • 2406
  • 15935 posts
Posted January 2, 2014

Thanks. Could you give me any tutorial on how to do that, or code? I remember something about that, but that was ModLoader. Forge is another.

Look on the wiki (link above) in the tutorials list.

 

Seriously? Wiki? There is no answers on such questions. They only giv e answers on development if so.

 

Oh, so this page doesn't exist.  Gotcha.

(Despite being old, its still accurate, based on a cursory glance and my recollections of when I did it)

  • Quote

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Share this post


Link to post
Share on other sites

DoorCloser    1

DoorCloser

DoorCloser    1

  • Creeper Killer
  • DoorCloser
  • Members
  • 1
  • 178 posts
Posted January 2, 2014

Thanks. Could you give me any tutorial on how to do that, or code? I remember something about that, but that was ModLoader. Forge is another.

Look on the wiki (link above) in the tutorials list.

 

Seriously? Wiki? There is no answers on such questions. They only giv e answers on development if so.

 

Oh, so this page doesn't exist.  Gotcha.

(Despite being old, its still accurate, based on a cursory glance and my recollections of when I did it)

 

Thanks, but i still miss understand something. Tutorial says i supposed to put  MinecraftForge.EVENT_BUS.register(new HalflifeMod_EventSounds()); in @PreInit in Main.class. So it should be looks like that;

 

 

@PreInit

MinecraftForge.EVENT_BUS.register(new HalflifeMod_EventSounds());

}}

 

 

 

Because eclipse giving me an error;

Syntax Error on token "MinecraftForge", delete this token

 

Without that string my sounds doesnt work. Can you help? I'll give you some codes;

package doorcloser.modding;

import net.minecraftforge.client.event.sound.SoundLoadEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.ForgeSubscribe;

public class HalflifeMod_EventSounds
{

    @ForgeSubscribe
    public void onSound(SoundLoadEvent event)
    {
        try 
        {
            event.manager.soundPoolSounds.addSound("houndeye/bip.wav", mod_HalflifeMod.class.getResource("/resources/newsound/mob/bip.ogg"));            
        
        } 
        catch (Exception e)
        {
            System.err.println("Failed to register one or more sounds.");
        }
    
        event.manager.soundPoolSounds.addSound("houndeye/bip1.ogg", mod_HalflifeMod.class.getResource("/resources/newsound/mob/bip1.ogg"));         
        event.manager.soundPoolSounds.addSound("houndeye/bip2.ogg", mod_HalflifeMod.class.getResource("/resources/newsound/mob/bip2.ogg"));         
        event.manager.soundPoolSounds.addSound("houndeye/bip3.ogg", mod_HalflifeMod.class.getResource("/resources/newsound/mob/bip3.ogg"));
        
}}

 

Did i set the paths not correct? Please help,

  • Quote

Share this post


Link to post
Share on other sites

Draco18s    2406

Draco18s

Draco18s    2406

  • Reality Controller
  • Draco18s
  • Members
  • 2406
  • 15935 posts
Posted January 2, 2014

@PreInit
MinecraftForge.EVENT_BUS.register(new HalflifeMod_EventSounds());
}}

 

This is wrong.

 

First, @PreInit is a function declared with the @PreInit annotation in your main class.

Second (and the only inaccuracy in the tutoral) is that @PreInit was depreciated in favor of @EventHandler, but it should alert you to this and what to use instead.

Third, I don't know how you thought you needed two unpaired close-braces.

 

    @EventHandler
    public void preInit(FMLPreInitializationEvent event)
    {
        MinecraftForge.EVENT_BUS.register(new HalflifeMod_EventSounds());
    }

  • Quote

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Share this post


Link to post
Share on other sites

DoorCloser    1

DoorCloser

DoorCloser    1

  • Creeper Killer
  • DoorCloser
  • Members
  • 1
  • 178 posts
Posted January 2, 2014

@PreInit
MinecraftForge.EVENT_BUS.register(new HalflifeMod_EventSounds());
}}

 

This is wrong.

 

First, @PreInit is a function declared with the @PreInit annotation in your main class.

Second (and the only inaccuracy in the tutoral) is that @PreInit was depreciated in favor of @EventHandler, but it should alert you to this and what to use instead.

Third, I don't know how you thought you needed two unpaired close-braces.

 

    @EventHandler
    public void preInit(FMLPreInitializationEvent event)
    {
        MinecraftForge.EVENT_BUS.register(new HalflifeMod_EventSounds());
    }

 

Eclipse says; @EventHandler cannot be resolved to a type.

Whats the matter? Am i suppose to type it below @Mod, or upper? Below public class or upper?

  • Quote

Share this post


Link to post
Share on other sites

CJLetsGame    27

CJLetsGame

CJLetsGame    27

  • Creeper Killer
  • CJLetsGame
  • Forge Modder
  • 27
  • 148 posts
Posted January 2, 2014

EventHandler wasnt implemented yet in 1.5.2 forge.

 

DoorCloser, is there any reason you dont start modding with 1.6.4? You might get better answers if you update.

  • Quote

Share this post


Link to post
Share on other sites

DoorCloser    1

DoorCloser

DoorCloser    1

  • Creeper Killer
  • DoorCloser
  • Members
  • 1
  • 178 posts
Posted January 2, 2014

EventHandler wasnt implemented yet in 1.5.2 forge.

 

DoorCloser, is there any reason you dont start modding with 1.6.4? You might get better answers if you update.

 

I know, but there was alot of changes. I was already modding for 1.5.2. When i finish my mod, i'll port it to 1.6.4. :9

  • Quote

Share this post


Link to post
Share on other sites

DoorCloser    1

DoorCloser

DoorCloser    1

  • Creeper Killer
  • DoorCloser
  • Members
  • 1
  • 178 posts
Posted January 2, 2014

EventHandler wasnt implemented yet in 1.5.2 forge.

 

DoorCloser, is there any reason you dont start modding with 1.6.4? You might get better answers if you update.

 

So, @PreInit made without errors. But still no sounds. I dont know where to put them. Is it supposed to be in sound3 or newsound in resources folder? I tried to put folder newsound in minecraft.jar, nothing worked. I did something wrong again? Check my codes please:

 

Event_Sound file:

 

 

package doorcloser.modding;

 

import net.minecraftforge.client.event.sound.SoundLoadEvent;

import net.minecraftforge.common.MinecraftForge;

import net.minecraftforge.event.ForgeSubscribe;

 

public class HalflifeMod_EventSounds {

 

@ForgeSubscribe

public void onSound(SoundLoadEvent event) {

try {

event.manager.soundPoolSounds.addSound("houndeye/bip1.wav",

mod_HalflifeMod.class

.getResource("/newsound/mob/houndeye/bip1.wav"));

event.manager.soundPoolSounds.addSound("houndeye/bip2.wav",

mod_HalflifeMod.class

.getResource("/newsound/mob/houndeye/bip2.wav"));

event.manager.soundPoolSounds.addSound("houndeye/bip3.wav",

mod_HalflifeMod.class

.getResource("/newsound/mob/houndeye/bip3.wav"));

 

} catch (Exception e) {

System.err.println("Failed to register one or more sounds.");

}

 

}

}

 

 

 

My mod file:

 

 

package doorcloser.modding;

 

import net.minecraftforge.common.*;

import net.minecraft.block.Block;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.entity.EnumCreatureType;

import net.minecraft.item.EnumToolMaterial;

import net.minecraft.item.Item;

import net.minecraft.item.ItemFood;

import net.minecraft.item.ItemStack;

import net.minecraft.world.biome.BiomeGenBase;

import net.minecraftforge.common.EnumHelper;

import cpw.mods.fml.client.registry.RenderingRegistry;

import cpw.mods.fml.common.Mod;

import cpw.mods.fml.common.Mod.Init;

import cpw.mods.fml.common.Mod.PreInit;

import cpw.mods.fml.common.event.FMLInitializationEvent;

import cpw.mods.fml.common.event.FMLPreInitializationEvent;

import cpw.mods.fml.common.network.NetworkMod;

import cpw.mods.fml.common.registry.EntityRegistry;

import cpw.mods.fml.common.registry.GameRegistry;

import cpw.mods.fml.common.registry.LanguageRegistry;

 

// basic forge stuff

@Mod(modid = "mod_HalflifeMod", name = "Half-Life MOD", version = "v1")

 

@NetworkMod(clientSideRequired = true, serverSideRequired = false)

public class mod_HalflifeMod {

 

@PreInit

    public void preInit(FMLPreInitializationEvent event)

    {

        MinecraftForge.EVENT_BUS.register(new HalflifeMod_EventSounds());

    }

 

//creative tabs

public static CreativeTabs hltab = new TabHL(CreativeTabs.getNextID(), "Half-Life Blocks");

 

 

public static Block floor01;

public static Block floor02;

public static Block floor03;

public static Block wall01;

public static Block wall02;

public static Block wall03;

public static Block wall04;

public static Block wall05;

public static Block wall06;

public static Block wall07;

public static Block wall08pt1;

public static Block wall08pt2;

public static Block smallpc;

public static Block xeniangrass;

public static Block xeniandirt;

public static Block xenianbluepillar;

public static Block xeniangreenpillar;

public static Block xenianstone;

public static Block xenianpillar;

 

public static Block xenportal;

public static int DimID = 4;

public static BiomeGenBase xenbiome1 = new BiomeGenSpaces(30);

 

 

 

public String getVersion() {

return "1.5.2";

}

 

@Init

public void load(FMLInitializationEvent event) {

 

//Houndeye main

EntityRegistry.registerGlobalEntityID(EntityHoundeye.class,"Houndeye", EntityRegistry.findGlobalUniqueEntityId(), 111738, 889345);

RenderingRegistry.registerEntityRenderingHandler(EntityHoundeye.class, new RenderHoundeye(new ModelHoundeye(), 0.5F));

 

//rendering stuff

EntityRegistry.registerModEntity(EntityHoundeye.class, "Houndeye", 1, this, 80, 3, true);

EntityRegistry.addSpawn(doorcloser.modding.EntityHoundeye.class,20,3,8, EnumCreatureType.creature);

 

// floor 01 block

floor01 = new BlockFloor01(2000, "floor01")

.setUnlocalizedName("floor01")

.setHardness(4.0F)

.setResistance(5.0F)

.setStepSound(Block.soundMetalFootstep);

GameRegistry.registerBlock(floor01, "floor01");

LanguageRegistry.addName(floor01, "Chess Floor");

 

// floor 02 block

floor02 = new BlockFloor02(2001, "floor02")

.setUnlocalizedName("floor02")

.setHardness(4.0F)

.setResistance(5.0F)

.setStepSound(Block.soundMetalFootstep);

GameRegistry.registerBlock(floor02, "floor02");

LanguageRegistry.addName(floor02, "Carpet FLoor");

 

// floor 03 block

floor03 = new BlockFloor03(2002, "floor03")

.setUnlocalizedName("floor03")

.setHardness(4.0F)

.setResistance(5.0F)

.setStepSound(Block.soundMetalFootstep);

GameRegistry.registerBlock(floor03, "floor03");

LanguageRegistry.addName(floor03, "SiloD Floor");

 

// wall 01 block

wall01 = new BlockWall01(2003, "wall01")

.setUnlocalizedName("wall01")

.setHardness(4.0F)

.setResistance(5.0F)

.setStepSound(Block.soundMetalFootstep);

GameRegistry.registerBlock(wall01, "wall01");

LanguageRegistry.addName(wall01, "Green MetalWall");

 

// wall 02 block

wall02 = new BlockWall02(2004, "wall02")

.setUnlocalizedName("wall02")

.setHardness(4.0F)

.setResistance(5.0F)

.setStepSound(Block.soundMetalFootstep);

GameRegistry.registerBlock(wall02, "wall02");

LanguageRegistry.addName(wall02, "Green MetalWall 2");

 

// wall 03 block

wall03 = new BlockWall03(2005, "wall03")

.setUnlocalizedName("wall03")

.setHardness(4.0F)

.setResistance(5.0F)

.setStepSound(Block.soundMetalFootstep);

GameRegistry.registerBlock(wall03, "wall03");

LanguageRegistry.addName(wall03, "Grey MetalWall");

 

// wall 04 block

wall04 = new BlockWall04(2006, "wall04")

.setUnlocalizedName("wall04")

.setHardness(4.0F)

.setResistance(5.0F)

.setStepSound(Block.soundMetalFootstep);

GameRegistry.registerBlock(wall04, "wall04");

LanguageRegistry.addName(wall04, "Grey MetalWall 2");

 

// wall 05 block

wall05 = new BlockWall05(2007, "wall05")

.setUnlocalizedName("wall05")

.setHardness(4.0F)

.setResistance(5.0F)

.setStepSound(Block.soundMetalFootstep);

GameRegistry.registerBlock(wall05, "wall05");

LanguageRegistry.addName(wall05, "Green MetalWall 3");

 

// wall 06 block

wall06 = new BlockWall06(2008, "wall06")

.setUnlocalizedName("wall06")

.setHardness(4.0F)

.setResistance(5.0F)

.setStepSound(Block.soundMetalFootstep);

GameRegistry.registerBlock(wall06, "wall06");

LanguageRegistry.addName(wall06, "Grey MetalWall 3");

 

// wall 07 block

wall07 = new BlockWall07(2009, "wall07")

.setUnlocalizedName("wall07")

.setHardness(4.0F)

.setResistance(5.0F)

.setStepSound(Block.soundMetalFootstep);

GameRegistry.registerBlock(wall07, "wall07");

LanguageRegistry.addName(wall07, "Grey MetalWall 4");

 

// wall 08 pt1 block

wall08pt1 = new BlockWall08pt1(2010, "wall08pt1")

.setUnlocalizedName("wall08pt1")

.setHardness(4.0F)

.setResistance(5.0F)

.setStepSound(Block.soundMetalFootstep);

GameRegistry.registerBlock(wall08pt1, "wall08pt1");

LanguageRegistry.addName(wall08pt1, "String Wall Top");

 

// wall 08 pt2 block

wall08pt2 = new BlockWall08pt2(2011, "wall08pt2")

.setUnlocalizedName("wall08pt2")

.setHardness(4.0F)

.setResistance(5.0F)

.setStepSound(Block.soundMetalFootstep);

GameRegistry.registerBlock(wall08pt2, "wall08pt2");

LanguageRegistry.addName(wall08pt2, "String Wall Bottom");

 

// small pc block

smallpc = new BlockPC(2012, "smallpc")

.setUnlocalizedName("monitor")

.setHardness(4.0F)

.setResistance(5.0F)

.setStepSound(Block.soundMetalFootstep);

GameRegistry.registerBlock(smallpc, "smallpc");

LanguageRegistry.addName(smallpc, "Small PC");

 

// [XEN STUFF BELOW]

 

// xenian grass block

xeniangrass = new BlockXenianGrass(2013, "xeniangrass")

.setUnlocalizedName("xeniangrass")

.setHardness(2.0F)

.setResistance(3.0F)

.setStepSound(Block.soundGrassFootstep);

GameRegistry.registerBlock(xeniangrass, "xeniangrass");

LanguageRegistry.addName(xeniangrass, "Xenian Grass");

// xenian dirt block

xeniandirt = new BlockXenianDirt(2014, "xeniandirt")

.setUnlocalizedName("xeniandirt")

.setHardness(2.0F)

.setResistance(3.0F)

.setStepSound(Block.soundGrassFootstep);

GameRegistry.registerBlock(xeniandirt, "xeniandirt");

LanguageRegistry.addName(xeniandirt, "Xenian Dirt");

// xenian blue pillar block

xenianbluepillar = new BlockXenianBluePillar(2015, "xenianbluepillar")

.setUnlocalizedName("xenianbluepillar")

.setHardness(8.0F)

.setResistance(4.0F)

.setStepSound(Block.soundStoneFootstep);

GameRegistry.registerBlock(xenianbluepillar, "xenianbluepillar");

LanguageRegistry.addName(xenianbluepillar, "Blue Xenian Pillar");

// xenian green pillar block

xeniangreenpillar = new BlockXenianGreenPillar(2016, "xenianbluepillar")

.setUnlocalizedName("xeniangreenpillar")

.setHardness(8.0F)

.setResistance(4.0F)

.setStepSound(Block.soundStoneFootstep);

GameRegistry.registerBlock(xeniangreenpillar, "xeniangreenpillar");

LanguageRegistry.addName(xeniangreenpillar, "Green Xenian Pillar");

// xenian pillar block

xenianpillar = new BlockXenianPillar(2017, "xenianpillar")

.setUnlocalizedName("xenianpillar")

.setHardness(8.0F)

.setResistance(4.0F)

.setStepSound(Block.soundStoneFootstep);

GameRegistry.registerBlock(xenianpillar, "xenianpillar");

LanguageRegistry.addName(xenianpillar, "Xenian Pillar");

// xenian stone block

xenianstone = new BlockXenianStone(2018, "xenianstone")

.setUnlocalizedName("xenianstone")

.setHardness(8.0F)

.setResistance(4.0F)

.setStepSound(Block.soundStoneFootstep);

GameRegistry.registerBlock(xenianstone, "xenianstone");

LanguageRegistry.addName(xenianstone, "Xenian Stone");

 

// xenian portal block

xenportal = new BlockXenPortal(2019)

.setUnlocalizedName("xenportal")

.setHardness(8.0F)

.setResistance(4.0F)

.setStepSound(Block.soundStoneFootstep);

GameRegistry.registerBlock(xenportal, "xenportal");

LanguageRegistry.addName(xenportal, "Xenian Portal");

 

// Dimension stuff below

DimensionManager.registerProviderType(DimID, WorldProviderXen.class, true);

DimensionManager.registerDimension(DimID, DimID);

}}

 

 

 

 

 

My Entity file:

 

 

package doorcloser.modding;

 

import cpw.mods.fml.relauncher.SideOnly;

import net.minecraft.client.Minecraft;

import net.minecraft.client.model.ModelBase;

import net.minecraft.client.renderer.entity.RenderLiving;

import net.minecraft.entity.Entity;

import net.minecraft.entity.ai.EntityAIAttackOnCollide;

import net.minecraft.entity.ai.EntityAIHurtByTarget;

import net.minecraft.entity.ai.EntityAILeapAtTarget;

import net.minecraft.entity.ai.EntityAILookIdle;

import net.minecraft.entity.ai.EntityAIMoveTwardsRestriction;

import net.minecraft.entity.ai.EntityAINearestAttackableTarget;

import net.minecraft.entity.ai.EntityAISwimming;

import net.minecraft.entity.ai.EntityAIWander;

import net.minecraft.entity.ai.EntityAIWatchClosest;

import net.minecraft.entity.ai.EntityLookHelper;

import net.minecraft.entity.monster.EntityMob;

import net.minecraft.entity.passive.EntityVillager;

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.nbt.NBTTagCompound;

import net.minecraft.pathfinding.PathEntity;

import net.minecraft.world.World;

 

public class EntityHoundeye extends EntityMob {

 

// mob

public EntityHoundeye(World par1World) {

 

super(par1World);

this.setSize(0.6F, 0.8F);

this.moveSpeed = 0.3F;

texture = "/mob/HL/Houndeye.png";

isImmuneToFire = true;

this.getNavigator().setSpeed(0.3F);

// mob's ai below

 

this.tasks.addTask(0, new EntityAISwimming(this));

this.tasks.addTask(1, new EntityAIAttackOnCollide(this,

EntityPlayer.class, this.moveSpeed, false));

this.tasks.addTask(2, new EntityAIMoveTwardsRestriction(this,

this.moveSpeed));

this.tasks.addTask(3, new EntityAIWander(this, 0.2F));

this.tasks.addTask(4, new EntityAILeapAtTarget(this, 0.4F));

this.tasks.addTask(5, new EntityAIWatchClosest(this,

EntityPlayer.class, 6.0F));

this.tasks.addTask(6, new EntityAILookIdle(this));

this.targetTasks.addTask(0, new EntityAIHurtByTarget(this, true));

this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this,

EntityPlayer.class, 25.0F, 0, true));

 

}

 

protected boolean isAIEnabled()// enable/disable ai

{

return true;

}

 

public int func_82193_c(Entity par1Entity) // the ammount of damage

{

return 4;

}

 

protected void fall(float par1) {

}

 

public int getMaxHealth() // mob's health

{

return 15;

}

 

protected String getLivingSound() {

return "newsound.mob.houndeye.bip";

}

 

protected String getHurtSound() {

return "houndeye.bip";

}

 

protected String getDeathSound() {

return "mob.houndeye.bip";

}

 

public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) {

super.writeEntityToNBT(par1NBTTagCompound);

}

 

public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) {

super.readEntityFromNBT(par1NBTTagCompound);

}

 

protected float getSoundVolume() {

return 0.4F;

}

 

protected boolean canDespawn() // respawn after kill on the same spot

{

return false;

 

}

}

 

 

  • Quote

Share this post


Link to post
Share on other sites

CJLetsGame    27

CJLetsGame

CJLetsGame    27

  • Creeper Killer
  • CJLetsGame
  • Forge Modder
  • 27
  • 148 posts
Posted January 2, 2014

Im guessing like every other asset for mods, it goes in your mod's asset folder. Probably in a sub-folder called sounds.

  • Quote

Share this post


Link to post
Share on other sites

DoorCloser    1

DoorCloser

DoorCloser    1

  • Creeper Killer
  • DoorCloser
  • Members
  • 1
  • 178 posts
Posted January 2, 2014

Im guessing like every other asset for mods, it goes in your mod's asset folder. Probably in a sub-folder called sounds.

 

ITS FINALLY WORKED!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! I HAD TO PUT MY entity's sounds FOLDER IN resources/mod/sound FOLDER!!!! YEEEEEEEEEEEEEEEAAAAAAAAAAAH!!! THANKS EVERYONE!!!! THIS PROBLEM NOW SOLVED!!!!!!!!!!!!!!!!!!!!!

  • Quote

Share this post


Link to post
Share on other sites

Draco18s    2406

Draco18s

Draco18s    2406

  • Reality Controller
  • Draco18s
  • Members
  • 2406
  • 15935 posts
Posted January 2, 2014

EventHandler wasnt implemented yet in 1.5.2 forge.

 

Whoops, yeah, this.

  • Quote

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 1
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • LK1905
      [Solved][1.16.4] How do I correctly sync capability data between Client and server?

      By LK1905 · Posted 9 minutes ago

      I've changed the serializeNBT and deserialize methods so the value of i is in the key: @Override public CompoundNBT serializeNBT() { CompoundNBT data = new CompoundNBT(); for(int i = 0; i < 26; i++) { data.putInt("xp_" + i, (int) xp[i]); data.putInt("dynamic_" + i, dynamicLevels[i]); data.putInt("static_" + i, staticLevels[i]); } return data; } @Override public void deserializeNBT(CompoundNBT data) { for(int i = 0; i < 26; i++) { xp[i] = data.getInt("xp_" + i); dynamicLevels[i] = data.getInt("dynamic_" + i); staticLevels[i] = data.getInt("static_" + i); } }   And now it works, thank you! (I think thats what the first person to reply to this post was trying to tell me to do but I didn't understand at the time).
    • diesieben07
      Cannot create a modded forge server for 1.16.4

      By diesieben07 · Posted 16 minutes ago

      Try joining the server anyways and then post the debug.log from server and client.
    • DeNub
      Cannot create a modded forge server for 1.16.4

      By DeNub · Posted 22 minutes ago

      New Bitmap Image.bmp
    • squidlex
      How to cancel an event without subscribing to it

      By squidlex · Posted 25 minutes ago

      It's my own custom one. That's a shame but thank you for your quick reply!
    • diesieben07
      How to cancel an event without subscribing to it

      By diesieben07 · Posted 26 minutes ago

      You cannot. Your mod needs to run on the client, subscribe to the event and cancel it there. What event is this?
  • Topics

    • LK1905
      27
      [Solved][1.16.4] How do I correctly sync capability data between Client and server?

      By LK1905
      Started December 31, 2020

    • DeNub
      12
      Cannot create a modded forge server for 1.16.4

      By DeNub
      Started 4 hours ago

    • squidlex
      2
      How to cancel an event without subscribing to it

      By squidlex
      Started 36 minutes ago

    • Klarks
      2
      [1.16.4] My structure doesnt work

      By Klarks
      Started Tuesday at 04:55 AM

    • Dr.Nickenstein
      2
      Help for my tool

      By Dr.Nickenstein
      Started 1 hour ago

  • Who's Online (See full list)

    • hrlil
    • LexManos
    • LK1905
    • squidlex
    • CookieLukas
    • Choonster
    • Pl00py_R
    • diesieben07
    • Error_Coding
    • DeNub
    • P0SCH1T0
    • Dr.Nickenstein
    • Talp1
    • Jebl
    • Danebi
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [SOLVED] [1.5.2.] Custom Mobs /w Custom Sounds.
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community