Jump to content

Bektor

Forge Modder
  • Posts

    852
  • Joined

  • Last visited

Everything posted by Bektor

  1. Hi, I just got a small problems with my json's. I'm getting some errors in the fml-log, while all textures are working in and outside of the inventory fine. Here is the code from the blockstate: [spoiler=stone.json] { "forge_marker": 1, "defaults": { "textures": { "all": "primevalforest:blocks/rocks/placeholder1" }, "uvlock": false, "model": "cube_all" }, "variants": { "stone": { "andesite": { "textures": {"all": "primevalforest:blocks/rocks/placeholder1" }}, "basalt": { "textures": {"all": "primevalforest:blocks/rocks/placeholder1" }}, "chalk": { "textures": {"all": "primevalforest:blocks/rocks/placeholder1" }}, "limestone": { "textures": {"all": "primevalforest:blocks/rocks/placeholder1" }}, "marble": { "textures": {"all": "primevalforest:blocks/rocks/placeholder1" }}, "quartzite": { "textures": {"all": "primevalforest:blocks/rocks/placeholder1" }} } } } And here the models/item/stone. I just copied one json file in, because they are nearly the same.. Each variant has a different json with the name of the variant in the subfolder stone. [spoiler=andesite.json] { "parent": "block/cube_all", "textures": { "all": "primevalforest:blocks/rocks/placeholder1" }, "display": { "thirdperson": { "rotation": [ 10, -45, 170 ], "translation": [ 0, 1.5, -2.75 ], "scale": [ 0.375, 0.375, 0.375 ] } } } All existing variants of the stone: The next json problem is the one with the log_horizontal . Why is it searching for log_horizontal#inventory stuff ? blockstate log_horizontal: Here a example file from models/item/wood/logs: It is based on the same system that all variants have there own json file. The base_log.json just defines the rotation in first and third person mode. So why am I getting these errors in the fml-log when all textures are working fine in eclipse and outside of eclipse? Thx in advance. Bektor
  2. Ok, thx. That works. Just letting this open if someone knows it to 100%.
  3. Ah, ok thx. And I18n.translateToLocal is still deprecated. And the method format wants a second parameter. I think there is even one more class... (not names I18n), but not quite sure about it.
  4. The problem is that you register the render methods also on the Server, but the Server has nothing to do with rendering. Register your render code on Client Side only (for example put it in the ClientProxy) and add to your class RenderBeetle the sideonly stuff, so that it looks like this: @SideOnly(Side.CLIENT) public class RenderBeetle extends RenderLiving{ That should do it.
  5. Add information is client side only. It makes no sense on the server. The advanced boolean, I believe, is true if the player is holding Shift. Ah, ok. Now when thinking about it.. makes sense. ^^ Oh and the advanced boolean isn't for holding shift stuff. Tested it a few seconds ago: if(advanced) tooltip.add(TextFormatting.BLACK + "the last of it - the last of them"); So when it is client-side only, which is the best way of translating a String in 1.10.2 (since it's been a long time since I last did such stuff [1.7 or 1.6 I think ]).
  6. Hi, I'm wondering how to add a translated and coloured tooltip to a block/item/itemblock. That's what I've currently got: tooltip.add(TextFormatting.DARK_GRAY + Constants.MOD_NAME); I'm also wondering if the addInformation method to add a tooltip is client-side only or also server-side and for what the boolean advanced is. Thx in advance. Bektor
  7. Hi, I just played a bit on my test server for my mod with a friend and then the server crashed... What I did: just removed some of my gravity blocks (a few hundred) which resultet in a few more hundred EntityFalling blocks and then the complete internet connection of my house was gone.... Restarted the server, did the exact same again... same result... No idea why this happens cause nothing in the log before this happened shows anything related to my mod and I don't even call any netty methods, so I think this is caused by Forge or Minecraft (or something else?). A few hours before I had even a crash that because of so many falling entities the netty thread crashed... I still don't know why this happened... but I don't think this should ever happen. Netty Crash-log: BlockCollapse.java:45 -> calls a method and results in BlockCollapse.java:54 --> calls a method which results in BlockCollapse.java:127: on that line is just the 'continue' keyword inside of a while-loop... No idea what's going on there.... The code of the line 127 for anyone who does not believe me: Above the if-clause starts the while loop. the other later problem: Unfortunately there isn't any more information and my router can't tell me anything else because I had to reset it to get the internet back, but windows told me in the fourth try to locate the problem something about an invalid ip-configuration while the router was online, but no device in the house was able to get a connection to a website or the router itself... I hope this is the correct forum and someone can help me with this! Thx in advance. Bektor EDIT: Forge Mod Loader version 12.18.1.2094 for Minecraft 1.10.2 Java is Java HotSpot 64-Bit Server VM, version 1.8.0_101, running on Windows 10:amd64:10.0 (Anniversary Update) Installed mods other than mine: BiomesOPlenty-1.10.2-5.0.0.2085-universal.jar worldedit-forge-mc1.10.2-6.1.4-dist.jar The server started with these flags: JVM Flags: 2 total; -Xmx4096M -Xms4096M and in the nogui mode. If more information is required, please let me know how to provide them, cause this is everything I found which is related to the problems and saved in a crash-log or/and log file. EDIT 2: Could also re-produce the netty crash with a huge amount of gravel blocks.
  8. Hi, I'm wondering how it is possible to create for the item model json (for a block) a new parent json which parent is a mc cube_all json and my blocks will use this custom parent json, so I don't have to duplicate so many json code.... Any idea how this is possible and if this is possible? Like what to write in the parent tag that my parent json will be found etc. For example you have a json which defines the rotation of all your blocks of a specific block and this gets the 'vertices' from the mojang json and the block json's itself only need to worry about the texture because the rest is done in other json files. The json file is also located in a subfolder. Thx in advance. Bektor
  9. Create a Stream of all values of the EnumType enum, sort it by the getMeta value and then produce an ordered array of them. This uses Java 8 features heavily (Streams, method references), you should look them up. Ah, ok thx. Hm... going to look one day more into it... I've already looked into it once, but because I'm using them not very often (never until yet ) I totally forgot what they are doing.
  10. Ok, but I'm still wondering what the line private static final EnumType[] META_LOOKUP = Stream.of(values()).sorted(Comparator.comparing(EnumType::getMeta)).toArray(EnumType[]::new); does.
  11. Is it also possible without having an IVariant interface? EDIT: Oh and what does this line exactly do? private static final EnumType[] META_LOOKUP = Stream.of(values()).sorted(Comparator.comparing(EnumType::getMeta)).toArray(EnumType[]::new);
  12. Ah, ok. Thx. Just a small question: When having a method which automatically registeres every block with it's itemblock and render stuff and so on... is it possible to get all names of the ItemBlock and use these names for the inventory name? So that when I have for example a stone block and many stone types like granite and for that a StoneType file, is it possible to get all the names out of this file and use them with having this method header: Block block, String name, @Nullable Function<Block, ItemBlock> itemFactory
  13. Hi, I'm wondering how I have to register json files in Minecraft 1.10.2. I want them to be in a sub-folder, so in the blockstates file there is just one json file and under model.items is a subfolder for example called "random" in which all sub-blocks go. I want to do this because I have some blocks with many different block states and different textures and so I want to have it all a bit sorted. How can I achieve this? That's what I am currently doing but this is not working: ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(block), meta, new ModelResourceLocation("random/"+ block.getRegistryName(), "inventory")); ModelLoader.setCustomModelResourceLocation(block, meta, new ModelResourceLocation("random/"+ block.getRegistryName(), "inventory")); [The first one is for the block, the second one for the item block] Thx in advance. Bektor
  14. I might be wrong in my assumption, but I think you are meaning to do 2iterations. If so, that's not the Java exponent operator. That's the bitwise xor operator. Use Math.pow(2, iterations) instead. Well, even when using Math.pow(2, iterations), the result is the same.
  15. So after this here does not bring me to a solution I created now a github repository here: https://github.com/MinecraftPlaye/Fractal_World_Playground
  16. Hi, I've read the changelog of the Forge 1.10.2 latest version: Now I'm wondering how to do a performant cable network in 1.10.2 which does not cause a huge fps-drop like I noticed in 1.7.10 with many cables and machines in one room. So any help would be nice, cause I've never really worked with API stuff and never worked with energy network's before. Thx in advance. Bektor
  17. I mean the loading states in the nice splash screen when starting Minecraft: like I can see there stuff like reloading texture manager state etc.
  18. Hi, I've got a small question about Forge: - For what are all these loading states? (For do they, why have they to be there etc.) I came up with this question because I wondered for a long time for what the reloading texture manager state is and before I'm asking here for every state I come up with a question I'm just asking for all states at once. Thx in advance. Bektor
  19. Well... not quite sure about it. Just did that to store the noise in an array, because I have to store it somewhere when I change the noise variable again... so I used here an array (while I used in my Test Project just a noise value and saved the noise value result direclty to the picture before recalculating that value for the next pixel). But either way... if you do the first thing or the second thing of the code you posted... it changes nothing.. It just changes the location of where the calculated noise variable is saved. EDIT: Ok, I just found out that it seems to be a problem with the array itself. Without an array it's working, but I don't know any solution which would work to implement such a thing in Minecraft and with an array it seems to be that the generateNewNoise method is always putting out the same value for a reason I don't know.
  20. Ok, I found something interesting out: Output of the test project: Output of the same noise function in Minecraft: Hm... anyone who knows how to fix this and why it is working outside of Minecraft, but not inside of Minecraft???
  21. Ok, I changed it now with returning the ChunkPrimer from generateTerrain , but nothing changed. The world looks the same as before.
×
×
  • Create New...

Important Information

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