Skip to content

Commit

Permalink
v1.12-1.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
delvr committed Oct 30, 2017
1 parent 2258cf9 commit b684b92
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 16 deletions.
3 changes: 2 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -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).
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
6 changes: 3 additions & 3 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 " "
}
Expand Down
12 changes: 5 additions & 7 deletions src/main/scala/repose/block/FallingBlockExtensions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand All @@ -48,15 +48,15 @@ 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)
}

def updateTick(block: Block, w: World, pos: BlockPos, state: IBlockState, random: Random) {
implicit val world = w
if(block.canFallFrom(pos))
block.fallFrom(pos, pos)
else if(!block.isInstanceOf[BlockFalling])
else
block.updateTick(w, pos, state, random)
}

Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -66,14 +66,18 @@ 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)
else {
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))
Expand Down

0 comments on commit b684b92

Please sign in to comment.