At the moment the datapack can make the crossbow shoot the following items: (the arrow gets replaced by this and it copies the motion of this arrow)
- Any type of fish in a bucket
- Seeds, carrots, potatoes: gets planted with farmland when landing on top of any type of dirt block
- All potions (splash, lingering): works as normal potions except they can be thrown far away
- Anvil (Doesn't really make sense to be in the final version, but it's fun to play around with for the moment)(edited)
tomh13-Oct-19 10:33 PM
do fish do damage?
Thanathor13-Oct-19 10:33 PM
Maybe you could so something with like a lead, not entirely sure what
Dennis13-Oct-19 10:33 PM
It does require to run a command every tick (check if someone used a crossbow), but without this it wouldn't look right and could be very unreliable
like it needs to execute the commands directly after using the crossbow, otherwise the fish would only appear up to 30 blocks away(edited)
do you mean shoot a lead at an animal?
i like the idea but not sure if that's possible
Thanathor13-Oct-19 10:35 PM
Possibly, or a grapple effect, maybe you shoot it at an item/mob and it pulls it toward you
tomh13-Oct-19 10:35 PM
yeah
like a fishing rod?
Dennis13-Oct-19 10:35 PM
reverse fishing rod
(that's basically a grappling hook)
Thanathor13-Oct-19 10:36 PM
pretty much yes
Dennis13-Oct-19 10:37 PM
the fish don't do damage btw, except for pufferfish, which does damage by itself(edited)
that would also need another 20Hz clock because the fish go lightning fast
that also why i haven't done that ink thing yet that blinds players, it needs to detect the player quickly enough(edited)
Bloo13-Oct-19 10:53 PM
I'm sure there is an advancement for firing a crossbow
Gamemode 4 Datapacks. Contribute to Dennis-0/GM4_Datapacks development by creating an account on GitHub.
I just used a scoreboard to check for when a player fires a crossbow but advancement would be better
anyway, here it is if you want to try it yourself
only thing is that when firing a seed at an angle, it will just slide across the ground until the gm4 clock detects it, but I think the only way to fix this is by placing it on a 20hz clock
Contribute to skylinerw/guides development by creating an account on GitHub.
Dennis14-Oct-19 12:14 AM
That sounds very useful, I'm not sure how to use triggers yet but then I'll have something to look into
1
Dennis14-Oct-19 12:12 PM
Updated on github with the advancement trigger
Also needs real advancements, so if anyone got some ideas let me know
Dennis14-Oct-19 01:13 PM
Is there a way to copy a potion effect with for example name 'long_invisibility' to a status effect as id number?
Wanted to give fish fired with tipped arrows that effect
Kroppeb14-Oct-19 01:59 PM
Not that i know
Minecraft is really inconsistent about it
using but numerical and string
I guess you can copy it to a potion and let it fall onto the fish?
Dennis14-Oct-19 02:04 PM
it would give the player the effect as well then
Dennis14-Oct-19 05:11 PM
Other possible additions:
- Fire charge: shoots a blaze fireball (basically better fire module, can be used for griefing)
- Torch: light up caves by shooting the torches in the caves
- Lead: shoot at animal to put a lead on it
I'll just try to add whatever I can think of, they can be disabled very easily by commenting out 1 line
tomh14-Oct-19 05:18 PM
I mean, what about a way to shoot Ghast Balls?
Dennis14-Oct-19 05:27 PM
Thought the smaller ones would make more sense
But could do the big ones instead
Maybe play with damage values
Also because the fire charge is basically a blaze fireball
tomh14-Oct-19 05:50 PM
It probably wouldnt make sense for fire charges, but a way to launch ghast fireballs would be really fun
Dennis14-Oct-19 06:34 PM
What's the difference with the small fireballs?
Or do you just want the bigger balls
Misode14-Oct-19 06:38 PM
Iirc small fireballs can't destroy blocks
Bloo14-Oct-19 06:44 PM
^
Dennis14-Oct-19 07:01 PM
I guess that's a good thing?
Bloo14-Oct-19 07:51 PM
yes
tomh14-Oct-19 08:48 PM
maybe ghast tears could fire off big balls?
ToffeeMax14-Oct-19 09:09 PM
big balls
Fire charge?
tomh14-Oct-19 09:59 PM
fire ball
Dennis14-Oct-19 10:00 PM
fire charge is the item
Dennis15-Oct-19 11:24 AM
Torches are working as well,, just need to get a list of all blocks torches can be placed on
the fireball doesn't seem to work, modifying its nbt doesn't make it move the way i want to(edited)
Misode15-Oct-19 11:50 AM
You need to modify direction iirc
Dennis15-Oct-19 12:04 PM
that makes it move but stops after a couple blocks(edited)
Misode15-Oct-19 12:24 PM
Did you set the life tag?`(edited)
Wait nvm, that has no effect
So probably needs some power
@Dennis
Dennis15-Oct-19 12:27 PM
oh yea power works indeed but copying the motion or direction of the arrow to the fireball didn't do anything
oh maybe they all need to be changed
Dennis15-Oct-19 01:15 PM
github is updated again
(now also has torches)
Dennis15-Oct-19 06:26 PM
for some reason the small fireball is invisible when summoned, it worked when i copy to both power and motion and creates some fire roughly where is aimed(edited)
Dennis15-Oct-19 07:19 PM
Everything seems to work now!, changed the way crops are fired so that works better now
Didn't do the leads because that didn't seem to work
(and leads bug out anyway so would probably break all the time)
Nathan2221116-Oct-19 05:21 PM
what about a full auto.. trait (whatever your calling them)
tomh16-Oct-19 07:08 PM
Full auto crossbows would be hilarious
Dennis16-Oct-19 07:10 PM
on it
(most likely won't be included in the pack though)
Dennis16-Oct-19 07:23 PM
oh nice now I can shoot pufferfish 20 times per second
(if you really want it, just put this command in a repeating command block:
replaceitem entity @p hotbar.0 minecraft:crossbow{Charged:1b,ChargedProjectiles:[{id:"minecraft:arrow",Count:1b}]}
ToffeeMax16-Oct-19 11:36 PM
Still looking for a name @Dennis ?
Since it adds more ammo - what about calling it Cartridges?
Dennis16-Oct-19 11:43 PM
Yes if we can find a better one, but I think the name should tell you what it is
Cartridges could still be anything
Also need name for advancement, currently there's just an advancement for shooting a fish
BluePsychoRanger17-Oct-19 02:29 AM
Crossbow Cartridges ?
1
Thielith17-Oct-19 08:20 AM
"Fish out of water" maybe for advancement name? "Seems fishy" could potentially work too.
Tesset17-Oct-19 06:01 PM
"Like shooting fish in a barrel" seems the obvious one there
tomh17-Oct-19 06:35 PM
Or have that be a secret achievement
ToffeeMax18-Oct-19 02:43 PM
@Dennis Want me to rename this to crossbow cartridges?
Dennis18-Oct-19 02:43 PM
If everyone thinks it's a good name, sure
Andante18-Oct-19 02:44 PM
sounds good
ToffeeMax18-Oct-19 02:44 PM
It is your module /shrug(edited)
grian18-Oct-19 02:44 PM
ooh cartridges sounds fun
ToffeeMax18-Oct-19 02:44 PM
But I get the crowdsourcing side
grian18-Oct-19 02:44 PM
what is this module about
Dennis18-Oct-19 02:44 PM
Download and see
I already made a pullrequest with description
So you can get it from there
grian18-Oct-19 02:45 PM
ah just scrolled up
i wanna start making textures for the RP for this
Dennis18-Oct-19 02:45 PM
Idk if the link i sent earlier still works
grian18-Oct-19 02:45 PM
wait nvm i cant
Dennis18-Oct-19 02:46 PM
I don't think there is need for textures
grian18-Oct-19 02:46 PM
since it doesnt apply anything to the potions itself or smth we cant retexture it
Dennis18-Oct-19 02:46 PM
It doesn't have special items
grian18-Oct-19 02:46 PM
yeah
i thought you were gonna aply some nbt to potions to make them potion cartridges that can be shot by crossbows but i guess not
would've been fun to make some potion in literal cartridges(edited)
Dennis18-Oct-19 02:47 PM
I mean I can add tags to the potions but it's not needed
grian18-Oct-19 02:47 PM
no need dw bout it
Dennis18-Oct-19 02:54 PM
You can also change the advancement name if you want, the current one is kinda like a placeholder
tomh18-Oct-19 07:10 PM
There could be custom textures in terms of load models for the crossbow
Dennis18-Oct-19 07:13 PM
The crossbow doesn't have any tags
Dennis23-Oct-19 11:28 AM
opened a new pull request for the namechange as that seemed easier
ToffeeMax23-Oct-19 05:27 PM
@Dennis Is this PR Open and fully submitted(edited)
Dennis23-Oct-19 05:27 PM
yes
not sure what that means but i submitted the code
and it's done
Dennis25-Oct-19 10:21 AM
Found a small issue, since torches can't be placed on all sides of a stair, you can't shoot a torch at the back side of it
Would it be worth it to add extra commands in case the torch is shot at a stair?
Same for fences/walls and that other blocks like that
Misode25-Oct-19 10:25 AM
Checking stairs seems complicated because you can't use a block tag to check blockstates
Dennis25-Oct-19 10:27 AM
it would just do a similar check like I did with chairs, but would also add 1 command for each exception
Minecraft is so inconsistent.. there's a tag for wool, but none for any of the other blocks with 16 colors, thought I would be able to get rid of half of that list
Bloo25-Oct-19 11:07 AM
Why dont you make a list of blocks that torches can't be placed onto?
Dennis25-Oct-19 11:09 AM
I'm not sure if that list will be much shorter
but I'll try
the folder "better_crossbows" sneaked in my master branch and in the PR. it's basically the same thing but the last commits are in "crossbow_cartridges"(edited)
and I have no clue how to remove that folder
Bloo25-Oct-19 11:14 AM
We could calculate the ratio of faces the torches can stick to vs ones they can't over all blocks
And then make it random
My guess is about 41%
Misode25-Oct-19 11:42 AM
The positive block tag is safer for future compatibility
Dennis25-Oct-19 11:42 AM
so I made the lists, there are 92 lines in the block tags where torches cannot be placed on, and 198 lines where torches can be placed on
Don't you need two block tags, for both side and top variants?
You can place torches on op of anvils and top slabs, but you can't place them on the side
Dennis25-Oct-19 12:01 PM
oh that's true
well it's needed for top half slabs and anvils, now they are just not in the list
but you can't tell it to only do top half slabs in the block tags, right?
Misode25-Oct-19 12:02 PM
Hmm that's right
Dennis25-Oct-19 12:02 PM
so idk if it's worth another block tag just for anvils and possibly another block
(while it's mainly used in caves probably)
Misode25-Oct-19 12:03 PM
Tbh you could just copy the opaque block tag from aestd and be done with it. I don't think anyone will mind
Dennis25-Oct-19 12:03 PM
the list is done already
but there's no anvils for exmaple
Misode25-Oct-19 12:04 PM
They shouldn't be in the list
Dennis25-Oct-19 12:06 PM
so it should work with any block that torches can be placed on at the moment, except for sides of stairs, top slabs, on top of anvils/fence/wall/scaffolding/grindstone/bell/ironbars/glasspane/endrod(edited)
Dennis25-Oct-19 12:13 PM
so we could add another block tag which would have the same as the other blocks, but with above blocks added, if we want to
Misode25-Oct-19 12:29 PM
It might not be worth it as we can't detect blockstates
Dennis25-Oct-19 12:44 PM
I mean without slabs and stairs, the others don't have relevant blockstates
Hmm I just realized I could add some of these blocks to the list, because it wouldnt place the torch if the arrow is not inside an air block
Although it's not really worth it
tomh25-Oct-19 05:33 PM
The pufferfish were better than I could ever imagine
Kroppeb25-Oct-19 06:45 PM
Honestly I think it should always use a torch and just let it drop if it's invalid
You are shooting the torch after all
Dennis25-Oct-19 07:53 PM
True, good one
Dennis25-Oct-19 08:41 PM
Do you think it should give back or consume the arrow when shooting the different projectiles?
Currently it only consumes the arrow when shooting torch/crop(edited)
Dennis25-Oct-19 09:01 PM
Changed it so it takes away the torch directly when shooting it and drops when not placing the torch. Only downside I can think of is that when hitting a mob with that arrow, the torch is gone
Dennis25-Oct-19 10:59 PM
should this be possible? in vanilla it's only possible to place a torch on top, but this doesn't seem unreasonable
grian25-Oct-19 11:17 PM
if its not possible on vanilla then imo dont do it
BluePsychoRanger26-Oct-19 12:18 AM
when placing the torch, clone the block it's on back to it's place (as long as it's not a skull or double tall plant or piston head, but the first whitelist should take care of that) to force a block update
Also, the arrow should always be consumed when firing the crossbow, I think of it as attaching the thing to the arrow then shooting it
1
Kroppeb26-Oct-19 06:49 AM
Mmh, what happens if you clone the torch to itself?
BluePsychoRanger26-Oct-19 07:02 AM
nothing happens, the torch doesn't pop off
Dennis28-Oct-19 10:57 AM
(Just making a new PR because the other one was a mess, there are files that shouldnt even be there and this one has many file name changes)(edited)
Dennis28-Oct-19 11:05 AM
Can I just create a new fork of master? there are some commits in mine which I can't remove and I just want a fresh master without it saying my branch is many commits ahead of gamemode4dev
Misode28-Oct-19 11:25 AM
If you don't have any other open PRs, deleting your fork is the easiest
I've completely messed up the master branch of my forked git repo.
I want to completely reset the master branch that was pushed to my fork with the contents of the upstream master repo. I have no
@Dennis
Also I'm not sure what the problem was. Commits gets squashed anyways
Dennis28-Oct-19 11:28 AM
I've used the browser for everything so far, but I guess this would work as well
well the problem was that another folder was in the PR, but i found a way to delete that now
Misode28-Oct-19 12:17 PM
Omg Dennis what did you do
This PR is even worse
Dennis28-Oct-19 01:16 PM
Yep
But at least this one only has the files it's supposed to have
grian28-Oct-19 01:19 PM
dennis bad pepega
Dennis28-Oct-19 01:19 PM
If you ignore the delete commits, the PR is good
Kroppeb28-Oct-19 01:52 PM
breathes
Can I suggest using git bash
and just squashing all your commits
Dennis29-Oct-19 04:08 PM
Added sounds, thought those were still missing
I tried squashing those other commits but that didn't work, is it a problem if it's kept like this?
Kroppeb29-Oct-19 04:20 PM
It's ugly
do you have git bash installed?
Misode29-Oct-19 04:33 PM
Tbh it's not that big of a deal, they will be squashed later
Dennis29-Oct-19 05:18 PM
I do have git bash
But when I tried to do it in another branch it didnt work
Dennis01-Dec-19 04:44 PM
About that last comment, the torch indeed gets lost if an entity is hit. Ideally it would drop the torch at that entity, but I'm not sure how exactly. I don't think the damage is really a problem as throwing a torch at someone would still hurt
Bloo01-Dec-19 05:18 PM
This is fine. You're shooting a mob
Dennis02-Dec-19 01:17 PM
So I can add that items can also be used to shoot fish as in #idea-discussion , but for how long should it stay alive?
Currently they die after 2 seconds
Misode02-Dec-19 01:35 PM
Oh that's quite short
Dennis02-Dec-19 02:34 PM
It is, but that's without any extra nbt, just wither effect
And I couldnt really find a good way to stop the player from picking up the fish with a bucket
Misode02-Dec-19 03:42 PM
Can they be picked up while not in water?
Dennis02-Dec-19 03:54 PM
Yes
Any time with a water bucket
Dennis12-Dec-19 02:59 PM
I haven't really finished this because I didn't get more feedback, is there any way to prevent a fish from being picked up? Otherwise it could just turn the fish items into alive fish but I'm not sure if we want that
Misode12-Dec-19 03:00 PM
If you pick up a fish, does it preserve nbt?
Dennis12-Dec-19 03:00 PM
I think it's just a normal pufferfish bucket item
Misode12-Dec-19 03:00 PM
If so you could just give it an empty loot table
Dennis12-Dec-19 03:02 PM
yes it loses its data
Misode12-Dec-19 03:03 PM
Yeah just tested
Dennis12-Dec-19 03:24 PM
was hoping at least the ghast would have a hitbox big enough to cover the fish, but sadly no