Jump to content

tool_user

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by tool_user

  1. It took me a while to figure this out so I thought I'd share my experience hoping to save someone else some time. (Re as: share the pain.) I was updated a working 1.8.9 mod to 1.9.4 and for the life of me couldn't get the setCustomModelResourceLocation calls to set up the textures. I did a lot of searching and debugging and finally traced it down to the fact that the items were not in the ItemModelMesher. Wait, what does the ModelMesher have to do with it, aren't we supposed to use the ModelLoader? I honestly have no idea since I really haven't spent the time to see how the rendering pipeline works. What I did find is that the ModelLoader and the ItemModelMesher have different lists. There is a routine called onRegisterItems in ModelLoader that moves all the registered things into ItemModelMesher. It wasn't moving mine and I traced it down to the fact that I was doing all my old old calls to getItemModelMesher().register in init NOT preinit! Yup! My mistake. However, there were no errors anywhere in the log telling me that it was going to fail because I was doing it "too late." Once I knew this all the tutorials did say "do in preinit" but I missed that part and since it did work in 1.8.9 I just figured it was the right place. Anyway, hope this helps someone else out.
  2. Thanks everyone for the input, it seems to share what I found during my research. To answer a few of the questions that came up. I just want a way to easily separate "natural" things from man-made things. I am working on yet another set of creative mod tools (structure builders, tunnelers, etc.) for fun and some of the features I'd like to add would like to be able to discriminate between "ground" (natural) and something built. For example a road builder wants to walk the terrain and not go "over" structures or even remove them. I also want to make a "cleanup" that removes all non-natural blocks so I can remove unwanted structures easily. I think my approach (for now) is basically going to detect "natural" based on block type (by name) then just support a config file. Since I have a robust undo (in transient memory), if it doesn't detect right the person can undo the work, or manually fix it. I'll probably add a tool (wand) so they user can right-click to add the block to the config file easily, so they won't need to leave the game. Again, thanks all for the quick feedback and insight!
  3. Thanks for the feedback! Sorry! I don't actually want to tell if the player placed the block, but if it is a naturally occurring block. Basically trying to separate mostly natural terrain from something someone probably made. Obviously, if they make something out of dirt or sandstone, I can't detect those blocks. Right now in my "is natural" routine I am just doing this: public static boolean isNatural(IBlockState state) { Block block = state.getBlock(); return (block == Blocks.stone || block == Blocks.gravel || block == Blocks.log || block == Blocks.log2 || block == Blocks.leaves || block == Blocks.leaves2 || block == Blocks.sand || block == Blocks.sandstone || block == Blocks.dirt || block == Blocks.grass); } This seems to work ok as things like "Block.stone" covers diorite, andesite, etc. I was just hoping for some clever way to use the crafting manager or ore dict.
  4. I am working on some things where I want to identify if a block is natural (stone, log, sand, dirt, gravel, etc.) or manufactured (cobblestone, plank, stone brick, brick, etc.). Is there any function somewhere (world gen, ore dict, materials, etc.) that would help with this? I have a basic function now in my mod where I have all the "natural" blocks, but I'd like to have something that would be compatible with other mods without having to resort to a manual config file. I've looked through world gen a little, crafting manager (doesn't work because of things like sandstone), and the ore dict. I'm looking for direct answers such there is on in XYZ place, or places to look that I might be able to tap into would be great. Thanks.
  5. I've been trying to track down the baby chickens drowning issue (I see references all over but no solutions) and I'm following the reproduction through forge. First off, I don't know if it really is forge, but that's how far I've traced it. Consider a basic chicken farm: 9x9, with 7x7 interior. Four water source blocks in the corners and the one central floor block is missing with a sign in it. In 1.6.4 vanilla the chicks don't drown. In 1.6.4 with forge installed (9.11.1.953) installed using the installer, the baby chickens drown. No other mods. I doesn't seem to matter where the chicks are, they drown in the middle block or not. However, without forge they seem to be a little more "bouncy" than with forge. The chickens (adult) survive in both. I've reproduced this on both OSX and Linux Mint (Cinnamon Ubuntu.) Also, I've never heard seen my chicks drown in 1.5.2 or 1.7.2 farms in vanilla minecraft. I never encountered the problem until I started playing with mods. If anyone knows how to fix it fantastic! If not, I don't mind reading some code, but I have never looked at minecraft code. Can someone point me at places I could look/play with or other things I could do help reproduce to help people find a fix? Thanks for any feedback.
  6. I don't know if this is related but I had problems with sounds with older versions of MagicLauncher. The solution was that I had to copy the contents from "<minecraft>/assets/virtual/legacy" into "<minecraft>/assets". The "<minecraft>" being your appropriate minecraft support folder like ".minecraft". You didn't mention MagicLauncher so this might not be related.
×
×
  • Create New...

Important Information

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