Jump to content

Bedrock_Miner

Forge Modder
  • Posts

    613
  • Joined

  • Last visited

Everything posted by Bedrock_Miner

  1. Well, I did some further investigation and found out what caused the problem, although I neither know why this is a problem, nor how to solve it. (Did I mention that I hate the Minecraft model system because it makes everything pretty user-unfriendly to debug?) I created an even simpler .obj file consisting out of a single face and generated the same face by code (the latter works, the former doesn't) and compared the raw data I got. This is the data stored in the UnpackedBakedQuad classes: The difference is, that the UV coordinates are repeated for the obj model. I changed the repeated values to 0 in eclipse debug mode, and it works. I assume, the values are doubled because the BLOCK vertex format uses [POS, COLOR, UV (double), UV (short)]. Now the questions: 1st and most important: Dear Minecraft, why the heck do you need UVs twice, why in different formats and WHY do I HAVE TO make the second ones all zero? 2nd: Why does the Forge model loader put the uvs in two times if one is enough? Or is this a problem only I have so no one else noticed? 3rd: How can I fix this from inside my code, not from debug mode? I don't want to recreate the whole ObjModel class to change a tiny bit in the final putVertexData method and I also don't really want to create a coremod for this.
  2. Yes, this would work, however I have one problem with this: The pipes I try to create would have way too many different blockstates! There is one boolean state for each direction (2^6 states), the pipe can have different colors (*16 more states), the pipe can have different materials (even more) and maybe I want to allow different pipe types to connect to each other, which needs to be rendered differently. Every single possible combination of those states would require a single blockstate which a) slows down minecraft loading, because every single blockstate is evaluated and cached (Tried it, I got about 2048 states per pipe) b) consumes tons of ram, especially if the models become more complicated c) makes the blockstates json file a mess and difficult to read and write. Therefore I decided not to use blockstates at all and to make a code-driven renderer which works fine generally. Only the obj models are not rendered, everything else is fine already. Therefore, I wont change to forge's blockstates file now.
  3. Hello everyone! I wanted to create a pipe block, which can connect to adjacent pipes on every side. The connection element should be rendered with an .obj file, that is rotated to the correct direction for each connected side. The problem is, that I cannot get the obj models to work. I've created a simple model file that does the same with vanilla model files (and actually works), but this is not customizable enough for me, I'd like to use .obj instead. This is the model code I used with the vanilla model files: And this is the base class ModelBase I created for working with code-driven renderers: This code does work. However, my second attempt with the .obj models did not work at all: The models are loaded, but they are not rendered in the game. Nothing there at all. Here's the code of the loadSubmodels and putQuads method (everything else is the same). The obj file is a simple cube at the moment to keep it simple. If anyone has an idea why this does not work or how to fix it, please tell me! If you need some more code, I can provide it as well.
  4. Hello everyone! I want to create a GUI where some of the Slots have a background texture, similar to the armor background icon for the player inventory. However, I ran into a problem there: The code for the rendering of the slot (GuiContainer) showed me that I need to have a TextureAtlasSprite for the slot. However, I have no Idea how I can set this value as the variable is private and has no setter. Furthermore, I don't even know how to create an instance of this class. It looks like I can display an item texture by its name there, but I don't want the texture of an existing item but a completely new one. Can I register it somehow and then bind it to the slot? And why the heck is this so complicated that I cannot simply define a resource location of a 16*16 image that will be rendered into the slot?
  5. OK, I now deleted the .gradle folder from my user account, reinstalled forge, installed gradle 2.12 as the compile sequence requested at least 2.3, compiled and got no error. I wonder why it crashed before.
  6. Changed to stable_22, tried again, got an exception. Reinstalled Forge using stable_22 as well, tried again, got an exception. Obviously, some important files were not added during Forge installation?! Building Mod File... To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: http://gradle.org/docs/1.11/userguide/gradle_daemon.html. **************************** Powered By MCP: http://modcoderpack.com/ Searge, ProfMobius, Fesh0r, R4wk, ZeuX, IngisKahn, bspkrs MCP Data version : stable_22 **************************** :compileApiJava UP-TO-DATE :processApiResources UP-TO-DATE :apiClasses UP-TO-DATE :sourceMainJava UP-TO-DATE :compileJava UP-TO-DATE :processResources UP-TO-DATE :classes UP-TO-DATE :jar UP-TO-DATE :compileTestJava UP-TO-DATE :processTestResources UP-TO-DATE :testClasses UP-TO-DATE :test UP-TO-DATE :extractMcpData UP-TO-DATE :getVersionJson :extractUserDev UP-TO-DATE :genSrgs FAILED FAILURE: Build failed with an exception. * What went wrong: Some problems were found with the configuration of task ':genSrgs'. > File 'C:\Users\~~~~~\.gradle\caches\minecraft\net\minecraftforge\forge\1.8.9-11.15.1.1722\unpacked\conf\packaged.srg' specified for property 'inSrg' does not exist. > File 'C:\Users\~~~~~\.gradle\caches\minecraft\net\minecraftforge\forge\1.8.9-11.15.1.1722\unpacked\conf\packaged.exc' specified for property 'inExc' does not exist. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 13.782 secs
  7. For some reason though, compiling a mod with the stable_20 mapping does not work. I tried using the following version: minecraft { version = "1.8.9-11.15.1.1722" runDir = "run" mappings = "stable_20" } I simply copied this from the forge mdk I downloaded. When I tried compiling my Mod, I got this error: Building Mod File... To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: http://gradle.org/docs/1.11/userguide/gradle_daemon.html. FAILURE: Build failed with an exception. * Where: Build file 'C:\Users\~~~~~\Desktop\Modding\Applied Science\Applied Science\build.gradle' line: 34 * What went wrong: A problem occurred evaluating root project 'Applied Science'. > This mapping 'stable_20' exists only for MC 1.8.8! * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 10.553 secs Is there another mapping I can use instead?
  8. I know that. I want two oredict names at once, that's the problem.
  9. Hello everyone, I recently wondered if it would be possible to register an ore recipe directly with a list of items as mapping for a recipe letter. Internally, they are put into a list anyway, so it would be convenient to do that in registration like this: addRecipe(new ItemStack(MagicumItems.copper_chestplate), "# #","###","###", '#', Arrays.asList(MagicumItems.copper_ingot, MagicumItems.hardened_copper)); I know, that example is not perfect, because I could simply use oredict, but what I really want to do is the following: I have created an item that is registered as two oredict names. I want both names to be mapped to the item in a recipe, but I don't want to create every recipe twice. Instead, i just want to do it like this: List<ItemStack> list = new LinkedList<ItemStack>(); list.addAll(OreDictionary.getOres("firstName"); list.addAll(OreDictionary.getOres("secondName"); addRecipe(new ItemStack(result), "###","###","###", '#', list); This is much easier, because the whole process can be packed into a simple method that reads every name for a stack and packs it into the recipe. Is there a simple way of doing that or do I need to create some dirty workarounds?
  10. This looks actually pretty fancy... I think I'm going to work a bit with this and maybe add world-specific configs to my Library Mod.
  11. Could work, but then we'd still have the problem of too many gamerules being a bit confusing.
  12. Hello everyone! I recently came up with the question whether it's more useful to create a config file or to create a gamerule, because both have some great advantages: Config Files can contain lots of data and hide it from the normal user, but are the same for every world. Gamerules, however can be set differently per world, but are not suitable for tons of information. What would you say is more useful?
  13. Magicum (Work in progress) Magicum is a mod about collecting elemental resources from worldly materials and turning them into magical essences, spells and magically enhanced items. When you start playing Magicum, you will ascend from a wizard apprentice to a master of spells and magical machines. Use the energy of Mana to direct your will and the elemental essences into powerful magic. Collect the magical resource Magicum to increase your magical power even further. Craft Mana-infused armor that grants you special effects to make you nearly invulnerable. The magical energy awaits you. You cannot feel it yet, but it wants to work together with you to rule the world of Minecraft. (Link to official website) Getting started with Magicum Magicum is a very complex mod, but it has an ingame tutorial book, called the Codex Magicum. This is the first item you should craft in order to become a wizard. It is also the only crafting recipe you need to remember, everything else is explained within the Codex. You can craft the Codex Magicum like you can see in the images in the spoiler box. If you want the Codex to be named, you can use a signed book in the center. The Codex explains you everything you need to know about Magicum: The backgrounds of magic, the crafting recipes and magical phenomena. Screenshot Gallery I have collected a lot of random screenshots that I took during development in a gallery on Imgur. Click here to go there. Status of development Magicum is currently "work in progress", thus some Items are not available in survival mode yet. They are marked with "work in progress". Features implemented in Magicum 1.0-a.410: Elemental forces in nearly every Item Magical workbech and simple machines Elemental essences Wands Basic Magic spells Swords, Bows, Armor Meteors and Shootingstars that provide some materials (There may be some bugs with their spawning behavior) Planned features in Magicum: Energy crystals that can store magical energies Machines that work with energy crystals Special magic spells that can be learned NPCs and Monsters Enchantmens The ability to fly Bugs I am relatively sure there are some bugs in Magicum, so if you spot one of them, please let me know via e-mail: minerbedrock@gmail.com. When reporting a bug, please include the crash report and a description of what exactly you have done. Downloads Magicum requires the Miner's Basic modding library. For each version of Magicum there is a download link for the respective Miner's Basic version. You can also download Miner's Basic from here. If you do not know how to install Minecraft Forge to run the mods (basically you should if you're on this forum), please refer to this tutorial. Downloads 1.0- alpha build 410 (MC 1.8 ) Download | Miner's Basic 1.0-b.326 Download
  14. Hello everyone, I'm not sure if this can considered to be a bug, but I discovered that the ServerHangWatchdog terminates the Server when the startup routine takes longer than the max-tick-time set in the Server properties. I don't think this is intentional as starting a server takes much longer than average ticks, so I'm posting this here. If it is a bug it would be great if it could be removed, because it forces me to set the max-tick-time much higher than I want to. -BM
  15. Looks great... I'm now updating forge to the needed version... EDIT: Well, it seems like the new gradle version makes the installation a bit unstable... Doesn't work for now, I'll try when it's out in a stable build.
  16. Yes it works However, I want the Item to be rendered the same way as the TileEntity. Therefore I've created a method that adds the block to the builtin blocks, so that I can use the parent builtin/entity for the item model. The method calls this minecraft method: (and adds the renderer) Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getModelManager().getBlockModelShapes().registerBuiltInBlocks(Block.getBlockFromItem(stack.getItem())); This should allow me to use a custom renderer for the Item using builtin/entity. However, this also disables the block model, so that the particles are not working anymore. Any ideas now?
  17. Well, for me the model thing didn't work, but maybe I did something wrong or missed something . How would you do this? I did it similar to the setup of a normal cube block model.
  18. Hello everyone! I've created a tile entity with a TileEntitySpecialRenderer, which works perfectly well. However, I now discovered that the block break particles show the missing texture. How can I change this? I've already tried to add a block model with the particle texture in place but that doesn't do anything because the model is not used. Any ideas?
  19. It's getting even weirder... I ran a GL State checker over it and the differences between the two rendering modes are those: [20:03:53] [Client thread/INFO] [minersbasic]: GL_VERTEX_ARRAY_STRIDE: 28 -> 16 (Stride between vertices) [20:03:53] [Client thread/INFO] [minersbasic]: GL_COLOR_ARRAY_STRIDE: 28 -> 16 (Stride between colors) [20:03:53] [Client thread/INFO] [minersbasic]: GL_TEXTURE_COORD_ARRAY_STRIDE: 28 -> 20 (Stride between texture coordinates) (Left side is normal, right side is wrongly rendered) I actually don't know what they mean, but maybe anyone knows? Also I discovered that other Entities are affected as well, even if no shooting star is nearby. Here's a screenshot of Items being rendered weirdly when laying next to one: Also, the bows of skeletons show that halfway-transparent look. I really need a way to fix it, it's so annoying... EDIT: I think I have found out something useful: It does work if I call GL11.glDisable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); instead of GlStateManagerdisableLighting(); GlStateManager.enableBlend(); GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); Is there maybe something that I don't understand with the GLStateManager? And, even more important, is it OK when I do it like that or do I break something else with it? Or should I maybe call both?
  20. Basically this must work because its the normal way you change logging behaviour with log4j. Butdoes anyone know where this file is actually loaded and in which variables the content is stored? I was looking for a possibility to enable this from code via reflection.
  21. Thanks a lot! Which Forge Version will include this?
  22. They are not 2 entities, see the new screenshots I made: First, as it was before. I just rotated the head a bit until the other entity comes into sight, I changed nothing else: Second with ONE: Third with ZERO: I hope this helps you...
  23. It's OK... I hope no one will notice that in the mod..
×
×
  • Create New...

Important Information

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