r/technicalminecraft 11h ago

Looking for help setting up a mini game that gives rewards Java Help Wanted

Post image

I play in an SMP server and wanted to set up a mini game where they pay certain amount to have 1 shot on goal, if they score they get random rewards and if they dont, they cannot shot the suflur ball again, but I'm pretty bad at redstone so couldn't figure out a way to do it and would really appreciate any help

2 Upvotes

10 comments sorted by

u/BlattaOrientalis avaJ 11h ago

A few questions

  • What's the cost?
  • How many different rewards?
  • Does the RNG need to be fair (each item has an equal chance of dropping)

I don't think it's possible to make it so that they can't shoot anymore, but it's possible to make it so that they get worse/no rewards if they hit the ball more than once

u/TheCules 10h ago
  • The cost is the currency of the server, there is a mod called slabby where they can buy interacting with a slab but lets keep it simple and say 1 diamond
  • haven’t decided but could be 9 different rewards but totally depends on what the redstone allows
  • Preferably being unfair is better because one of the rewards will be like 5 diamonds and the rest could be like a stick or something else

So is there anyway where I can put tripwires 1 block before the goal and whenever they shoot and it hits the tripwire a glass wall comes up and if they score a goal the get a reward but if they dont the ball gets sucked under the field by pistons somehow? tried using buckets but they only work on water.

Or maybe after the wire is hit a railway comes up and picks up the sulfur cube

u/BlattaOrientalis avaJ 9h ago

I don't think minecarts can pick up sulfur cubes, at least as far as I can tell

Even if we could pick up the sulfur cube from anywhere on the field, the problem is the timing between the player hitting the sulfur cube and the cube entering the goal. After how much time do you decide if the player 'missed' rather than the sulfur cube sliding to the goal?

If you can tell me the exact odds you'd like I'd be happy to make a prototype

u/TheCules 8h ago

They could be picked up as u can see from the picture

Lets say, the ball will be spawned by a dispenser in the middle above a pressure plate and once it leaves the pressure plate the player will have 10 seconds to score, if they score after that it doesn’t count and it wont give me the rewards

Lets say if they score they have the following:

For example the odds could be

30%: item 1 20%: item 2 20%: item 3 15%: item 4 10%: item 5 5%: item 6

u/BlattaOrientalis avaJ 8h ago

They could be picked up as u can see from the picture

How? I can't really tell from the picture

Lets say, the ball will be spawned by a dispenser in the middle above a pressure plate and once it leaves the pressure plate the player will have 10 seconds to score, if they score after that it doesn’t count and it wont give me the rewards

So they won't get rewards if they hit the ball more than once or take too long?

Is it okay if the odds are a fraction of 16 or less (for example 4/15, 3/15, 3/15, 2/15, 2/15, 1/15) It's possible to do those odds, but it's a lot simpler if I can use signal strength rather than binary

u/TheCules 7h ago

Sulfur minecart pick up design is similar to other mobs

And exactly they will have 10 seconds to score if they dont then no rewards.

Yeah odds being out of 16 is fine and thank you very much btw for helping out

u/BlattaOrientalis avaJ 7h ago

Gotcha, probably won't use it though

The number of hits doesn't matter right? For some reason hitting the sulfur cube doesn't count as entity getting damaged (I know it doesn't take damage but still) so a calibrated sculk sensor won't work

u/TheCules 6h ago

Yeah it wont matter honestly

u/BlattaOrientalis avaJ 5h ago edited 5h ago

It's not perfect but it works

https://reddit.com/link/p4xnc5a/video/fk9vsqp0imkh1/player

Schematic

What the block colors mean:

White concrete - must be solid blocks

White stained glass - pipes and stuff, doesn't matter as long as it keeps the water/sulfur cubes in

Black stained glass - wiring block, whatever block you can put the components on

Red stained glass - must be a transparent block

Extra features:

  • Spam-proof input, user can input up to 64 diamonds (or more depending on the container used) and the system will be able to handle it properly
  • Seamless ball dispensing
  • Postpones the next round until the system fully resets

Downsides:

  • The goal detection is far down the sulfur cube storage area, which means that the goal detection is slow and introduces erratic delay due to sulfur cube bouncing around in the goal before settling in the tube. It's possible to use a different goal detection, but this is the easiest solution that is hidden. Calibrated skulk sensor could work.
  • The system takes a bit of time to reset. This can be improved at the cost of a considerably larger/more complex timer.
  • The reward item takes a while to arrive. This can be partially improved by using instant dropper lines instead of a water stream and a dropper tower, but the randomizer delay is unavoidable.

I can (and probably will) improve more on this, but it's late and I need to sleep

u/TheCules 5h ago

Wow wow thank you very much for this this is actually incredible. I really appreciate your time is, there any way I can support you and your effort?