-
-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '1.21.x' into l10n_1.21.x
- Loading branch information
Showing
340 changed files
with
3,783 additions
and
7,736 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
patches/net/minecraft/client/data/models/BlockModelGenerators.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- a/net/minecraft/client/data/models/BlockModelGenerators.java | ||
+++ b/net/minecraft/client/data/models/BlockModelGenerators.java | ||
@@ -5819,4 +_,16 @@ | ||
return this; | ||
} | ||
} | ||
+ | ||
+ /** | ||
+ * Neo: create a {@link BlockModelGenerators.BlockFamilyProvider} which re-uses the existing model of the given full | ||
+ * block instead of creating a model and blockstate file for it. Intended for use cases where the full block is | ||
+ * separately generated or otherwise exists such as when a dummy {@link BlockFamily} is used to create additional | ||
+ * variants for existing vanilla block families | ||
+ */ | ||
+ public BlockModelGenerators.BlockFamilyProvider familyWithExistingFullBlock(Block fullBlock) { | ||
+ var provider = new BlockModelGenerators.BlockFamilyProvider(TextureMapping.cube(fullBlock)); | ||
+ provider.fullBlock = ModelLocationUtils.getModelLocation(fullBlock); | ||
+ return provider; | ||
+ } | ||
} |
22 changes: 22 additions & 0 deletions
22
patches/net/minecraft/client/data/models/EquipmentAssetProvider.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- a/net/minecraft/client/data/models/EquipmentAssetProvider.java | ||
+++ b/net/minecraft/client/data/models/EquipmentAssetProvider.java | ||
@@ -26,6 +_,10 @@ | ||
this.pathProvider = p_387559_.createPathProvider(PackOutput.Target.RESOURCE_PACK, "equipment"); | ||
} | ||
|
||
+ protected void registerModels(BiConsumer<ResourceKey<EquipmentAsset>, EquipmentClientInfo> output) { | ||
+ bootstrap(output); | ||
+ } | ||
+ | ||
private static void bootstrap(BiConsumer<ResourceKey<EquipmentAsset>, EquipmentClientInfo> p_387865_) { | ||
p_387865_.accept( | ||
EquipmentAssets.LEATHER, | ||
@@ -106,7 +_,7 @@ | ||
@Override | ||
public CompletableFuture<?> run(CachedOutput p_387304_) { | ||
Map<ResourceKey<EquipmentAsset>, EquipmentClientInfo> map = new HashMap<>(); | ||
- bootstrap((p_386976_, p_388942_) -> { | ||
+ registerModels((p_386976_, p_388942_) -> { | ||
if (map.putIfAbsent(p_386976_, p_388942_) != null) { | ||
throw new IllegalStateException("Tried to register equipment asset twice for id: " + p_386976_); | ||
} |
13 changes: 13 additions & 0 deletions
13
patches/net/minecraft/client/data/models/ItemModelOutput.java.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- a/net/minecraft/client/data/models/ItemModelOutput.java | ||
+++ b/net/minecraft/client/data/models/ItemModelOutput.java | ||
@@ -10,4 +_,10 @@ | ||
void accept(Item p_387543_, ItemModel.Unbaked p_386880_); | ||
|
||
void copy(Item p_387316_, Item p_387995_); | ||
+ | ||
+ /** | ||
+ * Neo: Pulled up from {@link ModelProvider.ItemInfoCollector} to give modders full control over the {@link net.minecraft.client.renderer.item.ClientItem} instead of just the {@link ItemModel.Unbaked} in {@link #accept(Item, ItemModel.Unbaked) | ||
+ */ | ||
+ default void register(Item item, net.minecraft.client.renderer.item.ClientItem clientItem) { | ||
+ } | ||
} |
Oops, something went wrong.