diff --git a/gradle.properties b/gradle.properties index 3b22db3..d728827 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ minecraft_version=1.20.1 yarn_mappings=1.20.1+build.10 loader_version=0.18.3 # Mod Properties -mod_version=26.3.12.1 +mod_version=26.3.14 maven_group=dev.tggamesyt archives_base_name=szar # Dependencies diff --git a/src/client/java/dev/tggamesyt/szar/client/BulletDecalRenderer.java b/src/client/java/dev/tggamesyt/szar/client/BulletDecalRenderer.java new file mode 100644 index 0000000..0f32416 --- /dev/null +++ b/src/client/java/dev/tggamesyt/szar/client/BulletDecalRenderer.java @@ -0,0 +1,78 @@ +package dev.tggamesyt.szar.client; + +import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderContext; +import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderEvents; +import net.minecraft.client.render.*; +import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.util.Identifier; +import net.minecraft.util.math.Direction; +import net.minecraft.util.math.RotationAxis; +import net.minecraft.util.math.Vec3d; +import org.joml.Matrix4f; + +import static dev.tggamesyt.szar.Szar.MOD_ID; + +public class BulletDecalRenderer { + + private static final Identifier DECAL_TEXTURE = + new Identifier(MOD_ID, "textures/entity/bullet_impact.png"); + private static final float SIZE = 0.15F; + private static final long FADE_START_MS = BulletDecalStore.FADE_START_MS; + private static final long LIFETIME_MS = BulletDecalStore.LIFETIME_MS; + + public static void register() { + WorldRenderEvents.AFTER_TRANSLUCENT.register(BulletDecalRenderer::render); + } + + private static void render(WorldRenderContext ctx) { + MatrixStack matrices = ctx.matrixStack(); + VertexConsumerProvider consumers = ctx.consumers(); + if (matrices == null || consumers == null) return; + + Vec3d cam = ctx.camera().getPos(); + long now = System.currentTimeMillis(); + + VertexConsumer consumer = consumers.getBuffer( + RenderLayer.getEntityTranslucentCull(DECAL_TEXTURE) + ); + + for (BulletDecalStore.Decal decal : BulletDecalStore.getDecals()) { + long age = now - decal.spawnTime(); + float alpha = 1.0F; + if (age > FADE_START_MS) { + alpha = 1.0F - (float)(age - FADE_START_MS) / (LIFETIME_MS - FADE_START_MS); + } + int a = (int)(alpha * 255); + if (a <= 0) continue; + + matrices.push(); + Direction face = decal.face(); + matrices.translate( + decal.pos().x - cam.x + face.getOffsetX() * 0.002, + decal.pos().y - cam.y + face.getOffsetY() * 0.002, + decal.pos().z - cam.z + face.getOffsetZ() * 0.002 + ); + + applyFaceRotation(matrices, face); + + Matrix4f mat = matrices.peek().getPositionMatrix(); + + consumer.vertex(mat, -SIZE, SIZE, 0).color(255,255,255,a).texture(0,1).overlay(OverlayTexture.DEFAULT_UV).light(LightmapTextureManager.MAX_LIGHT_COORDINATE).normal(0,0,1).next(); + consumer.vertex(mat, SIZE, SIZE, 0).color(255,255,255,a).texture(1,1).overlay(OverlayTexture.DEFAULT_UV).light(LightmapTextureManager.MAX_LIGHT_COORDINATE).normal(0,0,1).next(); + consumer.vertex(mat, SIZE, -SIZE, 0).color(255,255,255,a).texture(1,0).overlay(OverlayTexture.DEFAULT_UV).light(LightmapTextureManager.MAX_LIGHT_COORDINATE).normal(0,0,1).next(); + consumer.vertex(mat, -SIZE, -SIZE, 0).color(255,255,255,a).texture(0,0).overlay(OverlayTexture.DEFAULT_UV).light(LightmapTextureManager.MAX_LIGHT_COORDINATE).normal(0,0,1).next(); + matrices.pop(); + } + } + + private static void applyFaceRotation(MatrixStack matrices, Direction face) { + switch (face) { + case NORTH -> {} + case SOUTH -> matrices.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(180)); + case EAST -> matrices.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(-90)); + case WEST -> matrices.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(90)); + case UP -> matrices.multiply(RotationAxis.POSITIVE_X.rotationDegrees(90)); + case DOWN -> matrices.multiply(RotationAxis.POSITIVE_X.rotationDegrees(-90)); + } + } +} \ No newline at end of file diff --git a/src/client/java/dev/tggamesyt/szar/client/BulletDecalStore.java b/src/client/java/dev/tggamesyt/szar/client/BulletDecalStore.java new file mode 100644 index 0000000..7fed985 --- /dev/null +++ b/src/client/java/dev/tggamesyt/szar/client/BulletDecalStore.java @@ -0,0 +1,27 @@ +package dev.tggamesyt.szar.client; + +import net.minecraft.util.math.Vec3d; +import net.minecraft.util.math.Direction; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +public class BulletDecalStore { + + public record Decal(Vec3d pos, Direction face, long spawnTime) {} + + private static final List decals = new ArrayList<>(); + static final long LIFETIME_MS = 30 * 1000; + static final long FADE_START_MS = 27 * 1000; + + public static void add(Vec3d pos, Direction face) { + decals.add(new Decal(pos, face, System.currentTimeMillis())); + } + + public static List getDecals() { + // Clean up expired decals + long now = System.currentTimeMillis(); + decals.removeIf(d -> now - d.spawnTime() > LIFETIME_MS); + return decals; + } +} \ No newline at end of file diff --git a/src/client/java/dev/tggamesyt/szar/client/BulletRenderer.java b/src/client/java/dev/tggamesyt/szar/client/BulletRenderer.java index 881d74c..abff86e 100644 --- a/src/client/java/dev/tggamesyt/szar/client/BulletRenderer.java +++ b/src/client/java/dev/tggamesyt/szar/client/BulletRenderer.java @@ -1,17 +1,23 @@ package dev.tggamesyt.szar.client; import dev.tggamesyt.szar.BulletEntity; -import net.minecraft.client.render.VertexConsumerProvider; +import net.minecraft.client.render.*; import net.minecraft.client.render.entity.EntityRenderer; import net.minecraft.client.render.entity.EntityRendererFactory; import net.minecraft.client.util.math.MatrixStack; import net.minecraft.util.Identifier; +import net.minecraft.util.math.RotationAxis; +import org.joml.Matrix4f; public class BulletRenderer extends EntityRenderer { private static final Identifier TEXTURE = new Identifier("szar", "textures/entity/bullet.png"); + private static final float LENGTH = 8.0F; + private static final float WIDTH = 2.0F; + private static final float SCALE = 0.0125F; + public BulletRenderer(EntityRendererFactory.Context ctx) { super(ctx); } @@ -25,10 +31,42 @@ public class BulletRenderer extends EntityRenderer { VertexConsumerProvider vertices, int light ) { + // Only render after 2 ticks or if partial tick is past 0.25 + if (entity.age < 2 && tickDelta <= 0.25F) return; + + net.minecraft.client.MinecraftClient client = net.minecraft.client.MinecraftClient.getInstance(); + if (client.player != null) { + double dist = client.player.squaredDistanceTo(entity.getX(), entity.getY(), entity.getZ()); + if (dist < 0.25) return; + } + matrices.push(); - matrices.scale(0.25F, 0.25F, 0.25F); - matrices.multiply(this.dispatcher.getRotation()); + + // Orient bullet to face its travel direction + matrices.multiply(RotationAxis.POSITIVE_Y.rotationDegrees(entity.getYaw() - 90.0F)); + matrices.multiply(RotationAxis.POSITIVE_Z.rotationDegrees(entity.getPitch())); + + matrices.multiply(RotationAxis.POSITIVE_X.rotationDegrees(45.0F)); + matrices.scale(SCALE, SCALE, SCALE); + + VertexConsumer consumer = vertices.getBuffer( + RenderLayer.getEntityCutoutNoCull(TEXTURE) + ); + + // Draw 4 crossed quads like the original + for (int i = 0; i < 4; i++) { + matrices.multiply(RotationAxis.POSITIVE_X.rotationDegrees(90.0F)); + + Matrix4f mat = matrices.peek().getPositionMatrix(); + + consumer.vertex(mat, -LENGTH, -WIDTH, 0).color(255,255,255,255).texture(0.0F, 0.0F).overlay(OverlayTexture.DEFAULT_UV).light(light).normal(0,1,0).next(); + consumer.vertex(mat, LENGTH, -WIDTH, 0).color(255,255,255,255).texture(1.0F, 0.0F).overlay(OverlayTexture.DEFAULT_UV).light(light).normal(0,1,0).next(); + consumer.vertex(mat, LENGTH, WIDTH, 0).color(255,255,255,255).texture(1.0F, 1.0F).overlay(OverlayTexture.DEFAULT_UV).light(light).normal(0,1,0).next(); + consumer.vertex(mat, -LENGTH, WIDTH, 0).color(255,255,255,255).texture(0.0F, 1.0F).overlay(OverlayTexture.DEFAULT_UV).light(light).normal(0,1,0).next(); + } + matrices.pop(); + super.render(entity, yaw, tickDelta, matrices, vertices, light); } @@ -36,4 +74,4 @@ public class BulletRenderer extends EntityRenderer { public Identifier getTexture(BulletEntity entity) { return TEXTURE; } -} +} \ No newline at end of file diff --git a/src/client/java/dev/tggamesyt/szar/client/SzarClient.java b/src/client/java/dev/tggamesyt/szar/client/SzarClient.java index aa35ebc..3d87833 100644 --- a/src/client/java/dev/tggamesyt/szar/client/SzarClient.java +++ b/src/client/java/dev/tggamesyt/szar/client/SzarClient.java @@ -11,11 +11,9 @@ import net.fabricmc.fabric.api.client.keybinding.v1.KeyBindingHelper; import net.fabricmc.fabric.api.client.model.ModelLoadingRegistry; import net.fabricmc.fabric.api.client.networking.v1.ClientPlayConnectionEvents; import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking; -import net.fabricmc.fabric.api.client.rendering.v1.BlockEntityRendererRegistry; import net.fabricmc.fabric.api.client.rendering.v1.EntityModelLayerRegistry; import net.fabricmc.fabric.api.client.rendering.v1.EntityRendererRegistry; import net.fabricmc.fabric.api.client.rendering.v1.HudRenderCallback; -import net.fabricmc.fabric.api.client.screenhandler.v1.ScreenRegistry; import net.fabricmc.fabric.api.networking.v1.PacketByteBufs; import net.fabricmc.fabric.api.object.builder.v1.client.model.FabricModelPredicateProviderRegistry; import net.fabricmc.fabric.api.resource.ResourceManagerHelper; @@ -23,27 +21,16 @@ import net.fabricmc.fabric.api.resource.ResourcePackActivationType; import net.fabricmc.loader.api.FabricLoader; import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.screen.ingame.HandledScreens; -import net.minecraft.client.network.AbstractClientPlayerEntity; -import net.minecraft.client.network.OtherClientPlayerEntity; import net.minecraft.client.option.KeyBinding; import net.minecraft.client.render.entity.EmptyEntityRenderer; import net.minecraft.client.render.entity.EntityRenderer; import net.minecraft.client.render.entity.FlyingItemEntityRenderer; -import net.minecraft.client.render.entity.PlayerEntityRenderer; -import net.minecraft.client.render.entity.animation.Animation; import net.minecraft.client.render.entity.model.EntityModelLayer; -import net.minecraft.client.render.item.BuiltinModelItemRenderer; -import net.minecraft.client.render.item.ItemRenderer; import net.minecraft.client.sound.EntityTrackingSoundInstance; -import net.minecraft.client.sound.PositionedSoundInstance; -import net.minecraft.client.sound.SoundInstance; -import net.minecraft.client.sound.SoundManager; import net.minecraft.client.util.InputUtil; import net.minecraft.client.render.*; import net.minecraft.client.util.ModelIdentifier; -import net.minecraft.client.world.ClientWorld; import net.minecraft.entity.Entity; -import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.network.PacketByteBuf; import net.minecraft.sound.SoundCategory; @@ -52,11 +39,11 @@ import net.minecraft.text.Text; import net.minecraft.util.Identifier; import net.minecraft.util.Util; import net.minecraft.util.math.Box; +import net.minecraft.util.math.Direction; import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.random.Random; import org.lwjgl.glfw.GLFW; -import org.spongepowered.asm.mixin.Unique; import java.io.File; import java.io.IOException; @@ -67,7 +54,6 @@ import java.util.*; import static dev.tggamesyt.szar.ServerCosmetics.SYNC_PACKET; import static dev.tggamesyt.szar.Szar.*; import static dev.tggamesyt.szar.client.ClientCosmetics.loadTextureFromURL; -import static dev.tggamesyt.szar.client.UraniumUtils.updateUranium; public class SzarClient implements ClientModInitializer { // add this field to your client init class @@ -99,14 +85,24 @@ public class SzarClient implements ClientModInitializer { int startLength = 596; int loopLength = 541; int loopStart = startOffset + startLength; - public static final KeyBinding SPIN_KEY = KeyBindingHelper.registerKeyBinding( new KeyBinding("key.szar.spin", InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_R, "key.categories.szar") ); @Override public void onInitializeClient() { + BulletDecalRenderer.register(); + // In ClientModInitializer: + ClientPlayNetworking.registerGlobalReceiver(Szar.BULLET_IMPACT, (client, handler, buf, sender) -> { + double x = buf.readDouble(); + double y = buf.readDouble(); + double z = buf.readDouble(); + Direction face = buf.readEnumConstant(Direction.class); + client.execute(() -> { + BulletDecalStore.add(new Vec3d(x, y, z), face); + }); + }); // Then in a ClientTickEvents.END_CLIENT_TICK: ClientTickEvents.END_CLIENT_TICK.register(client -> { if (SPIN_KEY.wasPressed() && client.player != null) { @@ -312,7 +308,7 @@ public class SzarClient implements ClientModInitializer { );*/ HandledScreens.register(Szar.SLOT_MACHINE_SCREEN_HANDLER_TYPE, SlotMachineScreen::new); HandledScreens.register(Szar.ROULETTE_SCREEN_HANDLER_TYPE, RouletteScreen::new); - + EntityRendererRegistry.register(Szar.BULLET, BulletRenderer::new); EntityRendererRegistry.register( Szar.NiggerEntityType, NiggerEntityRenderer::new @@ -341,10 +337,10 @@ public class SzarClient implements ClientModInitializer { Szar.NaziEntityType, NaziEntityRenderer::new ); - EntityRendererRegistry.register( + /*EntityRendererRegistry.register( Szar.BULLET, ctx -> new FlyingItemEntityRenderer<>(ctx) - ); + );*/ EntityRendererRegistry.register( Szar.EpsteinEntityType, EpsteinEntityRenderer::new diff --git a/src/client/java/dev/tggamesyt/szar/client/mixin/BipedEntityModelMixin.java b/src/client/java/dev/tggamesyt/szar/client/mixin/BipedEntityModelMixin.java index ad2eefb..4c300e7 100644 --- a/src/client/java/dev/tggamesyt/szar/client/mixin/BipedEntityModelMixin.java +++ b/src/client/java/dev/tggamesyt/szar/client/mixin/BipedEntityModelMixin.java @@ -1,12 +1,15 @@ package dev.tggamesyt.szar.client.mixin; import dev.tggamesyt.szar.Joint; +import dev.tggamesyt.szar.RevolverItem; import net.minecraft.client.model.ModelPart; import net.minecraft.client.render.entity.model.BipedEntityModel; import net.minecraft.entity.LivingEntity; import net.minecraft.util.Arm; import net.minecraft.util.Hand; import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.Vec3d; +import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; @@ -16,8 +19,11 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(BipedEntityModel.class) public abstract class BipedEntityModelMixin { + @Final @Shadow public ModelPart rightArm; + @Final @Shadow public ModelPart leftArm; + @Final @Shadow public ModelPart head; @Inject( @@ -31,24 +37,46 @@ public abstract class BipedEntityModelMixin { ) private void injectJointPose(T entity, float f, float g, float h, float i, float j, CallbackInfo ci) { if (!entity.isUsingItem()) return; - if (!(entity.getActiveItem().getItem() instanceof Joint)) return; - boolean mainHand = entity.getActiveHand() == Hand.MAIN_HAND; boolean rightHanded = entity.getMainArm() == Arm.RIGHT; boolean useRight = (mainHand && rightHanded) || (!mainHand && !rightHanded); - - if (useRight) { - this.rightArm.pitch = MathHelper.clamp( - this.head.pitch - 1.7F - (entity.isInSneakingPose() ? 0.2617994F : 0.0F), - -2.4F, 3.3F - ); - this.rightArm.yaw = this.head.yaw - 0.4F; - } else { - this.leftArm.pitch = MathHelper.clamp( - this.head.pitch - 1.7F - (entity.isInSneakingPose() ? 0.2617994F : 0.0F), - -2.4F, 3.3F - ); - this.leftArm.yaw = this.head.yaw + 0.4F; + if (entity.getActiveItem().getItem() instanceof Joint) { + if (useRight) { + this.rightArm.pitch = MathHelper.clamp( + this.head.pitch - 1.7F - (entity.isInSneakingPose() ? 0.2617994F : 0.0F), + -2.4F, 3.3F + ); + this.rightArm.yaw = this.head.yaw - 0.4F; + } else { + this.leftArm.pitch = MathHelper.clamp( + this.head.pitch - 1.7F - (entity.isInSneakingPose() ? 0.2617994F : 0.0F), + -2.4F, 3.3F + ); + this.leftArm.yaw = this.head.yaw + 0.4F; + } + } + if (entity.getActiveItem().getItem() instanceof RevolverItem && entity.isSneaking()) { + if (useRight) { + float extraOut = MathHelper.clamp(-this.head.yaw, 0F, 1F) * 0.4F; + float pitchDrop = MathHelper.clamp(-(this.head.pitch + 1.0F), 0F, 1F) * 0.4F; + this.rightArm.pitch = -(float)Math.PI / 2F + pitchDrop; + this.rightArm.yaw = this.head.yaw * (this.head.yaw > 0 ? 1.4F : 2.0F) + (float)Math.PI / 2F + extraOut; + this.rightArm.roll = 0F; + // Reset left arm to idle (undo vanilla two-hand pose) + this.leftArm.pitch = 0F; + this.leftArm.yaw = 0F; + this.leftArm.roll = 0F; + } else { + float extraOut = MathHelper.clamp(this.head.yaw, 0F, 1F) * 0.4F; + float pitchDrop = MathHelper.clamp(-(this.head.pitch + 1.0F), 0F, 1F) * 0.4F; + this.leftArm.pitch = -(float)Math.PI / 2F + pitchDrop; + this.leftArm.yaw = this.head.yaw * (this.head.yaw < 0 ? 1.4F : 2.0F) - (float)Math.PI / 2F - extraOut; + this.leftArm.roll = 0F; + // Reset right arm to idle (undo vanilla two-hand pose) + this.rightArm.pitch = 0F; + this.rightArm.yaw = 0F; + this.rightArm.roll = 0F; + } } } } \ No newline at end of file diff --git a/src/client/java/dev/tggamesyt/szar/client/mixin/HeldItemRendererMixin.java b/src/client/java/dev/tggamesyt/szar/client/mixin/HeldItemRendererMixin.java index eb9673b..9984783 100644 --- a/src/client/java/dev/tggamesyt/szar/client/mixin/HeldItemRendererMixin.java +++ b/src/client/java/dev/tggamesyt/szar/client/mixin/HeldItemRendererMixin.java @@ -1,6 +1,7 @@ package dev.tggamesyt.szar.client.mixin; import dev.tggamesyt.szar.Joint; +import dev.tggamesyt.szar.RevolverItem; import net.minecraft.client.network.AbstractClientPlayerEntity; import net.minecraft.client.render.VertexConsumerProvider; import net.minecraft.client.render.item.HeldItemRenderer; @@ -32,37 +33,66 @@ public abstract class HeldItemRendererMixin { int light, CallbackInfo ci ) { - if (!(item.getItem() instanceof Joint)) return; - // only override position while actively using, otherwise let normal rendering handle equip/unequip - if (!player.isUsingItem() || player.getActiveHand() != hand || player.getItemUseTimeLeft() <= 0) return; + if (item.getItem() instanceof Joint) { + // only override position while actively using, otherwise let normal rendering handle equip/unequip + if (!player.isUsingItem() || player.getActiveHand() != hand || player.getItemUseTimeLeft() <= 0) return; - boolean isMainHand = hand == Hand.MAIN_HAND; - Arm arm = isMainHand ? player.getMainArm() : player.getMainArm().getOpposite(); - boolean isRight = arm == Arm.RIGHT; + boolean isMainHand = hand == Hand.MAIN_HAND; + Arm arm = isMainHand ? player.getMainArm() : player.getMainArm().getOpposite(); + boolean isRight = arm == Arm.RIGHT; - matrices.push(); - // rotate 80 degrees toward player (around Y axis, so it faces them) - matrices.translate( - 0.0F, - -0.15F, // was -0.35F, more negative = higher up - -0.5F - ); + matrices.push(); + // rotate 80 degrees toward player (around Y axis, so it faces them) + matrices.translate( + 0.0F, + -0.15F, // was -0.35F, more negative = higher up + -0.5F + ); - matrices.multiply(RotationAxis.POSITIVE_X.rotationDegrees(95.0F)); - matrices.translate(0.0F, equipProgress * -0.6F, 0.0F); + matrices.multiply(RotationAxis.POSITIVE_X.rotationDegrees(95.0F)); + matrices.translate(0.0F, equipProgress * -0.6F, 0.0F); - HeldItemRenderer self = (HeldItemRenderer)(Object)this; - self.renderItem( - player, - item, - isRight ? ModelTransformationMode.FIRST_PERSON_RIGHT_HAND : ModelTransformationMode.FIRST_PERSON_LEFT_HAND, - !isRight, - matrices, - vertexConsumers, - light - ); + HeldItemRenderer self = (HeldItemRenderer) (Object) this; + self.renderItem( + player, + item, + isRight ? ModelTransformationMode.FIRST_PERSON_RIGHT_HAND : ModelTransformationMode.FIRST_PERSON_LEFT_HAND, + !isRight, + matrices, + vertexConsumers, + light + ); - matrices.pop(); - ci.cancel(); + matrices.pop(); + ci.cancel(); + } + + if (item.getItem() instanceof RevolverItem + && player.isUsingItem() + && player.getActiveHand() == hand) { + + boolean isMainHand = hand == Hand.MAIN_HAND; + Arm arm = isMainHand ? player.getMainArm() : player.getMainArm().getOpposite(); + boolean isRight = arm == Arm.RIGHT; + + matrices.push(); + + // Center in middle of screen regardless of hand + matrices.translate( + isMainHand ? -0.18F : 0.18F, + -0.5F, + -0.5F + ); + + matrices.translate(0.0F, equipProgress * -0.6F, 0.0F); + + HeldItemRenderer self = (HeldItemRenderer) (Object) this; + self.renderItem(player, item, + isRight ? ModelTransformationMode.FIRST_PERSON_RIGHT_HAND : ModelTransformationMode.FIRST_PERSON_LEFT_HAND, + !isRight, matrices, vertexConsumers, light); + + matrices.pop(); + ci.cancel(); + } } } \ No newline at end of file diff --git a/src/client/java/dev/tggamesyt/szar/client/mixin/PlayerEntityRendererMixin.java b/src/client/java/dev/tggamesyt/szar/client/mixin/PlayerEntityRendererMixin.java index 26bf8ce..5ccc47c 100644 --- a/src/client/java/dev/tggamesyt/szar/client/mixin/PlayerEntityRendererMixin.java +++ b/src/client/java/dev/tggamesyt/szar/client/mixin/PlayerEntityRendererMixin.java @@ -21,7 +21,6 @@ public abstract class PlayerEntityRendererMixin { private void addVideoFeature(EntityRendererFactory.Context ctx, boolean slim, CallbackInfo ci) { PlayerEntityRenderer renderer = (PlayerEntityRenderer)(Object)this; - renderer.addFeature(new VideoHeadFeature(renderer)); } diff --git a/src/client/java/dev/tggamesyt/szar/client/mixin/PlayerHeldItemFeatureRendererMixin.java b/src/client/java/dev/tggamesyt/szar/client/mixin/PlayerHeldItemFeatureRendererMixin.java index 931618f..6d31aab 100644 --- a/src/client/java/dev/tggamesyt/szar/client/mixin/PlayerHeldItemFeatureRendererMixin.java +++ b/src/client/java/dev/tggamesyt/szar/client/mixin/PlayerHeldItemFeatureRendererMixin.java @@ -1,8 +1,10 @@ package dev.tggamesyt.szar.client.mixin; import dev.tggamesyt.szar.Joint; +import dev.tggamesyt.szar.RevolverItem; import net.minecraft.client.model.ModelPart; import net.minecraft.client.render.VertexConsumerProvider; +import net.minecraft.client.render.entity.feature.HeadFeatureRenderer; import net.minecraft.client.render.entity.feature.PlayerHeldItemFeatureRenderer; import net.minecraft.client.render.entity.model.ModelWithHead; import net.minecraft.client.render.item.HeldItemRenderer; @@ -12,6 +14,7 @@ import net.minecraft.entity.LivingEntity; import net.minecraft.item.ItemStack; import net.minecraft.util.Arm; import net.minecraft.util.math.MathHelper; +import net.minecraft.util.math.RotationAxis; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; @@ -53,7 +56,7 @@ public abstract class PlayerHeldItemFeatureRendererMixin= 1.0F; + } + @Unique private static boolean isAprilFools() { LocalDate today = LocalDate.now(); @@ -88,6 +106,7 @@ public class TitleScreenBackgroundMixin { private void onRenderHead(DrawContext context, int mouseX, int mouseY, float delta, CallbackInfo ci) { if (!isAprilFools()) return; loadFrames(); + if (FRAMES.isEmpty()) return; // don't advance if nothing loaded long now = System.currentTimeMillis(); if (now - lastFrameTime >= FRAME_DURATION_MS) { @@ -108,11 +127,20 @@ public class TitleScreenBackgroundMixin { float u, float v, int regionWidth, int regionHeight, int textureWidth, int textureHeight) { - if (isAprilFools() && VANILLA_OVERLAY.equals(texture) && !FRAMES.isEmpty()) { - // Each frame is a square texture so region = full texture size - context.drawTexture(FRAMES.get(currentFrame), x, y, width, height, 0.0F, 0.0F, 720, 720, 720, 720); - } else { + if (!isAprilFools() || !VANILLA_OVERLAY.equals(texture) || FRAMES.isEmpty()) { context.drawTexture(texture, x, y, width, height, u, v, regionWidth, regionHeight, textureWidth, textureHeight); + return; } + + float alpha = getFadeAlpha(); + if (alpha <= 0f) return; // fully transparent, skip entirely + + // Apply alpha via RenderSystem before drawing + RenderSystem.enableBlend(); + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, alpha); + int safeFrame = FRAMES.isEmpty() ? 0 : currentFrame % FRAMES.size(); // guard divide-by-zero + context.drawTexture(FRAMES.get(safeFrame), x, y, width, height, 0.0F, 0.0F, 720, 720, 720, 720); + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); // reset alpha + RenderSystem.disableBlend(); } } \ No newline at end of file diff --git a/src/main/java/dev/tggamesyt/szar/AK47Item.java b/src/main/java/dev/tggamesyt/szar/AK47Item.java index ae85184..45c79a3 100644 --- a/src/main/java/dev/tggamesyt/szar/AK47Item.java +++ b/src/main/java/dev/tggamesyt/szar/AK47Item.java @@ -4,6 +4,8 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; +import net.minecraft.sound.SoundCategory; +import net.minecraft.sound.SoundEvents; import net.minecraft.util.Hand; import net.minecraft.util.TypedActionResult; import net.minecraft.util.UseAction; @@ -24,7 +26,8 @@ public class AK47Item extends Item { if (player.getItemCooldownManager().isCoolingDown(this)) return; if (!consumeAmmo(player)) return; - + player.getWorld().playSound(null, player.getBlockPos(), + SoundEvents.ENTITY_GENERIC_EXPLODE, SoundCategory.PLAYERS, 0.5f, 1.8f); BulletEntity bullet = new BulletEntity(world, player); bullet.setVelocity(player, player.getPitch(), player.getYaw(), 0f, 4.5f, 1.0f); world.spawnEntity(bullet); diff --git a/src/main/java/dev/tggamesyt/szar/BulletEntity.java b/src/main/java/dev/tggamesyt/szar/BulletEntity.java index 3e5d77c..4cc5fad 100644 --- a/src/main/java/dev/tggamesyt/szar/BulletEntity.java +++ b/src/main/java/dev/tggamesyt/szar/BulletEntity.java @@ -1,13 +1,22 @@ package dev.tggamesyt.szar; +import net.fabricmc.fabric.api.networking.v1.PacketByteBufs; +import net.fabricmc.fabric.api.networking.v1.PlayerLookup; +import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityType; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.damage.DamageSource; import net.minecraft.entity.projectile.thrown.ThrownItemEntity; import net.minecraft.item.Item; +import net.minecraft.network.PacketByteBuf; +import net.minecraft.particle.ParticleTypes; import net.minecraft.registry.RegistryKeys; +import net.minecraft.server.world.ServerWorld; +import net.minecraft.util.hit.BlockHitResult; import net.minecraft.util.hit.EntityHitResult; +import net.minecraft.util.math.Direction; +import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; public class BulletEntity extends ThrownItemEntity { @@ -75,4 +84,31 @@ public class BulletEntity extends ThrownItemEntity { discard(); } + + @Override + protected void onBlockHit(net.minecraft.util.hit.BlockHitResult hit) { + super.onBlockHit(hit); + // Use exact hit position + nudge along face normal to sit on surface + Vec3d pos = hit.getPos(); + Direction face = hit.getSide(); + spawnImpact(pos, face); + discard(); + } + + private void spawnImpact(Vec3d pos, Direction face) { + if (!(getWorld() instanceof ServerWorld serverWorld)) return; + + serverWorld.spawnParticles(ParticleTypes.SMOKE, + pos.x, pos.y, pos.z, 5, 0.05, 0.05, 0.05, 0.02); + + PacketByteBuf buf = PacketByteBufs.create(); + buf.writeDouble(pos.x); + buf.writeDouble(pos.y); + buf.writeDouble(pos.z); + buf.writeEnumConstant(face); + + PlayerLookup.tracking(this).forEach(player -> + ServerPlayNetworking.send(player, Szar.BULLET_IMPACT, buf) + ); + } } \ No newline at end of file diff --git a/src/main/java/dev/tggamesyt/szar/PoliceEntity.java b/src/main/java/dev/tggamesyt/szar/PoliceEntity.java index aae2d81..69aac7e 100644 --- a/src/main/java/dev/tggamesyt/szar/PoliceEntity.java +++ b/src/main/java/dev/tggamesyt/szar/PoliceEntity.java @@ -13,6 +13,7 @@ import net.minecraft.entity.mob.MobEntity; import net.minecraft.entity.mob.PathAwareEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Items; +import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.util.TypeFilter; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Box; @@ -51,11 +52,11 @@ public class PoliceEntity extends PathAwareEntity { Box searchBox = new Box(pos).expand(60); - int playerCount = world.getEntitiesByType( + List nearbyPlayers = world.getEntitiesByType( TypeFilter.instanceOf(PlayerEntity.class), searchBox, e -> true - ).size(); + ); int policeCount = world.getEntitiesByType( TypeFilter.instanceOf(PoliceEntity.class), @@ -63,8 +64,22 @@ public class PoliceEntity extends PathAwareEntity { e -> true ).size(); - int limit = Math.min(playerCount, 10); - return policeCount < limit; + int limit = Math.min(nearbyPlayers.size(), 10); + if (policeCount >= limit) return false; + + // Check if at least one nearby player is off cooldown + ServerPlayerEntity eligiblePlayer = nearbyPlayers.stream() + .filter(p -> p instanceof ServerPlayerEntity) + .map(p -> (ServerPlayerEntity) p) + .filter(PoliceSpawnTimerStore::canSpawnForPlayer) + .findFirst() + .orElse(null); + + if (eligiblePlayer == null) return false; + + // Record the spawn against that player + PoliceSpawnTimerStore.recordSpawn(eligiblePlayer); + return true; } diff --git a/src/main/java/dev/tggamesyt/szar/PoliceSpawnTimerStore.java b/src/main/java/dev/tggamesyt/szar/PoliceSpawnTimerStore.java new file mode 100644 index 0000000..8cf015a --- /dev/null +++ b/src/main/java/dev/tggamesyt/szar/PoliceSpawnTimerStore.java @@ -0,0 +1,29 @@ +package dev.tggamesyt.szar; + +import net.minecraft.server.network.ServerPlayerEntity; +import java.util.Map; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; + +public class PoliceSpawnTimerStore { + + private static final long COOLDOWN_TICKS = 20 * 60 * 10L; // 10 minutes in ticks + + // UUID → last spawn time in world ticks + private static final Map lastSpawnTime = new ConcurrentHashMap<>(); + + public static boolean canSpawnForPlayer(ServerPlayerEntity player) { + long now = player.getWorld().getTime(); + Long last = lastSpawnTime.get(player.getUuid()); + if (last == null) return true; + return (now - last) >= COOLDOWN_TICKS; + } + + public static void recordSpawn(ServerPlayerEntity player) { + lastSpawnTime.put(player.getUuid(), player.getWorld().getTime()); + } + + public static void remove(ServerPlayerEntity player) { + lastSpawnTime.remove(player.getUuid()); + } +} \ No newline at end of file diff --git a/src/main/java/dev/tggamesyt/szar/RouletteBlockEntity.java b/src/main/java/dev/tggamesyt/szar/RouletteBlockEntity.java index 2c6e071..5fe012c 100644 --- a/src/main/java/dev/tggamesyt/szar/RouletteBlockEntity.java +++ b/src/main/java/dev/tggamesyt/szar/RouletteBlockEntity.java @@ -145,7 +145,8 @@ public class RouletteBlockEntity extends BlockEntity { int total = stack.getCount() * multiplier; while (total > 0) { int batchSize = Math.min(total, stack.getMaxCount()); - ItemStack give = new ItemStack(stack.getItem(), batchSize); + ItemStack give = stack.copy(); + give.setCount(batchSize); player.getInventory().offerOrDrop(give); total -= batchSize; } diff --git a/src/main/java/dev/tggamesyt/szar/SlotMachineBlockEntity.java b/src/main/java/dev/tggamesyt/szar/SlotMachineBlockEntity.java index fff003b..40be946 100644 --- a/src/main/java/dev/tggamesyt/szar/SlotMachineBlockEntity.java +++ b/src/main/java/dev/tggamesyt/szar/SlotMachineBlockEntity.java @@ -133,22 +133,28 @@ public class SlotMachineBlockEntity extends BlockEntity { void finishSpin() { if (getForceWin()) { int payout = switch (getwinTier()) { - case 0 -> getcurrentBetAmount() * 2; // fruit 2x - case 1 -> getcurrentBetAmount() * 10; // golden apple small - case 2 -> getcurrentBetAmount() * 30; // jackpot + case 0 -> getcurrentBetAmount() * 2; + case 1 -> getcurrentBetAmount() * 10; + case 2 -> getcurrentBetAmount() * 30; default -> 0; }; Direction facing = getCachedState().get(SlotMachineBlock.FACING); BlockPos drop = getPos().offset(facing); assert getWorld() != null; - ItemScatterer.spawn( - getWorld(), - drop.getX(), - drop.getY(), - drop.getZ(), - new ItemStack(getcurrentBetStack().getItem(), payout) - ); + + // Spawn payout stacks, respecting max stack size + ItemStack template = getcurrentBetStack().copy(); + int remaining = payout; + int maxStack = template.getMaxCount(); + + while (remaining > 0) { + int count = Math.min(remaining, maxStack); + ItemStack stack = template.copy(); + stack.setCount(count); + ItemScatterer.spawn(getWorld(), drop.getX(), drop.getY(), drop.getZ(), stack); + remaining -= count; + } } setcurrentBetAmount(0); setcurrentBetStack(ItemStack.EMPTY); diff --git a/src/main/java/dev/tggamesyt/szar/Szar.java b/src/main/java/dev/tggamesyt/szar/Szar.java index b1a555d..048235b 100644 --- a/src/main/java/dev/tggamesyt/szar/Szar.java +++ b/src/main/java/dev/tggamesyt/szar/Szar.java @@ -27,6 +27,7 @@ import net.minecraft.block.*; import net.minecraft.block.entity.BlockEntity; import net.minecraft.block.entity.BlockEntityType; import net.minecraft.entity.*; +import net.minecraft.entity.damage.DamageSource; import net.minecraft.entity.damage.DamageType; import net.minecraft.entity.data.DataTracker; import net.minecraft.entity.data.TrackedData; @@ -93,6 +94,7 @@ public class Szar implements ModInitializer { public static final Identifier REVOLVER_SHOOT = new Identifier(MOD_ID, "revolver_shoot"); public static final Identifier REVOLVER_SPIN = new Identifier(MOD_ID, "revolver_spin"); public static final Identifier REVOLVER_SYNC = new Identifier(MOD_ID, "revolver_sync"); + public static final Identifier BULLET_IMPACT = new Identifier(MOD_ID, "bullet_impact"); public static final Identifier REVOLVER_CHAMBER_CHANGE = new Identifier(MOD_ID, "revolver_chamber_change"); public static final SoundEvent BESZIV = Registry.register( Registries.SOUND_EVENT, @@ -371,6 +373,9 @@ public class Szar implements ModInitializer { private final Map sleepingPlayers = new HashMap<>(); @Override public void onInitialize() { + ServerPlayConnectionEvents.DISCONNECT.register((handler, server) -> { + PoliceSpawnTimerStore.remove(handler.player); + }); ServerPlayNetworking.registerGlobalReceiver(REVOLVER_CHAMBER_CHANGE, (server, player, handler, buf, responseSender) -> { int index = buf.readInt(); boolean wasLoaded = buf.readBoolean(); // true = unloading, false = loading @@ -448,7 +453,11 @@ public class Szar implements ModInitializer { SoundEvents.ENTITY_GENERIC_EXPLODE, SoundCategory.PLAYERS, 0.5f, 1.8f); if (isHeadshot) { - player.damage(player.getWorld().getDamageSources().genericKill(), Float.MAX_VALUE); + RegistryEntry bullet_damage = SERVER.getRegistryManager() + .get(RegistryKeys.DAMAGE_TYPE) + .getEntry(BULLET_DAMAGE) + .orElseThrow(() -> new IllegalStateException("Bullet DamageType not registered!")); + player.damage(new DamageSource(bullet_damage, player), Float.MAX_VALUE); } else { BulletEntity bullet = new BulletEntity(player.getWorld(), player); bullet.setVelocity(player, player.getPitch(), player.getYaw(), 0f, 4.5f, 0.0f); diff --git a/src/main/resources/assets/szar/lang/en_us.json b/src/main/resources/assets/szar/lang/en_us.json index 549bbeb..f26a248 100644 --- a/src/main/resources/assets/szar/lang/en_us.json +++ b/src/main/resources/assets/szar/lang/en_us.json @@ -125,5 +125,8 @@ "item.szar.revolver": "Revolver", "item.szar.revolver_bullet": "Revolver Bullet", - "item.szar.bullet_shell": "Revolver Bullet Shell" + "item.szar.bullet_shell": "Revolver Bullet Shell", + + "key.categories.szar": "Szar", + "key.szar.spin": "Interact with Revolver" } diff --git a/src/main/resources/assets/szar/models/item/ak47.json b/src/main/resources/assets/szar/models/item/ak47.json index eca5304..251fe75 100644 --- a/src/main/resources/assets/szar/models/item/ak47.json +++ b/src/main/resources/assets/szar/models/item/ak47.json @@ -1,89 +1,517 @@ { - "format_version": "1.9.0", - "credit": "Made with Blockbench", + "format_version": "1.21.11", + "credit": "Converted from TechGuns ModelAK", + "texture_size": [128, 64], "textures": { - "0": "szar:item/ak47", - "particle": "szar:item/ak47" + "0": "szar:item/ak47texture", + "particle": "szar:item/ak47texture" }, "elements": [ { - "from": [7, 0, 7], - "to": [9, 7, 9], - "rotation": {"angle": 22.5, "axis": "x", "origin": [8, 0, 9]}, + "name": "Magazine05", + "from": [3.25, 8, 8], + "to": [4.25, 12, 9], + "rotation": {"angle": 0, "axis": "x", "origin": [3.25, 12, 8]}, "faces": { - "north": {"uv": [4, 4, 6, 11], "texture": "#0"}, - "east": {"uv": [6, 4, 8, 11], "texture": "#0"}, - "south": {"uv": [8, 4, 10, 11], "texture": "#0"}, - "west": {"uv": [10, 0, 12, 7], "texture": "#0"}, - "up": {"uv": [12, 15, 10, 13], "texture": "#0"}, - "down": {"uv": [14, 13, 12, 15], "texture": "#0"} + "north": {"uv": [0.25, 0.5, 0.5, 2.5], "texture": "#0"}, + "east": {"uv": [0.5, 0.5, 0.75, 2.5], "texture": "#0"}, + "south": {"uv": [0.75, 0.5, 1, 2.5], "texture": "#0"}, + "west": {"uv": [0, 0.5, 0.25, 2.5], "texture": "#0"}, + "up": {"uv": [0.25, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0.5, 0, 0.75, 0.5], "texture": "#0"} } }, { - "from": [7, 6, 3], - "to": [9, 8, 13], - "rotation": {"angle": 0, "axis": "y", "origin": [7, 7, 10]}, + "name": "Grip2", + "from": [3, 10.5, 17.5], + "to": [4.5, 11.5, 18], "faces": { - "north": {"uv": [0, 14, 2, 16], "texture": "#0"}, - "east": {"uv": [0, 0, 10, 2], "texture": "#0"}, - "south": {"uv": [2, 14, 4, 16], "texture": "#0"}, - "west": {"uv": [0, 2, 10, 4], "texture": "#0"}, - "up": {"uv": [2, 14, 0, 4], "texture": "#0"}, - "down": {"uv": [4, 4, 2, 14], "texture": "#0"} + "north": {"uv": [0.125, 3, 0.5, 3.5], "texture": "#0"}, + "east": {"uv": [0.5, 3, 0.625, 3.5], "texture": "#0"}, + "south": {"uv": [0.625, 3, 1, 3.5], "texture": "#0"}, + "west": {"uv": [0, 3, 0.125, 3.5], "texture": "#0"}, + "up": {"uv": [0.125, 2.75, 0.5, 3], "texture": "#0"}, + "down": {"uv": [0.5, 2.75, 0.875, 3], "texture": "#0"} } }, { - "from": [7, 4, 13], - "to": [9, 8, 15], - "rotation": {"angle": 0, "axis": "y", "origin": [7, 7, 10]}, + "name": "MagHolder", + "from": [3, 10, 11.5], + "to": [4.5, 11.5, 12.5], "faces": { - "north": {"uv": [10, 7, 12, 11], "texture": "#0"}, - "east": {"uv": [4, 11, 6, 15], "texture": "#0"}, - "south": {"uv": [6, 11, 8, 15], "texture": "#0"}, - "west": {"uv": [8, 11, 10, 15], "texture": "#0"}, - "up": {"uv": [16, 4, 14, 2], "texture": "#0"}, - "down": {"uv": [16, 4, 14, 6], "texture": "#0"} + "north": {"uv": [2.5, 4, 2.875, 4.75], "texture": "#0"}, + "east": {"uv": [2.875, 4, 3.125, 4.75], "texture": "#0"}, + "south": {"uv": [3.125, 4, 3.5, 4.75], "texture": "#0"}, + "west": {"uv": [2.25, 4, 2.5, 4.75], "texture": "#0"}, + "up": {"uv": [2.5, 3.5, 2.875, 4], "texture": "#0"}, + "down": {"uv": [2.875, 3.5, 3.25, 4], "texture": "#0"} } }, { - "from": [7, 5, 15], - "to": [9, 7, 19], - "rotation": {"angle": 22.5, "axis": "x", "origin": [8, 7, 15]}, + "name": "Trigger02", + "from": [3.5, 10.25, 14.5], + "to": [4, 11.75, 15], + "rotation": {"angle": -22.5, "axis": "x", "origin": [3.5, 11.75, 14.5]}, "faces": { - "north": {"uv": [14, 6, 16, 8], "texture": "#0"}, - "east": {"uv": [10, 11, 14, 13], "texture": "#0"}, - "south": {"uv": [14, 8, 16, 10], "texture": "#0"}, - "west": {"uv": [12, 0, 16, 2], "texture": "#0"}, - "up": {"uv": [14, 6, 12, 2], "texture": "#0"}, - "down": {"uv": [14, 6, 12, 10], "texture": "#0"} + "north": {"uv": [1.75, 4, 1.875, 4.75], "texture": "#0"}, + "east": {"uv": [1.875, 4, 2, 4.75], "texture": "#0"}, + "south": {"uv": [2, 4, 2.125, 4.75], "texture": "#0"}, + "west": {"uv": [1.625, 4, 1.75, 4.75], "texture": "#0"}, + "up": {"uv": [1.75, 3.75, 1.875, 4], "texture": "#0"}, + "down": {"uv": [1.875, 3.75, 2, 4], "texture": "#0"} + } + }, + { + "name": "Barrel", + "from": [3.75, 12.75, -3.5], + "to": [5.25, 14.25, -2], + "rotation": {"angle": 45, "axis": "z", "origin": [3.75, 14.25, -3.5]}, + "faces": { + "north": {"uv": [5, 7.5, 5.375, 8.25], "texture": "#0"}, + "east": {"uv": [5.375, 7.5, 5.75, 8.25], "texture": "#0"}, + "south": {"uv": [5.75, 7.5, 6.125, 8.25], "texture": "#0"}, + "west": {"uv": [4.625, 7.5, 5, 8.25], "texture": "#0"}, + "up": {"uv": [5, 6.75, 5.375, 7.5], "texture": "#0"}, + "down": {"uv": [5.375, 6.75, 5.75, 7.5], "texture": "#0"} + } + }, + { + "name": "Receiver06", + "from": [3.5, 14.5, 18.25], + "to": [4, 15, 18.75], + "rotation": {"angle": -45, "axis": "x", "origin": [3.5, 15, 18.25]}, + "faces": { + "north": {"uv": [6.125, 0.25, 6.25, 0.5], "texture": "#0"}, + "east": {"uv": [6.25, 0.25, 6.375, 0.5], "texture": "#0"}, + "south": {"uv": [6.375, 0.25, 6.5, 0.5], "texture": "#0"}, + "west": {"uv": [6, 0.25, 6.125, 0.5], "texture": "#0"}, + "up": {"uv": [6.125, 0, 6.25, 0.25], "texture": "#0"}, + "down": {"uv": [6.25, 0, 6.375, 0.25], "texture": "#0"} + } + }, + { + "name": "Trigger01", + "from": [3.25, 9.5, 13], + "to": [4.25, 10, 16.5], + "faces": { + "north": {"uv": [3.625, 5, 3.875, 5.25], "texture": "#0"}, + "east": {"uv": [3.875, 5, 4.75, 5.25], "texture": "#0"}, + "south": {"uv": [4.75, 5, 5, 5.25], "texture": "#0"}, + "west": {"uv": [2.75, 5, 3.625, 5.25], "texture": "#0"}, + "up": {"uv": [3.625, 3.25, 3.875, 5], "texture": "#0"}, + "down": {"uv": [3.875, 3.25, 4.125, 5], "texture": "#0"} + } + }, + { + "name": "Magazine01", + "from": [3.25, 9.5, 12.5], + "to": [4.25, 11.5, 13], + "faces": { + "north": {"uv": [4.375, 3.5, 4.625, 4.5], "texture": "#0"}, + "east": {"uv": [4.625, 3.5, 4.75, 4.5], "texture": "#0"}, + "south": {"uv": [4.75, 3.5, 5, 4.5], "texture": "#0"}, + "west": {"uv": [4.25, 3.5, 4.375, 4.5], "texture": "#0"}, + "up": {"uv": [4.375, 3.25, 4.625, 3.5], "texture": "#0"}, + "down": {"uv": [4.625, 3.25, 4.875, 3.5], "texture": "#0"} + } + }, + { + "name": "Magazine02", + "from": [3, 10, 15], + "to": [4.5, 11.5, 17.5], + "faces": { + "north": {"uv": [0.625, 5, 1, 5.75], "texture": "#0"}, + "east": {"uv": [1, 5, 1.625, 5.75], "texture": "#0"}, + "south": {"uv": [1.625, 5, 2, 5.75], "texture": "#0"}, + "west": {"uv": [0, 5, 0.625, 5.75], "texture": "#0"}, + "up": {"uv": [0.625, 3.75, 1, 5], "texture": "#0"}, + "down": {"uv": [1, 3.75, 1.375, 5], "texture": "#0"} + } + }, + { + "name": "Grip1", + "from": [3, 6, 15.5], + "to": [4.5, 10, 17.5], + "rotation": {"angle": 22.5, "axis": "x", "origin": [3, 10, 15.5]}, + "faces": { + "north": {"uv": [3.75, 1, 4.125, 3], "texture": "#0"}, + "east": {"uv": [4.125, 1, 4.625, 3], "texture": "#0"}, + "south": {"uv": [4.625, 1, 5, 3], "texture": "#0"}, + "west": {"uv": [3.25, 1, 3.75, 3], "texture": "#0"}, + "up": {"uv": [3.75, 0, 4.125, 1], "texture": "#0"}, + "down": {"uv": [4.125, 0, 4.5, 1], "texture": "#0"} + } + }, + { + "name": "Magazine06", + "from": [3.25, 4.3, 7.5], + "to": [4.25, 8.3, 8.5], + "rotation": {"angle": -22.5, "axis": "x", "origin": [3.25, 8.3, 7.5]}, + "faces": { + "north": {"uv": [0.25, 0.5, 0.5, 2.5], "texture": "#0"}, + "east": {"uv": [0.5, 0.5, 0.75, 2.5], "texture": "#0"}, + "south": {"uv": [0.75, 0.5, 1, 2.5], "texture": "#0"}, + "west": {"uv": [0, 0.5, 0.25, 2.5], "texture": "#0"}, + "up": {"uv": [0.25, 0, 0.5, 0.5], "texture": "#0"}, + "down": {"uv": [0.5, 0, 0.75, 0.5], "texture": "#0"} + } + }, + { + "name": "Magazine03", + "from": [3, 8, 9], + "to": [4.5, 12, 11.5], + "rotation": {"angle": 0, "axis": "x", "origin": [3, 12, 9]}, + "faces": { + "north": {"uv": [1.75, 1.25, 2.125, 3.25], "texture": "#0"}, + "east": {"uv": [2.125, 1.25, 2.75, 3.25], "texture": "#0"}, + "south": {"uv": [2.75, 1.25, 3.125, 3.25], "texture": "#0"}, + "west": {"uv": [1.125, 1.25, 1.75, 3.25], "texture": "#0"}, + "up": {"uv": [1.75, 0, 2.125, 1.25], "texture": "#0"}, + "down": {"uv": [2.125, 0, 2.5, 1.25], "texture": "#0"} + } + }, + { + "name": "Magazine04", + "from": [3, 4, 8.5], + "to": [4.5, 8.5, 11], + "rotation": {"angle": -22.5, "axis": "x", "origin": [3, 8.5, 8.5]}, + "faces": { + "north": {"uv": [1.75, 1.25, 2.125, 3.5], "texture": "#0"}, + "east": {"uv": [2.125, 1.25, 2.75, 3.5], "texture": "#0"}, + "south": {"uv": [2.75, 1.25, 3.125, 3.5], "texture": "#0"}, + "west": {"uv": [1.125, 1.25, 1.75, 3.5], "texture": "#0"}, + "up": {"uv": [1.75, 0, 2.125, 1.25], "texture": "#0"}, + "down": {"uv": [2.125, 0, 2.5, 1.25], "texture": "#0"} + } + }, + { + "name": "Receiver03", + "from": [2.75, 14, 2.5], + "to": [4.75, 15.5, 6], + "faces": { + "north": {"uv": [6.875, 1.75, 7.375, 2.5], "texture": "#0"}, + "east": {"uv": [7.375, 1.75, 8.25, 2.5], "texture": "#0"}, + "south": {"uv": [8.25, 1.75, 8.75, 2.5], "texture": "#0"}, + "west": {"uv": [6, 1.75, 6.875, 2.5], "texture": "#0"}, + "up": {"uv": [6.875, 0, 7.375, 1.75], "texture": "#0"}, + "down": {"uv": [7.375, 0, 7.875, 1.75], "texture": "#0"} + } + }, + { + "name": "Handguard01", + "from": [3, 14, -2], + "to": [4.5, 15.5, 2.5], + "faces": { + "north": {"uv": [7.125, 4.75, 7.5, 5.5], "texture": "#0"}, + "east": {"uv": [7.5, 4.75, 8.625, 5.5], "texture": "#0"}, + "south": {"uv": [8.625, 4.75, 9, 5.5], "texture": "#0"}, + "west": {"uv": [6, 4.75, 7.125, 5.5], "texture": "#0"}, + "up": {"uv": [7.125, 2.5, 7.5, 4.75], "texture": "#0"}, + "down": {"uv": [7.5, 2.5, 7.875, 4.75], "texture": "#0"} + } + }, + { + "name": "Handguard02", + "from": [2.75, 11.5, -2], + "to": [4.75, 14, 5], + "faces": { + "north": {"uv": [13.25, 3.5, 13.75, 4.75], "texture": "#0"}, + "east": {"uv": [13.75, 3.5, 15.5, 4.75], "texture": "#0"}, + "south": {"uv": [15.5, 3.5, 16, 4.75], "texture": "#0"}, + "west": {"uv": [11.5, 3.5, 13.25, 4.75], "texture": "#0"}, + "up": {"uv": [13.25, 0, 13.75, 3.5], "texture": "#0"}, + "down": {"uv": [13.75, 0, 14.25, 3.5], "texture": "#0"} + } + }, + { + "name": "Barrel03", + "from": [3.5, 13.0167, -13], + "to": [4, 16.0167, -12.5], + "rotation": {"angle": 22.5, "axis": "x", "origin": [3.5, 16.0167, -13]}, + "faces": { + "north": {"uv": [0.125, 11.75, 0.25, 13.25], "texture": "#0"}, + "east": {"uv": [0.25, 11.75, 0.375, 13.25], "texture": "#0"}, + "south": {"uv": [0.375, 11.75, 0.5, 13.25], "texture": "#0"}, + "west": {"uv": [0, 11.75, 0.125, 13.25], "texture": "#0"}, + "up": {"uv": [0.125, 11.5, 0.25, 11.75], "texture": "#0"}, + "down": {"uv": [0.25, 11.5, 0.375, 11.75], "texture": "#0"} + } + }, + { + "name": "Barrel02", + "from": [3.75, 14.5167, -6.5], + "to": [4.75, 15.5167, -2], + "rotation": {"angle": 45, "axis": "z", "origin": [3.75, 15.5167, -6.5]}, + "faces": { + "north": {"uv": [5.75, 10.75, 6, 11.25], "texture": "#0"}, + "east": {"uv": [6, 10.75, 7.125, 11.25], "texture": "#0"}, + "south": {"uv": [7.125, 10.75, 7.375, 11.25], "texture": "#0"}, + "west": {"uv": [4.625, 10.75, 5.75, 11.25], "texture": "#0"}, + "up": {"uv": [5.75, 8.5, 6, 10.75], "texture": "#0"}, + "down": {"uv": [6, 8.5, 6.25, 10.75], "texture": "#0"} + } + }, + { + "name": "Receiver02", + "from": [2.75, 11.5, 5], + "to": [4.75, 14, 19], + "faces": { + "north": {"uv": [3.5, 14.75, 4, 16], "texture": "#0"}, + "east": {"uv": [4, 14.75, 7.5, 16], "texture": "#0"}, + "south": {"uv": [7.5, 14.75, 8, 16], "texture": "#0"}, + "west": {"uv": [0, 14.75, 3.5, 16], "texture": "#0"}, + "up": {"uv": [3.5, 7.75, 4, 14.75], "texture": "#0"}, + "down": {"uv": [4, 7.75, 4.5, 14.75], "texture": "#0"} + } + }, + { + "name": "Stock09", + "from": [2.75, 13.5, 19], + "to": [4.75, 14, 20], + "faces": { + "north": {"uv": [9.75, 9.25, 10.25, 9.5], "texture": "#0"}, + "east": {"uv": [10.25, 9.25, 10.5, 9.5], "texture": "#0"}, + "south": {"uv": [10.5, 9.25, 11, 9.5], "texture": "#0"}, + "west": {"uv": [9.5, 9.25, 9.75, 9.5], "texture": "#0"}, + "up": {"uv": [9.75, 8.75, 10.25, 9.25], "texture": "#0"}, + "down": {"uv": [10.25, 8.75, 10.75, 9.25], "texture": "#0"} + } + }, + { + "name": "Barrel04", + "from": [3.25, 12.5167, -8], + "to": [4.25, 13.5167, -5.5], + "rotation": {"angle": 45, "axis": "x", "origin": [3.25, 13.5167, -8]}, + "faces": { + "north": {"uv": [2.25, 11.25, 2.5, 11.75], "texture": "#0"}, + "east": {"uv": [2.5, 11.25, 3.125, 11.75], "texture": "#0"}, + "south": {"uv": [3.125, 11.25, 3.375, 11.75], "texture": "#0"}, + "west": {"uv": [1.625, 11.25, 2.25, 11.75], "texture": "#0"}, + "up": {"uv": [2.25, 10, 2.5, 11.25], "texture": "#0"}, + "down": {"uv": [2.5, 10, 2.75, 11.25], "texture": "#0"} + } + }, + { + "name": "BarrelIS", + "from": [3.5, 16.0167, -13.5], + "to": [4, 16.5167, -12.5], + "faces": { + "north": {"uv": [0.25, 8.75, 0.375, 9], "texture": "#0"}, + "east": {"uv": [0.375, 8.75, 0.625, 9], "texture": "#0"}, + "south": {"uv": [0.625, 8.75, 0.75, 9], "texture": "#0"}, + "west": {"uv": [0, 8.75, 0.25, 9], "texture": "#0"}, + "up": {"uv": [0.25, 8.25, 0.375, 8.75], "texture": "#0"}, + "down": {"uv": [0.375, 8.25, 0.5, 8.75], "texture": "#0"} + } + }, + { + "name": "BarrelMain", + "from": [3.75, 12.75, -16], + "to": [4.75, 13.75, -3.5], + "rotation": {"angle": 45, "axis": "z", "origin": [3.75, 13.75, -17]}, + "faces": { + "north": {"uv": [12.125, 15.5, 12.375, 16], "texture": "#0"}, + "east": {"uv": [12.375, 15.5, 15.75, 16], "texture": "#0"}, + "south": {"uv": [15.75, 15.5, 16, 16], "texture": "#0"}, + "west": {"uv": [8.75, 15.5, 12.125, 16], "texture": "#0"}, + "up": {"uv": [12.125, 8.75, 12.375, 15.5], "texture": "#0"}, + "down": {"uv": [12.375, 8.75, 12.625, 15.5], "texture": "#0"} + } + }, + { + "name": "BarrelFront", + "from": [3.75, 12.75, -14], + "to": [5.25, 14.25, -11], + "rotation": {"angle": 45, "axis": "z", "origin": [3.75, 14.25, -14]}, + "faces": { + "north": {"uv": [0.75, 13.5, 1.125, 14.25], "texture": "#0"}, + "east": {"uv": [1.125, 13.5, 1.875, 14.25], "texture": "#0"}, + "south": {"uv": [1.875, 13.5, 2.25, 14.25], "texture": "#0"}, + "west": {"uv": [0, 13.5, 0.75, 14.25], "texture": "#0"}, + "up": {"uv": [0.75, 12, 1.125, 13.5], "texture": "#0"}, + "down": {"uv": [1.125, 12, 1.5, 13.5], "texture": "#0"} + } + }, + { + "name": "BarrelMid", + "from": [3.75, 12.75, -8], + "to": [5.25, 14.25, -6.5], + "rotation": {"angle": 45, "axis": "z", "origin": [3.75, 14.25, -8]}, + "faces": { + "north": {"uv": [0.375, 10.5, 0.75, 11.25], "texture": "#0"}, + "east": {"uv": [0.75, 10.5, 1.125, 11.25], "texture": "#0"}, + "south": {"uv": [1.125, 10.5, 1.5, 11.25], "texture": "#0"}, + "west": {"uv": [0, 10.5, 0.375, 11.25], "texture": "#0"}, + "up": {"uv": [0.375, 9.75, 0.75, 10.5], "texture": "#0"}, + "down": {"uv": [0.75, 9.75, 1.125, 10.5], "texture": "#0"} + } + }, + { + "name": "ISTop", + "from": [3.5, 15.0167, 3], + "to": [4, 15.5167, 6.5], + "rotation": {"angle": 0, "axis": "x", "origin": [3.5, 15.5167, 3]}, + "faces": { + "north": {"uv": [0.875, 7.75, 1, 8], "texture": "#0"}, + "east": {"uv": [1, 7.75, 1.875, 8], "texture": "#0"}, + "south": {"uv": [1.875, 7.75, 2, 8], "texture": "#0"}, + "west": {"uv": [0, 7.75, 0.875, 8], "texture": "#0"}, + "up": {"uv": [0.875, 6, 1, 7.75], "texture": "#0"}, + "down": {"uv": [1, 6, 1.125, 7.75], "texture": "#0"} + } + }, + { + "name": "ISFront", + "from": [3.5, 13.0167, -13.5], + "to": [4, 16.0167, -13], + "faces": { + "north": {"uv": [0.125, 11.75, 0.25, 13.25], "texture": "#0"}, + "east": {"uv": [0.25, 11.75, 0.375, 13.25], "texture": "#0"}, + "south": {"uv": [0.375, 11.75, 0.5, 13.25], "texture": "#0"}, + "west": {"uv": [0, 11.75, 0.125, 13.25], "texture": "#0"}, + "up": {"uv": [0.125, 11.5, 0.25, 11.75], "texture": "#0"}, + "down": {"uv": [0.25, 11.5, 0.375, 11.75], "texture": "#0"} + } + }, + { + "name": "Receiver05", + "from": [3, 14, 6], + "to": [4.5, 15.5, 17.5], + "faces": { + "north": {"uv": [5.125, 5.75, 5.5, 6.5], "texture": "#0"}, + "east": {"uv": [5.5, 5.75, 8.375, 6.5], "texture": "#0"}, + "south": {"uv": [8.375, 5.75, 8.75, 6.5], "texture": "#0"}, + "west": {"uv": [2.25, 5.75, 5.125, 6.5], "texture": "#0"}, + "up": {"uv": [5.125, 0, 5.5, 5.75], "texture": "#0"}, + "down": {"uv": [5.5, 0, 5.875, 5.75], "texture": "#0"} + } + }, + { + "name": "Receiver04", + "from": [3, 14, 17.5], + "to": [4.5, 15.5, 19.5], + "rotation": {"angle": -45, "axis": "x", "origin": [3, 15.5, 17.5]}, + "faces": { + "north": {"uv": [2.125, 9, 2.5, 9.75], "texture": "#0"}, + "east": {"uv": [2.5, 9, 3, 9.75], "texture": "#0"}, + "south": {"uv": [3, 9, 3.375, 9.75], "texture": "#0"}, + "west": {"uv": [1.625, 9, 2.125, 9.75], "texture": "#0"}, + "up": {"uv": [2.125, 8, 2.5, 9], "texture": "#0"}, + "down": {"uv": [2.5, 8, 2.875, 9], "texture": "#0"} + } + }, + { + "name": "Stock04", + "from": [2.75, 11, 21.5], + "to": [4.75, 11.5, 32], + "faces": { + "north": {"uv": [8.375, 14.25, 8.875, 14.5], "texture": "#0"}, + "east": {"uv": [8.875, 14.25, 11.5, 14.5], "texture": "#0"}, + "south": {"uv": [11.5, 14.25, 12, 14.5], "texture": "#0"}, + "west": {"uv": [5.75, 14.25, 8.375, 14.5], "texture": "#0"}, + "up": {"uv": [8.375, 9, 8.875, 14.25], "texture": "#0"}, + "down": {"uv": [8.875, 9, 9.375, 14.25], "texture": "#0"} + } + }, + { + "name": "Stock03", + "from": [2.75, 11.5, 19], + "to": [4.75, 13.5, 32], + "faces": { + "north": {"uv": [10.5, 6.75, 11, 7.75], "texture": "#0"}, + "east": {"uv": [11, 6.75, 14.25, 7.75], "texture": "#0"}, + "south": {"uv": [14.25, 6.75, 14.75, 7.75], "texture": "#0"}, + "west": {"uv": [7.25, 6.75, 10.5, 7.75], "texture": "#0"}, + "up": {"uv": [10.5, 0.25, 11, 6.75], "texture": "#0"}, + "down": {"uv": [11, 0.25, 11.5, 6.75], "texture": "#0"} + } + }, + { + "name": "Stock05", + "from": [2.75, 9.5, 28.5], + "to": [4.75, 10, 32], + "faces": { + "north": {"uv": [8.375, 12, 8.875, 12.25], "texture": "#0"}, + "east": {"uv": [8.875, 12, 9.75, 12.25], "texture": "#0"}, + "south": {"uv": [9.75, 12, 10.25, 12.25], "texture": "#0"}, + "west": {"uv": [7.5, 12, 8.375, 12.25], "texture": "#0"}, + "up": {"uv": [8.375, 10.25, 8.875, 12], "texture": "#0"}, + "down": {"uv": [8.875, 10.25, 9.375, 12], "texture": "#0"} + } + }, + { + "name": "Stock06", + "from": [2.75, 13.5, 26], + "to": [4.75, 14, 32], + "faces": { + "north": {"uv": [8.375, 11.5, 8.875, 11.75], "texture": "#0"}, + "east": {"uv": [8.875, 11.5, 10.375, 11.75], "texture": "#0"}, + "south": {"uv": [10.375, 11.5, 10.875, 11.75], "texture": "#0"}, + "west": {"uv": [6.875, 11.5, 8.375, 11.75], "texture": "#0"}, + "up": {"uv": [8.375, 8.5, 8.875, 11.5], "texture": "#0"}, + "down": {"uv": [8.875, 8.5, 9.375, 11.5], "texture": "#0"} + } + }, + { + "name": "Stock07", + "from": [2.75, 10, 27], + "to": [4.75, 10.5, 32], + "faces": { + "north": {"uv": [8.375, 12.5, 8.875, 12.75], "texture": "#0"}, + "east": {"uv": [8.875, 12.5, 10.125, 12.75], "texture": "#0"}, + "south": {"uv": [10.125, 12.5, 10.625, 12.75], "texture": "#0"}, + "west": {"uv": [7.125, 12.5, 8.375, 12.75], "texture": "#0"}, + "up": {"uv": [8.375, 10, 8.875, 12.5], "texture": "#0"}, + "down": {"uv": [8.875, 10, 9.375, 12.5], "texture": "#0"} + } + }, + { + "name": "Stock08", + "from": [2.75, 10.5, 24.5], + "to": [4.75, 11, 32], + "faces": { + "north": {"uv": [8.375, 13, 8.875, 13.25], "texture": "#0"}, + "east": {"uv": [8.875, 13, 10.75, 13.25], "texture": "#0"}, + "south": {"uv": [10.75, 13, 11.25, 13.25], "texture": "#0"}, + "west": {"uv": [6.5, 13, 8.375, 13.25], "texture": "#0"}, + "up": {"uv": [8.375, 9.25, 8.875, 13], "texture": "#0"}, + "down": {"uv": [8.875, 9.25, 9.375, 13], "texture": "#0"} } } ], "display": { "thirdperson_righthand": { - "translation": [0, 4, -2.5] + "translation": [2, -0.75, -2.25], + "scale": [0.5, 0.5, 0.5] + }, + "thirdperson_lefthand": { + "translation": [-2, -0.75, -2.25], + "scale": [0.5, 0.5, 0.5] }, "firstperson_righthand": { - "translation": [0, 5.5, -1.75] + "translation": [2.63, 2.7, -0.87], + "scale": [0.6, 0.6, 0.6] }, "firstperson_lefthand": { - "translation": [0, 5.5, -1.75] + "translation": [-2.63, 2.7, -0.87], + "scale": [0.6, 0.6, 0.6] }, "ground": { - "rotation": [66, 180, 0], - "translation": [0, -4, 4], - "scale": [0.67, 0.67, 0.67] + "translation": [0, 3, 0], + "scale": [0.5, 0.5, 0.5] }, "gui": { - "rotation": [0, 90, 0], - "translation": [-2.5, 3, 0] + "rotation": [30, -135, 0], + "translation": [-1, -1.75, 0], + "scale": [0.4, 0.4, 0.4] }, "head": { - "translation": [0, 9.75, -9.25] + "translation": [4.5, 3.25, 0] }, "fixed": { - "rotation": [0, -90, 0], - "translation": [2.25, 2.75, -0.25] + "rotation": [90, 45, -90], + "translation": [-2, -2, -2.25], + "scale": [0.6, 0.6, 0.6] } } } \ No newline at end of file diff --git a/src/main/resources/assets/szar/models/item/ak47_1.json b/src/main/resources/assets/szar/models/item/ak47_1.json index bab39e2..eca5304 100644 --- a/src/main/resources/assets/szar/models/item/ak47_1.json +++ b/src/main/resources/assets/szar/models/item/ak47_1.json @@ -1,2639 +1,89 @@ { - "credit": "Converted from TechGuns ModelAK", - "texture_size": [ - 128, - 64 - ], - "textures": { - "0": "szar:item/ak47texture", - "particle": "szar:item/ak47texture" - }, - "elements": [ - { - "name": "Magazine05", - "from": [ - 6.5, - 16.0, - 0.0 - ], - "to": [ - 8.5, - 24.0, - 2.0 - ], - "faces": { - "up": { - "uv": [ - 0.25, - 0.0, - 0.5, - 0.5 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 0.5, - 0.0, - 0.75, - 0.5 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 0.0, - 0.5, - 0.25, - 2.5 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 0.25, - 0.5, - 0.5, - 2.5 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 0.5, - 0.5, - 0.75, - 2.5 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 0.75, - 0.5, - 1.0, - 2.5 - ], - "texture": "#0" - } - }, - "rotation": { - "angle": -9.0, - "axis": "x", - "origin": [ - 6.5, - 24.0, - 0.0 - ] - } - }, - { - "name": "Grip2", - "from": [ - 6.0, - 21.0, - 19.0 - ], - "to": [ - 9.0, - 23.0, - 20.0 - ], - "faces": { - "up": { - "uv": [ - 0.125, - 2.75, - 0.5, - 3.0 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 0.5, - 2.75, - 0.875, - 3.0 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 0.0, - 3.0, - 0.125, - 3.5 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 0.125, - 3.0, - 0.5, - 3.5 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 0.5, - 3.0, - 0.625, - 3.5 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 0.625, - 3.0, - 1.0, - 3.5 - ], - "texture": "#0" - } - } - }, - { - "name": "MagHolder", - "from": [ - 6.0, - 20.0, - 7.0 - ], - "to": [ - 9.0, - 23.0, - 9.0 - ], - "faces": { - "up": { - "uv": [ - 2.5, - 3.5, - 2.875, - 4.0 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 2.875, - 3.5, - 3.25, - 4.0 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 2.25, - 4.0, - 2.5, - 4.75 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 2.5, - 4.0, - 2.875, - 4.75 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 2.875, - 4.0, - 3.125, - 4.75 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 3.125, - 4.0, - 3.5, - 4.75 - ], - "texture": "#0" - } - } - }, - { - "name": "Trigger02", - "from": [ - 7.0, - 20.5, - 13.0 - ], - "to": [ - 8.0, - 23.5, - 14.0 - ], - "faces": { - "up": { - "uv": [ - 1.75, - 3.75, - 1.875, - 4.0 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 1.875, - 3.75, - 2.0, - 4.0 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 1.625, - 4.0, - 1.75, - 4.75 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 1.75, - 4.0, - 1.875, - 4.75 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 1.875, - 4.0, - 2.0, - 4.75 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 2.0, - 4.0, - 2.125, - 4.75 - ], - "texture": "#0" - } - }, - "rotation": { - "angle": -15.0, - "axis": "x", - "origin": [ - 7.0, - 23.5, - 13.0 - ] - } - }, - { - "name": "Barrel", - "from": [ - 7.5, - 25.5, - -23.0 - ], - "to": [ - 10.5, - 28.5, - -20.0 - ], - "faces": { - "up": { - "uv": [ - 5.0, - 6.75, - 5.375, - 7.5 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 5.375, - 6.75, - 5.75, - 7.5 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 4.625, - 7.5, - 5.0, - 8.25 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 5.0, - 7.5, - 5.375, - 8.25 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 5.375, - 7.5, - 5.75, - 8.25 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 5.75, - 7.5, - 6.125, - 8.25 - ], - "texture": "#0" - } - }, - "rotation": { - "angle": 45.0, - "axis": "z", - "origin": [ - 7.5, - 28.5, - -23.0 - ] - } - }, - { - "name": "Receiver06", - "from": [ - 7.0, - 29.0, - 20.5 - ], - "to": [ - 8.0, - 30.0, - 21.5 - ], - "faces": { - "up": { - "uv": [ - 6.125, - 0.0, - 6.25, - 0.25 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 6.25, - 0.0, - 6.375, - 0.25 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 6.0, - 0.25, - 6.125, - 0.5 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 6.125, - 0.25, - 6.25, - 0.5 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 6.25, - 0.25, - 6.375, - 0.5 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 6.375, - 0.25, - 6.5, - 0.5 - ], - "texture": "#0" - } - }, - "rotation": { - "angle": -70.0, - "axis": "x", - "origin": [ - 7.0, - 30.0, - 20.5 - ] - } - }, - { - "name": "Trigger01", - "from": [ - 6.5, - 19.0, - 10.0 - ], - "to": [ - 8.5, - 20.0, - 17.0 - ], - "faces": { - "up": { - "uv": [ - 3.625, - 3.25, - 3.875, - 5.0 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 3.875, - 3.25, - 4.125, - 5.0 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 2.75, - 5.0, - 3.625, - 5.25 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 3.625, - 5.0, - 3.875, - 5.25 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 3.875, - 5.0, - 4.75, - 5.25 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 4.75, - 5.0, - 5.0, - 5.25 - ], - "texture": "#0" - } - } - }, - { - "name": "Magazine01", - "from": [ - 6.5, - 19.0, - 9.0 - ], - "to": [ - 8.5, - 23.0, - 10.0 - ], - "faces": { - "up": { - "uv": [ - 4.375, - 3.25, - 4.625, - 3.5 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 4.625, - 3.25, - 4.875, - 3.5 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 4.25, - 3.5, - 4.375, - 4.5 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 4.375, - 3.5, - 4.625, - 4.5 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 4.625, - 3.5, - 4.75, - 4.5 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 4.75, - 3.5, - 5.0, - 4.5 - ], - "texture": "#0" - } - } - }, - { - "name": "Magazine02", - "from": [ - 6.0, - 20.0, - 14.0 - ], - "to": [ - 9.0, - 23.0, - 19.0 - ], - "faces": { - "up": { - "uv": [ - 0.625, - 3.75, - 1.0, - 5.0 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 1.0, - 3.75, - 1.375, - 5.0 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 0.0, - 5.0, - 0.625, - 5.75 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 0.625, - 5.0, - 1.0, - 5.75 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 1.0, - 5.0, - 1.625, - 5.75 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 1.625, - 5.0, - 2.0, - 5.75 - ], - "texture": "#0" - } - } - }, - { - "name": "Grip1", - "from": [ - 6.0, - 12.0, - 15.0 - ], - "to": [ - 9.0, - 20.0, - 19.0 - ], - "faces": { - "up": { - "uv": [ - 3.75, - 0.0, - 4.125, - 1.0 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 4.125, - 0.0, - 4.5, - 1.0 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 3.25, - 1.0, - 3.75, - 3.0 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 3.75, - 1.0, - 4.125, - 3.0 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 4.125, - 1.0, - 4.625, - 3.0 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 4.625, - 1.0, - 5.0, - 3.0 - ], - "texture": "#0" - } - }, - "rotation": { - "angle": 21.3, - "axis": "x", - "origin": [ - 6.0, - 20.0, - 15.0 - ] - } - }, - { - "name": "Magazine06", - "from": [ - 6.5, - 8.6, - -1.0 - ], - "to": [ - 8.5, - 16.6, - 1.0 - ], - "faces": { - "up": { - "uv": [ - 0.25, - 0.0, - 0.5, - 0.5 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 0.5, - 0.0, - 0.75, - 0.5 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 0.0, - 0.5, - 0.25, - 2.5 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 0.25, - 0.5, - 0.5, - 2.5 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 0.5, - 0.5, - 0.75, - 2.5 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 0.75, - 0.5, - 1.0, - 2.5 - ], - "texture": "#0" - } - }, - "rotation": { - "angle": -20.0, - "axis": "x", - "origin": [ - 6.5, - 16.6, - -1.0 - ] - } - }, - { - "name": "Magazine03", - "from": [ - 6.0, - 16.0, - 2.0 - ], - "to": [ - 9.0, - 24.0, - 7.0 - ], - "faces": { - "up": { - "uv": [ - 1.75, - 0.0, - 2.125, - 1.25 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 2.125, - 0.0, - 2.5, - 1.25 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 1.125, - 1.25, - 1.75, - 3.25 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 1.75, - 1.25, - 2.125, - 3.25 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 2.125, - 1.25, - 2.75, - 3.25 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 2.75, - 1.25, - 3.125, - 3.25 - ], - "texture": "#0" - } - }, - "rotation": { - "angle": -9.0, - "axis": "x", - "origin": [ - 6.0, - 24.0, - 2.0 - ] - } - }, - { - "name": "Magazine04", - "from": [ - 6.0, - 8.0, - 1.0 - ], - "to": [ - 9.0, - 17.0, - 6.0 - ], - "faces": { - "up": { - "uv": [ - 1.75, - 0.0, - 2.125, - 1.25 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 2.125, - 0.0, - 2.5, - 1.25 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 1.125, - 1.25, - 1.75, - 3.5 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 1.75, - 1.25, - 2.125, - 3.5 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 2.125, - 1.25, - 2.75, - 3.5 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 2.75, - 1.25, - 3.125, - 3.5 - ], - "texture": "#0" - } - }, - "rotation": { - "angle": -20.0, - "axis": "x", - "origin": [ - 6.0, - 17.0, - 1.0 - ] - } - }, - { - "name": "Receiver03", - "from": [ - 5.5, - 28.0, - -11.0 - ], - "to": [ - 9.5, - 31.0, - -4.0 - ], - "faces": { - "up": { - "uv": [ - 6.875, - 0.0, - 7.375, - 1.75 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 7.375, - 0.0, - 7.875, - 1.75 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 6.0, - 1.75, - 6.875, - 2.5 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 6.875, - 1.75, - 7.375, - 2.5 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 7.375, - 1.75, - 8.25, - 2.5 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 8.25, - 1.75, - 8.75, - 2.5 - ], - "texture": "#0" - } - } - }, - { - "name": "Handguard01", - "from": [ - 6.0, - 28.0, - -20.0 - ], - "to": [ - 9.0, - 31.0, - -11.0 - ], - "faces": { - "up": { - "uv": [ - 7.125, - 2.5, - 7.5, - 4.75 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 7.5, - 2.5, - 7.875, - 4.75 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 6.0, - 4.75, - 7.125, - 5.5 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 7.125, - 4.75, - 7.5, - 5.5 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 7.5, - 4.75, - 8.625, - 5.5 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 8.625, - 4.75, - 9.0, - 5.5 - ], - "texture": "#0" - } - } - }, - { - "name": "Handguard02", - "from": [ - 5.5, - 23.0, - -20.0 - ], - "to": [ - 9.5, - 28.0, - -6.0 - ], - "faces": { - "up": { - "uv": [ - 13.25, - 0.0, - 13.75, - 3.5 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 13.75, - 0.0, - 14.25, - 3.5 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 11.5, - 3.5, - 13.25, - 4.75 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 13.25, - 3.5, - 13.75, - 4.75 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 13.75, - 3.5, - 15.5, - 4.75 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 15.5, - 3.5, - 16.0, - 4.75 - ], - "texture": "#0" - } - } - }, - { - "name": "Barrel03", - "from": [ - 7.0, - 26.0333, - -42.0 - ], - "to": [ - 8.0, - 32.0333, - -41.0 - ], - "faces": { - "up": { - "uv": [ - 0.125, - 11.5, - 0.25, - 11.75 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 0.25, - 11.5, - 0.375, - 11.75 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 0.0, - 11.75, - 0.125, - 13.25 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 0.125, - 11.75, - 0.25, - 13.25 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 0.25, - 11.75, - 0.375, - 13.25 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 0.375, - 11.75, - 0.5, - 13.25 - ], - "texture": "#0" - } - }, - "rotation": { - "angle": 21.3, - "axis": "x", - "origin": [ - 7.0, - 32.0333, - -42.0 - ] - } - }, - { - "name": "Barrel02", - "from": [ - 7.5, - 29.0333, - -29.0 - ], - "to": [ - 9.5, - 31.0333, - -20.0 - ], - "faces": { - "up": { - "uv": [ - 5.75, - 8.5, - 6.0, - 10.75 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 6.0, - 8.5, - 6.25, - 10.75 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 4.625, - 10.75, - 5.75, - 11.25 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 5.75, - 10.75, - 6.0, - 11.25 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 6.0, - 10.75, - 7.125, - 11.25 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 7.125, - 10.75, - 7.375, - 11.25 - ], - "texture": "#0" - } - }, - "rotation": { - "angle": 45.0, - "axis": "z", - "origin": [ - 7.5, - 31.0333, - -29.0 - ] - } - }, - { - "name": "Receiver02", - "from": [ - 5.5, - 23.0, - -6.0 - ], - "to": [ - 9.5, - 28.0, - 22.0 - ], - "faces": { - "up": { - "uv": [ - 3.5, - 7.75, - 4.0, - 14.75 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 4.0, - 7.75, - 4.5, - 14.75 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 0.0, - 14.75, - 3.5, - 16.0 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 3.5, - 14.75, - 4.0, - 16.0 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 4.0, - 14.75, - 7.5, - 16.0 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 7.5, - 14.75, - 8.0, - 16.0 - ], - "texture": "#0" - } - } - }, - { - "name": "Stock09", - "from": [ - 5.5, - 27.0, - 22.0 - ], - "to": [ - 9.5, - 28.0, - 24.0 - ], - "faces": { - "up": { - "uv": [ - 9.75, - 8.75, - 10.25, - 9.25 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 10.25, - 8.75, - 10.75, - 9.25 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 9.5, - 9.25, - 9.75, - 9.5 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 9.75, - 9.25, - 10.25, - 9.5 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 10.25, - 9.25, - 10.5, - 9.5 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 10.5, - 9.25, - 11.0, - 9.5 - ], - "texture": "#0" - } - } - }, - { - "name": "Barrel04", - "from": [ - 6.5, - 25.0333, - -32.0 - ], - "to": [ - 8.5, - 27.0333, - -27.0 - ], - "faces": { - "up": { - "uv": [ - 2.25, - 10.0, - 2.5, - 11.25 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 2.5, - 10.0, - 2.75, - 11.25 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 1.625, - 11.25, - 2.25, - 11.75 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 2.25, - 11.25, - 2.5, - 11.75 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 2.5, - 11.25, - 3.125, - 11.75 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 3.125, - 11.25, - 3.375, - 11.75 - ], - "texture": "#0" - } - }, - "rotation": { - "angle": 55.0, - "axis": "x", - "origin": [ - 6.5, - 27.0333, - -32.0 - ] - } - }, - { - "name": "BarrelIS", - "from": [ - 7.0, - 32.0333, - -43.0 - ], - "to": [ - 8.0, - 33.0333, - -41.0 - ], - "faces": { - "up": { - "uv": [ - 0.25, - 8.25, - 0.375, - 8.75 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 0.375, - 8.25, - 0.5, - 8.75 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 0.0, - 8.75, - 0.25, - 9.0 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 0.25, - 8.75, - 0.375, - 9.0 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 0.375, - 8.75, - 0.625, - 9.0 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 0.625, - 8.75, - 0.75, - 9.0 - ], - "texture": "#0" - } - } - }, - { - "name": "BarrelMain", - "from": [ - 7.5, - 25.5, - -50.0 - ], - "to": [ - 9.5, - 27.5, - -23.0 - ], - "faces": { - "up": { - "uv": [ - 12.125, - 8.75, - 12.375, - 15.5 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 12.375, - 8.75, - 12.625, - 15.5 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 8.75, - 15.5, - 12.125, - 16.0 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 12.125, - 15.5, - 12.375, - 16.0 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 12.375, - 15.5, - 15.75, - 16.0 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 15.75, - 15.5, - 16.0, - 16.0 - ], - "texture": "#0" - } - }, - "rotation": { - "angle": 45.0, - "axis": "z", - "origin": [ - 7.5, - 27.5, - -50.0 - ] - } - }, - { - "name": "BarrelFront", - "from": [ - 7.5, - 25.5, - -44.0 - ], - "to": [ - 10.5, - 28.5, - -38.0 - ], - "faces": { - "up": { - "uv": [ - 0.75, - 12.0, - 1.125, - 13.5 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 1.125, - 12.0, - 1.5, - 13.5 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 0.0, - 13.5, - 0.75, - 14.25 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 0.75, - 13.5, - 1.125, - 14.25 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 1.125, - 13.5, - 1.875, - 14.25 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 1.875, - 13.5, - 2.25, - 14.25 - ], - "texture": "#0" - } - }, - "rotation": { - "angle": 45.0, - "axis": "z", - "origin": [ - 7.5, - 28.5, - -44.0 - ] - } - }, - { - "name": "BarrelMid", - "from": [ - 7.5, - 25.5, - -32.0 - ], - "to": [ - 10.5, - 28.5, - -29.0 - ], - "faces": { - "up": { - "uv": [ - 0.375, - 9.75, - 0.75, - 10.5 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 0.75, - 9.75, - 1.125, - 10.5 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 0.0, - 10.5, - 0.375, - 11.25 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 0.375, - 10.5, - 0.75, - 11.25 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 0.75, - 10.5, - 1.125, - 11.25 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 1.125, - 10.5, - 1.5, - 11.25 - ], - "texture": "#0" - } - }, - "rotation": { - "angle": 45.0, - "axis": "z", - "origin": [ - 7.5, - 28.5, - -32.0 - ] - } - }, - { - "name": "ISTop", - "from": [ - 7.0, - 30.0333, - -10.0 - ], - "to": [ - 8.0, - 31.0333, - -3.0 - ], - "faces": { - "up": { - "uv": [ - 0.875, - 6.0, - 1.0, - 7.75 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 1.0, - 6.0, - 1.125, - 7.75 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 0.0, - 7.75, - 0.875, - 8.0 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 0.875, - 7.75, - 1.0, - 8.0 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 1.0, - 7.75, - 1.875, - 8.0 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 1.875, - 7.75, - 2.0, - 8.0 - ], - "texture": "#0" - } - }, - "rotation": { - "angle": 8.0, - "axis": "x", - "origin": [ - 7.0, - 31.0333, - -10.0 - ] - } - }, - { - "name": "ISFront", - "from": [ - 7.0, - 26.0333, - -43.0 - ], - "to": [ - 8.0, - 32.0333, - -42.0 - ], - "faces": { - "up": { - "uv": [ - 0.125, - 11.5, - 0.25, - 11.75 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 0.25, - 11.5, - 0.375, - 11.75 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 0.0, - 11.75, - 0.125, - 13.25 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 0.125, - 11.75, - 0.25, - 13.25 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 0.25, - 11.75, - 0.375, - 13.25 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 0.375, - 11.75, - 0.5, - 13.25 - ], - "texture": "#0" - } - } - }, - { - "name": "Receiver05", - "from": [ - 6.0, - 28.0, - -4.0 - ], - "to": [ - 9.0, - 31.0, - 19.0 - ], - "faces": { - "up": { - "uv": [ - 5.125, - 0.0, - 5.5, - 5.75 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 5.5, - 0.0, - 5.875, - 5.75 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 2.25, - 5.75, - 5.125, - 6.5 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 5.125, - 5.75, - 5.5, - 6.5 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 5.5, - 5.75, - 8.375, - 6.5 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 8.375, - 5.75, - 8.75, - 6.5 - ], - "texture": "#0" - } - } - }, - { - "name": "Receiver04", - "from": [ - 6.0, - 28.0, - 19.0 - ], - "to": [ - 9.0, - 31.0, - 23.0 - ], - "faces": { - "up": { - "uv": [ - 2.125, - 8.0, - 2.5, - 9.0 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 2.5, - 8.0, - 2.875, - 9.0 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 1.625, - 9.0, - 2.125, - 9.75 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 2.125, - 9.0, - 2.5, - 9.75 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 2.5, - 9.0, - 3.0, - 9.75 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 3.0, - 9.0, - 3.375, - 9.75 - ], - "texture": "#0" - } - }, - "rotation": { - "angle": -50.0, - "axis": "x", - "origin": [ - 6.0, - 31.0, - 19.0 - ] - } - }, - { - "name": "Stock04", - "from": [ - 5.5, - 22.0, - 27.0 - ], - "to": [ - 9.5, - 23.0, - 48.0 - ], - "faces": { - "up": { - "uv": [ - 8.375, - 9.0, - 8.875, - 14.25 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 8.875, - 9.0, - 9.375, - 14.25 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 5.75, - 14.25, - 8.375, - 14.5 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 8.375, - 14.25, - 8.875, - 14.5 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 8.875, - 14.25, - 11.5, - 14.5 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 11.5, - 14.25, - 12.0, - 14.5 - ], - "texture": "#0" - } - } - }, - { - "name": "Stock03", - "from": [ - 5.5, - 23.0, - 22.0 - ], - "to": [ - 9.5, - 27.0, - 48.0 - ], - "faces": { - "up": { - "uv": [ - 10.5, - 0.25, - 11.0, - 6.75 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 11.0, - 0.25, - 11.5, - 6.75 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 7.25, - 6.75, - 10.5, - 7.75 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 10.5, - 6.75, - 11.0, - 7.75 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 11.0, - 6.75, - 14.25, - 7.75 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 14.25, - 6.75, - 14.75, - 7.75 - ], - "texture": "#0" - } - } - }, - { - "name": "Stock05", - "from": [ - 5.5, - 19.0, - 41.0 - ], - "to": [ - 9.5, - 20.0, - 48.0 - ], - "faces": { - "up": { - "uv": [ - 8.375, - 10.25, - 8.875, - 12.0 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 8.875, - 10.25, - 9.375, - 12.0 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 7.5, - 12.0, - 8.375, - 12.25 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 8.375, - 12.0, - 8.875, - 12.25 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 8.875, - 12.0, - 9.75, - 12.25 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 9.75, - 12.0, - 10.25, - 12.25 - ], - "texture": "#0" - } - } - }, - { - "name": "Stock06", - "from": [ - 5.5, - 27.0, - 36.0 - ], - "to": [ - 9.5, - 28.0, - 48.0 - ], - "faces": { - "up": { - "uv": [ - 8.375, - 8.5, - 8.875, - 11.5 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 8.875, - 8.5, - 9.375, - 11.5 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 6.875, - 11.5, - 8.375, - 11.75 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 8.375, - 11.5, - 8.875, - 11.75 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 8.875, - 11.5, - 10.375, - 11.75 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 10.375, - 11.5, - 10.875, - 11.75 - ], - "texture": "#0" - } - } - }, - { - "name": "Stock07", - "from": [ - 5.5, - 20.0, - 38.0 - ], - "to": [ - 9.5, - 21.0, - 48.0 - ], - "faces": { - "up": { - "uv": [ - 8.375, - 10.0, - 8.875, - 12.5 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 8.875, - 10.0, - 9.375, - 12.5 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 7.125, - 12.5, - 8.375, - 12.75 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 8.375, - 12.5, - 8.875, - 12.75 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 8.875, - 12.5, - 10.125, - 12.75 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 10.125, - 12.5, - 10.625, - 12.75 - ], - "texture": "#0" - } - } - }, - { - "name": "Stock08", - "from": [ - 5.5, - 21.0, - 33.0 - ], - "to": [ - 9.5, - 22.0, - 48.0 - ], - "faces": { - "up": { - "uv": [ - 8.375, - 9.25, - 8.875, - 13.0 - ], - "texture": "#0" - }, - "down": { - "uv": [ - 8.875, - 9.25, - 9.375, - 13.0 - ], - "texture": "#0" - }, - "west": { - "uv": [ - 6.5, - 13.0, - 8.375, - 13.25 - ], - "texture": "#0" - }, - "north": { - "uv": [ - 8.375, - 13.0, - 8.875, - 13.25 - ], - "texture": "#0" - }, - "east": { - "uv": [ - 8.875, - 13.0, - 10.75, - 13.25 - ], - "texture": "#0" - }, - "south": { - "uv": [ - 10.75, - 13.0, - 11.25, - 13.25 - ], - "texture": "#0" - } - } - } - ], - "display": { - "thirdperson_righthand": { - "rotation": [ - 0, - 90, - -35 - ], - "translation": [ - 0, - 1.25, - -3.5 - ], - "scale": [ - 0.85, - 0.85, - 0.85 - ] - }, - "firstperson_righthand": { - "rotation": [ - 0, - -90, - 25 - ], - "translation": [ - 1.13, - 3.2, - 1.13 - ], - "scale": [ - 0.68, - 0.68, - 0.68 - ] - }, - "ground": { - "translation": [ - 0, - 3, - 0 - ], - "scale": [ - 0.5, - 0.5, - 0.5 - ] - }, - "gui": { - "rotation": [ - 30, - 225, - 0 - ], - "scale": [ - 0.625, - 0.625, - 0.625 - ] - }, - "fixed": { - "scale": [ - 0.5, - 0.5, - 0.5 - ] - } - } -} + "format_version": "1.9.0", + "credit": "Made with Blockbench", + "textures": { + "0": "szar:item/ak47", + "particle": "szar:item/ak47" + }, + "elements": [ + { + "from": [7, 0, 7], + "to": [9, 7, 9], + "rotation": {"angle": 22.5, "axis": "x", "origin": [8, 0, 9]}, + "faces": { + "north": {"uv": [4, 4, 6, 11], "texture": "#0"}, + "east": {"uv": [6, 4, 8, 11], "texture": "#0"}, + "south": {"uv": [8, 4, 10, 11], "texture": "#0"}, + "west": {"uv": [10, 0, 12, 7], "texture": "#0"}, + "up": {"uv": [12, 15, 10, 13], "texture": "#0"}, + "down": {"uv": [14, 13, 12, 15], "texture": "#0"} + } + }, + { + "from": [7, 6, 3], + "to": [9, 8, 13], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 7, 10]}, + "faces": { + "north": {"uv": [0, 14, 2, 16], "texture": "#0"}, + "east": {"uv": [0, 0, 10, 2], "texture": "#0"}, + "south": {"uv": [2, 14, 4, 16], "texture": "#0"}, + "west": {"uv": [0, 2, 10, 4], "texture": "#0"}, + "up": {"uv": [2, 14, 0, 4], "texture": "#0"}, + "down": {"uv": [4, 4, 2, 14], "texture": "#0"} + } + }, + { + "from": [7, 4, 13], + "to": [9, 8, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [7, 7, 10]}, + "faces": { + "north": {"uv": [10, 7, 12, 11], "texture": "#0"}, + "east": {"uv": [4, 11, 6, 15], "texture": "#0"}, + "south": {"uv": [6, 11, 8, 15], "texture": "#0"}, + "west": {"uv": [8, 11, 10, 15], "texture": "#0"}, + "up": {"uv": [16, 4, 14, 2], "texture": "#0"}, + "down": {"uv": [16, 4, 14, 6], "texture": "#0"} + } + }, + { + "from": [7, 5, 15], + "to": [9, 7, 19], + "rotation": {"angle": 22.5, "axis": "x", "origin": [8, 7, 15]}, + "faces": { + "north": {"uv": [14, 6, 16, 8], "texture": "#0"}, + "east": {"uv": [10, 11, 14, 13], "texture": "#0"}, + "south": {"uv": [14, 8, 16, 10], "texture": "#0"}, + "west": {"uv": [12, 0, 16, 2], "texture": "#0"}, + "up": {"uv": [14, 6, 12, 2], "texture": "#0"}, + "down": {"uv": [14, 6, 12, 10], "texture": "#0"} + } + } + ], + "display": { + "thirdperson_righthand": { + "translation": [0, 4, -2.5] + }, + "firstperson_righthand": { + "translation": [0, 5.5, -1.75] + }, + "firstperson_lefthand": { + "translation": [0, 5.5, -1.75] + }, + "ground": { + "rotation": [66, 180, 0], + "translation": [0, -4, 4], + "scale": [0.67, 0.67, 0.67] + }, + "gui": { + "rotation": [0, 90, 0], + "translation": [-2.5, 3, 0] + }, + "head": { + "translation": [0, 9.75, -9.25] + }, + "fixed": { + "rotation": [0, -90, 0], + "translation": [2.25, 2.75, -0.25] + } + } +} \ No newline at end of file diff --git a/src/main/resources/assets/szar/sounds.json b/src/main/resources/assets/szar/sounds.json index e6d076c..197c40e 100644 --- a/src/main/resources/assets/szar/sounds.json +++ b/src/main/resources/assets/szar/sounds.json @@ -154,5 +154,13 @@ "stream": true } ] + }, + "reload": { + "sounds": [ + { + "name": "szar:reload", + "stream": true + } + ] } } diff --git a/src/main/resources/assets/szar/sounds/revolver_reload.ogg b/src/main/resources/assets/szar/sounds/reload.ogg similarity index 100% rename from src/main/resources/assets/szar/sounds/revolver_reload.ogg rename to src/main/resources/assets/szar/sounds/reload.ogg diff --git a/src/main/resources/assets/szar/textures/entity/bullet.png b/src/main/resources/assets/szar/textures/entity/bullet.png index 12875e1..70d8e63 100644 Binary files a/src/main/resources/assets/szar/textures/entity/bullet.png and b/src/main/resources/assets/szar/textures/entity/bullet.png differ diff --git a/src/main/resources/assets/szar/textures/entity/bullet_impact.png b/src/main/resources/assets/szar/textures/entity/bullet_impact.png new file mode 100644 index 0000000..e3f708b Binary files /dev/null and b/src/main/resources/assets/szar/textures/entity/bullet_impact.png differ diff --git a/src/main/resources/assets/szar/textures/entity/bullet_old.png b/src/main/resources/assets/szar/textures/entity/bullet_old.png new file mode 100644 index 0000000..12875e1 Binary files /dev/null and b/src/main/resources/assets/szar/textures/entity/bullet_old.png differ