调整格洛克和夕雾花的自发光

This commit is contained in:
Atsuihsio 2025-01-11 16:34:57 +08:00
parent 800fb6073f
commit 61022833df
12 changed files with 120 additions and 1344 deletions

View file

@ -0,0 +1,28 @@
package com.atsuishio.superbwarfare.client.layer;
import com.atsuishio.superbwarfare.ModUtils;
import com.atsuishio.superbwarfare.client.ModRenderTypes;
import com.atsuishio.superbwarfare.item.gun.handgun.Glock17Item;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.resources.ResourceLocation;
import software.bernie.geckolib.cache.object.BakedGeoModel;
import software.bernie.geckolib.renderer.GeoRenderer;
import software.bernie.geckolib.renderer.layer.GeoRenderLayer;
public class Glock17LightLayer extends GeoRenderLayer<Glock17Item> {
private static final ResourceLocation LAYER = new ResourceLocation(ModUtils.MODID, "textures/item/glock17_light.png");
public Glock17LightLayer(GeoRenderer<Glock17Item> itemGeoRenderer) {
super(itemGeoRenderer);
}
@Override
public void render(PoseStack poseStack, Glock17Item animatable, BakedGeoModel bakedModel, RenderType renderType, MultiBufferSource bufferSource, VertexConsumer buffer, float partialTick, int packedLight, int packedOverlay) {
RenderType glowRenderType = ModRenderTypes.ILLUMINATED.apply(LAYER);
getRenderer().reRender(getDefaultBakedModel(animatable), poseStack, bufferSource, animatable, glowRenderType, bufferSource.getBuffer(glowRenderType), partialTick, packedLight, OverlayTexture.NO_OVERLAY, 1, 1, 1, 1);
}
}

View file

@ -0,0 +1,28 @@
package com.atsuishio.superbwarfare.client.layer;
import com.atsuishio.superbwarfare.ModUtils;
import com.atsuishio.superbwarfare.client.ModRenderTypes;
import com.atsuishio.superbwarfare.item.gun.handgun.Glock18Item;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.resources.ResourceLocation;
import software.bernie.geckolib.cache.object.BakedGeoModel;
import software.bernie.geckolib.renderer.GeoRenderer;
import software.bernie.geckolib.renderer.layer.GeoRenderLayer;
public class Glock18LightLayer extends GeoRenderLayer<Glock18Item> {
private static final ResourceLocation LAYER = new ResourceLocation(ModUtils.MODID, "textures/item/glock17_light.png");
public Glock18LightLayer(GeoRenderer<Glock18Item> itemGeoRenderer) {
super(itemGeoRenderer);
}
@Override
public void render(PoseStack poseStack, Glock18Item animatable, BakedGeoModel bakedModel, RenderType renderType, MultiBufferSource bufferSource, VertexConsumer buffer, float partialTick, int packedLight, int packedOverlay) {
RenderType glowRenderType = ModRenderTypes.ILLUMINATED.apply(LAYER);
getRenderer().reRender(getDefaultBakedModel(animatable), poseStack, bufferSource, animatable, glowRenderType, bufferSource.getBuffer(glowRenderType), partialTick, packedLight, OverlayTexture.NO_OVERLAY, 1, 1, 1, 1);
}
}

View file

@ -0,0 +1,28 @@
package com.atsuishio.superbwarfare.client.layer;
import com.atsuishio.superbwarfare.ModUtils;
import com.atsuishio.superbwarfare.client.ModRenderTypes;
import com.atsuishio.superbwarfare.item.gun.handgun.Trachelium;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.resources.ResourceLocation;
import software.bernie.geckolib.cache.object.BakedGeoModel;
import software.bernie.geckolib.renderer.GeoRenderer;
import software.bernie.geckolib.renderer.layer.GeoRenderLayer;
public class TracheliumLightLayer extends GeoRenderLayer<Trachelium> {
private static final ResourceLocation LAYER = new ResourceLocation(ModUtils.MODID, "textures/item/trachelium_texture_light.png");
public TracheliumLightLayer(GeoRenderer<Trachelium> itemGeoRenderer) {
super(itemGeoRenderer);
}
@Override
public void render(PoseStack poseStack, Trachelium animatable, BakedGeoModel bakedModel, RenderType renderType, MultiBufferSource bufferSource, VertexConsumer buffer, float partialTick, int packedLight, int packedOverlay) {
RenderType glowRenderType = ModRenderTypes.ILLUMINATED.apply(LAYER);
getRenderer().reRender(getDefaultBakedModel(animatable), poseStack, bufferSource, animatable, glowRenderType, bufferSource.getBuffer(glowRenderType), partialTick, packedLight, OverlayTexture.NO_OVERLAY, 1, 1, 1, 1);
}
}

View file

@ -2,6 +2,7 @@ package com.atsuishio.superbwarfare.client.renderer.item;
import com.atsuishio.superbwarfare.client.AnimationHelper;
import com.atsuishio.superbwarfare.client.layer.Glock17Layer;
import com.atsuishio.superbwarfare.client.layer.Glock17LightLayer;
import com.atsuishio.superbwarfare.client.model.item.Glock17ItemModel;
import com.atsuishio.superbwarfare.event.ClientEventHandler;
import com.atsuishio.superbwarfare.init.ModTags;
@ -32,6 +33,7 @@ public class Glock17ItemRenderer extends GeoItemRenderer<Glock17Item> {
public Glock17ItemRenderer() {
super(new Glock17ItemModel());
this.addRenderLayer(new Glock17Layer(this));
this.addRenderLayer(new Glock17LightLayer(this));
}
@Override

View file

@ -2,6 +2,7 @@ package com.atsuishio.superbwarfare.client.renderer.item;
import com.atsuishio.superbwarfare.client.AnimationHelper;
import com.atsuishio.superbwarfare.client.layer.Glock18Layer;
import com.atsuishio.superbwarfare.client.layer.Glock18LightLayer;
import com.atsuishio.superbwarfare.client.model.item.Glock18ItemModel;
import com.atsuishio.superbwarfare.event.ClientEventHandler;
import com.atsuishio.superbwarfare.init.ModTags;
@ -32,6 +33,7 @@ public class Glock18ItemRenderer extends GeoItemRenderer<Glock18Item> {
public Glock18ItemRenderer() {
super(new Glock18ItemModel());
this.addRenderLayer(new Glock18Layer(this));
this.addRenderLayer(new Glock18LightLayer(this));
}
@Override

View file

@ -3,6 +3,7 @@ package com.atsuishio.superbwarfare.client.renderer.item;
import com.atsuishio.superbwarfare.client.AnimationHelper;
import com.atsuishio.superbwarfare.client.ItemModelHelper;
import com.atsuishio.superbwarfare.client.layer.TracheliumLayer;
import com.atsuishio.superbwarfare.client.layer.TracheliumLightLayer;
import com.atsuishio.superbwarfare.client.model.item.TracheliumItemModel;
import com.atsuishio.superbwarfare.event.ClientEventHandler;
import com.atsuishio.superbwarfare.init.ModTags;
@ -34,6 +35,7 @@ public class TracheliumItemRenderer extends GeoItemRenderer<Trachelium> {
public TracheliumItemRenderer() {
super(new TracheliumItemModel());
this.addRenderLayer(new TracheliumLayer(this));
this.addRenderLayer(new TracheliumLightLayer(this));
}
@Override

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 413 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB