diff --git a/changelog.md b/changelog.md index a8b8596..5084db6 100644 --- a/changelog.md +++ b/changelog.md @@ -1 +1,2 @@ -- Updated to Minecraft 1.12. +- Fixed [fallen concrete powder not turning into concrete](https://github.com/delvr/Repose/issues/12). +- No longer [altering behavior of non-granular falling blocks](https://github.com/delvr/Repose/issues/13). diff --git a/gradle.properties b/gradle.properties index d0adc40..a2957f8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,11 +1,11 @@ -modVersion=1.5 +modVersion=1.5.1 modDependencies=farseek@[2,3) modDescription=This mod allows you to walk up and down hills without jumping. Give your spacebar a break! modUrl=http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2076319-repose-walkable-soil-slopes-give-your-spacebar-a -gradleWrapperVersion=4.1 +gradleWrapperVersion=4.3 forgeRevision=2443 -mcpMappings=snapshot_20170828 +mcpMappings=snapshot_20171030 curseForgeId=220524 curseForgeReleaseType=release diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..92165ee --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-bin.zip diff --git a/gradlew b/gradlew index 4453cce..cccdd3d 100644 --- a/gradlew +++ b/gradlew @@ -33,11 +33,11 @@ DEFAULT_JVM_OPTS="" # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" -warn ( ) { +warn () { echo "$*" } -die ( ) { +die () { echo echo "$*" echo @@ -155,7 +155,7 @@ if $cygwin ; then fi # Escape application args -save ( ) { +save () { for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done echo " " } diff --git a/src/main/scala/repose/block/FallingBlockExtensions.scala b/src/main/scala/repose/block/FallingBlockExtensions.scala index 9803918..c5d0ae1 100644 --- a/src/main/scala/repose/block/FallingBlockExtensions.scala +++ b/src/main/scala/repose/block/FallingBlockExtensions.scala @@ -32,7 +32,7 @@ object FallingBlockExtensions { implicit val world = w if(block.canFallFrom(pos)) w.scheduleUpdate(pos, block, block.fallDelay) - else if(!block.isInstanceOf[BlockFalling]) + else block.onBlockAdded(w, pos, state) } @@ -48,7 +48,7 @@ object FallingBlockExtensions { implicit val world = w if(!canDisplace(formerNeighbor) && block.canFallFrom(pos)) w.scheduleUpdate(pos, block, block.fallDelay) - else if(!block.isInstanceOf[BlockFalling]) + else block.neighborChanged(state, w, pos, formerNeighbor, neighborPos) } @@ -56,7 +56,7 @@ object FallingBlockExtensions { implicit val world = w if(block.canFallFrom(pos)) block.fallFrom(pos, pos) - else if(!block.isInstanceOf[BlockFalling]) + else block.updateTick(w, pos, state, random) } @@ -111,15 +111,13 @@ object FallingBlockExtensions { def fallDelay = FallDelay - def canFall(implicit w: World) = !w.isRemote && (block.isInstanceOf[BlockFalling] || - (granularFall && reposeGranularBlocks.value.contains(block))) + def canFall(implicit w: World) = !w.isRemote && granularFall && reposeGranularBlocks.value.contains(block) def canSpread(implicit w: World) = canFall && blockSpread def canSpreadInAvalanche(implicit w: World) = !EnviroMineLoaded && canSpread && avalanches && !block.isSoil - def canFallFrom(pos: BlockPos)(implicit w: World) = - canFall && canDisplace(blockAt(pos.down)) + def canFallFrom(pos: BlockPos)(implicit w: World) = canFall && canDisplace(blockAt(pos.down)) def fallFrom(pos: BlockPos, posOrigin: BlockPos)(implicit w: World) { if(!blocksFallInstantlyAt(pos) && MinecraftServer.getCurrentTimeMillis - w.getMinecraftServer.currentTime <= 2000L) { diff --git a/src/main/scala/repose/entity/item/EntityFallingBlockExtensions.scala b/src/main/scala/repose/entity/item/EntityFallingBlockExtensions.scala index c18a20f..8f3fbf9 100644 --- a/src/main/scala/repose/entity/item/EntityFallingBlockExtensions.scala +++ b/src/main/scala/repose/entity/item/EntityFallingBlockExtensions.scala @@ -21,7 +21,7 @@ object EntityFallingBlockExtensions { val block = blockAt(posOrigin) val data = dataAt(posOrigin) val fallingBlock = - if(block.isInstanceOf[BlockGrass]) (DIRT, 0) + if(block.isInstanceOf[BlockGrass] || block.isInstanceOf[BlockGrassPath]) (DIRT, 0) else (block, data) val e = new EntityFallingBlock(w, pos.getX + 0.5D, pos.getY, pos.getZ + 0.5D, fallingBlock) e.prevPosX = posOrigin.getX + 0.5D @@ -66,7 +66,7 @@ object EntityFallingBlockExtensions { if(e.onGround) { e.setDead() val pos = new BlockPos(e) - val blockHere = blockAt(pos) + val blockHere = blockStateAt(pos) // blockHere: landing on a slab; pos.down: landing on a ladder if(!canDisplace(blockHere) || canDisplace(blockAt(pos.down))) block.dropBlockAsItem(w, pos, blockState, 0) @@ -74,6 +74,10 @@ object EntityFallingBlockExtensions { if(!w.isAirBlock(pos)) blockHere.dropBlockAsItem(w, pos, blockStateAt(pos), 0) setBlockAt(pos, block, blockState) + block match { + case bf: BlockFalling => bf.onEndFalling(w, pos, blockState, blockHere) + case _ => + } if(e.getEntityData.getSize > 0) // not null! copyTileEntityTags(pos, e.getEntityData) if(block.canSpreadFrom(pos))