Fix Particle

This commit is contained in:
2024-12-01 17:12:48 +01:00
parent 37072b1f49
commit 47cca70d95
7 changed files with 89 additions and 12 deletions
@@ -0,0 +1,28 @@
/*
* This file is a part of the SteamWar software.
*
* Copyright (C) 2024 SteamWar.de-Serverteam
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package de.steamwar.core;
import org.bukkit.Particle;
public interface TrickyParticleWrapper {
public TrickyParticleWrapper impl = VersionDependent.getVersionImpl(Core.getInstance());
Particle getVillagerHappy();
}
@@ -20,7 +20,6 @@
package de.steamwar.core;
import org.bukkit.Material;
import org.bukkit.Particle;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.EntityType;
import org.bukkit.inventory.InventoryView;
@@ -34,9 +33,5 @@ public interface TrickyTrialsWrapper {
Material getTurtleScute();
default Particle getVillagerHappyParticle() {
return Particle.VILLAGER_HAPPY;
}
String getInventoryTitle(InventoryView view);
}
@@ -68,7 +68,7 @@ public class WorldEditRenderer {
Transform transform = session.getClipboard().getTransform();
Vector a = WorldEditWrapper.impl.applyTransform(WorldEditWrapper.impl.getMinimum(region).subtract(WorldEditWrapper.impl.getOrigin(clipboard)), transform).add(pos);
Vector b = WorldEditWrapper.impl.applyTransform(WorldEditWrapper.impl.getMaximum(region).subtract(WorldEditWrapper.impl.getOrigin(clipboard)), transform).add(pos);
drawCuboid(Vector.getMinimum(a, b), Vector.getMaximum(a, b), TrickyTrialsWrapper.impl.getVillagerHappyParticle(), player);
drawCuboid(Vector.getMinimum(a, b), Vector.getMaximum(a, b), TrickyParticleWrapper.impl.getVillagerHappy(), player);
} catch (EmptyClipboardException e) {
//ignore
}