Skip to content

Commit

Permalink
Version 1.6.1
Browse files Browse the repository at this point in the history
Fix build for recent Vector-related API changes in WorldEdit.
(EngineHub/WorldEdit@399e0ad)
  • Loading branch information
totemo committed Nov 7, 2018
1 parent 0d45a91 commit a6ac19e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>net.sothatsit</groupId>
<artifactId>blockstore</artifactId>
<version>1.6.0</version>
<version>1.6.1</version>
<packaging>jar</packaging>

<properties>
Expand Down Expand Up @@ -54,4 +54,4 @@
</dependency>
</dependencies>

</project>
</project>
9 changes: 5 additions & 4 deletions src/main/java/net/sothatsit/blockstore/WorldEditHook.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package net.sothatsit.blockstore;

import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.event.extent.EditSessionEvent;
import com.sk89q.worldedit.extent.AbstractDelegateExtent;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.util.eventbus.Subscribe;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.block.BlockStateHolder;

import net.sothatsit.blockstore.chunkstore.BlockLoc;
import net.sothatsit.blockstore.chunkstore.ChunkManager;
import net.sothatsit.blockstore.chunkstore.ChunkStore;
Expand All @@ -17,7 +18,7 @@ public class WorldEditHook {
void register() {
WorldEdit.getInstance().getEventBus().register(this);
}

@Subscribe
public void wrapForLogging(EditSessionEvent event) {
World world = event.getWorld();
Expand All @@ -28,13 +29,13 @@ public void wrapForLogging(EditSessionEvent event) {
final ChunkManager manager = BlockStore.getInstance().getManager(world.getName());
event.setExtent(new AbstractDelegateExtent(event.getExtent()) {
@Override
public boolean setBlock(Vector pos, BlockStateHolder block) throws WorldEditException {
public boolean setBlock(BlockVector3 pos, BlockStateHolder block) throws WorldEditException {
BlockLoc blockLoc = BlockLoc.fromLocation(pos.getX(), pos.getY(), pos.getZ());
ChunkStore store = manager.getChunkStore(blockLoc.chunkLoc, true);
store.setPlaced(blockLoc, false);
return getExtent().setBlock(pos, block);
}
});
}

}

0 comments on commit a6ac19e

Please sign in to comment.