Skip to content

Commit

Permalink
Resolve #18, #17, and #14
Browse files Browse the repository at this point in the history
  • Loading branch information
BarchamMal committed Jul 26, 2024
1 parent 2dac6fc commit b2ac19f
Show file tree
Hide file tree
Showing 68 changed files with 492 additions and 407 deletions.
4 changes: 2 additions & 2 deletions src/client/java/barch/mc_extended/Entities/EnderCube.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
import net.minecraft.util.Identifier;

import static barch.mc_extended.Entities.Entities.ENDER_CUBE;
import static barch.mc_extended.MCExtended.NAMESPACE;
import static barch.mc_extended.MCExtended.MC_EXTENDED;

public class EnderCube {

public static final EntityModelLayer MODEL_ENDER_CUBE_LAYER = new EntityModelLayer(Identifier.of(NAMESPACE, "ender_cube"), "main");
public static final EntityModelLayer MODEL_ENDER_CUBE_LAYER = new EntityModelLayer(Identifier.of(MC_EXTENDED, "ender_cube"), "main");

public static void registerClient() {

Expand Down
4 changes: 2 additions & 2 deletions src/client/java/barch/mc_extended/Entities/Lost.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
import net.minecraft.util.Identifier;

import static barch.mc_extended.Entities.Entities.LOST;
import static barch.mc_extended.MCExtended.NAMESPACE;
import static barch.mc_extended.MCExtended.MC_EXTENDED;

public class Lost {

public static final EntityModelLayer MODEL_LOST_LAYER = new EntityModelLayer(Identifier.of(NAMESPACE, "lost"), "main");
public static final EntityModelLayer MODEL_LOST_LAYER = new EntityModelLayer(Identifier.of(MC_EXTENDED, "lost"), "main");

public static void registerClient() {

Expand Down
4 changes: 2 additions & 2 deletions src/client/java/barch/mc_extended/Entities/SilverGolem.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
import net.minecraft.util.Identifier;

import static barch.mc_extended.Entities.Entities.SILVER_GOLEM;
import static barch.mc_extended.MCExtended.NAMESPACE;
import static barch.mc_extended.MCExtended.MC_EXTENDED;

public class SilverGolem {

public static final EntityModelLayer MODEL_SILVER_GOLEM_LAYER = new EntityModelLayer(Identifier.of(NAMESPACE, "silver_golem"), "main");
public static final EntityModelLayer MODEL_SILVER_GOLEM_LAYER = new EntityModelLayer(Identifier.of(MC_EXTENDED, "silver_golem"), "main");

public static void registerClient() {

Expand Down
4 changes: 2 additions & 2 deletions src/client/java/barch/mc_extended/Entities/TroutFish.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
import net.minecraft.util.Identifier;

import static barch.mc_extended.Entities.Entities.TROUT_FISH;
import static barch.mc_extended.MCExtended.NAMESPACE;
import static barch.mc_extended.MCExtended.MC_EXTENDED;

public class TroutFish {


public static final EntityModelLayer MODEL_TROUT_FISH_LAYER = new EntityModelLayer(Identifier.of(NAMESPACE, "trout_fish"), "main");
public static final EntityModelLayer MODEL_TROUT_FISH_LAYER = new EntityModelLayer(Identifier.of(MC_EXTENDED, "trout_fish"), "main");

public static void registerClient() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
import net.minecraft.util.math.MathHelper;

import static barch.mc_extended.Entities.EnderCube.MODEL_ENDER_CUBE_LAYER;
import static barch.mc_extended.MCExtended.NAMESPACE;
import static barch.mc_extended.MCExtended.MC_EXTENDED;

@Environment(EnvType.CLIENT)
public class EnderCubeEntityRenderer extends MobEntityRenderer<EnderCubeEntity, EnderCubeEntityModel<EnderCubeEntity>> {
private static final Identifier TEXTURE = Identifier.of(NAMESPACE,"textures/entity/slimes/ender_cube.png");
private static final Identifier TEXTURE = Identifier.of(MC_EXTENDED,"textures/entity/slimes/ender_cube.png");

public EnderCubeEntityRenderer(EntityRendererFactory.Context context) {
super(context, new EnderCubeEntityModel(context.getPart(MODEL_ENDER_CUBE_LAYER)), 0.25F);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
import net.minecraft.client.render.entity.feature.SkeletonOverlayFeatureRenderer;
import net.minecraft.client.render.entity.model.EntityModelLayers;
import net.minecraft.entity.mob.AbstractSkeletonEntity;
import net.minecraft.entity.mob.StrayEntity;
import net.minecraft.util.Identifier;

import static barch.mc_extended.MCExtended.NAMESPACE;
import static barch.mc_extended.MCExtended.MC_EXTENDED;

public class LostEntityRenderer extends SkeletonEntityRenderer {
private static final Identifier TEXTURE = Identifier.of(NAMESPACE,"textures/entity/skeleton/lost.png");
private static final Identifier field_49165 = Identifier.of(NAMESPACE, "textures/entity/skeleton/lost_overlay.png");
private static final Identifier TEXTURE = Identifier.of(MC_EXTENDED,"textures/entity/skeleton/lost.png");
private static final Identifier field_49165 = Identifier.of(MC_EXTENDED, "textures/entity/skeleton/lost_overlay.png");

public LostEntityRenderer(EntityRendererFactory.Context context) {
super(context, EntityModelLayers.STRAY, EntityModelLayers.STRAY_INNER_ARMOR, EntityModelLayers.STRAY_OUTER_ARMOR);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
import barch.mc_extended.render.entity.model.SilverGolemEntityModel;
import net.minecraft.client.render.entity.EntityRendererFactory;
import net.minecraft.client.render.entity.MobEntityRenderer;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.RotationAxis;

import static barch.mc_extended.Entities.SilverGolem.MODEL_SILVER_GOLEM_LAYER;
import static barch.mc_extended.MCExtended.NAMESPACE;
import static barch.mc_extended.MCExtended.MC_EXTENDED;

public class SilverGolemEntityRenderer extends MobEntityRenderer<SilverGolemEntity, SilverGolemEntityModel<SilverGolemEntity>> {
private static final Identifier TEXTURE = Identifier.of(NAMESPACE,"textures/entity/golems/silver_golem.png");
private static final Identifier TEXTURE = Identifier.of(MC_EXTENDED,"textures/entity/golems/silver_golem.png");

public SilverGolemEntityRenderer(EntityRendererFactory.Context context) {
super(context, new SilverGolemEntityModel<>(context.getPart(MODEL_SILVER_GOLEM_LAYER)), 0.7F);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@
import barch.mc_extended.render.entity.model.TroutFishEntityModel;
import net.minecraft.client.render.entity.EntityRendererFactory;
import net.minecraft.client.render.entity.MobEntityRenderer;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.Identifier;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.RotationAxis;

import static barch.mc_extended.MCExtended.NAMESPACE;
import static barch.mc_extended.MCExtended.MC_EXTENDED;
import static barch.mc_extended.Entities.TroutFish.MODEL_TROUT_FISH_LAYER;

public class TroutFishEntityRenderer extends MobEntityRenderer<TroutFishEntity, TroutFishEntityModel<TroutFishEntity>> {
private static final Identifier TEXTURE = Identifier.of(NAMESPACE,"textures/entity/fish/trout_fish.png");
private static final Identifier TEXTURE = Identifier.of(MC_EXTENDED,"textures/entity/fish/trout_fish.png");

public TroutFishEntityRenderer(EntityRendererFactory.Context context) {
super(context, new TroutFishEntityModel(context.getPart(MODEL_TROUT_FISH_LAYER)), 0.4F);
Expand Down
9 changes: 5 additions & 4 deletions src/main/java/barch/mc_extended/ArFoMiToVi.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package barch.mc_extended;

import barch.mc_extended.Armor.ArmorMaterials;
import barch.mc_extended.Armor.MCEArmorMaterials;
import barch.mc_extended.Entities.Entities;
import barch.mc_extended.Foods.Foods;
import barch.mc_extended.Minerals.Minerals;
import barch.mc_extended.Misc.Misc;
import barch.mc_extended.Tools.ToolMaterials;
import barch.mc_extended.Tools.MCEToolMaterials;
import barch.mc_extended.Villagers.Villagers;

// (AR)mor (FO)od (MI)nerals (TO)ols (VI)llagers
public class ArFoMiToVi {

public static void RegisterAll() {
Expand All @@ -16,8 +17,8 @@ public static void RegisterAll() {
Foods.RegisterAll();
Misc.RegisterAll();

ArmorMaterials.RegisterAll();
ToolMaterials.RegisterAll();
MCEArmorMaterials.RegisterAll();
MCEToolMaterials.RegisterAll();

Villagers.RegisterAll();
Entities.RegisterAll();
Expand Down
25 changes: 12 additions & 13 deletions src/main/java/barch/mc_extended/Armor/BronzeArmorData.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,19 @@
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.sound.SoundEvent;
import net.minecraft.sound.SoundEvents;
import net.minecraft.util.Identifier;

import java.util.List;
import java.util.Map;
import java.util.function.Supplier;

import static barch.mc_extended.Armor.ArmorMaterials.registerMaterial;
import static barch.mc_extended.Armor.MCEArmorMaterials.registerMaterial;
import static barch.mc_extended.MCExtended.*;
import static net.minecraft.item.AnimalArmorItem.Type.EQUESTRIAN;

public class BronzeArmorData {

private static final int[] BASE_DURABILITY = new int[] {13,18,17,15};

public static final RegistryEntry<ArmorMaterial> BRONZE = registerMaterial(
"bronze",
Map.of(
Expand All @@ -40,20 +39,20 @@ public class BronzeArmorData {
false);


public static final Item BRONZE_HELMET = new ArmorItem(BRONZE, ArmorItem.Type.HELMET, new Item.Settings());
public static final Item BRONZE_CHESTPLATE = new ArmorItem(BRONZE, ArmorItem.Type.CHESTPLATE, new Item.Settings());
public static final Item BRONZE_LEGGINGS = new ArmorItem(BRONZE, ArmorItem.Type.LEGGINGS, new Item.Settings());
public static final Item BRONZE_BOOTS = new ArmorItem(BRONZE, ArmorItem.Type.BOOTS, new Item.Settings());
public static final Item BRONZE_HELMET = new ArmorItem(BRONZE, ArmorItem.Type.HELMET, new Item.Settings().maxCount(1).maxDamage(BASE_DURABILITY[0]));
public static final Item BRONZE_CHESTPLATE = new ArmorItem(BRONZE, ArmorItem.Type.CHESTPLATE, new Item.Settings().maxCount(1).maxDamage(BASE_DURABILITY[1]));
public static final Item BRONZE_LEGGINGS = new ArmorItem(BRONZE, ArmorItem.Type.LEGGINGS, new Item.Settings().maxCount(1).maxDamage(BASE_DURABILITY[2]));
public static final Item BRONZE_BOOTS = new ArmorItem(BRONZE, ArmorItem.Type.BOOTS, new Item.Settings().maxCount(1).maxDamage(BASE_DURABILITY[3]));
public static final Item BRONZE_HORSE_ARMOR = new AnimalArmorItem(BRONZE, EQUESTRIAN, false, new Item.Settings().maxCount(1));


public static void RegisterArmor() {

Registry.register(Registries.ITEM, Identifier.of(NAMESPACE, "bronze_helmet"), BRONZE_HELMET);
Registry.register(Registries.ITEM, Identifier.of(NAMESPACE, "bronze_chestplate"), BRONZE_CHESTPLATE);
Registry.register(Registries.ITEM, Identifier.of(NAMESPACE, "bronze_leggings"), BRONZE_LEGGINGS);
Registry.register(Registries.ITEM, Identifier.of(NAMESPACE, "bronze_boots"), BRONZE_BOOTS);
Registry.register(Registries.ITEM, Identifier.of(NAMESPACE, "bronze_horse_armor"), BRONZE_HORSE_ARMOR);
Registry.register(Registries.ITEM, Identifier.of(MC_EXTENDED, "bronze_helmet"), BRONZE_HELMET);
Registry.register(Registries.ITEM, Identifier.of(MC_EXTENDED, "bronze_chestplate"), BRONZE_CHESTPLATE);
Registry.register(Registries.ITEM, Identifier.of(MC_EXTENDED, "bronze_leggings"), BRONZE_LEGGINGS);
Registry.register(Registries.ITEM, Identifier.of(MC_EXTENDED, "bronze_boots"), BRONZE_BOOTS);
Registry.register(Registries.ITEM, Identifier.of(MC_EXTENDED, "bronze_horse_armor"), BRONZE_HORSE_ARMOR);

}

Expand Down
25 changes: 12 additions & 13 deletions src/main/java/barch/mc_extended/Armor/CopperArmorData.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,21 @@
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.sound.SoundEvent;
import net.minecraft.sound.SoundEvents;
import net.minecraft.util.Identifier;

import java.util.List;
import java.util.Map;
import java.util.function.Supplier;

import static barch.mc_extended.Armor.ArmorMaterials.registerMaterial;
import static barch.mc_extended.Armor.MCEArmorMaterials.registerMaterial;
import static barch.mc_extended.Armor.SilverArmorData.SILVER_BOOTS;
import static barch.mc_extended.Armor.SilverArmorData.SILVER_HORSE_ARMOR;
import static barch.mc_extended.MCExtended.*;
import static net.minecraft.item.AnimalArmorItem.Type.EQUESTRIAN;

public class CopperArmorData {

private static final int[] BASE_DURABILITY = new int[] {9,17,15,10};

public static final RegistryEntry<ArmorMaterial> COPPER = registerMaterial(
"copper",
Map.of(
Expand All @@ -40,20 +39,20 @@ public class CopperArmorData {
false);


public static final Item COPPER_HELMET = new ArmorItem(COPPER, ArmorItem.Type.HELMET, new Item.Settings());
public static final Item COPPER_CHESTPLATE = new ArmorItem(COPPER, ArmorItem.Type.CHESTPLATE, new Item.Settings());
public static final Item COPPER_LEGGINGS = new ArmorItem(COPPER, ArmorItem.Type.LEGGINGS, new Item.Settings());
public static final Item COPPER_BOOTS = new ArmorItem(COPPER, ArmorItem.Type.BOOTS, new Item.Settings());
public static final Item COPPER_HELMET = new ArmorItem(COPPER, ArmorItem.Type.HELMET, new Item.Settings().maxCount(1).maxDamage(BASE_DURABILITY[0]));
public static final Item COPPER_CHESTPLATE = new ArmorItem(COPPER, ArmorItem.Type.CHESTPLATE, new Item.Settings().maxCount(1).maxDamage(BASE_DURABILITY[1]));
public static final Item COPPER_LEGGINGS = new ArmorItem(COPPER, ArmorItem.Type.LEGGINGS, new Item.Settings().maxCount(1).maxDamage(BASE_DURABILITY[2]));
public static final Item COPPER_BOOTS = new ArmorItem(COPPER, ArmorItem.Type.BOOTS, new Item.Settings().maxCount(1).maxDamage(BASE_DURABILITY[3]));
public static final Item COPPER_HORSE_ARMOR = new AnimalArmorItem(COPPER, EQUESTRIAN, false, new Item.Settings().maxCount(1));


public static void RegisterArmor() {

Registry.register(Registries.ITEM, Identifier.of(NAMESPACE, "copper_helmet"), COPPER_HELMET);
Registry.register(Registries.ITEM, Identifier.of(NAMESPACE, "copper_chestplate"), COPPER_CHESTPLATE);
Registry.register(Registries.ITEM, Identifier.of(NAMESPACE, "copper_leggings"), COPPER_LEGGINGS);
Registry.register(Registries.ITEM, Identifier.of(NAMESPACE, "copper_boots"), COPPER_BOOTS);
Registry.register(Registries.ITEM, Identifier.of(NAMESPACE, "copper_horse_armor"), COPPER_HORSE_ARMOR);
Registry.register(Registries.ITEM, Identifier.of(MC_EXTENDED, "copper_helmet"), COPPER_HELMET);
Registry.register(Registries.ITEM, Identifier.of(MC_EXTENDED, "copper_chestplate"), COPPER_CHESTPLATE);
Registry.register(Registries.ITEM, Identifier.of(MC_EXTENDED, "copper_leggings"), COPPER_LEGGINGS);
Registry.register(Registries.ITEM, Identifier.of(MC_EXTENDED, "copper_boots"), COPPER_BOOTS);
Registry.register(Registries.ITEM, Identifier.of(MC_EXTENDED, "copper_horse_armor"), COPPER_HORSE_ARMOR);

}

Expand Down
30 changes: 15 additions & 15 deletions src/main/java/barch/mc_extended/Armor/CorundumArmorData.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.registry.entry.RegistryEntry;
import net.minecraft.sound.SoundEvent;
import net.minecraft.sound.SoundEvents;
import net.minecraft.util.Identifier;

import java.util.List;
import java.util.Map;
import java.util.function.Supplier;

import static barch.mc_extended.Armor.ArmorMaterials.registerMaterial;
import static barch.mc_extended.Armor.MCEArmorMaterials.registerMaterial;
import static barch.mc_extended.Armor.SapphireArmorData.SAPPHIRE_HORSE_ARMOR;
import static barch.mc_extended.MCExtended.NAMESPACE;
import static barch.mc_extended.MCExtended.MC_EXTENDED;
import static net.minecraft.item.AnimalArmorItem.Type.EQUESTRIAN;

public class CorundumArmorData {

private static final int[] BASE_DURABILITY = new int[] {49,73,67,65};

public static final RegistryEntry<ArmorMaterial> CORUNDUM = registerMaterial(
"corundum",
Map.of(
Expand All @@ -39,19 +39,19 @@ public class CorundumArmorData {
true);


public static final Item CORUNDUM_HELMET = new ArmorItem(CORUNDUM, ArmorItem.Type.HELMET, new Item.Settings().fireproof());
public static final Item CORUNDUM_CHESTPLATE = new ArmorItem(CORUNDUM, ArmorItem.Type.CHESTPLATE, new Item.Settings().fireproof());
public static final Item CORUNDUM_LEGGINGS = new ArmorItem(CORUNDUM, ArmorItem.Type.LEGGINGS, new Item.Settings().fireproof());
public static final Item CORUNDUM_BOOTS = new ArmorItem(CORUNDUM, ArmorItem.Type.BOOTS, new Item.Settings().fireproof());
public static final Item CORUNDUM_HELMET = new ArmorItem(CORUNDUM, ArmorItem.Type.HELMET, new Item.Settings().fireproof().maxCount(1).maxDamage(BASE_DURABILITY[0]));
public static final Item CORUNDUM_CHESTPLATE = new ArmorItem(CORUNDUM, ArmorItem.Type.CHESTPLATE, new Item.Settings().fireproof().maxCount(1).maxDamage(BASE_DURABILITY[1]));
public static final Item CORUNDUM_LEGGINGS = new ArmorItem(CORUNDUM, ArmorItem.Type.LEGGINGS, new Item.Settings().fireproof().maxCount(1).maxDamage(BASE_DURABILITY[2]));
public static final Item CORUNDUM_BOOTS = new ArmorItem(CORUNDUM, ArmorItem.Type.BOOTS, new Item.Settings().fireproof().maxCount(1).maxDamage(BASE_DURABILITY[3]));

public static final Item CORUNDUM_HORSE_ARMOR = new AnimalArmorItem(CORUNDUM, AnimalArmorItem.Type.EQUESTRIAN, false, new Item.Settings().maxCount(1).fireproof());
public static final Item CORUNDUM_HORSE_ARMOR = new AnimalArmorItem(CORUNDUM, EQUESTRIAN, false, new Item.Settings().maxCount(1).fireproof());

public static void RegisterArmor() {
Registry.register(Registries.ITEM, Identifier.of(NAMESPACE, "corundum_helmet"), CORUNDUM_HELMET);
Registry.register(Registries.ITEM, Identifier.of(NAMESPACE, "corundum_chestplate"), CORUNDUM_CHESTPLATE);
Registry.register(Registries.ITEM, Identifier.of(NAMESPACE, "corundum_leggings"), CORUNDUM_LEGGINGS);
Registry.register(Registries.ITEM, Identifier.of(NAMESPACE, "corundum_boots"), CORUNDUM_BOOTS);
Registry.register(Registries.ITEM, Identifier.of(NAMESPACE, "corundum_horse_armor"), CORUNDUM_HORSE_ARMOR);
Registry.register(Registries.ITEM, Identifier.of(MC_EXTENDED, "corundum_helmet"), CORUNDUM_HELMET);
Registry.register(Registries.ITEM, Identifier.of(MC_EXTENDED, "corundum_chestplate"), CORUNDUM_CHESTPLATE);
Registry.register(Registries.ITEM, Identifier.of(MC_EXTENDED, "corundum_leggings"), CORUNDUM_LEGGINGS);
Registry.register(Registries.ITEM, Identifier.of(MC_EXTENDED, "corundum_boots"), CORUNDUM_BOOTS);
Registry.register(Registries.ITEM, Identifier.of(MC_EXTENDED, "corundum_horse_armor"), CORUNDUM_HORSE_ARMOR);
}

public static void GroupArmor() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,16 @@
import net.minecraft.sound.SoundEvent;
import net.minecraft.util.Identifier;

import java.net.Proxy;
import java.util.EnumMap;
import java.util.List;
import java.util.Map;
import java.util.function.Supplier;

import static barch.mc_extended.MCExtended.NAMESPACE;

public class ArmorMaterials {
public class MCEArmorMaterials {

public static RegistryEntry<ArmorMaterial> registerMaterial(String id, Map<ArmorItem.Type, Integer> defencePoints, int enchantability, RegistryEntry<SoundEvent> equipSound, Supplier<Ingredient> repairIngredientSupplier, float toughness, float knockbackResistance, boolean dyeable) {
List<ArmorMaterial.Layer> layers = List.of(
new ArmorMaterial.Layer(Identifier.of(NAMESPACE, id), "", dyeable)
new ArmorMaterial.Layer(Identifier.ofVanilla(id), "", dyeable)
);

EnumMap<ArmorItem.Type, Integer> enumMap = new EnumMap(ArmorItem.Type.class);
Expand Down
Loading

0 comments on commit b2ac19f

Please sign in to comment.