update to latest recommended Forge
This commit is contained in:
@@ -4,7 +4,7 @@ jarName = BetterFoliage-MC1.10.2
|
|||||||
version = 2.2.0
|
version = 2.2.0
|
||||||
|
|
||||||
mc_version = 1.10.2
|
mc_version = 1.10.2
|
||||||
forge_version = 12.18.2.2121
|
forge_version = 12.18.3.2185
|
||||||
mcp_mappings = snapshot_20160905
|
mcp_mappings = stable_29
|
||||||
|
|
||||||
kotlin_version = 1.1.1
|
kotlin_version = 1.2.0
|
||||||
@@ -95,7 +95,7 @@ object Client {
|
|||||||
|
|
||||||
val blockName = Block.REGISTRY.getNameForObject(state.block).toString()
|
val blockName = Block.REGISTRY.getNameForObject(state.block).toString()
|
||||||
val blockLoc = "${location.x},${location.y},${location.z}"
|
val blockLoc = "${location.x},${location.y},${location.z}"
|
||||||
Minecraft.getMinecraft().thePlayer.addChatMessage(TextComponentTranslation(
|
Minecraft.getMinecraft().ingameGUI.chatGUI.printChatMessage(TextComponentTranslation(
|
||||||
"betterfoliage.rendererror",
|
"betterfoliage.rendererror",
|
||||||
textComponent(blockName, TextFormatting.GOLD),
|
textComponent(blockName, TextFormatting.GOLD),
|
||||||
textComponent(blockLoc, TextFormatting.GOLD)
|
textComponent(blockLoc, TextFormatting.GOLD)
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ AbstractEntityFX(world, pos.x.toDouble() + 0.5, pos.y.toDouble(), pos.z.toDouble
|
|||||||
var wasCollided = false
|
var wasCollided = false
|
||||||
|
|
||||||
init {
|
init {
|
||||||
particleMaxAge = MathHelper.floor_double(random(0.6, 1.0) * Config.fallingLeaves.lifetime * 20.0)
|
particleMaxAge = MathHelper.floor(random(0.6, 1.0) * Config.fallingLeaves.lifetime * 20.0)
|
||||||
motionY = -Config.fallingLeaves.speed
|
motionY = -Config.fallingLeaves.speed
|
||||||
particleScale = Config.fallingLeaves.size.toFloat() * 0.1f
|
particleScale = Config.fallingLeaves.size.toFloat() * 0.1f
|
||||||
|
|
||||||
@@ -119,7 +119,7 @@ object LeafWindTracker {
|
|||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
fun handleWorldTick(event: TickEvent.ClientTickEvent) {
|
fun handleWorldTick(event: TickEvent.ClientTickEvent) {
|
||||||
if (event.phase == TickEvent.Phase.START) Minecraft.getMinecraft().theWorld?.let { world ->
|
if (event.phase == TickEvent.Phase.START) Minecraft.getMinecraft().world?.let { world ->
|
||||||
// change target wind speed
|
// change target wind speed
|
||||||
if (world.worldInfo.worldTime >= nextChange) changeWind(world)
|
if (world.worldInfo.worldTime >= nextChange) changeWind(world)
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ AbstractEntityFX(world, pos.x.toDouble() + 0.5, pos.y.toDouble() + 1.0, pos.z.to
|
|||||||
motionY = 0.1
|
motionY = 0.1
|
||||||
particleGravity = 0.0f
|
particleGravity = 0.0f
|
||||||
particleTexture = RisingSoulTextures.headIcons[rand.nextInt(256)]
|
particleTexture = RisingSoulTextures.headIcons[rand.nextInt(256)]
|
||||||
particleMaxAge = MathHelper.floor_double((0.6 + 0.4 * rand.nextDouble()) * Config.risingSoul.lifetime * 20.0)
|
particleMaxAge = MathHelper.floor((0.6 + 0.4 * rand.nextDouble()) * Config.risingSoul.lifetime * 20.0)
|
||||||
}
|
}
|
||||||
|
|
||||||
override val isValid: Boolean get() = true
|
override val isValid: Boolean get() = true
|
||||||
|
|||||||
@@ -114,8 +114,8 @@ class BlockContext {
|
|||||||
/** Get the distance of the block from the camera (player). */
|
/** Get the distance of the block from the camera (player). */
|
||||||
val cameraDistance: Int get() {
|
val cameraDistance: Int get() {
|
||||||
val camera = Minecraft.getMinecraft().renderViewEntity ?: return 0
|
val camera = Minecraft.getMinecraft().renderViewEntity ?: return 0
|
||||||
return Math.abs(pos.x - MathHelper.floor_double(camera.posX)) +
|
return Math.abs(pos.x - MathHelper.floor(camera.posX)) +
|
||||||
Math.abs(pos.y - MathHelper.floor_double(camera.posY)) +
|
Math.abs(pos.y - MathHelper.floor(camera.posY)) +
|
||||||
Math.abs(pos.z - MathHelper.floor_double(camera.posZ))
|
Math.abs(pos.z - MathHelper.floor(camera.posZ))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -90,7 +90,7 @@ class IconSet(val domain: String, val namePattern: String) : IStitchListener {
|
|||||||
var num = 0
|
var num = 0
|
||||||
|
|
||||||
override fun onStitch(atlas: TextureMap) {
|
override fun onStitch(atlas: TextureMap) {
|
||||||
num = 0;
|
num = 0
|
||||||
(0..15).forEach { idx ->
|
(0..15).forEach { idx ->
|
||||||
icons[idx] = null
|
icons[idx] = null
|
||||||
val locReal = ResourceLocation(domain, "textures/${namePattern.format(idx)}.png")
|
val locReal = ResourceLocation(domain, "textures/${namePattern.format(idx)}.png")
|
||||||
@@ -103,13 +103,13 @@ class IconSet(val domain: String, val namePattern: String) : IStitchListener {
|
|||||||
|
|
||||||
class ModelSet(val num: Int, val init: Model.(Int)->Unit): IConfigChangeListener {
|
class ModelSet(val num: Int, val init: Model.(Int)->Unit): IConfigChangeListener {
|
||||||
val models = Array(num) { Model().apply{ init(it) } }
|
val models = Array(num) { Model().apply{ init(it) } }
|
||||||
override fun onConfigChange() { (0..num-1).forEach { models[it] = Model().apply{ init(it) } } }
|
override fun onConfigChange() { (0 until num).forEach { models[it] = Model().apply{ init(it) } } }
|
||||||
operator fun get(idx: Int) = models[idx % num]
|
operator fun get(idx: Int) = models[idx % num]
|
||||||
}
|
}
|
||||||
|
|
||||||
class VectorSet(val num: Int, val init: (Int)->Double3): IConfigChangeListener {
|
class VectorSet(val num: Int, val init: (Int)->Double3): IConfigChangeListener {
|
||||||
val models = Array(num) { init(it) }
|
val models = Array(num) { init(it) }
|
||||||
override fun onConfigChange() { (0..num-1).forEach { models[it] = init(it) } }
|
override fun onConfigChange() { (0 until num).forEach { models[it] = init(it) } }
|
||||||
operator fun get(idx: Int) = models[idx % num]
|
operator fun get(idx: Int) = models[idx % num]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -117,7 +117,7 @@ class SimplexNoise() : IWorldLoadListener {
|
|||||||
var noise = NoiseGeneratorSimplex()
|
var noise = NoiseGeneratorSimplex()
|
||||||
override fun onWorldLoad(world: World) { noise = NoiseGeneratorSimplex(Random(world.worldInfo.seed))
|
override fun onWorldLoad(world: World) { noise = NoiseGeneratorSimplex(Random(world.worldInfo.seed))
|
||||||
}
|
}
|
||||||
operator fun get(x: Int, z: Int) = MathHelper.floor_double((noise.getValue(x.toDouble(), z.toDouble()) + 1.0) * 32.0)
|
operator fun get(x: Int, z: Int) = MathHelper.floor((noise.getValue(x.toDouble(), z.toDouble()) + 1.0) * 32.0)
|
||||||
operator fun get(pos: Int3) = get(pos.x, pos.z)
|
operator fun get(pos: Int3) = get(pos.x, pos.z)
|
||||||
operator fun get(pos: BlockPos) = get(pos.x, pos.z)
|
operator fun get(pos: BlockPos) = get(pos.x, pos.z)
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user