mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Bump mcpl
This commit is contained in:
parent
8381a148fc
commit
dac5f69d47
3 changed files with 8 additions and 8 deletions
|
@ -52,16 +52,15 @@ public class ArmorItem extends Item {
|
|||
|
||||
ArmorTrim trim = components.get(DataComponentType.TRIM);
|
||||
if (trim != null) {
|
||||
// TODO material IDs
|
||||
String material = trim.getMaterial().getAssetName();
|
||||
String pattern = trim.getPattern().getAssetId();
|
||||
|
||||
// discard custom trim patterns/materials to prevent visual glitches on bedrock
|
||||
if (!material.startsWith("minecraft:")
|
||||
|| !pattern.startsWith("minecraft:")) {
|
||||
if (trim.getMaterial().isCustom() || trim.getPattern().isCustom()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO material IDs
|
||||
String material = trim.getMaterial().getCustomValue().getAssetName();
|
||||
String pattern = trim.getPattern().getCustomValue().getAssetId();
|
||||
|
||||
NbtMapBuilder trimBuilder = NbtMap.builder();
|
||||
// bedrock has an uppercase first letter key, and the value is not namespaced
|
||||
trimBuilder.put("Material", stripNamespace(material));
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
|
||||
package org.geysermc.geyser.item.type;
|
||||
|
||||
import com.github.steveice10.mc.protocol.data.game.Holder;
|
||||
import com.github.steveice10.mc.protocol.data.game.item.ItemStack;
|
||||
import com.github.steveice10.mc.protocol.data.game.item.component.DataComponentType;
|
||||
import com.github.steveice10.mc.protocol.data.game.item.component.DataComponents;
|
||||
|
@ -60,7 +61,7 @@ public class GoatHornItem extends Item {
|
|||
if (components == null) {
|
||||
return builder;
|
||||
}
|
||||
Instrument instrument = components.get(DataComponentType.INSTRUMENT);
|
||||
Holder<Instrument> instrument = components.get(DataComponentType.INSTRUMENT);
|
||||
// TODO registry
|
||||
if (instrument != null) {
|
||||
// Drop the Minecraft namespace if applicable
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue