Skip to content

Commit

Permalink
Fix compilation for 1.10.2.
Browse files Browse the repository at this point in the history
  • Loading branch information
wizjany committed May 24, 2019
1 parent df3765b commit c09da8c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions build.gradle
Expand Up @@ -33,11 +33,17 @@ dependencies {
compile 'com.google.code.findbugs:jsr305:1.3.9'
compile 'com.owlike:genson:1.3'
compile 'com.me4502:ModularFramework:1.5'
compile 'com.sk89q.worldedit:worldedit-sponge-mc1.10.2:6.1.4-SNAPSHOT:dev'
compile 'com.sk89q.worldedit:worldedit-sponge-mc1.10.2:6.1.4-SNAPSHOT'
testCompile 'org.mockito:mockito-core:2.+'
testCompile 'junit:junit:5.+'
}

configurations.all {
resolutionStrategy {
force 'org.spongepowered:spongeapi:5.2.0-SNAPSHOT'
}
}

if (JavaVersion.current().isJava8Compatible()) {
// Java 8 turns on doclint which we fail
tasks.withType(Javadoc) {
Expand Down Expand Up @@ -205,4 +211,4 @@ println """
Output files will be in build/libs
*******************************************
"""
"""
Expand Up @@ -52,7 +52,7 @@
import java.util.concurrent.ThreadLocalRandom;
import java.util.function.Consumer;

@Module(moduleName = "BetterPhysics", onEnable="onInitialize", onDisable="onDisable")
@Module(moduleName = "BetterPlants", onEnable="onInitialize", onDisable="onDisable")
public class BetterPlants extends SpongeBlockMechanic implements DocumentationProvider {

@Inject
Expand Down Expand Up @@ -96,7 +96,7 @@ public void onBlockBreak(ChangeBlockEvent.Break event, @First Player player) {
if (player.get(Keys.GAME_MODE).orElse(GameModes.SURVIVAL) != GameModes.CREATIVE) {
Item item = (Item) snapshot.getLocation().get().getExtent().createEntity(EntityTypes.ITEM, snapshot.getPosition());
item.offer(Keys.REPRESENTED_ITEM, ItemStack.builder().itemType(ItemTypes.TALLGRASS).add(Keys.SHRUB_TYPE, ShrubTypes.FERN).build().createSnapshot());
snapshot.getLocation().get().spawnEntity(item, CraftBookPlugin.spongeInst().getCause().build());
snapshot.getLocation().get().getExtent().spawnEntity(item, CraftBookPlugin.spongeInst().getCause().build());
}
}).submit(CraftBookPlugin.spongeInst().getContainer()));
}
Expand Down

0 comments on commit c09da8c

Please sign in to comment.