Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build script, fix shulker boxes, add shields #156

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
Version 2.2.1

- Requires new version of Multi Item Lib
- Fixed Netherite Shulker Box sound
- Re-enabled shields, removed Fabric-Shield-Lib dependency
- Reworked the elytra internally to be registered like an actual elytra item, uses reintroduced Multi Item Lib functionality to hopefully have better compatibility
- Still functions as a piece of armor if a protection value is provided.
- Now requires Quilt Loader 0.26.0 or greater, and QFApi 7.5.0+0.92.2-1.20.1 or greater
- Update by Roadhog360
----
Version 2.2.0

- Update to Minecraft 1.20.1
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Discord: https://discord.gg/dGCvj56

* Netherite Shulker Boxes
- Don't burn in lava
- Still are exploded by TNT, will be fixed soon

* Netherite Fishing Rod
- Doesnt burn in lava
Expand Down
9 changes: 5 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id 'org.quiltmc.loom' version "1.1.+"
id 'org.quiltmc.loom' version "1.4.+"

id 'com.oroarmor.general-gradle-plugin' version '1.2.3'
id 'com.oroarmor.minecraft-gradle-plugin' version '1.2.3'
Comment on lines 4 to 5
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
id 'com.oroarmor.general-gradle-plugin' version '1.2.3'
id 'com.oroarmor.minecraft-gradle-plugin' version '1.2.3'
id 'com.oroarmor.general-gradle-plugin' version '1.3.1'
id 'com.oroarmor.minecraft-gradle-plugin' version '1.3.1'

