Skip to content

Commit

Permalink
refactored some stuff yay
Browse files Browse the repository at this point in the history
  • Loading branch information
CammiePone committed Jan 16, 2025
1 parent 666dcbb commit 1d5db4d
Show file tree
Hide file tree
Showing 99 changed files with 170 additions and 173 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public void renderBackground(GuiGraphics guiGraphics) {
}

private static void openLink(String target) {
var container = FabricLoader.getInstance().getModContainer(FabricMain.MOD_ID).orElseThrow();
var container = FabricLoader.getInstance().getModContainer(Arcanus.MOD_ID).orElseThrow();
var meta = container.getMetadata();
try {
var uri = new URIBuilder(target).addParameter("source", "mod:%s/%s".formatted(meta.getId(), meta.getVersion())).build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
import java.util.Locale;

public class SpellBookScreen extends AbstractContainerScreen<SpellBookScreenHandler> {
public static final ResourceLocation BOOK_TEXTURE = FabricMain.id("textures/gui/spell_book.png");
public static final ResourceLocation PANEL_TEXTURE = FabricMain.id("textures/gui/spell_crafting.png");
public static final ResourceLocation BOOK_TEXTURE = Arcanus.id("textures/gui/spell_book.png");
public static final ResourceLocation PANEL_TEXTURE = Arcanus.id("textures/gui/spell_crafting.png");
public final LinkedList<SpellGroup> SPELL_GROUPS = new LinkedList<>();

public SpellBookScreen(SpellBookScreenHandler screenHandler, Inventory playerInventory, Component text) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
import java.util.Locale;

public class SpellcraftScreen extends AbstractContainerScreen<SpellcraftScreenHandler> {
public static final ResourceLocation BOOK_TEXTURE = FabricMain.id("textures/gui/spell_book.png");
public static final ResourceLocation PANEL_TEXTURE = FabricMain.id("textures/gui/spell_crafting.png");
public static final ResourceLocation BOOK_TEXTURE = Arcanus.id("textures/gui/spell_book.png");
public static final ResourceLocation PANEL_TEXTURE = Arcanus.id("textures/gui/spell_crafting.png");
private static final Vector4i VALID_BOUNDS = new Vector4i(30, 40, 197, 114);
private static List<SpellComponent> spellShapes;
private static List<SpellComponent> spellEffects;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import net.minecraft.world.entity.LivingEntity;

public class BattleMageArmourModel<T extends LivingEntity> extends HumanoidModel<T> {
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(FabricMain.id("battle_mage_armor"), "main");
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(Arcanus.id("battle_mage_armor"), "main");
public final ModelPart helmet;
public final ModelPart chestplate;
public final ModelPart surcoatFront;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import net.minecraft.world.entity.LivingEntity;

public class WizardArmourModel<T extends LivingEntity> extends HumanoidModel<T> {
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(FabricMain.id("wizard_robes"), "main");
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(Arcanus.id("wizard_robes"), "main");
public final ModelPart wizardHat;
public final ModelPart robes;
public final ModelPart rightSleeve;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import net.minecraft.util.Mth;

public class OpossumEntityModel extends EntityModel<OpossumEntity> {
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(FabricMain.id("opossum"), "main");
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(Arcanus.id("opossum"), "main");
public final ModelPart head;
public final ModelPart hat;
public final ModelPart body;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import net.minecraft.world.entity.HumanoidArm;

public class WizardEntityModel extends EntityModel<WizardEntity> implements ArmedModel, HeadedModel {
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(FabricMain.id("wizard"), "main");
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(Arcanus.id("wizard"), "main");
public final ModelPart head;
public final ModelPart leftArm;
public final ModelPart rightArm;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import net.minecraft.client.model.geom.builders.*;

public class AggressorbEntityModel extends EntityModel<AggressorbEntity> {
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(FabricMain.id("aggressorb"), "main");
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(Arcanus.id("aggressorb"), "main");
public final ModelPart cube1;
public final ModelPart cube2;
public final ModelPart cube3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import net.minecraft.client.model.geom.builders.*;

public class AreaOfEffectEntityModel extends EntityModel<AreaOfEffectEntity> {
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(FabricMain.id("area_of_effect"), "main");
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(Arcanus.id("area_of_effect"), "main");
public final ModelPart base;
public final ModelPart pillar;
public final ModelPart walls;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import net.minecraft.client.model.geom.builders.*;

public class GuardianOrbEntityModel extends EntityModel<GuardianOrbEntity> {
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(FabricMain.id("guardian_orb"), "main");
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(Arcanus.id("guardian_orb"), "main");
public final ModelPart cube1;
public final ModelPart cube2;
public final ModelPart cube3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import net.minecraft.client.model.geom.builders.*;

public class MagicLobEntityModel extends EntityModel<MagicProjectileEntity> {
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(FabricMain.id("magic_lob"), "main");
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(Arcanus.id("magic_lob"), "main");
public final ModelPart cube1;
public final ModelPart cube2;
public final ModelPart cube3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import net.minecraft.client.model.geom.builders.*;

public class MagicProjectileEntityModel extends EntityModel<MagicProjectileEntity> {
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(FabricMain.id("magic_projectile"), "main");
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(Arcanus.id("magic_projectile"), "main");
private final ModelPart base;
public final ModelPart ring1;
public final ModelPart ring2;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import net.minecraft.client.model.geom.builders.*;

public class MagicRuneEntityModel extends EntityModel<MagicRuneEntity> {
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(FabricMain.id("magic_rune"), "main");
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(Arcanus.id("magic_rune"), "main");
public final ModelPart rune;

public MagicRuneEntityModel(ModelPart root) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import net.minecraft.world.entity.Entity;

public class PocketDimensionPortalEntityModel extends EntityModel<Entity> {
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(FabricMain.id("pocket_dimension_portal"), "main");
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(Arcanus.id("pocket_dimension_portal"), "main");
private final ModelPart box;
public final ModelPart skybox;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// Exported for Minecraft version 1.17+ for Yarn
// Paste this class into your mod and generate all required imports
public class SpatialRiftEntitySigilModel extends EntityModel<Entity> {
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(FabricMain.id("spatial_rift_sigil"), "main");
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(Arcanus.id("spatial_rift_sigil"), "main");
public final ModelPart sigil;

public SpatialRiftEntitySigilModel(ModelPart root) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import net.minecraft.world.entity.player.Player;

public class HaloModel<T extends Player> extends HumanoidModel<T> {
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(FabricMain.id("halo"), "main");
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(Arcanus.id("halo"), "main");
public final ModelPart halo;
public final ModelPart spinny;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import java.util.List;

public class SpellPatternModel<T extends Player> extends HumanoidModel<T> {
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(FabricMain.id("spell_pattern"), "main");
public static final ModelLayerLocation MODEL_LAYER = new ModelLayerLocation(Arcanus.id("spell_pattern"), "main");
private final Minecraft client = Minecraft.getInstance();
private final ModelPart base;
public final ModelPart first;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
public class BattleMageArmourRenderer implements ArmorRenderer {
private final Minecraft client = Minecraft.getInstance();
private final ResourceLocation[] mainTextures = {
FabricMain.id("textures/entity/armor/battle_mage_armor_stage_0.png"),
FabricMain.id("textures/entity/armor/battle_mage_armor_stage_1.png"),
FabricMain.id("textures/entity/armor/battle_mage_armor_stage_2.png"),
FabricMain.id("textures/entity/armor/battle_mage_armor_stage_3.png")
Arcanus.id("textures/entity/armor/battle_mage_armor_stage_0.png"),
Arcanus.id("textures/entity/armor/battle_mage_armor_stage_1.png"),
Arcanus.id("textures/entity/armor/battle_mage_armor_stage_2.png"),
Arcanus.id("textures/entity/armor/battle_mage_armor_stage_3.png")
};
private final ResourceLocation overlayTexture = FabricMain.id("textures/entity/armor/battle_mage_armor_overlay.png");
private final ResourceLocation overlayTexture = Arcanus.id("textures/entity/armor/battle_mage_armor_overlay.png");
private BattleMageArmourModel<LivingEntity> model;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

public class WizardArmourRenderer implements ArmorRenderer {
private final Minecraft client = Minecraft.getInstance();
private final ResourceLocation mainTexture = FabricMain.id("textures/entity/armor/wizard_robes.png");
private final ResourceLocation overlayTexture = FabricMain.id("textures/entity/armor/wizard_robes_overlay.png");
private final ResourceLocation mainTexture = Arcanus.id("textures/entity/armor/wizard_robes.png");
private final ResourceLocation overlayTexture = Arcanus.id("textures/entity/armor/wizard_robes_overlay.png");
private WizardArmourModel<LivingEntity> model;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import static dev.cammiescorner.arcanus.fabric.entrypoints.FabricClient.renderSide;

public class MagicBlockEntityRenderer<T extends AbstractMagicBlockEntity> implements BlockEntityRenderer<T> {
private static final RenderType LAYER = FabricClient.getMagicCircles(FabricMain.id("textures/block/magic_block.png"));
private static final RenderType LAYER = FabricClient.getMagicCircles(Arcanus.id("textures/block/magic_block.png"));

private final Function<T, Color> colorGetter;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import net.minecraft.world.level.Level;

public class SpatialRiftExitBlockEntityRenderer implements BlockEntityRenderer<SpatialRiftExitBlockEntity> {
private static final RenderType LAYER = FabricClient.getMagicCircles(FabricMain.id("textures/entity/magic/spatial_rift_sigil.png"));
private static final RenderType LAYER = FabricClient.getMagicCircles(Arcanus.id("textures/entity/magic/spatial_rift_sigil.png"));
private final SpatialRiftEntitySigilModel sigilModel;

public SpatialRiftExitBlockEntityRenderer(BlockEntityRendererProvider.Context ctx) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import net.minecraft.world.item.ItemStack;

public class OpossumEntityRenderer extends MobRenderer<OpossumEntity, OpossumEntityModel> {
public static final ResourceLocation TEXTURE = FabricMain.id("textures/entity/living/opossum.png");
public static final ResourceLocation HAT_TEXTURE = FabricMain.id("textures/entity/living/opossum_hat.png");
public static final ResourceLocation TEXTURE = Arcanus.id("textures/entity/living/opossum.png");
public static final ResourceLocation HAT_TEXTURE = Arcanus.id("textures/entity/living/opossum_hat.png");

public OpossumEntityRenderer(EntityRendererProvider.Context context) {
super(context, new OpossumEntityModel(Minecraft.getInstance().getEntityModels().bakeLayer(OpossumEntityModel.MODEL_LAYER)), 0.3F);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import net.minecraft.world.item.DyeColor;

public class WizardEntityRenderer extends MobRenderer<WizardEntity, WizardEntityModel> {
public static final ResourceLocation TEXTURE = FabricMain.id("textures/entity/living/wizard.png");
public static final ResourceLocation ROBES_TEXTURE = FabricMain.id("textures/entity/living/wizard_overlay.png");
public static final ResourceLocation TEXTURE = Arcanus.id("textures/entity/living/wizard.png");
public static final ResourceLocation ROBES_TEXTURE = Arcanus.id("textures/entity/living/wizard_overlay.png");

public WizardEntityRenderer(EntityRendererProvider.Context context) {
super(context, new WizardEntityModel(Minecraft.getInstance().getEntityModels().bakeLayer(WizardEntityModel.MODEL_LAYER)), 0.6F);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import net.minecraft.resources.ResourceLocation;

public class AggressorbEntityRenderer extends EntityRenderer<AggressorbEntity> {
private static final ResourceLocation TEXTURE = FabricMain.id("textures/entity/magic/lob.png");
private static final ResourceLocation TEXTURE = Arcanus.id("textures/entity/magic/lob.png");
private final AggressorbEntityModel model;

public AggressorbEntityRenderer(EntityRendererProvider.Context context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import net.minecraft.util.Mth;

public class AreaOfEffectEntityRenderer extends EntityRenderer<AreaOfEffectEntity> {
private static final ResourceLocation TEXTURE = FabricMain.id("textures/entity/magic/area_of_effect.png");
private static final ResourceLocation TEXTURE = Arcanus.id("textures/entity/magic/area_of_effect.png");
private final AreaOfEffectEntityModel model;

public AreaOfEffectEntityRenderer(EntityRendererProvider.Context ctx) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.joml.Vector3d;

public class BeamEntityRenderer extends EntityRenderer<BeamEntity> {
private static final ResourceLocation BEAM_TEXTURE = FabricMain.id("textures/entity/magic/beam.png");
private static final ResourceLocation BEAM_TEXTURE = Arcanus.id("textures/entity/magic/beam.png");
private static final RenderType LAYER = FabricClient.getMagicCircles(BEAM_TEXTURE);
private static final Vector3d UP = new Vector3d(0, 1, 0);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import net.minecraft.resources.ResourceLocation;

public class GuardianOrbEntityRenderer extends EntityRenderer<GuardianOrbEntity> {
private static final ResourceLocation TEXTURE = FabricMain.id("textures/entity/magic/lob.png");
private static final ResourceLocation TEXTURE = Arcanus.id("textures/entity/magic/lob.png");
private final GuardianOrbEntityModel model;

public GuardianOrbEntityRenderer(EntityRendererProvider.Context context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import net.minecraft.util.Mth;

public class MagicProjectileEntityRenderer extends ArrowRenderer<MagicProjectileEntity> {
private static final ResourceLocation PROJECTILE_TEXTURE = FabricMain.id("textures/entity/magic/projectile.png");
private static final ResourceLocation LOB_TEXTURE = FabricMain.id("textures/entity/magic/lob.png");
private static final ResourceLocation PROJECTILE_TEXTURE = Arcanus.id("textures/entity/magic/projectile.png");
private static final ResourceLocation LOB_TEXTURE = Arcanus.id("textures/entity/magic/lob.png");
private final MagicLobEntityModel lobModel;
private final MagicProjectileEntityModel projectileModel;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import net.minecraft.resources.ResourceLocation;

public class MagicRuneEntityRenderer extends EntityRenderer<MagicRuneEntity> {
private static final ResourceLocation TEXTURE = FabricMain.id("textures/entity/magic/rune.png");
private static final ResourceLocation TEXTURE = Arcanus.id("textures/entity/magic/rune.png");
private final MagicRuneEntityModel model;
private final int[] keyFrames = {
16, 16, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import java.util.List;

public class ManaShieldEntityRenderer extends EntityRenderer<ManaShieldEntity> {
private static final ResourceLocation TEXTURE = FabricMain.id("textures/block/magic_block.png");
private static final ResourceLocation TEXTURE = Arcanus.id("textures/block/magic_block.png");
private static final RenderType LAYER = FabricClient.getMagicCirclesTri(TEXTURE);
public static final List<Vector3f> VERTICES = List.of(
new Vector3f(0, 0, 1), new Vector3f(0.894F, 0F, 0.447F), new Vector3f(0.276F, 0.851F, 0.447F),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import org.lwjgl.opengl.GL31;

public class PocketDimensionPortalEntityRenderer extends EntityRenderer<PocketDimensionPortalEntity> {
private static final ResourceLocation PORTAL_TEXTURE = FabricMain.id("textures/entity/magic/pocket_dimension_portal.png");
private static final ResourceLocation SIGIL_TEXTURE = FabricMain.id("textures/entity/magic/spatial_rift_sigil.png");
private static final ResourceLocation PORTAL_TEXTURE = Arcanus.id("textures/entity/magic/pocket_dimension_portal.png");
private static final ResourceLocation SIGIL_TEXTURE = Arcanus.id("textures/entity/magic/spatial_rift_sigil.png");
private final Minecraft client = Minecraft.getInstance();
private final Tesselator tesselator = Tesselator.getInstance();
private final PocketDimensionPortalEntityModel portalModel;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.joml.Vector3f;

public class SmiteEntityRenderer extends EntityRenderer<SmiteEntity> {
private static final ResourceLocation TEXTURE = FabricMain.id("textures/block/magic_block.png");
private static final ResourceLocation TEXTURE = Arcanus.id("textures/block/magic_block.png");

public SmiteEntityRenderer(EntityRendererProvider.Context ctx) {
super(ctx);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

public class HaloFeatureRenderer<T extends Player, M extends EntityModel<T>> extends RenderLayer<T, M> {

private static final ResourceLocation TEXTURE = FabricMain.id("textures/entity/feature/halo.png");
private static final ResourceLocation TEXTURE = Arcanus.id("textures/entity/feature/halo.png");
private final HaloModel<T> model;

public HaloFeatureRenderer(RenderLayerParent<T, M> context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import net.minecraft.world.entity.LivingEntity;

public class ManaWingsFeatureRenderer<T extends LivingEntity, M extends EntityModel<T>> extends RenderLayer<T, M> {
private static final ResourceLocation TEXTURE = FabricMain.id("/textures/entity/feature/mana_wings.png");
private static final ResourceLocation TEXTURE = Arcanus.id("/textures/entity/feature/mana_wings.png");
private final ElytraModel<T> model;

public ManaWingsFeatureRenderer(RenderLayerParent<T, M> context) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import net.minecraft.world.item.ItemStack;

public class SpellPatternFeatureRenderer<T extends Player, M extends EntityModel<T>> extends RenderLayer<T, M> {
private static final ResourceLocation TEXTURE = FabricMain.id("textures/entity/feature/magic_circles.png");
private static final ResourceLocation TEXTURE = Arcanus.id("textures/entity/feature/magic_circles.png");
private final Minecraft client = Minecraft.getInstance();
private final SpellPatternModel<Player> model;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ private static int export(CommandContext<CommandSourceStack> context, GameProfil
return 0;
}

var structureId = FabricMain.id("pocket_dimensions/%s/pocket_dimensions_%s".formatted(targetProfile.getId(), date));
var structureId = Arcanus.id("pocket_dimensions/%s/pocket_dimensions_%s".formatted(targetProfile.getId(), date));
FabricMain.LOGGER.info("Saving pocket dimension for player {} ({}) as '{}'", targetProfile.getName(), targetProfile.getId(), structureId);

var templateManager = pocketDim.getStructureManager();
var structure = templateManager.getOrCreate(structureId);
structure.setAuthor("%s_pocket_dimension_%s_%s".formatted(FabricMain.MOD_ID, targetProfile.getId(), date));
structure.setAuthor("%s_pocket_dimension_%s_%s".formatted(Arcanus.MOD_ID, targetProfile.getId(), date));
structure.fillFromWorld(pocketDim, plot.min(), plot.max().offset(1, 1, 1).subtract(plot.min()), true, null);
templateManager.save(structureId);

Expand Down
Loading

0 comments on commit 1d5db4d

Please sign in to comment.