Jump to content

FireController1847

Members
  • Posts

    290
  • Joined

  • Last visited

Everything posted by FireController1847

  1. Until recently, forge has been working perfectly fine with no lag spikes and everything working great. When I updated forge to 1.12.1/1.12.2 from 1.12, it started getting these 0 FPS lag spikes every time I broke a block. This would only happen randomly, and it doesn't "appear" to happen if you're looking in a certain direction. Also, this only happens in what seems to be random locations. I'm not sure what could be causing this, as this doesn't happen on vanilla.
  2. Now please don't get mad at me, as this is just something that came up out of my mind for no reason whatsoever and probably is a really bad idea, BUTTTTTTTTT Is there a way we can make it possible where we can have folders in the mods folder? So I know how there are the 1.10.2 folders and so on, but us being able to sort our mods (for modpacks or whatever), by putting them in folders. Like, we could call a folder "Client Side Mods" and then have another folder for "GUI Addons" and then "Magical Stuff"... I don't know, it's just an idea.
  3. Ugh.. Okay. I'll wait and see if Mr. Crayfish implements a way to get the EntityPlayer from the player who is using the PC.
  4. is there a reason why I'd have to do this? I am very easily able to get the itemstack on the inventory using this... Minecraft.getMinecraft().thePlayer.inventory.mainInventory That is an item stack list EDIT: When I do print System.out.println(player.inventory.mainInventory[5]); to console, it outputs ... 1xtile.lightgem@0 When I print out ItemStack testItem = new ItemStack(Blocks.glowstone);, it outputs ... 1xtile.lightgem@0 Yet the if-statment I have given it doesn't work? final EntityPlayerSP player = Minecraft.getMinecraft().thePlayer; ItemStack testItem = new ItemStack(Blocks.glowstone); System.out.println(player.inventory.mainInventory[5]); System.out.println(testItem); if (player.inventory.mainInventory[5] == testItem) { System.out.println("HE HAS IT"); } else { System.out.println("It ain't glowstone"); } Full Output: [19:25:30] [Client thread/INFO] [sTDOUT]: [com.fire.cdmbloxread.apps.ApplicationBloxRead:init:36]: 1xtile.lightgem@0 [19:25:30] [Client thread/INFO] [sTDOUT]: [com.fire.cdmbloxread.apps.ApplicationBloxRead:init:37]: 1xtile.lightgem@0 [19:25:30] [Client thread/INFO] [sTDOUT]: [com.fire.cdmbloxread.apps.ApplicationBloxRead:init:42]: It ain't glowstone
  5. I have access to the EntityPlayerSP variable. What for inventory would I use to search for an item?
  6. I've got the input figured out, Mr. Crayfish made an API, all I need to know is if the item is in the players inventory, and then if it is to remove it.
  7. Title really says all, I'm developing an addon for MrCray's Device Mod, and I want it to give the player 'money' when they press a button. By doing that, I need to figure out how to detected if an item is in the players inventory.
  8. Basically, let's say I wanted to make a mod, and I wanted to addon to Mr. Crayfishes Device Mod. I want this mod to work with, or without the mod. When the mod is not installed, don't register the things for the mod, and if it is, do register them. How would I be able to execute this?
  9. Okay... even when it's implemented I have done that, I don't understand it.
  10. But what is it used for? Can you give me an example of it being used in code?
  11. Sir, this forum is for creating mods, not finding modpacks. As you can obviously tell, no matter what version we will be able to help you with a modpack, but don't do it on this specific forum please. No, 1.7 is not supported, but 1.8 is.
  12. I haven't played it, but I assume that Tekkit Legends is updated to 1.7.10 or 1.8, but I am not sure.
  13. May I ask why you're modding for 1.6.4? I just want you to know that 1.6.4-1.7.10 is no longer supported and you will not get any help on these forums if you ask for help with it. So it's pretty much pointless to do this (unless of course you're trying to update an old mod).
  14. I am probably an idiot for not understanding how ISound works, even when it's implemented, so can I get a somewhat noobish explanation of what ISound is an how I can implement it?
  15. Once again, I am not an expert in this category of registering and probably will get things wrong/have limited knowledge. It's possible that either blockOrder is null, blockOrder.add is not a valid function or something is wrong with the function, or Item.getItemFromBlock(block) is unable to get the item from the block.
  16. It's possible, but considering his mods are actually updated to 1.10.2, I wouldn't believe it.
  17. I am not exactly an expert on how you're doing this, but I would assume from the crash for blocks that you are trying to call blockOrder.add(Item.getItemFromBlock(block)); with nothing, hence the nullPoinerException error. The same thing with your items as well, there is a nullPointerException error, and the first line says it's in ModItems.regItems on line 73. Check your code to make sure the method is being called with the item it needs, instead of nothing.
  18. I guess before I do all this, I should know what ISound is and how it's used... I tried googling this but nothing came up. Anybody have any examples for me?
  19. I am a (somewhat) beginner modder trying to make a client side mod (ex. my siggy). I need to make an ISound that does these things: [*]Has the length in the sound [*]Follows the player I am trying to remake a thing like matmos, and I am using the PlayerTick thing to do this, and I have no idea how to keep the sounds from overlapping. Here's my PlayerTick: package com.fire.testmodclient.Events; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.biome.Biome; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; public class PlayerTick { private boolean firstTime = true; private int ticksBeforeCheck; private boolean isRaining; private boolean isNight; private long timeOfDay; private Biome biome; private BlockPos position; @SubscribeEvent public void onClientTick(TickEvent.PlayerTickEvent event){ final EntityPlayer player = event.player; final World world = player.worldObj; position = player.getPosition(); CheckPlayerWalking(player, world); ticksBeforeCheck++; if (ticksBeforeCheck >= 1000) { ticksBeforeCheck = 0; UpdateVariables(player, world); }if (firstTime) { firstTime = false; UpdateVariables(player, world); } } private void UpdateVariables(EntityPlayer player, World world) { biome = world.getBiomeForCoordsBody(position); timeOfDay = world.getWorldTime(); isRaining = world.isRaining(); if (timeOfDay >= 12000) { isNight = true; } else { isNight = false; } System.out.println("Updating Variables!"); System.out.println("Player's Position: " + position); System.out.println("Biome Name: " + biome.getBiomeName()); System.out.println("Time of day (in ticks): " + timeOfDay); System.out.println("Is it raining: " + isRaining); System.out.println("Is it night time: " + isNight); } private int CPWoldX = 0; private int CPWoldY = 0; private int CPWoldZ = 0; private void CheckPlayerWalking(EntityPlayer player, World world) { boolean isMoving = false; int newX = position.getX(); int newY = position.getY(); int newZ = position.getZ(); if (newX != CPWoldX || newY != CPWoldY || newZ != CPWoldZ) { isMoving = true; } if (isRaining && isMoving) { // Play walking sound for rain // System.out.println("Is raining and player moved, play sound!"); } CPWoldX = newX; CPWoldY = newY; CPWoldZ = newZ; } private void PlaySound(EntityPlayer player, World world) { String biomeName = biome.getBiomeName(); boolean soundIsPlaying = false; //// Check Biomes ///////////////////////////////////////////////////////////////////////////////////// /* * Biome List: http://minecraft.gamepedia.com/Biome#Biome_types * * Search Keys: * • Snow-Covered Biomes * • Cold Biomes * • Lush Biomes * • Dry Biomes * • Neutral Biomes */ // Snow-Covered Biomes if (biomeName == "Ice Plains") { } else if (biomeName == "Ice Plains Spikes") { } else if (biomeName == "Cold Taiga" || biomeName == "Cold Taiga M") { } else if (biomeName == "Frozen River") { } else if (biomeName == "Cold Beach") { // Cold Biomes } else if (biomeName == "Extreme Hills" || biomeName == "Extreme Hills M") { } else if (biomeName == "Extreme Hills+" || biomeName == "Extreme Hills+ M") { } else if (biomeName == "Taiga" || biomeName == "Taiga M") { } else if (biomeName == "Mega Taiga" || biomeName == "Mega Spruce Taiga") { } else if (biomeName == "Stone Beach") { } else if (biomeName == "The End") { // Lush Biomes } else if (biomeName == "Plains" || biomeName == "Plains M" || biomeName == "Sunflower Plains") { } else if (biomeName == "Forest" || biomeName == "Flower Forest" || biomeName == "Birch Forest" || biomeName == "Birch Forest M") { } else if (biomeName == "Roofed Forest" || biomeName == "Roofed Forest M") { } else if (biomeName == "Sawmpland" || biomeName == "Swampland M") { } else if (biomeName == "Jungle" || biomeName == "Jungle M" || biomeName == "Jungle Edge" || biomeName == "Jungle Edge M") { } else if (biomeName == "Beach" || biomeName == "River") { } else if (biomeName == "Mushroom Island" || biomeName == "Muschroom Island Shore") { // Dry Biomes } else if (biomeName == "Desert" || biomeName == "Desert M") { } else if (biomeName == "Savanna" || biomeName == "Savanna M") { } else if (biomeName == "Mesa" || biomeName == "Mesa (Bryce)" || biomeName == "Mesa Plateau F" || biomeName == "Mesa Plateau F M") { } else if (biomeName == "Plateau" || biomeName == "Plateau M") { } else if (biomeName == "Hell") { // Neutral Biomes } else if (biomeName == "Ocean" || biomeName == "Deep Ocean") { } else if (biomeName == "Hills") { } else if (biomeName == "The Void") { } } }
  20. Thank you! I completely forgot about casting >.<! It's working great now! :D:D:D
  21. Okay..... How do I get EntityPlayerSP instead of EntityPlayer? Also, Quotes of what this article was/is about:
  22. Hmm... But still, the first sound works when I type the command and when I use the code it doesn't. Please help, I need to know what the code is to play sounds!
  23. Okay, I'll try that. Back to playing a custom sound: I have no idea how to do it... Please help me >.< ^ Considering my whole mod is based around this, let's let this be our main priority. Edit: That didn't work. It says it played the sound but it's not. [13:05:49] [server thread/INFO]: [FireControl1847: Played sound 'testmodclient:testSound' to FireControl1847] [13:05:49] [Client thread/INFO]: [CHAT] Played sound 'testmodclient:testSound' to FireControl1847 [13:05:53] [server thread/INFO]: [FireControl1847: Played sound 'testmodclient:test/testSound' to FireControl1847] [13:05:53] [Client thread/WARN]: Unable to play unknown soundEvent: testmodclient:test/testSound [13:05:53] [Client thread/INFO]: [CHAT] Played sound 'testmodclient:test/testSound' to FireControl1847 [13:05:59] [server thread/INFO]: [FireControl1847: Played sound 'testmodclient:test/testSound2' to FireControl1847] [13:05:59] [Client thread/INFO]: [CHAT] Played sound 'testmodclient:test/testSound2' to FireControl1847 [13:06:10] [server thread/INFO]: [FireControl1847: Played sound 'testmodclient:test/testSound2' to FireControl1847] [13:06:10] [Client thread/INFO]: [CHAT] Played sound 'testmodclient:test/testSound2' to FireControl1847
  24. I mean... I'm pretty sure. All I know is what you guys tell me... That's why I asked how to play custom sounds This is what I've tried: 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"); testSound2 = register("test", "testSound2"); } public static SoundEvent register(String folder, String name) { ResourceLocation location; if (folder != null) { location = new ResourceLocation(Reference.MOD_ID + ":" + folder + "\\" + name); } else { 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 }, "testSound2": { "category": "music", "sounds": ["testmodclient:test\testSound2"], "subtitle": "testmodclient.subtitle.testSound" , "stream": true } } Console Output [12:58:01] [Client thread/INFO]: [CHAT] Played sound 'testmodclient:testSound' to FireControl1847 [12:58:05] [Client thread/WARN]: Unable to play unknown soundEvent: testmodclient:test\testSound [12:58:05] [Client thread/INFO]: [CHAT] Played sound 'testmodclient:test\testSound' to FireControl1847 [12:58:09] [Client thread/WARN]: Unable to play unknown soundEvent: testmodclient:test/testSound [12:58:09] [Client thread/INFO]: [CHAT] Played sound 'testmodclient:test/testSound' to FireControl1847 [12:58:16] [Client thread/WARN]: Unable to play unknown soundEvent: testmodclient:test/testSound2 [12:58:16] [Client thread/INFO]: [CHAT] Played sound 'testmodclient:test/testSound2' to FireControl1847 [12:58:20] [Client thread/INFO]: [CHAT] Played sound 'testmodclient:test\testSound2' to FireControl1847
×
×
  • Create New...

Important Information

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