Expand Down Expand Up @@ -47,7 +47,7 @@ minecraftPublishing {
curseforgeId = "394120"
dependencies {
"multi-item-lib" {
version = "1.6.2"
version = "1.6.3"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
version = "1.6.3"
version = "1.7.0"

type = DependencyType.REQUIRED
}
}
Expand All @@ -71,8 +71,9 @@ dependencies {
modImplementation "org.quiltmc:qsl:${project.qsl_version}"
modImplementation "org.quiltmc.quilted-fabric-api:quilted-fabric-api:${project.qfapi_version}"

modImplementation "com.oroarmor:multi-item-lib:1.6.2"
modCompileOnly('com.github.CrimsonDawn45:Fabric-Shield-Lib:main-SNAPSHOT')
modImplementation "com.oroarmor:multi-item-lib:1.7.0"

modCompileOnly("com.github.CrimsonDawn45:Fabric-Shield-Lib:1.7.2-1.20.2")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still being used?

modRuntimeOnly("com.terraformersmc:modmenu:7.2.1")
}

Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ org.gradle.jvmargs=-Xmx2G

# Quilt Properties
minecraft_version=1.20.1
quilt_loader_version=0.20.2
quilt_loader_version=0.26.0

# Mod Properties
mod_version=2.2.0
mod_version=2.2.1
maven_group=com.oroarmor
archives_base_name=netherite-plus-mod
project_name=Netherite Plus Mod
discord_hook_image_url=https://raw.githubusercontent.com/OroArmorModding/Netherite-Plus-Mod/742eaf744ad79946d47ddc7b070ddbc90b05bb03/src/main/resources/assets/netherite_plus/icon.png

# Dependencies
qsl_version=6.1.1+1.20.1
qfapi_version=7.2.1+0.88.0-1.20.1
qfapi_version=7.5.0+0.92.2-1.20.1
mappings=1.20.1+build.23
7 changes: 4 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Thu Jul 23 21:34:18 PDT 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
zipStorePath=wrapper/dists
11 changes: 9 additions & 2 deletions src/main/java/com/oroarmor/netherite_plus/NetheritePlusMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public static Identifier id(String id) {

public static void registerItemsWithMultiItemLib() {
if (CONFIG.enabled.shields.value()) {
// UniqueItemRegistry.SHIELD.addItemToRegistry(NETHERITE_SHIELD);
UniqueItemRegistry.SHIELD.addItemToRegistry(NETHERITE_SHIELD);
}
if (CONFIG.enabled.fishing_rod.value()) {
UniqueItemRegistry.FISHING_ROD.addItemToRegistry(NETHERITE_FISHING_ROD);
Expand All @@ -106,5 +106,12 @@ public static void registerItemsWithMultiItemLib() {
if (CONFIG.enabled.shears.value()) {
UniqueItemRegistry.SHEARS.addItemToRegistry(NETHERITE_SHEARS);
}
if (CONFIG.enabled.bows_and_crossbows.value()) {
UniqueItemRegistry.BOW.addItemToRegistry(NETHERITE_BOW);
UniqueItemRegistry.CROSSBOW.addItemToRegistry(NETHERITE_CROSSBOW);
}
if (CONFIG.enabled.elytra.value()) {
UniqueItemRegistry.ELYTRA.addItemToRegistry(NETHERITE_ELYTRA);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,23 +96,23 @@ private static Block register(String id, Block block) {
}

private static void registerShulkerBoxBlocks() {
NETHERITE_SHULKER_BOX = register("netherite_shulker_box", createShulkerBoxBlock(null, AbstractBlock.Settings.create().mapColor(MapColor.GRAY)));
NETHERITE_WHITE_SHULKER_BOX = register("netherite_white_shulker_box", createShulkerBoxBlock(DyeColor.WHITE, AbstractBlock.Settings.create().mapColor(MapColor.SNOW)));
NETHERITE_ORANGE_SHULKER_BOX = register("netherite_orange_shulker_box", createShulkerBoxBlock(DyeColor.ORANGE, AbstractBlock.Settings.create().mapColor(MapColor.ORANGE)));
NETHERITE_MAGENTA_SHULKER_BOX = register("netherite_magenta_shulker_box", createShulkerBoxBlock(DyeColor.MAGENTA, AbstractBlock.Settings.create().mapColor(MapColor.MAGENTA)));
NETHERITE_LIGHT_BLUE_SHULKER_BOX = register("netherite_light_blue_shulker_box", createShulkerBoxBlock(DyeColor.LIGHT_BLUE, AbstractBlock.Settings.create().mapColor(MapColor.LIGHT_BLUE)));
NETHERITE_YELLOW_SHULKER_BOX = register("netherite_yellow_shulker_box", createShulkerBoxBlock(DyeColor.YELLOW, AbstractBlock.Settings.create().mapColor(MapColor.YELLOW)));
NETHERITE_LIME_SHULKER_BOX = register("netherite_lime_shulker_box", createShulkerBoxBlock(DyeColor.LIME, AbstractBlock.Settings.create().mapColor(MapColor.LIME)));
NETHERITE_PINK_SHULKER_BOX = register("netherite_pink_shulker_box", createShulkerBoxBlock(DyeColor.PINK, AbstractBlock.Settings.create().mapColor(MapColor.PINK)));
NETHERITE_GRAY_SHULKER_BOX = register("netherite_gray_shulker_box", createShulkerBoxBlock(DyeColor.GRAY, AbstractBlock.Settings.create().mapColor(MapColor.GRAY)));
NETHERITE_LIGHT_GRAY_SHULKER_BOX = register("netherite_light_gray_shulker_box", createShulkerBoxBlock(DyeColor.LIGHT_GRAY, AbstractBlock.Settings.create().mapColor(MapColor.LIGHT_GRAY)));
NETHERITE_CYAN_SHULKER_BOX = register("netherite_cyan_shulker_box", createShulkerBoxBlock(DyeColor.CYAN, AbstractBlock.Settings.create().mapColor(MapColor.CYAN)));
NETHERITE_PURPLE_SHULKER_BOX = register("netherite_purple_shulker_box", createShulkerBoxBlock(DyeColor.PURPLE, AbstractBlock.Settings.create().mapColor(MapColor.PURPLE)));
NETHERITE_BLUE_SHULKER_BOX = register("netherite_blue_shulker_box", createShulkerBoxBlock(DyeColor.BLUE, AbstractBlock.Settings.create().mapColor(MapColor.BLUE)));
NETHERITE_BROWN_SHULKER_BOX = register("netherite_brown_shulker_box", createShulkerBoxBlock(DyeColor.BROWN, AbstractBlock.Settings.create().mapColor(MapColor.BROWN)));
NETHERITE_GREEN_SHULKER_BOX = register("netherite_green_shulker_box", createShulkerBoxBlock(DyeColor.GREEN, AbstractBlock.Settings.create().mapColor(MapColor.GREEN)));
NETHERITE_RED_SHULKER_BOX = register("netherite_red_shulker_box", createShulkerBoxBlock(DyeColor.RED, AbstractBlock.Settings.create().mapColor(MapColor.RED)));
NETHERITE_BLACK_SHULKER_BOX = register("netherite_black_shulker_box", createShulkerBoxBlock(DyeColor.BLACK, AbstractBlock.Settings.create().mapColor(MapColor.BLACK)));
NETHERITE_SHULKER_BOX = register("netherite_shulker_box", createShulkerBoxBlock(null, AbstractBlock.Settings.create().mapColor(MapColor.GRAY).sounds(BlockSoundGroup.NETHERITE)));
NETHERITE_WHITE_SHULKER_BOX = register("netherite_white_shulker_box", createShulkerBoxBlock(DyeColor.WHITE, AbstractBlock.Settings.create().mapColor(MapColor.SNOW).sounds(BlockSoundGroup.NETHERITE)));
NETHERITE_ORANGE_SHULKER_BOX = register("netherite_orange_shulker_box", createShulkerBoxBlock(DyeColor.ORANGE, AbstractBlock.Settings.create().mapColor(MapColor.ORANGE).sounds(BlockSoundGroup.NETHERITE)));
NETHERITE_MAGENTA_SHULKER_BOX = register("netherite_magenta_shulker_box", createShulkerBoxBlock(DyeColor.MAGENTA, AbstractBlock.Settings.create().mapColor(MapColor.MAGENTA).sounds(BlockSoundGroup.NETHERITE)));
NETHERITE_LIGHT_BLUE_SHULKER_BOX = register("netherite_light_blue_shulker_box", createShulkerBoxBlock(DyeColor.LIGHT_BLUE, AbstractBlock.Settings.create().mapColor(MapColor.LIGHT_BLUE).sounds(BlockSoundGroup.NETHERITE)));
NETHERITE_YELLOW_SHULKER_BOX = register("netherite_yellow_shulker_box", createShulkerBoxBlock(DyeColor.YELLOW, AbstractBlock.Settings.create().mapColor(MapColor.YELLOW).sounds(BlockSoundGroup.NETHERITE)));
NETHERITE_LIME_SHULKER_BOX = register("netherite_lime_shulker_box", createShulkerBoxBlock(DyeColor.LIME, AbstractBlock.Settings.create().mapColor(MapColor.LIME).sounds(BlockSoundGroup.NETHERITE)));
NETHERITE_PINK_SHULKER_BOX = register("netherite_pink_shulker_box", createShulkerBoxBlock(DyeColor.PINK, AbstractBlock.Settings.create().mapColor(MapColor.PINK).sounds(BlockSoundGroup.NETHERITE)));
NETHERITE_GRAY_SHULKER_BOX = register("netherite_gray_shulker_box", createShulkerBoxBlock(DyeColor.GRAY, AbstractBlock.Settings.create().mapColor(MapColor.GRAY).sounds(BlockSoundGroup.NETHERITE)));
NETHERITE_LIGHT_GRAY_SHULKER_BOX = register("netherite_light_gray_shulker_box", createShulkerBoxBlock(DyeColor.LIGHT_GRAY, AbstractBlock.Settings.create().mapColor(MapColor.LIGHT_GRAY).sounds(BlockSoundGroup.NETHERITE)));
NETHERITE_CYAN_SHULKER_BOX = register("netherite_cyan_shulker_box", createShulkerBoxBlock(DyeColor.CYAN, AbstractBlock.Settings.create().mapColor(MapColor.CYAN).sounds(BlockSoundGroup.NETHERITE)));
NETHERITE_PURPLE_SHULKER_BOX = register("netherite_purple_shulker_box", createShulkerBoxBlock(DyeColor.PURPLE, AbstractBlock.Settings.create().mapColor(MapColor.PURPLE).sounds(BlockSoundGroup.NETHERITE)));
NETHERITE_BLUE_SHULKER_BOX = register("netherite_blue_shulker_box", createShulkerBoxBlock(DyeColor.BLUE, AbstractBlock.Settings.create().mapColor(MapColor.BLUE).sounds(BlockSoundGroup.NETHERITE)));
NETHERITE_BROWN_SHULKER_BOX = register("netherite_brown_shulker_box", createShulkerBoxBlock(DyeColor.BROWN, AbstractBlock.Settings.create().mapColor(MapColor.BROWN).sounds(BlockSoundGroup.NETHERITE)));
NETHERITE_GREEN_SHULKER_BOX = register("netherite_green_shulker_box", createShulkerBoxBlock(DyeColor.GREEN, AbstractBlock.Settings.create().mapColor(MapColor.GREEN).sounds(BlockSoundGroup.NETHERITE)));
NETHERITE_RED_SHULKER_BOX = register("netherite_red_shulker_box", createShulkerBoxBlock(DyeColor.RED, AbstractBlock.Settings.create().mapColor(MapColor.RED).sounds(BlockSoundGroup.NETHERITE)));
NETHERITE_BLACK_SHULKER_BOX = register("netherite_black_shulker_box", createShulkerBoxBlock(DyeColor.BLACK, AbstractBlock.Settings.create().mapColor(MapColor.BLACK).sounds(BlockSoundGroup.NETHERITE)));

NETHERITE_SHULKER_BOX_ENTITY = Registry.register(Registries.BLOCK_ENTITY_TYPE, id("netherite_shulker_box"),
BlockEntityType.Builder.create(NetheriteShulkerBoxBlockEntity::new,
Expand Down Expand Up @@ -140,4 +140,4 @@ private static NetheriteShulkerBoxBlock createShulkerBoxBlock(DyeColor color, Ab
);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,39 +24,29 @@

package com.oroarmor.netherite_plus.client;

import java.util.LinkedList;
import java.util.Queue;

import com.oroarmor.netherite_plus.NetheritePlusMod;
import com.oroarmor.netherite_plus.block.NetheritePlusBlocks;
import com.oroarmor.netherite_plus.client.render.NetheriteBeaconBlockEntityRenderer;
import com.oroarmor.netherite_plus.client.render.NetheriteElytraFeatureRenderer;
import com.oroarmor.netherite_plus.client.render.NetheritePlusBuiltinItemModelRenderer;
import com.oroarmor.netherite_plus.client.render.NetheriteShulkerBoxBlockEntityRenderer;
import com.oroarmor.netherite_plus.item.NetheritePlusItems;
import com.oroarmor.netherite_plus.network.LavaVisionUpdatePacket;
import com.oroarmor.netherite_plus.screen.NetheritePlusScreenHandlers;
import net.fabricmc.fabric.api.client.rendering.v1.BlockEntityRendererRegistry;
import net.fabricmc.fabric.api.client.rendering.v1.BuiltinItemRendererRegistry;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.resource.ResourceType;
import org.quiltmc.loader.api.ModContainer;
import org.quiltmc.qsl.base.api.entrypoint.client.ClientModInitializer;
import org.quiltmc.qsl.block.extensions.api.client.BlockRenderLayerMap;
import org.quiltmc.qsl.networking.api.client.ClientPlayConnectionEvents;
import org.quiltmc.qsl.networking.api.client.ClientPlayNetworking;
import org.quiltmc.qsl.resource.loader.api.ResourceLoader;

import net.minecraft.client.MinecraftClient;
import net.minecraft.client.render.RenderLayer;
import net.minecraft.client.render.entity.EntityRendererFactory;
import net.minecraft.client.render.entity.LivingEntityRenderer;
import net.minecraft.client.render.entity.model.ArmorStandEntityModel;
import net.minecraft.client.render.entity.model.BipedEntityModel;
import net.minecraft.client.render.entity.model.PlayerEntityModel;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.LivingEntity;
import net.minecraft.resource.ResourceType;
import java.util.LinkedList;
import java.util.Queue;

import net.fabricmc.fabric.api.client.rendering.v1.BlockEntityRendererRegistry;
import net.fabricmc.fabric.api.client.rendering.v1.BuiltinItemRendererRegistry;
import net.fabricmc.fabric.api.client.rendering.v1.LivingEntityFeatureRendererRegistrationCallback;
import static com.oroarmor.netherite_plus.NetheritePlusMod.id;

public class NetheritePlusClientMod implements ClientModInitializer {
Expand Down Expand Up @@ -87,12 +77,6 @@ public void onInitializeClient(ModContainer mod) {
if (NetheritePlusMod.CONFIG.enabled.beacon.value()) {
BlockRenderLayerMap.put(RenderLayer.getCutout(), NetheritePlusBlocks.NETHERITE_BEACON);
}

LivingEntityFeatureRendererRegistrationCallback.EVENT.register(((EntityType<? extends LivingEntity> entityType, LivingEntityRenderer<?, ?> entityRenderer, LivingEntityFeatureRendererRegistrationCallback.RegistrationHelper registrationHelper, EntityRendererFactory.Context context) -> {
if (entityRenderer.getModel() instanceof PlayerEntityModel || entityRenderer.getModel() instanceof BipedEntityModel || entityRenderer.getModel() instanceof ArmorStandEntityModel) {
registrationHelper.register(new NetheriteElytraFeatureRenderer<>(entityRenderer, context.getModelLoader()));
}
}));
Comment on lines -90 to -95
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah thanks for getting rid of this, it was pretty hacky

}

public static void registerBuiltinItemRenderers(MinecraftClient client) {
Expand Down Expand Up @@ -122,10 +106,10 @@ public static void registerBuiltinItemRenderers(MinecraftClient client) {
}

if (NetheritePlusMod.CONFIG.enabled.shields.value()) {
// BuiltinItemRendererRegistry.INSTANCE.register(NetheritePlusItems.NETHERITE_SHIELD, dynamicItemRenderer);
BuiltinItemRendererRegistry.INSTANCE.register(NetheritePlusItems.NETHERITE_SHIELD, dynamicItemRenderer);
}
if (NetheritePlusMod.CONFIG.enabled.trident.value()) {
BuiltinItemRendererRegistry.INSTANCE.register(NetheritePlusItems.NETHERITE_TRIDENT, dynamicItemRenderer);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public static void registerItemsWithModelProvider() {
}

if (NetheritePlusMod.CONFIG.enabled.shields.value()) {
// registerShieldModels();
registerShieldModels();
}

if (NetheritePlusMod.CONFIG.enabled.fishing_rod.value()) {
Expand Down Expand Up @@ -137,4 +137,4 @@ private static void registerTridentModels() {
return livingEntity != null && livingEntity.isUsingItem() && livingEntity.getActiveItem() == itemStack ? 1.0F : 0.0F;
});
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
public class NetheritePlusTextures {
public static final Identifier NETHERITE_SHULKER_BOXES_ATLAS_TEXTURE = id("textures/atlas/netherite_shulker_boxes.png");
public static final Identifier NETHERITE_SHIELD_PATTERNS_ATLAS_TEXTURE = id("textures/atlas/netherite_shield_patterns.png");
public static final Identifier NETHERITE_ELYTRA_SKIN = id("textures/entity/netherite_elytra.png");
public static final Identifier NETHERITE_SHIELD_TEXTURE = id("textures/entity/netherite_shield_base.png");
public static final Identifier NETHERITE_SHIELD_TEXTURE_NOPATTERN = id("textures/entity/netherite_shield_base_nopattern.png");
public static final Identifier NETHERITE_TRIDENT_TEXTURE = id("textures/entity/netherite_trident.png");

public static final Material NETHERITE_SHIELD_BASE = new Material(
NETHERITE_SHIELD_PATTERNS_ATLAS_TEXTURE, id("entity/netherite_shield_base")
);
public static final Material NETHERITE_SHIELD_BASE_NO_PATTERN = new Material(
NETHERITE_SHIELD_PATTERNS_ATLAS_TEXTURE, id("entity/netherite_shield_base_nopattern")
);
}
//Shields with patterns need an atlas, supposedly
public static final Material NETHERITE_SHIELD_BASE = new Material(NETHERITE_SHIELD_PATTERNS_ATLAS_TEXTURE, id("entity/netherite_shield_base"));
}
Loading
Loading