Initial commit

This commit is contained in:
2024-12-30 00:58:28 +13:00
commit aac3d2d4cb
18 changed files with 1048 additions and 0 deletions

View File

@ -0,0 +1,23 @@
package com.pobnellion.aoe.building
import com.pobnellion.aoe.ui.PlaceHint
import com.pobnellion.aoe.ui.PlaceHintValidators
import org.bukkit.Location
import org.bukkit.Material
import org.bukkit.entity.Player
class Blacksmith: Building {
override fun showPlaceHint(player: Player) {
PlaceHint.add(player, 4.0f, 3.0f, 4.0f, ::place, PlaceHintValidators::allReplaceable)
}
fun place(location: Location, sizeX: Float, sizeY: Float, sizeZ: Float) {
for (x in 0..<sizeX.toInt())
for (y in 0..<sizeY.toInt())
for (z in 0..<sizeZ.toInt())
location.world.getBlockAt(
location.blockX + x,
location.blockY + y,
location.blockZ + z ).type = Material.SMOOTH_STONE
}
}