update to latest recommended Forge
This commit is contained in:
@@ -95,7 +95,7 @@ object Client {
|
||||
|
||||
val blockName = Block.REGISTRY.getNameForObject(state.block).toString()
|
||||
val blockLoc = "${location.x},${location.y},${location.z}"
|
||||
Minecraft.getMinecraft().thePlayer.addChatMessage(TextComponentTranslation(
|
||||
Minecraft.getMinecraft().ingameGUI.chatGUI.printChatMessage(TextComponentTranslation(
|
||||
"betterfoliage.rendererror",
|
||||
textComponent(blockName, 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
|
||||
|
||||
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
|
||||
particleScale = Config.fallingLeaves.size.toFloat() * 0.1f
|
||||
|
||||
@@ -119,7 +119,7 @@ object LeafWindTracker {
|
||||
|
||||
@SubscribeEvent
|
||||
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
|
||||
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
|
||||
particleGravity = 0.0f
|
||||
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
|
||||
|
||||
@@ -114,8 +114,8 @@ class BlockContext {
|
||||
/** Get the distance of the block from the camera (player). */
|
||||
val cameraDistance: Int get() {
|
||||
val camera = Minecraft.getMinecraft().renderViewEntity ?: return 0
|
||||
return Math.abs(pos.x - MathHelper.floor_double(camera.posX)) +
|
||||
Math.abs(pos.y - MathHelper.floor_double(camera.posY)) +
|
||||
Math.abs(pos.z - MathHelper.floor_double(camera.posZ))
|
||||
return Math.abs(pos.x - MathHelper.floor(camera.posX)) +
|
||||
Math.abs(pos.y - MathHelper.floor(camera.posY)) +
|
||||
Math.abs(pos.z - MathHelper.floor(camera.posZ))
|
||||
}
|
||||
}
|
||||
@@ -90,7 +90,7 @@ class IconSet(val domain: String, val namePattern: String) : IStitchListener {
|
||||
var num = 0
|
||||
|
||||
override fun onStitch(atlas: TextureMap) {
|
||||
num = 0;
|
||||
num = 0
|
||||
(0..15).forEach { idx ->
|
||||
icons[idx] = null
|
||||
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 {
|
||||
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]
|
||||
}
|
||||
|
||||
class VectorSet(val num: Int, val init: (Int)->Double3): IConfigChangeListener {
|
||||
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]
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ class SimplexNoise() : IWorldLoadListener {
|
||||
var noise = NoiseGeneratorSimplex()
|
||||
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: BlockPos) = get(pos.x, pos.z)
|
||||
}
|
||||
Reference in New Issue
Block a user