File tree Expand file tree Collapse file tree 9 files changed +11
-38
lines changed
api/src/main/java/kr/toxicity/model/api/data
v1_20_R4/src/main/kotlin/kr/toxicity/model/nms/v1_20_R4
v1_21_R1/src/main/kotlin/kr/toxicity/model/nms/v1_21_R1
v1_21_R2/src/main/kotlin/kr/toxicity/model/nms/v1_21_R2
v1_21_R3/src/main/kotlin/kr/toxicity/model/nms/v1_21_R3
v1_21_R4/src/main/kotlin/kr/toxicity/model/nms/v1_21_R4
v1_21_R5/src/main/kotlin/kr/toxicity/model/nms/v1_21_R5
v1_21_R6/src/main/kotlin/kr/toxicity/model/nms/v1_21_R6 Expand file tree Collapse file tree 9 files changed +11
-38
lines changed Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ public boolean canBeRendered() {
7272 * @return pack name
7373 */
7474 public @ NotNull String packName (@ NotNull String parent ) {
75- return PackUtil .toPackName (parent + "_" + name ());
75+ return PackUtil .toPackName (name (). startsWith ( "global_" ) ? name () : parent + "_" + name ());
7676 }
7777
7878 /**
Original file line number Diff line number Diff line change @@ -36,9 +36,10 @@ public record ModelTexture(
3636 * @return converted textures
3737 */
3838 public @ NotNull BlueprintTexture toBlueprint () {
39+ var nameIndex = name ().indexOf ('.' );
3940 return new BlueprintTexture (
40- name ().split ( " \\ ." )[ 0 ] ,
41- Base64 .getDecoder ().decode (source ().split ( "," )[ 1 ] ),
41+ nameIndex >= 0 ? name ().substring ( 0 , nameIndex ) : name () ,
42+ Base64 .getDecoder ().decode (source ().substring ( source (). indexOf ( ',' ) + 1 ) ),
4243 width (),
4344 height (),
4445 uvWidth (),
Original file line number Diff line number Diff line change @@ -40,7 +40,6 @@ import net.minecraft.world.phys.AABB
4040import net.minecraft.world.phys.Vec3
4141import org.bukkit.Bukkit
4242import org.bukkit.Color
43- import org.bukkit.Location
4443import org.bukkit.Particle
4544import org.bukkit.craftbukkit.CraftServer
4645import org.bukkit.craftbukkit.entity.CraftArmorStand
@@ -71,10 +70,7 @@ internal class HitBoxImpl(
7170 private var onFly = false
7271
7372 val craftEntity: HitBox by lazy {
74- object : CraftArmorStand (Bukkit .getServer() as CraftServer , this ), HitBox by this {
75- override fun getLocation (): Location = interaction.bukkitEntity.location
76- override fun getLocation (loc : Location ? ): Location ? = interaction.bukkitEntity.getLocation(loc)
77- }
73+ object : CraftArmorStand (Bukkit .getServer() as CraftServer , this ), HitBox by this {}
7874 }
7975 private val _rotatedSource = FunctionUtil .throttleTick(Supplier {
8076 source.rotate(Quaterniond (bone.hitBoxViewRotation()))
Original file line number Diff line number Diff line change @@ -39,7 +39,6 @@ import net.minecraft.world.phys.AABB
3939import net.minecraft.world.phys.Vec3
4040import org.bukkit.Bukkit
4141import org.bukkit.Color
42- import org.bukkit.Location
4342import org.bukkit.Particle
4443import org.bukkit.craftbukkit.CraftServer
4544import org.bukkit.craftbukkit.entity.CraftArmorStand
@@ -70,10 +69,7 @@ internal class HitBoxImpl(
7069 private var onFly = false
7170
7271 val craftEntity: HitBox by lazy {
73- object : CraftArmorStand (Bukkit .getServer() as CraftServer , this ), HitBox by this {
74- override fun getLocation (): Location = interaction.bukkitEntity.location
75- override fun getLocation (loc : Location ? ): Location ? = interaction.bukkitEntity.getLocation(loc)
76- }
72+ object : CraftArmorStand (Bukkit .getServer() as CraftServer , this ), HitBox by this {}
7773 }
7874 private val _rotatedSource = FunctionUtil .throttleTick(Supplier {
7975 source.rotate(Quaterniond (bone.hitBoxViewRotation()))
Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ import net.minecraft.world.phys.AABB
4141import net.minecraft.world.phys.Vec3
4242import org.bukkit.Bukkit
4343import org.bukkit.Color
44- import org.bukkit.Location
4544import org.bukkit.Particle
4645import org.bukkit.craftbukkit.CraftServer
4746import org.bukkit.craftbukkit.entity.CraftArmorStand
@@ -72,10 +71,7 @@ internal class HitBoxImpl(
7271 private var onFly = false
7372
7473 val craftEntity: HitBox by lazy {
75- object : CraftArmorStand (Bukkit .getServer() as CraftServer , this ), HitBox by this {
76- override fun getLocation (): Location = interaction.bukkitEntity.location
77- override fun getLocation (loc : Location ? ): Location ? = interaction.bukkitEntity.getLocation(loc)
78- }
74+ object : CraftArmorStand (Bukkit .getServer() as CraftServer , this ), HitBox by this {}
7975 }
8076 private val _rotatedSource = FunctionUtil .throttleTick(Supplier {
8177 source.rotate(Quaterniond (bone.hitBoxViewRotation()))
Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ import net.minecraft.world.phys.AABB
4141import net.minecraft.world.phys.Vec3
4242import org.bukkit.Bukkit
4343import org.bukkit.Color
44- import org.bukkit.Location
4544import org.bukkit.Particle
4645import org.bukkit.craftbukkit.CraftServer
4746import org.bukkit.craftbukkit.entity.CraftArmorStand
@@ -73,10 +72,7 @@ internal class HitBoxImpl(
7372 private var onFly = false
7473
7574 val craftEntity: HitBox by lazy {
76- object : CraftArmorStand (Bukkit .getServer() as CraftServer , this ), HitBox by this {
77- override fun getLocation (): Location = interaction.bukkitEntity.location
78- override fun getLocation (loc : Location ? ): Location ? = interaction.bukkitEntity.getLocation(loc)
79- }
75+ object : CraftArmorStand (Bukkit .getServer() as CraftServer , this ), HitBox by this {}
8076 }
8177 private val _rotatedSource = FunctionUtil .throttleTick(Supplier {
8278 source.rotate(Quaterniond (bone.hitBoxViewRotation()))
Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ import net.minecraft.world.phys.AABB
4141import net.minecraft.world.phys.Vec3
4242import org.bukkit.Bukkit
4343import org.bukkit.Color
44- import org.bukkit.Location
4544import org.bukkit.Particle
4645import org.bukkit.craftbukkit.CraftServer
4746import org.bukkit.craftbukkit.entity.CraftArmorStand
@@ -73,10 +72,7 @@ internal class HitBoxImpl(
7372 private var onFly = false
7473
7574 val craftEntity: HitBox by lazy {
76- object : CraftArmorStand (Bukkit .getServer() as CraftServer , this ), HitBox by this {
77- override fun getLocation (): Location = interaction.bukkitEntity.location
78- override fun getLocation (loc : Location ? ): Location ? = interaction.bukkitEntity.getLocation(loc)
79- }
75+ object : CraftArmorStand (Bukkit .getServer() as CraftServer , this ), HitBox by this {}
8076 }
8177 private val _rotatedSource = FunctionUtil .throttleTick(Supplier {
8278 source.rotate(Quaterniond (bone.hitBoxViewRotation()))
Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ import net.minecraft.world.phys.AABB
4141import net.minecraft.world.phys.Vec3
4242import org.bukkit.Bukkit
4343import org.bukkit.Color
44- import org.bukkit.Location
4544import org.bukkit.Particle
4645import org.bukkit.craftbukkit.CraftServer
4746import org.bukkit.craftbukkit.entity.CraftArmorStand
@@ -73,10 +72,7 @@ internal class HitBoxImpl(
7372 private var onFly = false
7473
7574 val craftEntity: HitBox by lazy {
76- object : CraftArmorStand (Bukkit .getServer() as CraftServer , this ), HitBox by this {
77- override fun getLocation (): Location = interaction.bukkitEntity.location
78- override fun getLocation (loc : Location ? ): Location ? = interaction.bukkitEntity.getLocation(loc)
79- }
75+ object : CraftArmorStand (Bukkit .getServer() as CraftServer , this ), HitBox by this {}
8076 }
8177 private val _rotatedSource = FunctionUtil .throttleTick(Supplier {
8278 source.rotate(Quaterniond (bone.hitBoxViewRotation()))
Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ import net.minecraft.world.phys.AABB
4141import net.minecraft.world.phys.Vec3
4242import org.bukkit.Bukkit
4343import org.bukkit.Color
44- import org.bukkit.Location
4544import org.bukkit.Particle
4645import org.bukkit.craftbukkit.CraftServer
4746import org.bukkit.craftbukkit.entity.CraftArmorStand
@@ -73,10 +72,7 @@ internal class HitBoxImpl(
7372 private var onFly = false
7473
7574 val craftEntity: HitBox by lazy {
76- object : CraftArmorStand (Bukkit .getServer() as CraftServer , this ), HitBox by this {
77- override fun getLocation (): Location = interaction.bukkitEntity.location
78- override fun getLocation (loc : Location ? ): Location ? = interaction.bukkitEntity.getLocation(loc)
79- }
75+ object : CraftArmorStand (Bukkit .getServer() as CraftServer , this ), HitBox by this {}
8076 }
8177 private val _rotatedSource = FunctionUtil .throttleTick(Supplier {
8278 source.rotate(Quaterniond (bone.hitBoxViewRotation()))
You can’t perform that action at this time.
0 commit comments