diff --git a/.gitignore b/.gitignore
index 686c0ee..f8b5a7c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,23 @@
-/.gradle/
-/build/
-/libs/
-/out/
-/run/
+*
+# Ignore everything except entries with "!"
+
+!/.idea/
+/.idea/*
+!/.idea/codeStyles/
+!/.idea/dictionaries/
+!/.idea/inspectionProfiles/
+!/.idea/runConfigurations/
+!/.idea/scopes/
+!/.idea/gradle.xml
+!/.idea/vcs.xml
+
+!/gradle/
+
+!/src/
/src/main/resources/mcmod.info
+
+!/.gitignore
+!/*.gradle
+/.gradle/
+!/*.md
+!/gradle*
diff --git a/.idea/.gitignore b/.idea/.gitignore
deleted file mode 100644
index 0c7b611..0000000
--- a/.idea/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-/*
-!/runConfigurations/
-!/.gitignore
-!/gradle.xml
-!/misc.xml
-!/scala_settings.xml
-!/vcs.xml
diff --git a/.idea/.name b/.idea/.name
deleted file mode 100644
index 91aa5bf..0000000
--- a/.idea/.name
+++ /dev/null
@@ -1 +0,0 @@
-Streams
\ No newline at end of file
diff --git a/.idea/codeStyleSettings.xml b/.idea/codeStyleSettings.xml
deleted file mode 100644
index e869933..0000000
--- a/.idea/codeStyleSettings.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/highlighting.xml b/.idea/highlighting.xml
deleted file mode 100644
index f6e673a..0000000
--- a/.idea/highlighting.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 70b391c..0000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,426 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml
index c60c33b..bdc0816 100644
--- a/.idea/inspectionProfiles/profiles_settings.xml
+++ b/.idea/inspectionProfiles/profiles_settings.xml
@@ -1,7 +1,6 @@
-
-
+
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 7be8590..41e6c9c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -7,12 +7,12 @@ buildscript {
dependencies {
classpath "net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT"
classpath "co.riiid:gradle-github-plugin:0.4.2"
- classpath "gradle.plugin.com.matthewprenger:CurseGradle:1.0.10"
+ classpath "gradle.plugin.com.matthewprenger:CurseGradle:1.1.2"
}
}
apply from: zipTree(fileTree("libs"){include "Farseek-*-deobf.jar"}.singleFile).matching{include "common.gradle"}.singleFile
dependencies {
- compileOnly "2566/229:BetterWithMods:1.12-2.1.22", "2559/547:ImmersiveEngineering:0.12-82"
+ compileOnly "2566/229:BetterWithMods:1.12-2.1.22", "immersive-engineering:ImmersiveEngineering:0.12:89"
}
diff --git a/changelog.md b/changelog.md
index 0af839f..7baa215 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1 +1,3 @@
-- Fixed [streams not generating in worlds with custom sea levels](https://github.com/delvr/Streams/issues/58).
+- Fixed river blocks not being rendered by shaders in recent versions of Forge/OptiFine.
+- Fixed river blocks not being rendered by [BSL shaders](https://bitslablab.wixsite.com/main/bsl-shaders) (this works with 7.0 and 7.1.01, but not with earlier versions of 7.1).
+- Fixed river blocks ignoring biome-specific water colors when _not_ using OptiFine.
diff --git a/gradle.properties b/gradle.properties
index 20ee6c7..5c80009 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,12 +1,14 @@
-modVersion=0.4.4
+modVersion=0.4.5
modDependencies=farseek@[2,3)
modDescription=This mod introduces real flowing rivers, with a true current, to your Minecraft worlds. Compatible with many terrain generators.
-modUrl=http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2346379-streams-real-flowing-rivers
+modUrl=https://minecraft.curseforge.com/projects/streams
modAuthors=delvr
-gradleWrapperVersion=4.7
-forgeRevision=2443
-mcpMappings=snapshot_20180501
+gradleWrapperVersion=4.9
+forgeRevision=1.12-14.21.1.2443
+mcpMappings=stable_39
curseForgeId=229769
curseForgeReleaseType=beta
+
+org.gradle.jvmargs=-Xmx3G
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index 01b8bf6..94336fc 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index c30d4c0..a95009c 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-bin.zip
diff --git a/src/main/resources/META-INF/farseek_cm.cfg b/src/main/resources/META-INF/farseek_cm.cfg
index 6e0c5fe..8e7c513 100644
--- a/src/main/resources/META-INF/farseek_cm.cfg
+++ b/src/main/resources/META-INF/farseek_cm.cfg
@@ -4,3 +4,4 @@ streams.tileentity.package betterwithmods.common.blocks.mechanical.tile.TileEnt
streams.tileentity.package betterwithmods.common.blocks.mechanical.tile.TileAxleGenerator calculatePower calculatePower ()V
streams.entity.item.package net.minecraft.entity.item.EntityBoat getUnderwaterStatus func_184444_v ()Lnet/minecraft/entity/item/EntityBoat$Status;
streams.client.package net.minecraftforge.client.model.ModelLoader onRegisterAllBlocks onRegisterAllBlocks (Lnet/minecraft/client/renderer/BlockModelShapes;)V
+streams.client.package net.minecraft.client.renderer.color.BlockColors init func_186723_a ()Lnet/minecraft/client/renderer/color/BlockColors;
diff --git a/src/main/resources/assets/streams/shaders/block.properties b/src/main/resources/assets/streams/shaders/block.properties
index f0113e3..1903e01 100644
--- a/src/main/resources/assets/streams/shaders/block.properties
+++ b/src/main/resources/assets/streams/shaders/block.properties
@@ -1 +1,2 @@
-block.8=streams:river/tile.water/-2/-2 streams:river/tile.water/-2/-1 streams:river/tile.water/-2/0 streams:river/tile.water/-2/1 streams:river/tile.water/-2/2 streams:river/tile.water/-1/-2 streams:river/tile.water/-1/2 streams:river/tile.water/0/-2 streams:river/tile.water/0/0 streams:river/tile.water/0/2 streams:river/tile.water/1/-2 streams:river/tile.water/1/2 streams:river/tile.water/2/-2 streams:river/tile.water/2/-1 streams:river/tile.water/2/0 streams:river/tile.water/2/1 streams:river/tile.water/2/2
+block.8=streams:river/water/-2/-2 streams:river/water/-2/-1 streams:river/water/-2/0 streams:river/water/-2/1 streams:river/water/-2/2 streams:river/water/-1/-2 streams:river/water/-1/2 streams:river/water/0/-2 streams:river/water/0/0 streams:river/water/0/2 streams:river/water/1/-2 streams:river/water/1/2 streams:river/water/2/-2 streams:river/water/2/-1 streams:river/water/2/0 streams:river/water/2/1 streams:river/water/2/2 streams:river/tile.water/-2/-2 streams:river/tile.water/-2/-1 streams:river/tile.water/-2/0 streams:river/tile.water/-2/1 streams:river/tile.water/-2/2 streams:river/tile.water/-1/-2 streams:river/tile.water/-1/2 streams:river/tile.water/0/-2 streams:river/tile.water/0/0 streams:river/tile.water/0/2 streams:river/tile.water/1/-2 streams:river/tile.water/1/2 streams:river/tile.water/2/-2 streams:river/tile.water/2/-1 streams:river/tile.water/2/0 streams:river/tile.water/2/1 streams:river/tile.water/2/2
+block.13000=streams:river/water/-2/-2 streams:river/water/-2/-1 streams:river/water/-2/0 streams:river/water/-2/1 streams:river/water/-2/2 streams:river/water/-1/-2 streams:river/water/-1/2 streams:river/water/0/-2 streams:river/water/0/0 streams:river/water/0/2 streams:river/water/1/-2 streams:river/water/1/2 streams:river/water/2/-2 streams:river/water/2/-1 streams:river/water/2/0 streams:river/water/2/1 streams:river/water/2/2 streams:river/tile.water/-2/-2 streams:river/tile.water/-2/-1 streams:river/tile.water/-2/0 streams:river/tile.water/-2/1 streams:river/tile.water/-2/2 streams:river/tile.water/-1/-2 streams:river/tile.water/-1/2 streams:river/tile.water/0/-2 streams:river/tile.water/0/0 streams:river/tile.water/0/2 streams:river/tile.water/1/-2 streams:river/tile.water/1/2 streams:river/tile.water/2/-2 streams:river/tile.water/2/-1 streams:river/tile.water/2/0 streams:river/tile.water/2/1 streams:river/tile.water/2/2
diff --git a/src/main/scala/streams/block/BlockRiver.scala b/src/main/scala/streams/block/BlockRiver.scala
index 8955996..2b0a7f8 100644
--- a/src/main/scala/streams/block/BlockRiver.scala
+++ b/src/main/scala/streams/block/BlockRiver.scala
@@ -33,7 +33,7 @@ class BlockRiver(liquid: MaterialLiquid, val dxFlow: Int, val dzFlow: Int) exten
cloneObject(classOf[BlockLiquid], getStaticBlock(liquid), this, f => f.getType == classOf[IRegistryDelegate[Block]] || f.getType == classOf[ResourceLocation])
blockState = createBlockState
setDefaultState(blockState.getBaseState)
- ForgeRegistries.BLOCKS.register(setRegistryName("streams", s"river/$getUnlocalizedName/$dxFlow/$dzFlow"))
+ ForgeRegistries.BLOCKS.register(setRegistryName("streams", s"river/${Block.REGISTRY.getNameForObject(getStaticBlock(liquid)).getPath}/$dxFlow/$dzFlow"))
override def onBlockAdded(w: World, pos: BlockPos, state: IBlockState) {
if(populating)
diff --git a/src/main/scala/streams/client/package.scala b/src/main/scala/streams/client/package.scala
index 267bf15..e6cb9d5 100644
--- a/src/main/scala/streams/client/package.scala
+++ b/src/main/scala/streams/client/package.scala
@@ -1,7 +1,12 @@
package streams
import net.minecraft.block.Block
+import net.minecraft.block.state.IBlockState
import net.minecraft.client.renderer.BlockModelShapes
+import net.minecraft.client.renderer.color._
+import net.minecraft.util.math.BlockPos
+import net.minecraft.world.IBlockAccess
+import net.minecraft.world.biome.BiomeColorHelper
import net.minecraftforge.client.model.ModelLoader
import streams.block.FixedFlowBlock._
@@ -11,4 +16,14 @@ package object client {
ModelLoader.onRegisterAllBlocks(shapes)
shapes.registerBuiltInBlocks(FixedFlowBlocks.values.map(_.asInstanceOf[Block]).toSeq:_*)
}
+
+ def init(): BlockColors = {
+ val colors = BlockColors.init
+ val handler = new IBlockColor {
+ override def colorMultiplier(state: IBlockState, worldIn: IBlockAccess, pos: BlockPos, tintIndex: Int): Int =
+ if(worldIn != null && pos != null) BiomeColorHelper.getWaterColorAtPos(worldIn, pos) else -1
+ }
+ FixedFlowBlocks.values.foreach(colors.registerBlockColorHandler(handler, _))
+ colors
+ }
}