SteamWar/MissileWars
Archiviert
13
0

Fix Missle Info

Dieser Commit ist enthalten in:
jojo 2020-09-18 21:29:10 +02:00
Ursprung 4ffb9d8b37
Commit 1b21eb2af1

Datei anzeigen

@ -22,6 +22,7 @@ package de.steamwar.misslewars.items;
import com.sk89q.worldedit.EditSession; import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.bukkit.BukkitWorld; import com.sk89q.worldedit.bukkit.BukkitWorld;
import com.sk89q.worldedit.extent.clipboard.BlockArrayClipboard;
import com.sk89q.worldedit.extent.clipboard.Clipboard; import com.sk89q.worldedit.extent.clipboard.Clipboard;
import com.sk89q.worldedit.extent.clipboard.io.ClipboardFormat; import com.sk89q.worldedit.extent.clipboard.io.ClipboardFormat;
import com.sk89q.worldedit.extent.clipboard.io.ClipboardFormats; import com.sk89q.worldedit.extent.clipboard.io.ClipboardFormats;
@ -131,12 +132,13 @@ public class Missile extends SpecialItem {
private int count() { private int count() {
int tntCount = 0; int tntCount = 0;
BlockVector3 dimensions = clipboard.getDimensions(); BlockArrayClipboard arrayClipboard = (BlockArrayClipboard)clipboard;
Bukkit.getLogger().log(Level.SEVERE, clipboard.getBlock(BlockVector3.at(0, 0, 0)).getBlockType().toString()); BlockVector3 dimensions = arrayClipboard.getDimensions();
Bukkit.getLogger().log(Level.SEVERE, arrayClipboard.getBlock(BlockVector3.at(0, 0, 0)).getBlockType().toString());
for (int x = 0; x < dimensions.getX(); x++) { for (int x = 0; x < dimensions.getX(); x++) {
for (int y = 0; y < dimensions.getY(); y++) { for (int y = 0; y < dimensions.getY(); y++) {
for (int z = 0; z < dimensions.getZ(); z++) { for (int z = 0; z < dimensions.getZ(); z++) {
if (clipboard.getBlock(BlockVector3.at(x, y, z)).getBlockType() == TNT) { if (arrayClipboard.getBlock(BlockVector3.at(x, y, z)).getBlockType() == TNT) {
tntCount++; tntCount++;
} }
} }