-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Slight extension to resourcepack api
- Loading branch information
Showing
13 changed files
with
119 additions
and
45 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
22 changes: 0 additions & 22 deletions
22
...rc/main/java/eu/pb4/polymer/core/mixin/client/rendering/AbstractInventoryScreenMixin.java
This file was deleted.
Oops, something went wrong.
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
12 changes: 10 additions & 2 deletions
12
polymer-resource-pack/src/main/java/eu/pb4/polymer/resourcepack/api/PolymerArmorModel.java
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 |
---|---|---|
@@ -1,13 +1,21 @@ | ||
package eu.pb4.polymer.resourcepack.api; | ||
|
||
import net.minecraft.item.ArmorMaterial; | ||
import net.minecraft.util.Identifier; | ||
import org.jetbrains.annotations.ApiStatus; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Represents information about armor texture | ||
*/ | ||
@ApiStatus.NonExtendable | ||
public interface PolymerArmorModel{ | ||
public interface PolymerArmorModel { | ||
int color(); | ||
Identifier modelPath(); | ||
Identifier modelId(); | ||
List<ArmorMaterial.Layer> layers(); | ||
@Deprecated | ||
default Identifier modelPath() { | ||
return modelId(); | ||
} | ||
} |
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
6 changes: 5 additions & 1 deletion
6
...pack/src/main/java/eu/pb4/polymer/resourcepack/impl/generation/PolymerArmorModelImpl.java
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 |
---|---|---|
@@ -1,7 +1,11 @@ | ||
package eu.pb4.polymer.resourcepack.impl.generation; | ||
|
||
import eu.pb4.polymer.resourcepack.api.PolymerArmorModel; | ||
import net.minecraft.item.ArmorMaterial; | ||
import net.minecraft.util.Identifier; | ||
|
||
public record PolymerArmorModelImpl(int color, Identifier modelPath) implements PolymerArmorModel { | ||
import java.util.List; | ||
|
||
public record PolymerArmorModelImpl(int color, Identifier modelId, List<ArmorMaterial.Layer> layers) implements PolymerArmorModel { | ||
public static final PolymerArmorModel EMPTY = new PolymerArmorModelImpl(-1, new Identifier("empty"), List.of()); | ||
} |
12 changes: 12 additions & 0 deletions
12
polymer-resource-pack/src/main/java/eu/pb4/polymer/resourcepack/mixin/LayerAccessor.java
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,12 @@ | ||
package eu.pb4.polymer.resourcepack.mixin; | ||
|
||
import net.minecraft.item.ArmorMaterial; | ||
import net.minecraft.util.Identifier; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
|
||
@Mixin(ArmorMaterial.Layer.class) | ||
public interface LayerAccessor { | ||
@Accessor | ||
Identifier getId(); | ||
} |
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