Browse Source

Removing 1_12 module

RedstoneFuture 2 years ago
parent
commit
87d0681765

+ 0 - 42
1_12/pom.xml

@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-  ~ This file is part of MissileWars (https://github.com/Butzlabben/missilewars).
-  ~ Copyright (c) 2018-2021 Daniel Nägele.
-  ~
-  ~ MissileWars is free software: you can redistribute it and/or modify
-  ~ it under the terms of the GNU General Public License as published by
-  ~ the Free Software Foundation, either version 3 of the License, or
-  ~ (at your option) any later version.
-  ~
-  ~ MissileWars 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 General Public License for more details.
-  ~
-  ~ You should have received a copy of the GNU General Public License
-  ~ along with MissileWars.  If not, see <https://www.gnu.org/licenses/>.
-  -->
-
-<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xmlns="http://maven.apache.org/POM/4.0.0"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-    <parent>
-        <artifactId>missilewars</artifactId>
-        <groupId>de.butzlabben</groupId>
-        <version>1.0</version>
-    </parent>
-
-    <modelVersion>4.0.0</modelVersion>
-
-    <artifactId>1_12</artifactId>
-
-    <dependencies>
-        <!-- WorldEdit API -->
-        <dependency>
-            <groupId>com.sk89q</groupId>
-            <artifactId>worldedit</artifactId>
-            <version>6.0.0-SNAPSHOT</version>
-            <scope>provided</scope>
-        </dependency>
-    </dependencies>
-</project>

+ 0 - 61
1_12/src/main/java/de/butzlabben/missilewars/missile/paste/r1_12/BlockFilterExtent.java

@@ -1,61 +0,0 @@
-/*
- * This file is part of MissileWars (https://github.com/Butzlabben/missilewars).
- * Copyright (c) 2018-2021 Daniel Nägele.
- *
- * MissileWars is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * MissileWars 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with MissileWars.  If not, see <https://www.gnu.org/licenses/>.
- */
-
-package de.butzlabben.missilewars.missile.paste.r1_12;
-
-import com.sk89q.worldedit.Vector;
-import com.sk89q.worldedit.WorldEditException;
-import com.sk89q.worldedit.blocks.BaseBlock;
-import com.sk89q.worldedit.blocks.BlockID;
-import com.sk89q.worldedit.extent.AbstractDelegateExtent;
-import com.sk89q.worldedit.extent.Extent;
-
-/**
- * @author Butzlabben
- * @since 28.09.2018
- */
-public class BlockFilterExtent extends AbstractDelegateExtent {
-
-    private byte data;
-
-    protected BlockFilterExtent(Extent extent) {
-        super(extent);
-    }
-
-    public BlockFilterExtent(Extent extent, byte data) {
-        this(extent);
-        this.data = data;
-    }
-
-    @Override
-    public BaseBlock getBlock(Vector position) {
-        BaseBlock block = super.getBlock(position);
-        if (block.getId() == BlockID.STAINED_GLASS_PANE)
-            block.setData(data);
-        if (block.getId() == BlockID.STAINED_GLASS)
-            block.setData(data);
-        return block;
-    }
-
-    @Override
-    public boolean setBlock(Vector location, BaseBlock block) throws WorldEditException {
-        if (block.getId() == 160)
-            block.setData(data);
-        return super.setBlock(location, block);
-    }
-}

+ 0 - 117
1_12/src/main/java/de/butzlabben/missilewars/missile/paste/r1_12/R1_12Paster.java

@@ -1,117 +0,0 @@
-/*
- * This file is part of MissileWars (https://github.com/Butzlabben/missilewars).
- * Copyright (c) 2018-2021 Daniel Nägele.
- *
- * MissileWars is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * MissileWars 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with MissileWars.  If not, see <https://www.gnu.org/licenses/>.
- */
-
-package de.butzlabben.missilewars.missile.paste.r1_12;
-
-import com.sk89q.worldedit.EditSession;
-import com.sk89q.worldedit.Vector;
-import com.sk89q.worldedit.WorldEdit;
-import com.sk89q.worldedit.bukkit.BukkitWorld;
-import com.sk89q.worldedit.extent.Extent;
-import com.sk89q.worldedit.extent.clipboard.Clipboard;
-import com.sk89q.worldedit.extent.clipboard.io.ClipboardFormat;
-import com.sk89q.worldedit.extent.transform.BlockTransformExtent;
-import com.sk89q.worldedit.function.mask.ExistingBlockMask;
-import com.sk89q.worldedit.function.operation.ForwardExtentCopy;
-import com.sk89q.worldedit.function.operation.Operations;
-import com.sk89q.worldedit.math.transform.AffineTransform;
-import com.sk89q.worldedit.regions.CuboidRegion;
-import com.sk89q.worldedit.world.World;
-import com.sk89q.worldedit.world.registry.WorldData;
-import java.io.File;
-import java.io.FileInputStream;
-import java.util.HashSet;
-import java.util.Set;
-import org.bukkit.Material;
-import org.bukkit.block.Block;
-import org.bukkit.plugin.java.JavaPlugin;
-import org.bukkit.scheduler.BukkitRunnable;
-
-/**
- * @author Butzlabben
- * @since 23.09.2018
- */
-public class R1_12Paster {
-
-    public void pasteMissile(File schematic, org.bukkit.util.Vector pos, int rotation, org.bukkit.World world,
-                             byte data, int radius, Material replaceType, JavaPlugin plugin, int replaceTicks) {
-        try {
-            Vector position = new Vector(pos.getX(), pos.getY(), pos.getZ());
-
-            World weWorld = new BukkitWorld(world);
-            WorldData worldData = weWorld.getWorldData();
-            Clipboard clipboard = ClipboardFormat.SCHEMATIC.getReader(new FileInputStream(schematic)).read(worldData);
-            EditSession session = WorldEdit.getInstance().getEditSessionFactory().getEditSession(weWorld, -1);
-            AffineTransform transform = new AffineTransform();
-
-            transform = transform.rotateY(rotation);
-            Extent extent = new BlockTransformExtent(clipboard, transform, worldData.getBlockRegistry());
-            extent = new BlockFilterExtent(extent, data);
-
-            ForwardExtentCopy copy = new ForwardExtentCopy(extent, clipboard.getRegion(), clipboard.getOrigin(),
-                    session, position);
-
-            if (!transform.isIdentity())
-                copy.setTransform(transform);
-
-            copy.setSourceMask(new ExistingBlockMask(extent));
-
-            Operations.completeLegacy(copy);
-
-            // Replace given blocks
-            Set<Block> replace = new HashSet<>();
-            Vector min = new Vector(position.getX() - radius, position.getY() - radius, position.getZ() - radius);
-            Vector max = new Vector(position.getX() + radius, position.getY() + radius, position.getZ() + radius);
-            for (Vector v : new CuboidRegion(min, max)) {
-                Block b = world.getBlockAt(v.getBlockX(), v.getBlockY(), v.getBlockZ());
-                if (b.getType() == replaceType) {
-                    replace.add(b);
-                }
-            }
-            new BukkitRunnable() {
-                @Override
-                public void run() {
-                    replace.forEach(b -> b.setType(Material.AIR));
-                }
-            }.runTaskLater(plugin, replaceTicks);
-
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-
-    public void pasteSchematic(File schematic, org.bukkit.util.Vector pos, org.bukkit.World world) {
-        try {
-            Vector position = new Vector(pos.getX(), pos.getY(), pos.getZ());
-
-            World weWorld = new BukkitWorld(world);
-            WorldData worldData = weWorld.getWorldData();
-            Clipboard clipboard = ClipboardFormat.SCHEMATIC.getReader(new FileInputStream(schematic)).read(worldData);
-            EditSession session = WorldEdit.getInstance().getEditSessionFactory().getEditSession(weWorld, -1);
-
-            ForwardExtentCopy copy = new ForwardExtentCopy(clipboard, clipboard.getRegion(), clipboard.getOrigin(),
-                    session, position);
-
-            copy.setSourceMask(new ExistingBlockMask(clipboard));
-            Operations.completeLegacy(copy);
-
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-}

+ 0 - 6
missilewars-plugin/pom.xml

@@ -48,12 +48,6 @@
     </repositories>
 
     <dependencies>
-        <dependency>
-            <groupId>de.butzlabben</groupId>
-            <artifactId>1_12</artifactId>
-            <version>1.0</version>
-            <scope>compile</scope>
-        </dependency>
         <dependency>
             <groupId>de.butzlabben</groupId>
             <artifactId>1_13</artifactId>

+ 0 - 1
pom.xml

@@ -34,7 +34,6 @@
 
     <modules>
         <module>1_13</module>
-        <module>1_12</module>
         <module>1_13_FAWE</module>
         <module>1_16_FAWE</module>
         <module>missilewars-plugin</module>