Everything posted by calclavia
-
Forge Ore Dictionary
Works perfectly now! The code is so much cleaner than using the IOreHandler! Hmm maybe you should add a shortcut method in ShapedOreRecipe called ShapedOreRecipe.add(XXX) to simplify the method so people don't have to type such a long function such as: CraftingManager.getInstance().getRecipeList().add(xx)
-
Multiplayer GUI Problem
So in other words in the client side I use ModLoader.openGUI and on the server side on use Player.openGUI? Or is it both sides I use player.openGUI?
-
[SOLVED] Sound
Thats about right. But it doesn't really answer my question (although it makes everything more clear). The problem I am having is that I have to get my players to manually place the sound files in resources/mods/sounds/ directory in order for the sound to be actually found. I can't figure out a way to make the sound play when I store my xxx.ogg files in my mod distribution zip package. Industrialcraft seems to be able to do this with no problem but they are not using the Forge sound handler.
-
Blocks with inventory?
BlockContainer is not needed, just override the getTileEntity function, which is defined in Block, in your subclass. I tried that and it somehow did not work. The GUI of the block stopped working and basically it had no tile entity... BlockContainer works perfectly though. Is it not recommended to use BlockContainer?
-
How to make a mod .info file?
A child mod is basically a sub-mod or an add-on to the main mod. Forge has their own info file. Take that as reference and make your own.
-
Forge Ore Dictionary
I am REALLY sorry I wasn't paying attention to what you wrote above. Apologies.
-
Something similiar to tile entities for items
Speaking of wich, is it possible to get an item to have its metadata higher than 16 by using itemstacks but in the same time allowing the items to stack up to 64?
-
GitHub Questions
I don't think that works well with using mcp.
-
Multiplayer GUI Problem
I can't get the GUI to open on the blocks. I am not sure how to do this. I read the FML porting tutorial. I have this in both server and client and I registered it via MinecraftForge.setGuiHandler(this, this); @Override public Object getGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { System.out.println("WORKING "+ID); return null; } On the blockActivated function I simply called ModLoader.openGUI(...) in both client and server side. It never prints that line. Not sure why... You can check out the full code here: https://github.com/calclavia/Universal-Electricity/tree/master/Universal_Electricity Changes are in UCBlockMachine, mod_UniversalElectricity
-
GitHub Questions
Thank you very much
-
GitHub Questions
I am trying to set up a GitHub repo for Universal Electricity. I am a 100% noob at GitHub and I'm trying to learn how to use it. How would I commit the entire project onto GitHub without including all the Minecraft src files that I don't need (without manually dragging it and organizing them)?
-
Forge Ore Dictionary
There seems to be a new way of adding ore recipes now. I am not very sure how to use it yet. Anyone has any idea on how to use the new class ShapedOreRecipe and ShapelessOreRecipe?
-
4096 Block-IDs Fix included in Forge?
The newest build seems to have 4096 integrated. Check out the Jenkins change log.
-
Naming with metadata
You also need an ItemBlock class. You have to register it with ModLoader. ModLoader.registerBlock(YourBlockVariable, YourItemBlock.class)
-
Naming with metadata
You name the itemstack with the metadata. ModLoader.addName(new ItemStack(xxx, 1, 4), "NAME") In this case 4 is the metadata. XXX represents your block/item.
-
[SOLVED] Sound
Edit: I did a print line in the function onPlaySound and I found out for some reason the entry is always null...
-
[SOLVED] Sound
I looked at their code and did the exact same thing but the audio files don't seem to get recognized when I obfuscated it (it works no problem when I place it in the resource folder). static final String soundPrefix = "/icbm/sound/"; static final String[] soundFiles = {"airstrike", "missilelaunch", "emp", "explosion1", "machinehum", "missileinair", "targetlocked"}; @Override public void onLoadSoundSettings(SoundManager soundManager) { for(int i = 0; i < soundFiles.length; i++) { URL url = ICBMSound.class.getClassLoader().getResource(soundPrefix+soundFiles[i]+".ogg"); if(url != null) { soundManager.getSoundsPool().addSound("icbm.sound."+soundFiles[i], this.getClass().getResource(soundPrefix+soundFiles[i]+".ogg")); } else { System.out.println("Invalid sound file: " + soundFiles[i]); } } } The directory of my sound files are at /icbm/sound/... inside of my zip. What am I doing wrong?
-
Multiple Textured Blocks
There are so many copper mods out there lol... Search the web for Forge texture tutorial. There are LOADS of them out there.
-
[SOLVED] Sound
I ran into a problem. Let's say my block/entity gets destroyed. The sound will keep playing even when it is gone.
-
Ore Generation {SOLVED}
Do some debugging and print some variables
-
Missing TileEntity Mappings?
Leave it so other people who encounter the same problem can see.
-
[SOLVED] Sound
Oh.. Why didn't I think of that =_=
-
Missing TileEntity Mappings?
He is right. Use ModLoader.registerTileEntity... Search google for how to distribute your mod. Thre are so many tutorials out there on this.
-
[SOLVED] Sound
I already read that link. That's for the help. From what I see, they seem to have their sound files in a "sound" directory in the zip. I will try using that. And another question: How can I make a block to constantly play an ambient sound (when specified to do so by it's tile entity of course)? Industrialcraft has these machines that will keep playing noise as long as they're working. I can not use the world.playSoundEffect function since it doesn't really work well for this. I have a loop able sound track for some of my machines that I would like to have them used.
- Where to declare items/blocks (How to get IDs for other classes)
IPS spam blocked by CleanTalk.
Important Information
By using this site, you agree to our Terms of Use.