Jump to content

Vogner

Members
  • Posts

    73
  • Joined

  • Last visited

Everything posted by Vogner

  1. Oh, I get it, they use extras of each sound effect and choose which to play at random. For some reason I thought they used a single sound byte and randomized it in pitch and volume. It makes sense, the approach they chose is better for resource pack authors. Anyway, thanks again.
  2. That did it; I had a few obfuscated method names I had pulled from MCP src. Also wasn't explicitly overriding for some reason. You saved me some overhead and some time, thanks. Now I just have to figure out how to randomize the pitch. Edit: o/t, but do you work with caracals or something? My mother was a handler back in the day, mostly servals, Asian leopards and maus. Fascinating animals.
  3. I had created my own SoundType. I tried what you suggested, but the only change is that it says "Unable to play unknown soundEvent: minecraft:squish" rather than dig.squish. Also, most of the time the methods in Block.SoundType are called rather than the methods in the SoundType you specify. In fact it only seems to call those methods from the SoundType directly when you place the block. Walking on or breaking the block appear to call Block.SoundType's methods explicitly. It's funny, the few shreds of information I've found about custom step/dig sounds for specific blocks say something along the lines of: "Not recommended. Just use one of the pre-packaged sounds instead."
  4. Omitted the version, my mistake. It's been a while.
  5. I'm looking for a way to add custom step/break sounds to blocks. Been searching around for a bit, and I will continue searching and trying things. How would I go about this? Progress:
  6. Thanks anyways. I'm going to try a few things and log them here. Might be of use to somebody Deleted the whole forge folder and starting afresh Did not work, identical crash Tried using build 1000 Did not work, identical crash Tried using 995, the build used at random in Lex's tut. WORKED. Game playable. Hope this helps someone.
  7. Alright, unfortunately I'm getting an identical crash. This time I'll post the entire console from boot to crash, here it is. Setting up, I followed the video Lex put out. I used "gradlew setupDevWorkspace eclipse" to force it to downgrade to 1001 after editing build.gradle. And it does say I'm using 1001 at the menu. Which build are you personally using? It goes haywire after line 748, at "Register FML from SERVER".
  8. I'm using build 10.12.0.1002 in Eclipse, running as Client. Here's the log I'm getting crashes when i try to make a new world. But when I boot it up again, the world I made is in the world list. When I attempt to load the world, it goes back to the main menu as if nothing happened. Any idea what's going wrong here? I'm aware that Forge is unstable atm and it may just be the build. If that's the case, simply point me toward a usable build.
  9. Can't get textures to work. Here's the code for my simplest block: package fleshwerxx; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.client.renderer.texture.IconRegister; public class BlockOpenEarth extends Block { public BlockOpenEarth(int id) { super(id, Material.ground); this.setCreativeTab(Fleshwerxx.tabFW); } public void registerIcons(IconRegister par1IconRegister) { this.blockIcon = par1IconRegister.registerIcon("fleshwerxx:openearth"); } } But I can't figure out where to put the textures. I don't use Eclipse btw. I understand why all these resource changes have occurred, but I'm getting rreeeal sick of textures being problematic every time I update my damn mod...
  10. mods.gamersmods.fuelresourceful.tileentity.ContainerBlockBreaker.transferStackInSlot(ContainerBlockBreaker.java:57) Line 57 of ContainerBlockBreaker is causing an index out of bounds exception.
  11. Use an EntityInteractEvent handler. Verify that the mob you just interacted with is the desired mob, then trigger the GUI. You can do so with FMLClientHandler.getClient().openGui(...), or whatever it's actually called.
  12. I actually tried something like that using the FMLClientHandler.getClient().getPlayer() (or whatever its called), and the resultant player reference was null. My sanity checks were even client side/server side sensitive. I haven't yet tried that specific line of code, though - I'll try it and report back when I can. Since yesterday I've moved from buttons listing all level-able gear as text to custom buttons displaying the item's Icon, including any animation. I've also managed some GUIInventory-style tooltips that describe which specific item you're about to affect. There are still plenty of visual bugs, but I'm very happy with it, since it's my first.
  13. Well there's no gap or overlap between the tiles, so I'm not sure that's the issue. I'll keep comparing my code to vanilla code and see if I snafu'd something somewhere. In terms of progress, however, I've arrived at the point that when opened, a cleanly formatted GUI is displayed that lists every relevant piece of equipment in the player's inventory (including equipped items) as a button. Basically, you'll click on the gear you want to enhance, go to a second, item-specific GUI and expend some experience to purchase abilities or perks that you've unlocked. It should be really fun when I'm done. That issue aside, I haven't been able to trigger any of this with a keybinding, because there's no way that I know of to get a player reference that isn't null, and therefor I can't access its inventory, either... Quite a few mods have done it, though, so there's got to be a way.
  14. 1. It's null if it has no enchantment or already defined data. 2. Do you create an entirely new instance of the NBTTagCompound for each item? Seems like not, because of the behavior. 3. Can we see a screenshot? or at least a bit more explanation, what do you mean by tiling, how exactly? Unfortunately, I don't have internet on the computer with my project on it. But this is an example of a tiled image: https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcSiPtcQZ10wUrygGkoBp4T1Gk9defn9K9EXI5ASHv6B_fKJ2m1fRA[/img] The grass, sand and water images are laid next to each other, over and over again. This is happening to my GUI for some reason, although it is being displayed at the correct scale, so you can only see the tiling on the edges of the screen. Imagine the inventory gui, and then another next to it, and another beneath it, etc. This is only happening to the background layer. I'm using the exact same DrawBackgroundLayer code as every other GUI, with my own image substituted in. Also, I solved the NBT problem. I resorted to event handlers yet again. <3 event handlers. While I didn't know that the NBTTagCompound will likely be null if the item isn't enchanted, the problem wasn't the NBT thing at all. I neglected that items are static, and I had the xp integer saving, initializing and incrementing in the item's class, and so they were all reading the same value. I moved the entire exp system to an EntityAttack event, effectively solving the problem. So voila, I now have a mod with weapons that tier without having to craft each tier separately, as well as one that encourages hunting over constructing mob farms. Also, I made spiders tameable and mountable. That's unrelated, but it rocks.
  15. Okay so I've got the item writing and reading values from NBT, but naturally I've hit a few more walls: The NBTTagCompound is always null, despite the fact that the item is both damageable and not stackable, so I have to manually give it an NBTTagCompound object with ItemStack.setNBTTagCompound (or whatever it's called precisely) Perhaps related to the aforementioned is the fact that there are only one set of values for all items, so they all share and affect the same sets of values. Basically, they're all using the same NBT object and I'm not sure how to stop this from happening. Any ideas, guys? Third, my GUI now works. I decided to give it its own dedicated key, instead of using the inventory button, because there just isn't enough screen space for both GUIs. However, the GUI's background image is tiling. Any thoughts on that one?
  16. This must be possible without modifying base classes, because Galacticraft did it. Basically, I'm working toward armor that adds wings. Has anyone got any experience with this?
  17. Try removing the item if the stack's damage equals its max damage value.
  18. Excellent, thanks. I'll try to post if I learn anything of value.
  19. Basically, I'm working toward a weapon that levels, complete with a perks screen like a single talent tree from WoW, and I want to open its GUI with the inventory button. I've been trying to trigger a GUI with a keybinding rather than right clicking an item or block, and I've hit a bit of a wall. I've got the code working to the extent that when I hit the inventory button, code triggers. But I don't have a world or player reference, although I guess I could grab the FMLClientHandler references. Anyway, there's too much to consider beyond that, I'm not sure where to go from here. Is there an obvious solution I'm unaware of? Question 2: This idea will obviously require a bunch of NBT stuff. I'm probably just going to extrapolate from the code in ItemFireworks/FireworksCharge, which already keeps track of a bunch of NBT flags, which is perfect for a perks system . Since there are no dedicated methods for adding miscellaneous tags, I'll probably lump it in with one of the other methods that take a ItemStack object as a parameter. Is there an easier solution than this, or something I've missed? Thanks in advance.
  20. Beats me, even Mojang's "stained glass" from the April Fool's stuff had that issue.
  21. Also worth noting is that you will not be able to see anything that is also partially transparent (read: translucent) that is behind it. Ex: You won't be able to see water through your translucent block. If there's a solution to that problem, however, I am unaware of it, since Minecraft does not support extra rendering passes in any way that I'm aware of.
  22. Which size was the texture before? Whatever it is when you don't override the values in ModelBase, I wanna say 64 x 32.
  23. I increased my mob's texture size from the standard size to 64 x 64, changing nothing else. Now none of the textures are alligned correctly, and I can't figure out why. It's worth noting that I do not use Techne, as I have no internet access where I code.
×
×
  • Create New...

Important Information

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