• 1

    posted a message on [SOLVED] Functions - Prevent specific item from being put in chests

    What if they drop the item into a water stream and let a hopper pick it up?

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on How do you want to deal with your 1.13- maps?

    I only have a small amount of personal command block "mods" and I'm updating them. New command syntax seems cleaner and easier to use, so I'd say it's worth the effort to port your maps.

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on .mcfunction syntax definition for Notepad++

    Greetings!

    Posting the thread here, because I couldn't find a more appropriate forum for it.

    I tend to use NPP for writing scripts, and now that task includes Minecraft function files.

    Since NPP allows user to define their own syntax highlighting rules, I though I'd make a set for .mcfunction files.

    You can find an instruction on how to import a new syntax here.

    The file itself is under the spoiler (since forums disallow attaching arbitrary files).

    Feedback from fellow NPP users would be appreciated.


    <NotepadPlus>
        <UserLang name="Minecraft Function File" ext="mcfunction" udlVersion="2.1">
            <Settings>
                <Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="2" decimalSeparator="0" />
                <Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
            </Settings>
            <KeywordLists>
                <Keywords name="Comments">00# 01 02((EOL)) 03 04</Keywords>
                <Keywords name="Numbers, prefix1"></Keywords>
                <Keywords name="Numbers, prefix2"></Keywords>
                <Keywords name="Numbers, extras1"></Keywords>
                <Keywords name="Numbers, extras2"></Keywords>
                <Keywords name="Numbers, suffix1">s b l f d</Keywords>
                <Keywords name="Numbers, suffix2"></Keywords>
                <Keywords name="Numbers, range"></Keywords>
                <Keywords name="Operators1">~ += -= *= /= %= + - = : , /</Keywords>
                <Keywords name="Operators2"></Keywords>
                <Keywords name="Folders in code1, open"></Keywords>
                <Keywords name="Folders in code1, middle"></Keywords>
                <Keywords name="Folders in code1, close"></Keywords>
                <Keywords name="Folders in code2, open"></Keywords>
                <Keywords name="Folders in code2, middle"></Keywords>
                <Keywords name="Folders in code2, close"></Keywords>
                <Keywords name="Folders in comment, open"></Keywords>
                <Keywords name="Folders in comment, middle"></Keywords>
                <Keywords name="Folders in comment, close"></Keywords>
                <Keywords name="Keywords1">advancement ban blockdata clear clone debug defaultgamemode deop difficulty effect enchant entitydata execute fill function gamemode gamerule give help kick kill list locate me op pardon particle playsound publsih recipe reload replaceitem save save-off save-on say scoreboard seed setblock setidletimeout setmaxplayers setworldspawn spawnpoint spreadplayers stats stop stopsound summon teleport tell tellraw testfor testforblock testforblocks tickingarea time title toggledownfall tp transferserver trigger weather whitelist worldborder wsserver xp</Keywords>
                <Keywords name="Keywords2">objectives players stats add remove list set operation detect entity if unless</Keywords>
                <Keywords name="Keywords3">x y z r rm tag team c l lm m name rx rxm ry rym type @a @e @p @r @s</Keywords>
                <Keywords name="Keywords4"></Keywords>
                <Keywords name="Keywords5"></Keywords>
                <Keywords name="Keywords6"></Keywords>
                <Keywords name="Keywords7"></Keywords>
                <Keywords name="Keywords8"></Keywords>
                <Keywords name="Delimiters">00&quot; 01\ 02&quot; 03[ 04 05] 06{ 07 08} 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
            </KeywordLists>
            <Styles>
                <WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="COMMENTS" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="LINE COMMENTS" fgColor="008000" bgColor="FFFFFF" fontStyle="2" nesting="0" />
                <WordsStyle name="NUMBERS" fgColor="FF0000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="KEYWORDS1" fgColor="0000A0" bgColor="FFFFFF" fontStyle="1" nesting="0" />
                <WordsStyle name="KEYWORDS2" fgColor="0000A0" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="KEYWORDS3" fgColor="FF0000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="KEYWORDS4" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="KEYWORDS5" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="OPERATORS" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="FOLDER IN CODE1" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="DELIMITERS1" fgColor="000000" bgColor="FFFFFF" fontStyle="2" nesting="0" />
                <WordsStyle name="DELIMITERS2" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="83898375" />
                <WordsStyle name="DELIMITERS3" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="83886087" />
                <WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
                <WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
            </Styles>
        </UserLang>
    </NotepadPlus>

    P.S.: if there is a more appropriate forum to post this, I'd appreciate being pointed there.

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Help with custom items[Command Blocks to Functions]

    Happens to all of us =)

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Help with custom items[Command Blocks to Functions]

    Make a new function (for example named LoopMe) that calls the other functions inside it. There can be only one function looped by the gamerule but you can have functions be run inside other functions. The other option is to put every function in a Repeating, Unconditional, Always Active command blocks.


    Inside the "LoopMe" function just put the other ones:


    /gamerule gameLoopFunction rootfolder:items1/item1

    but for other item like this

    /gamerule gameLoopFunction rootfolder:items1/item2


    And then you can call "LoopMe" instead of "items1" and "items2".Remember not to put "/" slashes at the beginning of commands in functions.


    No-no-no! That's a bad way of calling a gameloop function!
    You should indeed make a new game function, but you can call other functions directly from it:
    function rootfolder:items1/item1
    function rootfolder:items1/item2
    Then you can set your new loop function via /gamerule.
    Sometimes it makes sense to use an combined approach - have a old good repeating command block call the loop function. But if you want a command-block free world, then you should create a wrapper function like command_block_shadow suggested.
    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Help with /Scoreboard < X and > X
    Quote from PannedCake»


    If I go from outside in to inside it will ADD on to x. But what If I had a higher amount than x? It will ADD, meaning it won't change the score if its high. I need it to REMOVE to x and ADD to x.



    If I understood you correctly, you want the temperature to gradually change over to some area-specific value while player is in the area, right?
    Then you can just chain two commands:

    /execute @a[score_temperature=XMINUS1,x=0,y=31,z=0,r=2] ~ ~ ~ scoreboard players add @s temperature 1
    /execute @a[score_temperature_min=XPLUS1,x=0,y=31,z=0,r=2] ~ ~ ~ scoreboard players remove @s temperature 1

    where XMINUS1 and XPLUS1 are 1 below and 1 above the area-specific temperature.

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on [Function] Adventure Mode Door Lock

    Well, you can try and rapidly replace the block with "door in closed state".

    It won't look too good, though. Redstone doors might look better.


    As for the selector, you can use scoreboard. Make a dummy objective "HasKey", and then do the following:

    1. set HasKey to 0 for all players

    2. set HasKey to 1 for all players holding the key item (easier than scanning their inventory).

    3. use selector score_HasKey_min=1 to detect players holding keys.

    Posted in: Redstone Discussion and Mechanisms
  • 1

    posted a message on How to make a contraption where a sticky piston knocks a player off when stepping on a pressure plate?

    My designs are a bit more expensive (as they include observers), but they are fast, self-resetting and reliable. All pistons are sticky, observer is facing the redstone wire underneath. You can use a version with one piston, but you can also use three to guarantee the player being caught.


    Second design is a bit more noticeable due to exposed observer, but it's also better protected. The black glass block has a string on it, that will update the observer if the player steps on it... or if the player breaks it! Since you can make a longer line of pistons, you can catch even the player smart enough to break the string from what would be safe distance for other traps.

    Posted in: Redstone Discussion and Mechanisms
  • 1

    posted a message on specific window of time

    Basically, the idea is that you have two "base" signals, with strength proportional to the time you want it to be.

    You compare it (via comparators, duh) to the signal, which strength is proportional to the current time.

    If the current signal is stronger than the first base signal but weaker than the second one, then you will get an output.

    This output can be used in an AND gate with your button, so buttons output will only reach the circuit when the time signal is active.


    To get time-specific signal, there are three approaches.

    a. use daylight sensor.

    + It will still work if you do /time set or change gamerule doDaylightCycle on your world.

    - It won't distinguish dusk and dawn.

    - Time intervals have varied length.

    - Affected by weather.


    b. use a day-long timer, like hopper clock + counter (clock itself has the period about 4 minutes at most).

    + It can distinguish dusk and dawn.

    + It's not affected by weather.

    - It will be out of sync if you mess with daylight cycle as above.

    - You will likely need to check output from both counter AND clock for it to work properly, which is tricky.


    c. A combination of the two - you can use a daylight sensor to start a hopper clock when the sunlight level is correct, and add a T-flipflop to keep track of dusk/dawn status.

    + more precision than just the daylight sensor

    + It can distinguish dusk and dawn.

    - It's affected by the weather.

    - It will be out of sync if you mess with daylight cycle as above.


    All the above approaches have the downside of only giving you at most 15 intervals per day, which is not too much in terms of precision.

    If you need something better, you should look into command blocks.


    Take a look at /scoreboard and /stats commands.

    Specifically, you need to:

    1) create a dummy scoreboard objective;

    2) repeatedly assign to it the queryResult stat of an entity executing /time query daytime. It can be done via /execute ... /stats ... command in a repeating command block.

    3) check if that scoreboard objective is within the desired range. I think it's easier with entities, just repeatedly run /testfor for your target entity with appropriate parameters and use a comparator to check if the command block running that command has succeeded. If it has, then the time is right.

    + Arbitrary time precision, down to single game tick

    + Always synced with the day-night cycle.

    + Is not affected by the weather.

    - Requires quite a bit of understanding of commands and scoreboard game mechanic.


    Sadly, the above is only a general idea on how to approach it - I'm not good enough to hammer out the details for you.

    Posted in: Redstone Creations
  • 4

    posted a message on Thaumcraft 6.1.BETA26 [no longer being developed]
    Quote from Azanor»

    So I've been struggling with a bit of a decision and I thought I might post it here to get a second opinion. Not sure I want to do it as a poll though.


    The research table with it's minigame will still be around in TC6, however it will basically be a crafting mechanic to make "Theories". Theories is one of the new currencies you require to unlock research. For example, unlocking Infusion crafting might cost 5x "Observations: Magic" and 3x "Theories: Magic". Observations you get by scanning stuff (for the most part).


    The problem I have is as follows. Where to get the pool of aspects required to finish the old aspect puzzle. In earlier incarnations of TC it was gained by scanning and in TC5 you just had a pool when you crafted the research note.


    Now I'm thinking of making require breaking down items. In other words you need to sacrifice something with AER to be able to get AER points to complete the puzzle. Combinations are no longer possible. One of the reasons I'm considering this system is that in the great scheme of things you will be spending a lot less time at the table thus I want to give things there a greater cost.


    The alternative is the TC5 way - in other words you start with a pool of primals and you need to combine them to finish the puzzle.


    What do you guys think?


    I'd agree with people above - TC4 version was a bit annoying when it came to scanning stuff.
    However, I suggest alternate, deck-building approach - have observation increase the size of the aspect pool you start the puzzles with. That way you might literally be unable to complete certain research topics until you learn enough.
    Another approach would be to spread out research bonus entries. Say, you need to complete some some observations of ignis aspect to craft a theory regarding ignis, that would give you bonuses (chance of not spending aspect point when placing or crafting; chance of refunding it when removing) to ignis and closely related aspects. Or, if the theory is about a composite aspect, it'd let you add it to your starting pool.
    So yeah, to sum it up in two words: deck building. With deck being the aspect points pool you start your research topic with. It can be shared between all research topics (TC4 style, except it's refilled for each new research paper), or it can be based on multipliers (each research paper starts with its own pool, but the bonuses you unlocked increase it's size and improve it's composition).
    Posted in: Minecraft Mods
  • To post a comment, please .