Jump to content

Vintagebob

Vintarian
  • Posts

    36
  • Joined

  • Last visited

Everything posted by Vintagebob

  1. Yes, the error was, that i tried to get the rotated block code with an outdated method. I used a dictionary, but this is the right way: BlockFacing[] horVer = SuggestedHVOrientation(byPlayer, blockSel); if (blockSel.Face.IsVertical){ horVer[1] = blockSel.Face; } AssetLocation code = this.CodeWithVariants(new string[] { "verticalorientation", "horizontalorientation" }, new string[] { horVer[1].Code, horVer[0].Code }); Block block = blockAccessor.GetBlock(code);
  2. Thank You! Unfortunately it still does not work, but i think this is some other error in the code then...
  3. Hello there, I recently decidet to update my mod to the newest version, and i noticed, that my custom classes are not registering. Every object, that had a custom class and thus a custom functionality, stopped working. In addition, when i try to spawn an entity with such a class, my game crashes with the crash log in the VS crash reporter: System.Exception: Don't know how to instantiate entity of type CustomEntity did you forget to register a mapping? at Vintagestory.Common.ClassRegistry.CreateEntity(String className) in VintagestoryLib\Common\ClassRegistry.cs:line 333 at Vintagestory.Common.ClassRegistryAPI.CreateEntity(EntityProperties entityType) in VintagestoryLib\Common\API\ClassRegistryAPI.cs:line 85 at Vintagestory.GameContent.ItemCreature.OnHeldInteractStart(ItemSlot slot, EntityAgent byEntity, BlockSelection blockSel, EntitySelection entitySel, Boolean firstEvent, ... Im currently registering classes by this mehtod: namespace custommod { public class CustomMod : ModSystem { public override void Start(ICoreAPI api) { base.Start(api); //---------Entities api.RegisterEntityClass("CustomEntity", typeof(CustomEntity)); //------------Blocks api.RegisterBlockClass("CustomBlock", typeof(CustomBlock)); //------------BlockEntities api.RegisterBlockEntityClass("CustomBlockEntity", typeof(CustomBlockEntity)); //------------Items api.RegisterItemClass("CustomItem", typeof(CustomItem)); } } } This is also the method shown in the wiki, and it worked bevore. So what do i need to change, or what is the new method of registering custom Classes in VS version 1.18.1? Thank You
  4. So, the new release without non-english letters is out now hopefully it wont bug anymore
  5. O, really? This is bad... I dont thought, it would cause any problems... Thanks very much for this tip I'll fix that at the weekend then, thanks
  6. Yes, i will make a new update for the mod, but now i havent enougth time to code it But I defenetly will
  7. Ok, i changed it now But if you want to look at tis file, it might take a long time, because i've written down all classes from the whole mod in this one file... nevertheless, thank you for your advice
  8. Hi, please spawn the boss only with the eternityaltar, otherwise it might bug and cant do all attacks Thanks for the feedback, @jakecool19 , but the music was a little bit buggi in the release x D, because i tested it and forgot to set the music-repeat-value back, and the music started every 10 seconds again. Now i fxed that, but if you die, and the boss despawns, the music still plays to end, because i dont know, how to fix that But now you can enjoy it without bugs (and thank you for not spoiling here ) New features in the new update: -from normal wooden buckets you can craft fishbuckets -use it on a fish (not a shark, because it is too big xD), and you will get the fish in the bucket -you can release the fish, whereever you want, just shift and left-click -the fish should not despawn then -you can craft the fishbucket back to a normal bucket
  9. Thank you i dont even knew, that it is possible to zip not a folder, but many files into one .zip file x D Now i uploaded a newer version with the corect zip
  10. Hello everyone, this is my first mod. It adds oceans, fishes, dungeons, mushrooms, popys and some stuff more. More information you find here: https://mods.vintagestory.at/httpsgithubcomkrafterbobomniummod (I didnt want do write all the stiff donw twice xD) Enjoy the mod
  11. No, this isnt working :/. If i try this, the world looks like this: and when i change offsetY from -84 to 84, the structures generate above the surface: But thanks for answer me
  12. unfortunately i missed the event . maybe you could do other such events, like a christmas event for example or so
  13. Thank you for the answer , but its solved already . The problem was, that i forgot to add the the texture to the blocktypes/metal/ingotpile,json file, and the texture for the forge and the anvil-workitems are taken from there. And yes, the textures have to be in the game folder, thanks
  14. Hello, I wonder for what the meta blocks "Pathway" and "Underground" are usefull. The "Filler" one fills structures with air, when they are generated, and the "Spawner" spawns entities. But what do the "Pathway" and the "Underground"?
  15. Hi, i have a problem: i want to add a new metal to the game, but when i put the ingots in a forge, or when im smithing them, they loose there textures and become white and with a question mark. Has someone an idea, how i can fix that problem pls?
  16. yes, there you need really to code . But if you set the durability very high and remove this, the tools will be very strong to
  17. i think there is though a way: in the jsons of the tools there is a parameter called DamagedBy. If you remove it by a patch, it should work (i think)
  18. Hi everyone, i need help (again). How i can generate the buttom part of a structure under the ground? I think with the offsetY parameter, but it doesn't work! Here is the code: [ { "op": "add", "path": "/structures/-", "value": { code: "omniummoddungeon1", chance: 1, schematics: ["dungeon1"], replacewithblocklayers: ["soil-normal-normal", "soil-low-normal"], offsetY: -84 }, "file": "game:worldgen/structures.json" }, ] It generates all on the surface, and then i have bunch of 84-block tall mountains all over the world. Pls. can somebody help me, Thank you
  19. And when i set "offsetY" to -1, like at the other structures, it dont even generate.
  20. @I33tmaan, yes, i took a look to chaoslands, and in my mod i have shipwrecks too, and they generate like it schould be. But there i dont use the "offsetY" parameter (or minimal, -1 or so). Maybe this is the reason, maybe the block to generate on is 84 blocks beneath, and there is no grass, and because of that its bugging. But i dont know, how to do it in an other way.
  21. Hello everyone , Can someone help me to generate my structures right? The structure is one, wich has a top on the surface, and then a underground-part. I the .json file i write all right (in my oppinion), and i set the inside-block-codes-parameter to grass and not to water, but the struktures keep generating there! Here some examplepictures: I dont understand where the mistake is. Here the .json code: [ { "op": "add", "path": "/structures/-", "value": { "code": "dungeon1", "offsetY": -84, "chance": 0.5, placement: "surface", "schematics": ["dungeon1"], inblockcodes: ["soil-medium-normal", "soil-low-normal", "soil-verylow-normal"], }, "file": "game:worldgen/structures.json" }, ] If someone could help me, it would be gratefull! Thank you
  22. I think the cost of the actions isnt set in one of the .json files., but in the code of the game (but im not sure xD). Therefore the fourth thought is probably the only solution for that problem.
  23. Hello, Is there a way not rotating a structure, when it is generating? When one generates, it rotates randomly in all direction. I made a multiblock door (and no, it isnt copied from the medival expansion mod ), and when i generate a structure with it, and the structure rotates, the door is bugging. Therefore i wopuld be happy to know a way to not-rotate structures thx
  24. I tested it, and it worked very well at me. Maybe the mistake is not in this code, but in the mod at its own. Can you send me the whole mod folder please? thx
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.