Jump to content

FireController1847

Members
  • Posts

    290
  • Joined

  • Last visited

Everything posted by FireController1847

  1. I am trying to make a client side mod, not a regular mod, that's why I asked about the EntityPlayerSP. I'm trying to make what my signature says. Edit: Also, is it possible to put the sounds in folders? I'm having trouble doing that...
  2. 1. I'm not sure how to tell the difference between EntityPlayer and EntityPlayerSP. The only way I can get EntityPlayer is event.getEntityPlayer(); 2. The code below is not working: PlayerSleepInBedEvent package com.fire.testmodclient.Events; import com.fire.testmodclient.Reference; import com.fire.testmodclient.SoundHandler; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer.SleepResult; import net.minecraft.util.SoundCategory; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.biome.Biome; import net.minecraftforge.event.entity.player.PlayerSleepInBedEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; public class PlayerSleep { @SubscribeEvent public void onPlayerSleep(PlayerSleepInBedEvent event){ final EntityPlayer player = event.getEntityPlayer(); final World world = player.worldObj; // world.playSound(player, player.getPosition(), SoundHandler.testSound, SoundCategory.MUSIC, 0.5F, 1F); // player.playSound(SoundHandler.testSound, 1, 1); if (event.getResultStatus() == SleepResult.OK) { player.playSound(SoundHandler.testSound, 1.0F, 1.0F); } } } SoundHandler package com.fire.testmodclient; import net.minecraft.util.ResourceLocation; import net.minecraft.util.SoundEvent; public class SoundHandler { public static SoundEvent testSound; public static SoundEvent testSound2; private static int size = 0; public static void init() { size = SoundEvent.REGISTRY.getKeys().size(); testSound = register(null, "testSound"); } public static SoundEvent register(String folder, String name) { ResourceLocation location = new ResourceLocation(Reference.MOD_ID + ":" + name); SoundEvent event = new SoundEvent(location); SoundEvent.REGISTRY.register(size, location, event); size++; return event; } } Sounds Json { "testSound": { "category": "music", "sounds": ["testmodclient:testSound"], "subtitle": "testmodclient.subtitle.testSound" , "stream": true } }
  3. So, I've done everything and it's all there and working, but...... It only plays the sound when I run the command. (It does take a little for the sound to load, but that's because it's a big audio file) I am using a playersleepevent for example: package com.fire.testmodclient.Events; import com.fire.testmodclient.SoundHandler; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.SoundCategory; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.biome.Biome; import net.minecraftforge.event.entity.player.PlayerSleepInBedEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; public class PlayerSleep { @SubscribeEvent public void onPlayerSleep(PlayerSleepInBedEvent event){ final Minecraft minecraft = Minecraft.getMinecraft(); final EntityPlayer player = event.getEntityPlayer(); final World world = player.worldObj; world.playSound(player, player.getPosition(), SoundHandler.testSound, SoundCategory.MUSIC, 1, 1); System.out.println("Player Sleeping"); event.setResult(EntityPlayer.SleepResult.OTHER_PROBLEM); } } The command I used that worked: /playsound testmodclient:testSound music FireControl1847 Edit: Also, how do I get the sound to follow the player, and only the player can hear? Edit 2: Also also, is there an event for when a sound ends?
  4. Now this one is a big one, and I want to fully understand it. How would I be able to play a custom sound file to the player?
  5. Alright. How do I register the event? (Sorry for all the noobish stuff ) Edit: Figured out how to register it!
  6. Hello! I am currently trying to make a client side mod (my signature), and I am trying to use "onClientTick", but I am not really sure how it works. Could somebody explain to me what it does? This is my current code: @SideOnly(Side.CLIENT) @SubscribeEvent public void onClientTick(ClientTickEvent event) { final Minecraft minecraft = FMLClientHandler.instance().getClient(); final WorldClient world = minecraft.theWorld; final EntityPlayerSP player = minecraft.thePlayer; System.out.println("Client Event"); } "Client Event" is not being printed out into console at all, so is it even doing anything? Edit: I am reading an outdated wiki, and it says something like registering the event.. How do I do that?
  7. ...what and where should I get started? I am a beginner mod maker, and I want to know what I would need to learn to make something like matmos (I know how to make blocks, items, and custom OBJ/JSON models. I also know most of java and will understand the difference between classes and methods) I do want to make this for 1.7.10, and then as well make it for 1.8+. The reasoning for this, is because my only modpack is version 1.7.10. Now before you go start saying "1.7.10 isn't supported!!!!!!!!NDJ:Owhoijgwreshfgsf", I KNOW THAT. I am going to make it for 1.10.2 first, and first of ALL. Then, I will start to learn and understand how to downgrade it instead of upgrade it. The features I want to implement into the mod: Wind sounds when high above the ground Biome specific sounds like birds chirping Block specific sounds when you're next to water or lava Rain sounds for when its raining (Ex. Walking in puddles, walking on grass) Improved sounds for walking and things like that Sounds for when you're falling for flying I understand this is a big project, but please tell me what I need to learn so I can get the basic guidelines down to doing this. I don't need you to teach me, just tell me what they are. If it's even possible, please tell me. What I am hoping you'll be able to give me is information about what I need to do (ex. make events), what most of the event names are or linking me to a event list, and the big one is how to implement sounds. Please and thank you!
  8. Alright so I was able to get it into the right position by positioning it here. Thank you dracos for all your help! <3
  9. It is not recommended by me, but you can if you'd like go to my wiki here. It's kind of confusing and unstable, but it should get you to understand how all this new nonsense works. And I am sorry all you forge modders who didn't want me to do this... To be honest soon I will be improving that wiki so it's not to a point of utter horribleness. And don't tell me to update the official one; personally I hate the layout of it and it doesn't match the way I like to do things.
  10. The new way of registering blocks is mainly you have to register the item and then the block. So first off, you have to register an item. Make a function where you get an item from the block, and then make a function that renders the blockitem like you would an item. Ex. function1 : RegisterBlockItem() Ex. function2 : RegisterItem(Item item) And then, from wherever (suggested to put in the block file), you have to give it a registry name, and use ModelLoader.SetCustomResourceModelLocation() to register the item. You can get an item from a block by doing item.getItemFromBlock(Block) And then you register the block and item like you would normally register something. This is how I would set up my InitBlocks file: http://vignette1.wikia.nocookie.net/minecraft-forge-tutorials/images/2/26/Code1-1.png/revision/latest?cb=20160606015651[/img] This is an image from this wiki.
  11. I just kind of feel bad for resource pack makers if they aren't able to change the texture of some of my models.
  12. Ah, I see. Alright, well in my next tutorials, I'll be sure to explain more in-depth of why I am writing it and what it will do.
  13. Diesie, most of the best mods are still only for 1.7.10, and 1.7.10 will most likely be the next 1.2.5 in modding. It's the main one that most people use, and it's still probably going to be used years from now. Yes, if you're developing new mods of course I'd say go use the latest version, but if you're putting together a modpack I'd suggest 1.7.10, as most of the mods are updated to that. As well as that, many mod creators gave up when they saw 1.8 come out, which was really saddening, but it happened. As well as what happened on 1.2.5, where a lot of mod creators gave up, people are pushing through. 1.7.10 may not be the best, but it's certainly there. Finally, I personally find Optifine, Fastcraft, and many of the alike run best with 1.7.10 compared to 1.10.2, as the game is less laggy, most mods are in a stable build, and it's super easy to do many things. Overall, 1.7.10 was a great version for mods and modpacks like, and yes I do agree that we need to update, but for adventure modpacks (not tech.), magical, and wizardry I would suggest 1.7.10.
  14. Ohhhhhhhhhhhh In MINECRAFT. Alright, here it is.
  15. So I just need to keep attepting with what I did on the first attempt but in different directions? Alright, so if I am looking this way, as now the direction things are on, what direction do I need the point? https://gyazo.com/8d52197097763db1fecf852e00f8256e
  16. Okay, I am very confused. At first it was there and now it's not? How do I set the origin and where do you want it? -0.5? 0.5? Alright, so I do this, and it comes up with this. I do this, it comes up with this! Why can't I ever get this right! What position does the origin need to be in!? 0.5 0.5 0? 0 0 0 is the center, so that's not it...
  17. So I've set the grid to these options: Lines: 32 Scale: 0.031 Subdivisions: 10 That seems to be working, but when I put a model right in the center, like this: https://gyazo.com/b80764faffa8d7606d62d764d9ccb4f9 But, for some reason this is what comes out in game... https://gyazo.com/c6475a9046a82b8396ac4bc69c9c1286 If anyone is willing to help, please, please help!
  18. Can I please have an explanation on how to do this? This is my current model... https://drive.google.com/file/d/0BxoVqiHe_OnvZGZjWEVNM0Z0S3M/view?usp=sharing https://drive.google.com/file/d/0BxoVqiHe_OnvSGpYd3VpTlVCNDA/view?usp=sharing
  19. One of your JSON files are invalid. Caused by: com.google.gson.JsonSyntaxException: Missing variants, expected to find a JsonObject In the desc of this video you'll find working ones.
  20. I've never had this problem, but try setting up eclipse to use 32bit java, and then use your run configuration in eclipse to run off of 32bit java, and maybe that will help. Also can you post the specs of your PC? This shouldn't happen...
  21. I think you might want to watch my tutorial for it. 1.9.4 things work on 1.10.
  22. Alright awesome. I'll try it out and if anything goes wrong in the process I'll unlock this thread! Thank you so much!
  23. So when I do this, lets say I have a present names 'red_ribbon_present', do I name the texture red_ribbon_present#color=black, or what special thing do I need to do to name it?
×
×
  • Create New...

Important Information

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