
ich programmiere zurzeit ein Minigame dort sollen Blöcke nach Prozent angaben gesetzt werden wie bei WorldEdit.
Ich habe mir das Video von Postcrafter angesehen https://www.youtube.com/watch?v=xxzrLHDrJ-A&index=20&list=PLjoTjjrsr0yYl-PE3VUJ7J4MTdq5XWQ-H
ich habe aber keine einzige Idee wie ich das mit den Prozenten machen soll.
Es soll dan ungefähr so aussehen:

Das ist der Code von PostCrafter:
- Code: Alles auswählen
- public void set(Material m, byte d){
- for(int x = this.minX; x <= this.maxX; x++){
- for(int y = this.minY; y <= this.maxY; y++){
- for(int z = this.minZ; z <= this.maxZ; z++){
- Block b = this.world.getBlockAt(x, y, z);
- b.setType(m);
- b.setData(d);
- }
- }
- }
- }
So sollen zum Beispiel die Prozente aussehen:
5% Eisenerz
10% Redstoneerz
3% Diamanterz
15% Kohleerz
67% Stein
Ich hoffe ihr könnt mir helfen.