#Coding within a resource pack
75 messages · Page 1 of 1 (latest)
a resource pack is purely client side and hence cannot edit anything that would affect everybody
darn it, thanks anyways. is there any other way i can do it without coding into the vanilla game?
or is command blocks/vanilla modding the only option
your options are data packs (or placed command blocks I guess), mods or plugins
ohh sweet, how would you do data packs?
if i ever plan to release my resource pack ill include a data pack with it
Well, they are two separate things though
A data pack needs to be installed on the world, a resource pack is a client side thing (well, I guess servers/worlds can enforce a resource pack, but still).
hmm, so i could have a dedicated server for it that has the data pack, then has the resource pack? would that work?
my verdict here is that im trying to have two entities with randomized textures, and one entity has to circle around the other entity. maybe that could spark some solutions
"two entities with randomized textures" -> not possible in vanilla (if we are talking about actual entities like a zombie)
like, two different mobs, sorry. i know how to randomize textures for mobs, but im trying to have one circle around the other
hopefully that makes sene
sense*
like a planet or what?
yeah! basically like an entity orbiting another entity
thats a much easier way to look at it
Well, the complicated part with that would basically be that you need some kind of "ID" score system, so your code knows which entity has to orbit around which entity (instead of all orbiters around one entity).
Then it would just be a matter of rotating the orbiting entity and teleporting it relative to the center entity based on the orbiting entity's rotation
oh jeez coding is not my strong suit
do you know how i could do all that?
thanks for all your help btw
well, you'd need to know the basics of minecraft commands for me to be able to help you (without me literally coding everything for you basically)
fair, guess i gotta hit the books
waittt
are command blocks like
the same coding language as mc
function files in data packs use the ingame commands, yes
ohhhhHHHHHHHH
hmmm
finding videos for this specific command is gonna be challenging
oh btw @sturdy nimbus while i have you here, is there a way to make entirely new entities instead of replacing existing ones with a resource pack?
best you can do is fake one (like all datapacks and plugins do)
as in have a bunch of item models on a bunch of item display entities or similar and teleport/rotate them around to fake animations + maybe a normal invisible entity for behaviour and hitbox (or some custom written "behaviour" with ingame commands)
ohh ok
i actually found out how to make entities spin
so ill just do that and add a following function to it
@sturdy nimbus question for ya
/execute at @e[type=cat,limit=1] facing entity @p[distance=1..] feet run teleport @e[type=cat,limit=1] ^ ^ ^0.8
i found this command on a youtube video, how can i edit this so that a husk follows a snow golem?
replace cat with husk and the @p part with a snowgolem selector
snowgolem selector?
well, just like they select a cat there
though that command is pretty badly written, and would behave weirdly with several mobs
oh
thats the best video i found on what im trying to do
i just need the folowwing part now as i animated the orbiting itself in blockbench
yeah, "entities" in general probably ain't the best thing to start with when one is new with command
is there an easier way to have entities follow a different entity?
I mean, if you animate the orbiting in Blockbench you could probably just have one entity ride the other, no?
wdym?
i cant have the entities in one cause i'd like each of them to be randomized
ohh wait i think i get it
how would you do that?
well, if the orbiting movement is controlled by the animation, it doesn't matter if the husk is 1 block behind the other or riding it, right? (as long as you adjust the animation according to that)
sorry its 3:25 in the morning for me im kinda slow
true, when riding do you mean as though a player is riding a horse?
yes, or like a spider jockey
ohh yeaaaa
so /summon snow_golem ~ ~ ~ {Passengers:[{id:"minecraft:husk"}]} for example (though in that command the two would attack each other I guess)
yep that works completely
how can you make them so they dont attack? sorry if im asking too much
I'm not actually sure if there is a good way without disabling both their AI completely 🤔 ?
(assuming they dod attack each other atm)
should i use a different mob besides husk?
would help, yeah
no
epic, ill use that
hey do you know how to spawn snow golems without the pumpkin?
For you I'd suggest using a command generator like this btw.:
https://mcstacker.net/
And the command would be: /summon snow_golem ~ ~ ~ {Pumpkin:0b,Passengers:[{id:"minecraft:villager"}]}
@sturdy nimbus btw, thanks so, so much for all your help
i wanna find a way to make the Husk work since its an obscure mob that i wont replace with anything
@sturdy nimbus could you help me find ways to make the snow golem stop trying to shoot the husk? i tried putting them on a team. they dont get damaged, but it still shoots snowballs
or how could i stop the snowballs itself
nevermind! it was shooting snowballs at the entities i accidentally made invisivl3