mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Updated to Sponge 4.0
This commit is contained in:
parent
0fd603bbd8
commit
04cf831a33
@ -18,7 +18,7 @@ apply plugin: 'net.minecraftforge.gradle.forge'
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile project(':worldedit-core')
|
compile project(':worldedit-core')
|
||||||
compile 'org.spongepowered:spongeapi:3.1.0-SNAPSHOT'
|
compile 'org.spongepowered:spongeapi:4.+'
|
||||||
testCompile group: 'org.mockito', name: 'mockito-core', version:'1.9.0-rc1'
|
testCompile group: 'org.mockito', name: 'mockito-core', version:'1.9.0-rc1'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ public abstract class SpongeWorld extends AbstractWorld {
|
|||||||
BlockState newState = getBlockState(block);
|
BlockState newState = getBlockState(block);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
world.setBlock(pos, newState, notifyAndLight, Cause.of(SpongeWorldEdit.container()));
|
world.setBlock(pos, newState, notifyAndLight, Cause.source(SpongeWorldEdit.container()).build());
|
||||||
} catch (PositionOutOfBoundsException ex) {
|
} catch (PositionOutOfBoundsException ex) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -204,7 +204,7 @@ public abstract class SpongeWorld extends AbstractWorld {
|
|||||||
if (optItem.isPresent()) {
|
if (optItem.isPresent()) {
|
||||||
org.spongepowered.api.entity.Entity entity = optItem.get();
|
org.spongepowered.api.entity.Entity entity = optItem.get();
|
||||||
entity.offer(Keys.REPRESENTED_ITEM, SpongeWorldEdit.toSpongeItemStack(item).createSnapshot());
|
entity.offer(Keys.REPRESENTED_ITEM, SpongeWorldEdit.toSpongeItemStack(item).createSnapshot());
|
||||||
getWorld().spawnEntity(entity, Cause.of(SpongeWorldEdit.container()));
|
getWorld().spawnEntity(entity, Cause.source(SpongeWorldEdit.container()).build());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -285,7 +285,7 @@ public abstract class SpongeWorld extends AbstractWorld {
|
|||||||
new Vector3d(dir.getX(), dir.getY(), dir.getZ())
|
new Vector3d(dir.getX(), dir.getY(), dir.getZ())
|
||||||
);
|
);
|
||||||
|
|
||||||
if (world.spawnEntity(newEnt, Cause.of(SpongeWorldEdit.container()))) {
|
if (world.spawnEntity(newEnt, Cause.source(SpongeWorldEdit.container()).build())) {
|
||||||
return new SpongeEntity(newEnt);
|
return new SpongeEntity(newEnt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user