添加loc方法
This commit is contained in:
parent
0f67737932
commit
2d214977ad
11 changed files with 51 additions and 52 deletions
|
@ -130,4 +130,8 @@ public class ModUtils {
|
|||
event.enqueueWork(() -> BrewingRecipeRegistry.addRecipe(Ingredient.of(PotionUtils.setPotion(new ItemStack(Items.POTION), ModPotion.SHOCK.get())),
|
||||
Ingredient.of(Items.GLOWSTONE_DUST), PotionUtils.setPotion(new ItemStack(Items.POTION), ModPotion.STRONG_SHOCK.get())));
|
||||
}
|
||||
|
||||
public static ResourceLocation loc(String path) {
|
||||
return new ResourceLocation(MODID, path);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,12 +20,12 @@ import net.minecraftforge.fml.common.Mod;
|
|||
|
||||
@Mod.EventBusSubscriber(value = Dist.CLIENT)
|
||||
public class AmmoBarOverlay {
|
||||
private static final ResourceLocation LINE = new ResourceLocation(ModUtils.MODID, "textures/gun_icon/fire_mode/line.png");
|
||||
private static final ResourceLocation SEMI = new ResourceLocation(ModUtils.MODID, "textures/gun_icon/fire_mode/semi.png");
|
||||
private static final ResourceLocation BURST = new ResourceLocation(ModUtils.MODID, "textures/gun_icon/fire_mode/burst.png");
|
||||
private static final ResourceLocation AUTO = new ResourceLocation(ModUtils.MODID, "textures/gun_icon/fire_mode/auto.png");
|
||||
private static final ResourceLocation TOP = new ResourceLocation(ModUtils.MODID, "textures/gun_icon/fire_mode/top.png");
|
||||
private static final ResourceLocation DIR = new ResourceLocation(ModUtils.MODID, "textures/gun_icon/fire_mode/dir.png");
|
||||
private static final ResourceLocation LINE = ModUtils.loc("textures/gun_icon/fire_mode/line.png");
|
||||
private static final ResourceLocation SEMI = ModUtils.loc("textures/gun_icon/fire_mode/semi.png");
|
||||
private static final ResourceLocation BURST = ModUtils.loc("textures/gun_icon/fire_mode/burst.png");
|
||||
private static final ResourceLocation AUTO = ModUtils.loc("textures/gun_icon/fire_mode/auto.png");
|
||||
private static final ResourceLocation TOP = ModUtils.loc("textures/gun_icon/fire_mode/top.png");
|
||||
private static final ResourceLocation DIR = ModUtils.loc("textures/gun_icon/fire_mode/dir.png");
|
||||
|
||||
private static boolean creativeAmmo() {
|
||||
Player player = Minecraft.getInstance().player;
|
||||
|
|
|
@ -9,7 +9,6 @@ import net.mcreator.superbwarfare.tools.TraceTool;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GameRenderer;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
|
@ -87,10 +86,10 @@ public class CannonHudOverlay {
|
|||
w / 2 + 14, h / 2 - 20, -1, false);
|
||||
}
|
||||
}
|
||||
preciseBlit(event.getGuiGraphics(), new ResourceLocation(ModUtils.MODID, "textures/screens/cannon/cannon_crosshair.png"), k, l, 0, 0.0F, i, j, i, j);
|
||||
preciseBlit(event.getGuiGraphics(), new ResourceLocation(ModUtils.MODID, "textures/screens/cannon/indicator.png"), k + (float) Math.tan(Mth.clamp(Mth.DEG_TO_RAD * diffY, -1.5, 1.5)) * 5 * i / 1.4f * (90 - Math.abs(player.getXRot())) / 90, l + (float) Math.tan(Mth.clamp(Mth.DEG_TO_RAD * diffX, -1.5, 1.5)) * 5 * j / 1.4f, 0, 0.0F, i, j, i, j);
|
||||
preciseBlit(event.getGuiGraphics(), ModUtils.loc("textures/screens/cannon/cannon_crosshair.png"), k, l, 0, 0.0F, i, j, i, j);
|
||||
preciseBlit(event.getGuiGraphics(), ModUtils.loc("textures/screens/cannon/indicator.png"), k + (float) Math.tan(Mth.clamp(Mth.DEG_TO_RAD * diffY, -1.5, 1.5)) * 5 * i / 1.4f * (90 - Math.abs(player.getXRot())) / 90, l + (float) Math.tan(Mth.clamp(Mth.DEG_TO_RAD * diffX, -1.5, 1.5)) * 5 * j / 1.4f, 0, 0.0F, i, j, i, j);
|
||||
} else {
|
||||
preciseBlit(event.getGuiGraphics(), new ResourceLocation(ModUtils.MODID, "textures/screens/cannon/cannon_crosshair_notzoom.png"), k, l, 0, 0.0F, i, j, i, j);
|
||||
preciseBlit(event.getGuiGraphics(), ModUtils.loc("textures/screens/cannon/cannon_crosshair_notzoom.png"), k, l, 0, 0.0F, i, j, i, j);
|
||||
}
|
||||
}
|
||||
RenderSystem.depthMask(true);
|
||||
|
|
|
@ -28,8 +28,8 @@ import static net.mcreator.superbwarfare.tools.RenderTool.preciseBlit;
|
|||
|
||||
@Mod.EventBusSubscriber(value = Dist.CLIENT)
|
||||
public class CrossHairOverlay {
|
||||
private static final ResourceLocation REX_HORIZONTAL = new ResourceLocation(ModUtils.MODID, "textures/screens/rex_horizontal.png");
|
||||
private static final ResourceLocation REX_VERTICAL = new ResourceLocation(ModUtils.MODID, "textures/screens/rex_vertical.png");
|
||||
private static final ResourceLocation REX_HORIZONTAL = ModUtils.loc("textures/screens/rex_horizontal.png");
|
||||
private static final ResourceLocation REX_VERTICAL = ModUtils.loc("textures/screens/rex_vertical.png");
|
||||
|
||||
public static int HIT_INDICATOR = 0;
|
||||
public static int HEAD_INDICATOR = 0;
|
||||
|
@ -74,10 +74,10 @@ public class CrossHairOverlay {
|
|||
float finPosY = ((h - finLength) / 2) + moveY;
|
||||
|
||||
if (shouldRenderCrossHair(player) || (Minecraft.getInstance().options.getCameraType() == CameraType.FIRST_PERSON && stack.is(ModItems.MINIGUN.get())) || (Minecraft.getInstance().options.getCameraType() == CameraType.THIRD_PERSON_BACK && (ClientEventHandler.zoomTime > 0 || ClientEventHandler.pullPos > 0))) {
|
||||
preciseBlit(guiGraphics, new ResourceLocation(ModUtils.MODID, "textures/screens/point.png"), w / 2f - 7.5f + moveX, h / 2f - 7.5f + moveY, 0, 0, 16, 16, 16, 16);
|
||||
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/point.png"), w / 2f - 7.5f + moveX, h / 2f - 7.5f + moveY, 0, 0, 16, 16, 16, 16);
|
||||
if (!player.isSprinting() || player.getPersistentData().getDouble("noRun") > 0) {
|
||||
if (stack.is(ModTags.Items.SHOTGUN)) {
|
||||
preciseBlit(guiGraphics, new ResourceLocation(ModUtils.MODID, "textures/screens/shotgun_hud.png"), finPosX, finPosY, 0, 0.0F, finLength, finLength, finLength, finLength);
|
||||
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/shotgun_hud.png"), finPosX, finPosY, 0, 0.0F, finLength, finLength, finLength, finLength);
|
||||
} else {
|
||||
preciseBlit(guiGraphics, REX_HORIZONTAL, (float) (w / 2f - 13.5f - 2.8f * spread) + moveX, h / 2f - 7.5f + moveY, 0, 0, 16, 16, 16, 16);
|
||||
preciseBlit(guiGraphics, REX_HORIZONTAL, (float) (w / 2f - 2.5f + 2.8f * spread) + moveX, h / 2f - 7.5f + moveY, 0, 0, 16, 16, 16, 16);
|
||||
|
@ -89,10 +89,10 @@ public class CrossHairOverlay {
|
|||
|
||||
if (stack.is(ModItems.BOCEK.get())) {
|
||||
if (stack.getOrCreateTag().getBoolean("HoloHidden")) {
|
||||
preciseBlit(guiGraphics, new ResourceLocation(ModUtils.MODID, "textures/screens/point.png"), w / 2f - 7.5f + moveX, h / 2f - 7.5f + moveY, 0, 0, 16, 16, 16, 16);
|
||||
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/point.png"), w / 2f - 7.5f + moveX, h / 2f - 7.5f + moveY, 0, 0, 16, 16, 16, 16);
|
||||
if (!player.isSprinting() || player.getPersistentData().getDouble("noRun") > 0 || ClientEventHandler.pullPos > 0) {
|
||||
if (ClientEventHandler.zoomTime < 0.1) {
|
||||
preciseBlit(guiGraphics, new ResourceLocation(ModUtils.MODID, "textures/screens/shotgun_hud.png"), finPosX, finPosY, 0, 0.0F, finLength, finLength, finLength, finLength);
|
||||
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/shotgun_hud.png"), finPosX, finPosY, 0, 0.0F, finLength, finLength, finLength, finLength);
|
||||
} else {
|
||||
preciseBlit(guiGraphics, REX_HORIZONTAL, (float) (w / 2f - 13.5f - 2.8f * spread) + moveX, h / 2f - 7.5f + moveY, 0, 0, 16, 16, 16, 16);
|
||||
preciseBlit(guiGraphics, REX_HORIZONTAL, (float) (w / 2f - 2.5f + 2.8f * spread) + moveX, h / 2f - 7.5f + moveY, 0, 0, 16, 16, 16, 16);
|
||||
|
@ -142,11 +142,11 @@ public class CrossHairOverlay {
|
|||
float rate = (40 - KILL_INDICATOR * 5) / 5.5f;
|
||||
|
||||
if (HIT_INDICATOR > 0) {
|
||||
preciseBlit(guiGraphics, new ResourceLocation(ModUtils.MODID, "textures/screens/hit_marker.png"), posX + moveX, posY + moveY, 0, 0, 16, 16, 16, 16);
|
||||
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/hit_marker.png"), posX + moveX, posY + moveY, 0, 0, 16, 16, 16, 16);
|
||||
}
|
||||
|
||||
if (HEAD_INDICATOR > 0) {
|
||||
preciseBlit(guiGraphics, new ResourceLocation(ModUtils.MODID, "textures/screens/headshot_mark.png"), posX + moveX, posY + moveY, 0, 0, 16, 16, 16, 16);
|
||||
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/headshot_mark.png"), posX + moveX, posY + moveY, 0, 0, 16, 16, 16, 16);
|
||||
}
|
||||
|
||||
if (KILL_INDICATOR > 0) {
|
||||
|
@ -155,10 +155,10 @@ public class CrossHairOverlay {
|
|||
float posX2 = w / 2f - 7.5f + 2 - rate + moveX;
|
||||
float posY2 = h / 2f - 7.5f + 2 - rate + moveY;
|
||||
|
||||
preciseBlit(guiGraphics, new ResourceLocation(ModUtils.MODID, "textures/screens/kill_mark1.png"), posX1, posY1, 0, 0, 16, 16, 16, 16);
|
||||
preciseBlit(guiGraphics, new ResourceLocation(ModUtils.MODID, "textures/screens/kill_mark2.png"), posX2, posY1, 0, 0, 16, 16, 16, 16);
|
||||
preciseBlit(guiGraphics, new ResourceLocation(ModUtils.MODID, "textures/screens/kill_mark3.png"), posX1, posY2, 0, 0, 16, 16, 16, 16);
|
||||
preciseBlit(guiGraphics, new ResourceLocation(ModUtils.MODID, "textures/screens/kill_mark4.png"), posX2, posY2, 0, 0, 16, 16, 16, 16);
|
||||
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/kill_mark1.png"), posX1, posY1, 0, 0, 16, 16, 16, 16);
|
||||
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/kill_mark2.png"), posX2, posY1, 0, 0, 16, 16, 16, 16);
|
||||
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/kill_mark3.png"), posX1, posY2, 0, 0, 16, 16, 16, 16);
|
||||
preciseBlit(guiGraphics, ModUtils.loc("textures/screens/kill_mark4.png"), posX2, posY2, 0, 0, 16, 16, 16, 16);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ import net.mcreator.superbwarfare.tools.TraceTool;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GameRenderer;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
@ -45,7 +44,7 @@ public class DroneUIOverlay {
|
|||
RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
|
||||
RenderSystem.setShaderColor(1, 1, 1, 1);
|
||||
if (stack.is(ModItems.MONITOR.get()) && stack.getOrCreateTag().getBoolean("Using") && stack.getOrCreateTag().getBoolean("Linked")) {
|
||||
event.getGuiGraphics().blit(new ResourceLocation(ModUtils.MODID, "textures/screens/drone.png"), w / 2 - 16, h / 2 - 16, 0, 0, 32, 32, 32, 32);
|
||||
event.getGuiGraphics().blit(ModUtils.loc("textures/screens/drone.png"), w / 2 - 16, h / 2 - 16, 0, 0, 32, 32, 32, 32);
|
||||
|
||||
DroneEntity entity = player.level().getEntitiesOfClass(DroneEntity.class, player.getBoundingBox().inflate(512))
|
||||
.stream().filter(e -> e.getStringUUID().equals(stack.getOrCreateTag().getString("LinkedDrone"))).findFirst().orElse(null);
|
||||
|
|
|
@ -8,7 +8,6 @@ import net.mcreator.superbwarfare.init.ModItems;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GameRenderer;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
@ -53,11 +52,11 @@ public class JavelinHudOverlay {
|
|||
float l = ((h - j) / 2) + moveY;
|
||||
float i1 = k + i;
|
||||
float j1 = l + j;
|
||||
preciseBlit(event.getGuiGraphics(), new ResourceLocation(ModUtils.MODID, "textures/screens/javelin/javelin_hud.png"), k, l, 0, 0.0F, i, j, i, j);
|
||||
preciseBlit(event.getGuiGraphics(), new ResourceLocation(ModUtils.MODID, stack.getOrCreateTag().getBoolean("TopMode") ? "textures/screens/javelin/top.png" : "textures/screens/javelin/dir.png"), k, l, 0, 0.0F, i, j, i, j);
|
||||
preciseBlit(event.getGuiGraphics(), new ResourceLocation(ModUtils.MODID, stack.getOrCreateTag().getInt("ammo") > 0 ? "textures/screens/javelin/missile_green.png" : "textures/screens/javelin/missile_red.png"), k, l, 0, 0.0F, i, j, i, j);
|
||||
preciseBlit(event.getGuiGraphics(), ModUtils.loc("textures/screens/javelin/javelin_hud.png"), k, l, 0, 0.0F, i, j, i, j);
|
||||
preciseBlit(event.getGuiGraphics(), ModUtils.loc(stack.getOrCreateTag().getBoolean("TopMode") ? "textures/screens/javelin/top.png" : "textures/screens/javelin/dir.png"), k, l, 0, 0.0F, i, j, i, j);
|
||||
preciseBlit(event.getGuiGraphics(), ModUtils.loc(stack.getOrCreateTag().getInt("ammo") > 0 ? "textures/screens/javelin/missile_green.png" : "textures/screens/javelin/missile_red.png"), k, l, 0, 0.0F, i, j, i, j);
|
||||
if (stack.getOrCreateTag().getInt("SeekTime") > 1 && stack.getOrCreateTag().getInt("SeekTime") < 20) {
|
||||
preciseBlit(event.getGuiGraphics(), new ResourceLocation(ModUtils.MODID, "textures/screens/javelin/seek.png"), k, l, 0, 0.0F, i, j, i, j);
|
||||
preciseBlit(event.getGuiGraphics(), ModUtils.loc("textures/screens/javelin/seek.png"), k, l, 0, 0.0F, i, j, i, j);
|
||||
}
|
||||
event.getGuiGraphics().fill(RenderType.guiOverlay(), 0, (int) l, (int) k + 3, (int) j1, -90, -16777216);
|
||||
event.getGuiGraphics().fill(RenderType.guiOverlay(), (int) i1, (int) l, w, (int) j1, -90, -16777216);
|
||||
|
|
|
@ -31,18 +31,18 @@ import static net.mcreator.superbwarfare.tools.RenderTool.preciseBlit;
|
|||
|
||||
@Mod.EventBusSubscriber(value = Dist.CLIENT)
|
||||
public class KillMessageOverlay {
|
||||
private static final ResourceLocation HEADSHOT = new ResourceLocation(ModUtils.MODID, "textures/screens/damage_types/headshot.png");
|
||||
private static final ResourceLocation HEADSHOT = ModUtils.loc("textures/screens/damage_types/headshot.png");
|
||||
|
||||
private static final ResourceLocation KNIFE = new ResourceLocation(ModUtils.MODID, "textures/screens/damage_types/knife.png");
|
||||
private static final ResourceLocation EXPLOSION = new ResourceLocation(ModUtils.MODID, "textures/screens/damage_types/explosion.png");
|
||||
private static final ResourceLocation CLAYMORE = new ResourceLocation(ModUtils.MODID, "textures/screens/damage_types/claymore.png");
|
||||
private static final ResourceLocation GENERIC = new ResourceLocation(ModUtils.MODID, "textures/screens/damage_types/generic.png");
|
||||
private static final ResourceLocation BEAST = new ResourceLocation(ModUtils.MODID, "textures/screens/damage_types/beast.png");
|
||||
private static final ResourceLocation BLEEDING = new ResourceLocation(ModUtils.MODID, "textures/screens/damage_types/bleeding.png");
|
||||
private static final ResourceLocation SHOCK = new ResourceLocation(ModUtils.MODID, "textures/screens/damage_types/shock.png");
|
||||
private static final ResourceLocation BLOOD_CRYSTAL = new ResourceLocation(ModUtils.MODID, "textures/screens/damage_types/blood_crystal.png");
|
||||
private static final ResourceLocation KNIFE = ModUtils.loc("textures/screens/damage_types/knife.png");
|
||||
private static final ResourceLocation EXPLOSION = ModUtils.loc("textures/screens/damage_types/explosion.png");
|
||||
private static final ResourceLocation CLAYMORE = ModUtils.loc("textures/screens/damage_types/claymore.png");
|
||||
private static final ResourceLocation GENERIC = ModUtils.loc("textures/screens/damage_types/generic.png");
|
||||
private static final ResourceLocation BEAST = ModUtils.loc("textures/screens/damage_types/beast.png");
|
||||
private static final ResourceLocation BLEEDING = ModUtils.loc("textures/screens/damage_types/bleeding.png");
|
||||
private static final ResourceLocation SHOCK = ModUtils.loc("textures/screens/damage_types/shock.png");
|
||||
private static final ResourceLocation BLOOD_CRYSTAL = ModUtils.loc("textures/screens/damage_types/blood_crystal.png");
|
||||
|
||||
private static final ResourceLocation WORLD_PEACE_STAFF = new ResourceLocation(ModUtils.MODID, "textures/gun_icon/compat/world_peace_staff.png");
|
||||
private static final ResourceLocation WORLD_PEACE_STAFF = ModUtils.loc("textures/gun_icon/compat/world_peace_staff.png");
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.NORMAL)
|
||||
public static void onRenderGui(RenderGuiEvent.Pre event) {
|
||||
|
|
|
@ -8,7 +8,6 @@ import net.mcreator.superbwarfare.init.ModItems;
|
|||
import net.minecraft.client.CameraType;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.GameRenderer;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.client.event.RenderGuiEvent;
|
||||
|
@ -32,7 +31,7 @@ public class M79UIOverlay {
|
|||
RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
|
||||
RenderSystem.setShaderColor(1, 1, 1, 1);
|
||||
if (shouldRenderCrossHair(player)) {
|
||||
event.getGuiGraphics().blit(new ResourceLocation(ModUtils.MODID, "textures/screens/rex.png"), w / 2 - 16, h / 2 - 16, 0, 0, 32, 32, 32, 32);
|
||||
event.getGuiGraphics().blit(ModUtils.loc("textures/screens/rex.png"), w / 2 - 16, h / 2 - 16, 0, 0, 32, 32, 32, 32);
|
||||
}
|
||||
RenderSystem.depthMask(true);
|
||||
RenderSystem.defaultBlendFunc();
|
||||
|
|
|
@ -19,7 +19,7 @@ import net.minecraftforge.api.distmarker.OnlyIn;
|
|||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public class ReforgingTableScreen extends AbstractContainerScreen<ReforgingTableMenu> {
|
||||
private static final ResourceLocation TEXTURE = new ResourceLocation(ModUtils.MODID, "textures/gui/reforging_table.png");
|
||||
private static final ResourceLocation TEXTURE = ModUtils.loc("textures/gui/reforging_table.png");
|
||||
|
||||
public ReforgingTableScreen(ReforgingTableMenu pMenu, Inventory pPlayerInventory, Component pTitle) {
|
||||
super(pMenu, pPlayerInventory, pTitle);
|
||||
|
|
|
@ -138,12 +138,12 @@ public class ModItemModelProvider extends ItemModelProvider {
|
|||
|
||||
private ItemModelBuilder simpleItem(RegistryObject<Item> item, String location) {
|
||||
return withExistingParent(item.getId().getPath(), new ResourceLocation("item/generated"))
|
||||
.texture("layer0", new ResourceLocation(ModUtils.MODID, "item/" + location + item.getId().getPath()));
|
||||
.texture("layer0", ModUtils.loc("item/" + location + item.getId().getPath()));
|
||||
}
|
||||
|
||||
private ItemModelBuilder simpleItem(RegistryObject<Item> item, String location, String renderType) {
|
||||
return withExistingParent(item.getId().getPath(), new ResourceLocation("item/generated"))
|
||||
.texture("layer0", new ResourceLocation(ModUtils.MODID, "item/" + location + item.getId().getPath())).renderType(renderType);
|
||||
.texture("layer0", ModUtils.loc("item/" + location + item.getId().getPath())).renderType(renderType);
|
||||
}
|
||||
|
||||
public void evenSimplerBlockItem(RegistryObject<Block> block) {
|
||||
|
@ -153,7 +153,7 @@ public class ModItemModelProvider extends ItemModelProvider {
|
|||
|
||||
private ItemModelBuilder blueprintItem(RegistryObject<Item> item) {
|
||||
return withExistingParent(item.getId().getPath(), new ResourceLocation("item/generated"))
|
||||
.texture("layer0", new ResourceLocation(ModUtils.MODID, "item/gun_blueprint"));
|
||||
.texture("layer0", ModUtils.loc("item/gun_blueprint"));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -18,7 +18,6 @@ import net.minecraft.client.CameraType;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.multiplayer.ClientLevel;
|
||||
import net.minecraft.client.player.LocalPlayer;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
|
@ -282,7 +281,7 @@ public class ClientEventHandler {
|
|||
|
||||
if (drone != null && stack.getOrCreateTag().getBoolean("Using")) {
|
||||
if (Minecraft.getInstance().gameRenderer.currentEffect() == null) {
|
||||
Minecraft.getInstance().gameRenderer.loadEffect(new ResourceLocation(ModUtils.MODID, "shaders/post/scan_pincushion.json"));
|
||||
Minecraft.getInstance().gameRenderer.loadEffect(ModUtils.loc("shaders/post/scan_pincushion.json"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue