Merge remote-tracking branch 'origin/master' into master

This commit is contained in:
DBotThePony 2022-09-07 07:55:01 +07:00
commit 7616483a66
Signed by: DBot
GPG Key ID: DCC23B5715498507
4 changed files with 329 additions and 13 deletions

View File

@ -4,6 +4,7 @@ import com.mojang.blaze3d.systems.RenderSystem
import com.mojang.math.Vector3f import com.mojang.math.Vector3f
import net.minecraft.client.Minecraft import net.minecraft.client.Minecraft
import net.minecraft.client.model.HumanoidModel import net.minecraft.client.model.HumanoidModel
import net.minecraft.client.renderer.block.model.ItemTransforms
import net.minecraft.nbt.CompoundTag import net.minecraft.nbt.CompoundTag
import net.minecraft.network.FriendlyByteBuf import net.minecraft.network.FriendlyByteBuf
import net.minecraft.server.level.ServerPlayer import net.minecraft.server.level.ServerPlayer
@ -368,7 +369,7 @@ abstract class AbstractWeaponItem<D : WeaponDataTable>(val tables: KClass<D>, ra
val player = Minecraft.getInstance().player!! val player = Minecraft.getInstance().player!!
val pose = event.poseStack val pose = event.poseStack
val itemInHandRenderer = Minecraft.getInstance().itemRenderer val itemInHandRenderer = Minecraft.getInstance().entityRenderDispatcher.itemInHandRenderer
pose.pushPose() pose.pushPose()
@ -419,15 +420,15 @@ abstract class AbstractWeaponItem<D : WeaponDataTable>(val tables: KClass<D>, ra
pose.mulPose(Vector3f.YP.rotation(yaw.toFloat())) pose.mulPose(Vector3f.YP.rotation(yaw.toFloat()))
pose.mulPose(Vector3f.XP.rotation(pitch.toFloat())) pose.mulPose(Vector3f.XP.rotation(pitch.toFloat()))
/*itemInHandRenderer.render( itemInHandRenderer.renderItem(
// player, player,
stack, stack,
ItemTransforms.TransformType.FIRST_PERSON_RIGHT_HAND, ItemTransforms.TransformType.FIRST_PERSON_RIGHT_HAND,
false, false,
pose, pose,
event.multiBufferSource, event.multiBufferSource,
event.packedLight event.packedLight
)*/ )
if (item is PlasmaWeaponItem<*>) { if (item is PlasmaWeaponItem<*>) {
// RenderSystem.setShader(GameRenderer::getPositionColorShader) // RenderSystem.setShader(GameRenderer::getPositionColorShader)

View File

@ -8,16 +8,16 @@
} }
}, },
"perspectives": { "perspectives": {
"third_person_right_hand": { "thirdperson_righthand": {
"parent": "overdrive_that_matters:item/plasma_rifle_3d" "parent": "overdrive_that_matters:item/plasma_rifle_3d"
}, },
"third_person_left_hand": { "thirdperson_lefthand": {
"parent": "overdrive_that_matters:item/plasma_rifle_3d" "parent": "overdrive_that_matters:item/plasma_rifle_3d"
}, },
"first_person_right_hand": { "firstperson_righthand": {
"parent": "overdrive_that_matters:item/plasma_rifle_3d" "parent": "overdrive_that_matters:item/plasma_rifle_3d"
}, },
"first_person_left_hand": { "firstperson_lefthand": {
"parent": "overdrive_that_matters:item/plasma_rifle_3d" "parent": "overdrive_that_matters:item/plasma_rifle_3d"
}, },
"fixed": { "fixed": {

View File

@ -1,6 +1,321 @@
{ {
"parent": "item/generated", "textures": {
"textures": { "0": "overdrive_that_matters:item/zpm_battery"
"layer0": "overdrive_that_matters:block/ph_kitty" },
} "elements": [
{
"name": "body",
"from": [4, 1, 4],
"to": [12, 4, 12],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 0.5, 8]},
"faces": {
"north": {"uv": [0, 0, 4, 1.5], "texture": "#0"},
"east": {"uv": [0, 0, 4, 1.5], "texture": "#0"},
"south": {"uv": [0, 0, 4, 1.5], "texture": "#0"},
"west": {"uv": [0, 0, 4, 1.5], "texture": "#0"},
"up": {"uv": [0, 1.5, 4, 5.5], "texture": "#0"},
"down": {"uv": [0, 1.5, 4, 5.5], "texture": "#0"}
}
},
{
"name": "body",
"from": [4.5, 4, 4.5],
"to": [11.5, 5, 11.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 0.5, 8]},
"faces": {
"north": {"uv": [0, 8.5, 3, 9], "texture": "#0"},
"east": {"uv": [0, 8.5, 3, 9], "texture": "#0"},
"south": {"uv": [0, 8.5, 3, 9], "texture": "#0"},
"west": {"uv": [0, 8.5, 3, 9], "texture": "#0"},
"up": {"uv": [0, 5.5, 3, 8.5], "rotation": 90, "texture": "#0"},
"down": {"uv": [0, 0, 3, 3], "rotation": 270, "texture": "#missing"}
}
},
{
"name": "crystal",
"from": [8, 6, 5],
"to": [11, 21, 8],
"rotation": {"angle": -45, "axis": "y", "origin": [9.5, 13, 6.5]},
"faces": {
"north": {"uv": [0, 10, 1.5, 16], "texture": "#0"},
"east": {"uv": [0, 10, 1.5, 16], "texture": "#0"},
"south": {"uv": [0, 10, 1.5, 16], "texture": "#0"},
"west": {"uv": [0, 10, 1.5, 16], "texture": "#0"},
"up": {"uv": [0, 9, 1.5, 10.5], "texture": "#0"},
"down": {"uv": [0, 0, 1.5, 1.5], "texture": "#missing"}
}
},
{
"name": "crystal",
"from": [9.7, 6, 8.5],
"to": [10.7, 17, 9.5],
"rotation": {"angle": 0, "axis": "y", "origin": [10.2, 12.5, 9]},
"faces": {
"north": {"uv": [3.5, 10, 5, 16], "texture": "#0"},
"east": {"uv": [3.5, 10, 5, 16], "texture": "#0"},
"south": {"uv": [3.5, 10, 5, 16], "texture": "#0"},
"west": {"uv": [3.5, 10, 5, 16], "texture": "#0"},
"up": {"uv": [3.5, 9, 5, 10.5], "texture": "#0"},
"down": {"uv": [0, 0, 1.5, 1.5], "texture": "#missing"}
}
},
{
"name": "crystal",
"from": [7, 5, 10],
"to": [8, 20, 11],
"rotation": {"angle": 22.5, "axis": "y", "origin": [7.5, 14, 10.5]},
"faces": {
"north": {"uv": [5.5, 10, 7, 16], "texture": "#0"},
"east": {"uv": [5.5, 10, 7, 16], "texture": "#0"},
"south": {"uv": [5.5, 10, 7, 16], "texture": "#0"},
"west": {"uv": [5.5, 10, 7, 16], "texture": "#0"},
"up": {"uv": [5.5, 9, 7, 10.5], "texture": "#0"},
"down": {"uv": [0, 0, 1.5, 1.5], "texture": "#missing"}
}
},
{
"name": "crystal",
"from": [5, 8, 8],
"to": [6, 21, 9],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 2, 0]},
"faces": {
"north": {"uv": [0, 10, 1.5, 16], "texture": "#0"},
"east": {"uv": [0, 10, 1.5, 16], "texture": "#0"},
"south": {"uv": [0, 10, 1.5, 16], "texture": "#0"},
"west": {"uv": [0, 10, 1.5, 16], "texture": "#0"},
"up": {"uv": [0, 9, 1.5, 10.5], "texture": "#0"},
"down": {"uv": [0, 0, 1.5, 1.5], "texture": "#missing"}
}
},
{
"name": "crystal",
"from": [7.1, 7, 5.9],
"to": [9.1, 23, 7.9],
"rotation": {"angle": 0, "axis": "y", "origin": [0, 2, 0]},
"faces": {
"north": {"uv": [6, 10, 7.5, 16], "texture": "#0"},
"east": {"uv": [6, 10, 7.5, 16], "texture": "#0"},
"south": {"uv": [6, 10, 7.5, 16], "texture": "#0"},
"west": {"uv": [6, 10, 7.5, 16], "texture": "#0"},
"up": {"uv": [6, 9, 7.5, 10.5], "texture": "#0"},
"down": {"uv": [0, 0, 1.5, 1.5], "texture": "#missing"}
}
},
{
"name": "crystal",
"from": [7, 7, 5],
"to": [8, 16, 6],
"rotation": {"angle": -22.5, "axis": "y", "origin": [7.5, 11, 5.5]},
"faces": {
"north": {"uv": [2.5, 10, 4, 16], "texture": "#0"},
"east": {"uv": [2.5, 10, 4, 16], "texture": "#0"},
"south": {"uv": [2.5, 10, 4, 16], "texture": "#0"},
"west": {"uv": [2.5, 10, 4, 16], "texture": "#0"},
"up": {"uv": [2.5, 9, 4, 10.5], "rotation": 90, "texture": "#0"},
"down": {"uv": [0, 0, 1.5, 1.5], "rotation": 270, "texture": "#missing"}
}
},
{
"name": "crystal",
"from": [6, 7, 7],
"to": [9, 22, 10],
"rotation": {"angle": -22.5, "axis": "y", "origin": [7.5, 14.5, 8.5]},
"faces": {
"north": {"uv": [0, 10, 1.5, 16], "texture": "#0"},
"east": {"uv": [0, 10, 1.5, 16], "texture": "#0"},
"south": {"uv": [0, 10, 1.5, 16], "texture": "#0"},
"west": {"uv": [0, 10, 1.5, 16], "texture": "#0"},
"up": {"uv": [0, 9, 1.5, 10.5], "texture": "#0"},
"down": {"uv": [0, 0, 1.5, 1.5], "texture": "#missing"}
}
},
{
"name": "crystal",
"from": [5.3, 4, 6],
"to": [7.3, 19, 8],
"rotation": {"angle": 22.5, "axis": "y", "origin": [6.3, 12, 7]},
"faces": {
"north": {"uv": [5.5, 10, 7, 16], "texture": "#0"},
"east": {"uv": [5.5, 10, 7, 16], "texture": "#0"},
"south": {"uv": [5.5, 10, 7, 16], "texture": "#0"},
"west": {"uv": [5.5, 10, 7, 16], "texture": "#0"},
"up": {"uv": [5.5, 9, 7, 10.5], "texture": "#0"},
"down": {"uv": [0, 0, 1.5, 1.5], "texture": "#missing"}
}
},
{
"name": "crystal",
"from": [4.3, 5, 9],
"to": [6.3, 18, 11],
"rotation": {"angle": 22.5, "axis": "y", "origin": [5.3, 12.5, 10]},
"faces": {
"north": {"uv": [0, 10, 1.5, 16], "texture": "#0"},
"east": {"uv": [0, 10, 1.5, 16], "texture": "#0"},
"south": {"uv": [0, 10, 1.5, 16], "texture": "#0"},
"west": {"uv": [0, 10, 1.5, 16], "texture": "#0"},
"up": {"uv": [0, 9, 1.5, 10.5], "rotation": 270, "texture": "#0"},
"down": {"uv": [0, 0, 1.5, 1.5], "rotation": 90, "texture": "#missing"}
}
},
{
"name": "crystal",
"from": [8.3, 6, 9],
"to": [10.3, 19, 11],
"rotation": {"angle": 22.5, "axis": "y", "origin": [9.3, 11, 10]},
"faces": {
"north": {"uv": [0, 10, 1.5, 16], "texture": "#0"},
"east": {"uv": [0, 10, 1.5, 16], "texture": "#0"},
"south": {"uv": [0, 10, 1.5, 16], "texture": "#0"},
"west": {"uv": [0, 10, 1.5, 16], "texture": "#0"},
"up": {"uv": [0, 9, 1.5, 10.5], "texture": "#0"},
"down": {"uv": [0, 0, 1.5, 1.5], "texture": "#missing"}
}
},
{
"name": "handle",
"from": [4, 6, 3],
"to": [4, 7, 13],
"faces": {
"north": {"uv": [0, 0, 0, 0.5], "texture": "#missing"},
"east": {"uv": [4, 4, 9, 4.5], "texture": "#0"},
"south": {"uv": [0, 0, 0, 0.5], "texture": "#missing"},
"west": {"uv": [4, 4, 9, 4.5], "texture": "#0"},
"up": {"uv": [0, 0, 0, 5], "texture": "#missing"},
"down": {"uv": [0, 0, 0, 5], "texture": "#missing"}
}
},
{
"name": "handle",
"from": [12, 6, 3],
"to": [12, 7, 13],
"faces": {
"north": {"uv": [0, 0, 0, 0.5], "texture": "#missing"},
"east": {"uv": [4, 4, 9, 4.5], "texture": "#0"},
"south": {"uv": [0, 0, 0, 0.5], "texture": "#missing"},
"west": {"uv": [4, 4, 9, 4.5], "texture": "#0"},
"up": {"uv": [0, 0, 0, 5], "texture": "#missing"},
"down": {"uv": [0, 0, 0, 5], "texture": "#missing"}
}
},
{
"name": "handle",
"from": [3, 2, 4],
"to": [7, 7, 4],
"faces": {
"north": {"uv": [7, 4.5, 9, 7], "texture": "#0"},
"east": {"uv": [0, 0, 0, 2.5], "texture": "#missing"},
"south": {"uv": [9, 4.5, 7, 7], "texture": "#0"},
"west": {"uv": [0, 0, 0, 2.5], "texture": "#missing"},
"up": {"uv": [0, 0, 2, 0], "texture": "#missing"},
"down": {"uv": [0, 0, 2, 0], "texture": "#missing"}
}
},
{
"name": "handle",
"from": [3, 2, 12],
"to": [7, 7, 12],
"faces": {
"north": {"uv": [7, 4.5, 9, 7], "texture": "#0"},
"east": {"uv": [0, 0, 0, 2.5], "texture": "#missing"},
"south": {"uv": [9, 4.5, 7, 7], "texture": "#0"},
"west": {"uv": [0, 0, 0, 2.5], "texture": "#missing"},
"up": {"uv": [0, 0, 2, 0], "texture": "#missing"},
"down": {"uv": [0, 0, 2, 0], "texture": "#missing"}
}
},
{
"name": "handle",
"from": [9, 2, 4],
"to": [13, 7, 4],
"faces": {
"north": {"uv": [9, 4.5, 7, 7], "texture": "#0"},
"east": {"uv": [0, 0, 0, 2.5], "texture": "#missing"},
"south": {"uv": [7, 4.5, 9, 7], "texture": "#0"},
"west": {"uv": [0, 0, 0, 2.5], "texture": "#missing"},
"up": {"uv": [0, 0, 2, 0], "texture": "#missing"},
"down": {"uv": [0, 0, 2, 0], "texture": "#missing"}
}
},
{
"name": "handle",
"from": [9, 2, 12],
"to": [13, 7, 12],
"faces": {
"north": {"uv": [9, 4.5, 7, 7], "texture": "#0"},
"east": {"uv": [0, 0, 0, 2.5], "texture": "#missing"},
"south": {"uv": [7, 4.5, 9, 7], "texture": "#0"},
"west": {"uv": [0, 0, 0, 2.5], "texture": "#missing"},
"up": {"uv": [0, 0, 2, 0], "texture": "#missing"},
"down": {"uv": [0, 0, 2, 0], "texture": "#missing"}
}
},
{
"name": "crystal",
"from": [5.5, 5, 5.5],
"to": [10.5, 8, 10.5],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 6, 8]},
"faces": {
"north": {"uv": [12, 15, 16, 16], "texture": "#0"},
"east": {"uv": [12, 15, 16, 16], "texture": "#0"},
"south": {"uv": [12, 15, 16, 16], "texture": "#0"},
"west": {"uv": [12, 15, 16, 16], "texture": "#0"},
"up": {"uv": [12, 11, 16, 15], "texture": "#0"},
"down": {"uv": [12, 11, 16, 15], "texture": "#0"}
}
},
{
"name": "crystal",
"from": [5.5, 5, 5.5],
"to": [10.5, 10, 10.5],
"rotation": {"angle": -45, "axis": "y", "origin": [8, 6, 8]},
"faces": {
"north": {"uv": [12, 15, 16, 16], "texture": "#0"},
"east": {"uv": [12, 15, 16, 16], "texture": "#0"},
"south": {"uv": [12, 15, 16, 16], "texture": "#0"},
"west": {"uv": [12, 15, 16, 16], "texture": "#0"},
"up": {"uv": [12, 11, 16, 15], "rotation": 270, "texture": "#0"},
"down": {"uv": [12, 11, 16, 15], "rotation": 90, "texture": "#0"}
}
}
],
"display": {
"thirdperson_righthand": {
"rotation": [0, 45, 0],
"translation": [0, 3, 1],
"scale": [0.55, 0.55, 0.55]
},
"thirdperson_lefthand": {
"rotation": [0, 45, 0],
"translation": [0, 3, 1],
"scale": [0.55, 0.55, 0.55]
},
"firstperson_righthand": {
"rotation": [0, -90, 0],
"translation": [1.13, 3.2, 1.13],
"scale": [0.68, 0.68, 0.68]
},
"firstperson_lefthand": {
"rotation": [0, -90, 0],
"translation": [1.13, 3.2, 1.13],
"scale": [0.68, 0.68, 0.68]
},
"ground": {
"translation": [0, 2, 0],
"scale": [0.5, 0.5, 0.5]
},
"gui": {
"rotation": [30, 225, 0],
"translation": [0, -1.5, 0],
"scale": [0.725, 0.725, 0.725]
},
"head": {
"translation": [0, 12.25, 0],
"scale": [1.5, 1.5, 1.5]
},
"fixed": {
"rotation": [-90, 0, 0],
"translation": [0, 0, -12.5],
"scale": [2, 2, 2]
}
}
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B