Can you do a video Tut on this? I'm very interested in it.
I would love too make modding tut videos... BUT my interwebs is too slow to even think about that right now... Hopefully i will when i get faster internet!
I would love too make modding tut videos... BUT my interwebs is too slow to even think about that right now... Hopefully i will when i get faster internet!
do any of these work on 1.5.2 if not do u no any good 1.5.2 tutorials
[I just took the Minecraft Noob test! Check out what I scored. Think you can beat me?!
[url=http://www.minecraftnoobtest.com/test.php][/url]
To take the test, check out
[url=http://www.minecraftnoobtest.com/test.php]http://minecraftnoobtest.com/test.php[/url]
[I just took the Minecraft Noob test! Check out what I scored. Think you can beat me?!
[url=http://www.minecraftnoobtest.com/test.php][/url]
To take the test, check out
[url=http://www.minecraftnoobtest.com/test.php]http://minecraftnoobtest.com/test.php[/url]
do any of these work on 1.5.2 if not do u no any good 1.5.2 tutorials
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI am trying to create a custom record in 1.6.4 , I realize that this threadis over a year old, but would you help me?
My record says it is playing fine, but there is no sound coming out.
I created an ItemRecord class called MusicDisc and extended ItemRecord, and tried calling the sound several ways, nothing seems to work;
</p><p>package glistremod.items;</p><p>import glistremod.Main;</p><p>import java.util.HashMap;<br>import java.util.List;<br>import java.util.Map;</p><p>import net.minecraft.block.Block;<br>import net.minecraft.block.BlockJukeBox;<br>import net.minecraft.client.renderer.texture.IconRegister;<br>import net.minecraft.creativetab.CreativeTabs;<br>import net.minecraft.entity.player.EntityPlayer;<br>import net.minecraft.item.EnumRarity;<br>import net.minecraft.item.Item;<br>import net.minecraft.item.ItemRecord;<br>import net.minecraft.item.ItemStack;<br>import net.minecraft.util.ResourceLocation;<br>import net.minecraft.util.StatCollector;<br>import net.minecraft.world.World;<br>import net.minecraftforge.client.event.sound.SoundLoadEvent;<br>import net.minecraftforge.event.ForgeSubscribe;</p><p> </p><p><br>public class MusicDisc extends ItemRecord {</p><p>private static final Map records = new HashMap();</p><p><br>public final String recordName;</p><p><br>public MusicDisc(int ItemID, String recordName)<br>{<br>super(ItemID, recordName);</p><p>this.setCreativeTab(CreativeTabs.tabMisc);<br>this.recordName = recordName;<br>this.maxStackSize = 1;</p><p><br></p><p>records.put(recordName, this);<br>}</p><p><br>@Override<br>public void registerIcons(IconRegister iconRegister)<br>{<br>itemIcon = iconRegister.registerIcon("glistremod:" + "record_" + recordName);<br>}</p><p><br>@Override<br>public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int par7, float par8, float par9, float par10)<br>{<br>if (world.getBlockId(x, y, z) == Block.jukebox.blockID && world.getBlockMetadata(x, y, z) == 0)<br>{<br>if (world.isRemote)<br>return true;<br>else<br>{<br>((BlockJukeBox)Block.jukebox).insertRecord(world, x, y, z, itemStack);<br>//world.playAuxSFX(1005, x, y, z, this.itemID);<br>world.playAuxSFXAtEntity((EntityPlayer)null, 1005, x, y, z, this.itemID);<br>//--itemStack.stackSize;<br>return true;<br>}<br>} <br>else<br>return false;<br>}</p><p><br>@Override<br>public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)<br>{<br>par3List.add(this.getRecordTitle());<br>}</p><p><br>@Override<br>public String getRecordTitle()<br>{<br>return StatCollector.translateToLocal(this.getUnlocalizedName() + ".desc");<br>}</p><p><br>@Override<br>public EnumRarity getRarity(ItemStack itemStack)<br>{<br>return EnumRarity.rare;<br>}</p><p><br>public static MusicDisc getRecord(String par0Str)<br>{<br>return (MusicDisc)records.get(par0Str);<br>}</p><p><br>public ResourceLocation getRecordResource(String name)<br>{<br>return new ResourceLocation("glistremod:records/" + "record_Glistre.ogg");<br>}</p><p><br>public String getSoundFile()<br>{<br>// return "/ibxm/record_Glistre.ogg";<br>return ("glistremod:records/" + "record_Glistre.ogg");<br>}<br>@ForgeSubscribe <br>public void onSound(SoundLoadEvent event)<br></p><p>{<br>event.manager.soundPoolStreaming.addSound("glistremod:records/record_Glistre");<br><br>}</p><p><br>// event.manager.soundPoolSounds.addSound("x/sound2.ogg", mod_ModName.class.getResource("/x/sound2.ogg"));</p><p>}and put this in my main class:
record_Glistre=(ItemRecord) new MusicDisc(2003, "Glistre").setUnlocalizedName("record_Glistre").setCreativeTab(MyCreativeTab_1);<br>GameRegistry.registerItem(record_Glistre, "record_Glistre");<br>MinecraftForge.EVENT_BUS.register(new SoundEvents());I did it, But it wont work. I get this error:
The method setStepSound(StepSound) in the type Block is not applicable for the arguments (String)
and 'setStepSound' was what the error came up over.
Here is all the code I used:
package mymod.blocks;
import java.util.Random;
import mymod.Sound;
import net.minecraft.block.Block;
import net.minecraft.block.StepSound;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
public class MyBlock extends Block {
private String texturePath = "mymod:";
private int thisBlockID;
private StepSound soundCardboard_Step_1;
public MyBlock (int par1, Material blockMaterial, String textureName) {
super(par1, blockMaterial);
this.setCreativeTab(CreativeTabs.tabBlock);
this.setUnlocalizedName(textureName);
this.setStepSound(Sound.CustomSound);
texturePath += textureName;
thisBlockID = par1;
}
public int idDropped(int par1, Random par2Random, int par3)
{
return thisBlockID;
}
public int quantityDropped(Random random)
{
return 1;
}
public void registerIcons(IconRegister iconRegister)
{
this.blockIcon = iconRegister.registerIcon(texturePath);
}
}
package mymod;
import mymod.blocks.MyBlock;
import mymod.proxies.CommonProxy;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.EnumHelper;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraftforge.common.MinecraftForge;
import mymod.SoundHandler;
/* MOD INFO */
@Mod( modid = "mymod", name = "My Awesome Mod", version = "0.5")
@NetworkMod(clientSideRequired=true, serverSideRequired=false)
public class Main {
/* PROXY INFO */
@SidedProxy(clientSide = "mymod.proxies.ClientProxy", serverSide = "mymod.proxies.CommonProxy")
public static CommonProxy proxy;
/**
* DECLARATION SECTION
* *********************************************************** */
// DECLARE THE BLOCK
public static Block MyBlock_1;
// DECLARE NEW TOOL MATERIAL
public static EnumToolMaterial MyToolMaterial = EnumHelper.addToolMaterial("Cardboard", 0, 100, 2.0F, 1.0F, 10);
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */
@EventHandler
public void preInit( FMLPreInitializationEvent event )
{
/**
* LOAD SECTION
* *********************************************************** */
// LOAD THE BLOCK
MyBlock_1 = new MyBlock(250, Material.wood, "MyBlock_1").setHardness(0.5F);
GameRegistry.registerBlock(MyBlock_1, "MyBlock_1");
LanguageRegistry.addName(MyBlock_1, "Cardboard");
MinecraftForge.setBlockHarvestLevel(MyBlock_1, "axe", 0);
boolean requiresNoTool = true;
boolean canburn = true;
// SOUND
MinecraftForge.EVENT_BUS.register(new SoundHandler());
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */
}
@EventHandler
public static void init( FMLInitializationEvent event )
{
/**
* RECIPES SECTION
* *********************************************************** */
// ITEM RECIPE
GameRegistry.addRecipe(new ItemStack(MyBlock_1, 4), new Object[]
{
" S ",
"SXS",
" S ",
'S', Item.stick,
'X', Block.dirt,
});
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */
/**
* EXTRA METHODS SECTION
* *********************************************************** */
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */
}
@EventHandler
public static void postInit( FMLPostInitializationEvent event )
{
}
}
package mymod;
import java.util.logging.Level;
import net.minecraftforge.client.event.sound.SoundLoadEvent;
import net.minecraftforge.event.ForgeSubscribe;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class SoundHandler {
@SideOnly(Side.CLIENT)
@ForgeSubscribe
public void onSzzoundLoad(SoundLoadEvent event) {
for(String sound : Sound.files){
try {
event.manager.soundPoolSounds.addSound(sound);
} catch(Exception e) {
LogHelper.log(Level.WARNING, "Failed loading sound: " + sound)
}
}
}
}
(oh and it also said 'LogHelper' could not be resolved)
package mymod;
public class Sound {
public static final String SOUND_RESOURCE_LOCATION = "mymod" + ":";
public static final String SOUND_PREFIX = "mymod" + ":";
public static String[] files = { SOUND_RESOURCE_LOCATION + "Cardboard_Step_1.ogg"};
public static final String CustomSound = SOUND_PREFIX + "SOUND";
}
Please help, I have been trying to get my custom sounds to work for many many hours
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumI'm in 1.6.4 and it says LogHelper cannot be resolved...
Nvm its logwrapper
[url ="http://www.minecraftforum.net/topic/1066990-hardcore-ender-expansion"]
[I just took the Minecraft Noob test! Check out what I scored. Think you can beat me?!
[/url]

[url=http://www.minecraftnoobtest.com/test.php]
To take the test, check out
[url=http://www.minecraftnoobtest.com/test.php]http://minecraftnoobtest.com/test.php[/url]
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumFor the sound, nothing happens.
SoundHandler:
package mymod;
import java.util.logging.Level;
import net.minecraft.launchwrapper.LogWrapper;
import net.minecraftforge.client.event.sound.SoundLoadEvent;
import net.minecraftforge.event.ForgeSubscribe;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class SoundHandler {
@SideOnly(Side.CLIENT)
@ForgeSubscribe
public void onSzzoundLoad(SoundLoadEvent event) {
for(String sound : Sound.files){
try {
event.manager.soundPoolSounds.addSound(sound);
} catch(Exception e) {
LogWrapper.log(Level.WARNING, "Failed loading sound: " + sound);
}
}
}
}
Sound.java:
package mymod;
public class Sound {
public static final String SOUND_RESOURCE_LOCATION = "mymod" + ":";
public static final String SOUND_PREFIX = "mymod" + ":";
public static String[] files = { SOUND_RESOURCE_LOCATION + "SOUND.ogg"};
public static final String CustomSound = SOUND_PREFIX + "SOUND";
}
assets --> mymod --> sounds --> SOUND.ogg
Event handler in main:
@EventHandler
public static void init( FMLInitializationEvent event )
{
MinecraftForge.EVENT_BUS.register(new SoundHandler());
Help please!
[url ="http://www.minecraftforum.net/topic/1066990-hardcore-ender-expansion"]
[I just took the Minecraft Noob test! Check out what I scored. Think you can beat me?!
[/url]

[url=http://www.minecraftnoobtest.com/test.php]
To take the test, check out
[url=http://www.minecraftnoobtest.com/test.php]http://minecraftnoobtest.com/test.php[/url]
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumNot sure about onSoundzzload my method is onSoundsLoaded
Maybe this could help you out:
http://www.minecraftforge.net/forum/index.php?topic=29460.5;wap2