Jump to content

DArkHekRoMaNT

Vintarian
  • Posts

    573
  • Joined

  • Last visited

  • Days Won

    18

Posts posted by DArkHekRoMaNT

  1. On 2/2/2023 at 12:19 PM, Frepo said:

    Aaaaah! I didn't understand you needed an index-position right after ("/variantgroups/n"). I actually never noticed that variantgroups was an array all along! Didn't see the "[ ]", I was focused on the path and the value lines, just took for granted that it was "{ }". Wow, that's a revelation! :D thank you thank you thank you!

    One more thing; I strangely messed up the gold and silver arrows arrowhead texture (notice: just the arrow head) when inserting the bone texture for my arrow.

      {
        "op": "replace",
        "side": "server",
        "path": "/texturesByType",
        "value": {
    		"*-bone": {"material": { "base": "game:block/bonesrotten" }},
    		"*-flint": {"material": { "base": "game:block/stone/flint" }},
    		"*-crude": { },
    		"*": {"material": { "base": "game:block/metal/ingot/{material}" }}
    	},
        "file": "game:itemtypes/tool/arrow.json"
      },

    First I tried with the "add" operation, but that messed all other texures up, except for my bone arrow. So I just replaced the entire section. Then everything looked good except for silver and gold. But I thought what ever, noone makes those arrows anyway, right? :)

    If you need to add something before "*" (takes any values), then you can use a little hack:
    1. "op": "move" with "path": "/temp" for "*"
    2. Add others
    3. "op": "move" with "path": "/originalpath" for "*"
    Example

  2. On 2/7/2023 at 5:10 PM, Frepo said:

    Sadly I can't add a new value to EnumBlastType

    You can do it. Enum is just an int. For example:

    EnumBlastType value = (EnumBlastType)124;
    if(value == (EnumBlastType)124)
    {
      // do smth
    }

    To make it more convenient, you can use it as const or static readonly property

    public static EnumBlastType CustomBlastType { get; } = (EnumBlastType)124;
  3. 53 minutes ago, Frepo said:

    Dark, my man! I've been sniffing around in that behavior before, but I was only there to see how to get the saturation level. I would never have thought there was such a connection (through the watchedattributes)... oooh thank you!!! God knows how much time you saved me!
    image.thumb.png.880bdc6bbe883ceae088d970aa8504e2.png

    Now... on to climb the next mountain; Making all players wake up if you run out of saturation while sleeping. And that (from what I can tell based on my limitied knowledge so far) doesn't seem possible without overriding the entire ModSleeping since it references BlockEntityBed in its WakeAllPlayers method. Meaning I must extend BlockEntityBed with my BlockEntityFTBed. And in BlockEntityBed are two cruicial methods i need to override (DidMount and DidUnmount) because the ticklistener is created there. But these methods are not marked as virtual, so I can't override them :(  ...I was so close.

    If you need to insert code into a method before or after the current code, then it is quite simple to do this through Harmony prefixes and postfixes

  4. 11 hours ago, Frepo said:

    Yeah, that seems to be exacly what happens. Which could be good enough I guess. But I want it to behave consistently with the other restrictions, meaning the character wont lay down at all and instead the client recieves an error message.

    How do I make the server tell the client not to allow the player to lay down?

    Have you tried canceling this on the server?

    byPlayer.Entity.TryUnmount();
  5. 14 minutes ago, Frepo said:

    I see... or... oh, I don know... I'm having a hard time wrapping my head around the client/server stuff. I mean, I understand that some code is only relevant for the client and vice versa. But I don't understand fully how to know when certain code is "visible" to one or the other (or both).

    So the entire BlockBed class is only ever read by the client? And that's why the hunger is not "visible" there? This is tricky, usually the IDE tells me when something is out of scope or not visible due to protection levels and such.

    So I guess what I need to do (from the client here) is tell the server "hey, I want you to give the saturation level of this player that's sleeping in this bed here". But how is that accomplished? I'm gonna search for some keywords here and investigate each place where the hunger is referenced/used/accessed, maybe things will clear up a bit.

    Thanks for the hint thou, Dark!

    Most of the methods associated with the actions of the players (for example, interaction) are run twice. First on the client and then on the server.

    Sometimes this requires you to explicitly indicate that the interaction on the client is successful and you need to repeat it on the server for sync. For example ref handling parameter or return value.

    In this case, you need to skip processing on the client (by checking api or world.Side), return true or false (see the comment for function) and process it on the server side

  6. 16 hours ago, Frepo said:

    THE SOLUTION

    Turns out you need your own bucket to go with the liquid.

    Try explicitly specifying your modid in creativeinventoryStacks (fregtech:adhesiveportion instead of adhesiveportion). As last resort, try putting the liquid json in assets/game instead of assets/fregtech.

    You definitely do not need to create a second bucket for this o.O

  7. v1.8.0-rc.1:
    - New simplify server-oriented teleport manager
    - UI refactoring
    - Subnetwork not working now (in progress)
    - Added map marker for teleport
    - Added check for teleport exists on load
    - Added restore stability command (/rst or /rst [player])
    - Added new config system (check /cfg and .cfg), old configs will be reset to default
    - Added import to WorldEdit command (/tpimp import)
    - Added idle, active and player teleported sounds
    - Added enity teleported particles (not work correctly on long distance teleports)
    - Added teleport glowing
    - Removed progress ring
    - Improved teleport particles
    - Broken teleport not render seal now
    - Fixed seal renderer during temporal effect
    - Fixed .tpdlg target teleport position
    - Fixed stability consumption not affected by StabilityTeleportMode
    - Improved teleport cancel check
    - Added tpimp pasteraw (not replace meta blocks)
    - Added move to teleport by click on map in creative
    - Save teleport frame when broken and render it in inventory
    - Added own structure generator:
      - Teleport structures randomization (biom-dependent stone, random roofing, wood and more)
      - Generate base and pillars, if required
      - Faster than vanilla generator (checks minimum distance first, not during structure generation)
    - Added new config options:
      - TeleportBuildProtected for teleport structure build protection mode (on, off or trader only)
      - BiomlessTeleports for generate only standart granite and aged wood teleports
      - DarknessMode for remove paper and metal lanterns from teleport structures
    - Added claim BuildOrBreak check for change frame
    - Changed rename dialog to edit dialog
    - Now you can also add note, change color and icon, pin teleport on the map or change the sort order via Shift + RMB on teleport block or RMB on the map icon
    - All teleport properties except name are client-side and not synced with other players
    - Name can only be changed if you have Use rights in claim (or you are in creative)
    - In the teleport list, names are sorted alphabetically (+client sort order)
    - Note is also displayed in hover text on the map and in the teleport list dialog
    - Added client config option for default icon and color of normal teleport, and color of broken teleport
    - Edit teleport dialog can be opened for broken teleport, but color will be ignored until repaired

    New since pre.7:
    - Added config for disable special teleports
    - Fixed tpimp command

    • Like 1
  8. v1.8.0-pre.7 (unstable):
    - Added claim BuildOrBreak check for change frame
    - Changed rename dialog to edit dialog
    - Now you can also add note, change color and icon, pin teleport on the map or change the sort order via Shift + RMB on teleport block or RMB on the map icon
    - All teleport properties except name are client-side and not synced with other players
    - Name can only be changed if you have Use rights in claim (or you are in creative)
    - In the teleport list, names are sorted alphabetically (+client sort order)
    - Note is also displayed in hover text on the map and in the teleport list dialog
    - Added client config option for default icon and color of normal teleport, and color of broken teleport
    - Edit teleport dialog can be opened for broken teleport, but color will be ignored until repaired

    • Like 1
  9. 14 hours ago, Ultric said:

    Been having an issue with /returnthings only working for one player (me). I'm the host, running it on a dedicated server, giving people op doesn't let them do it. Only thing I can think of is my blessed status has to do with me being player 0. Can supply more info if desired.

    By default /returnthings requires the gamemode privilege, which means the ability to use the /gamemode command. Does it work for them? You can also try to change the required privilege in the mod config

  10. 11 minutes ago, Hells Razer said:

    Nice. Just a question though:

    What does this option do? Make the teleporter structure behave like the trader's wagons?

    Yeah. Teleport with a merchant already used claim, but now it can be configured for all teleport types

    • Thanks 1
  11. v1.8.0-pre.6 (unstable):
    - Fixed resolving meta-spawners in tpimp pasteraw
    - Added move to teleport by click on map in creative
    - Save teleport frame when broken and render it in inventory
    - Added own structure generator:
      - Teleport structures randomization (biom-dependent stone, random roofing, wood and more)
      - Generate base and pillars, if required
      - Faster than vanilla generator (checks minimum distance first, not during structure generation)
    - Added new config options:
      - TeleportBuildProtected for teleport structure build protection mode (on, off or trader only)
      - BiomlessTeleports for generate only standart granite and aged wood teleports
      - DarknessMode for remove paper and metal lanterns from teleport structures

    • Like 1
×
×
  • 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.