mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Fix compiling probably
This commit is contained in:
parent
11c277481f
commit
05a88f7693
4 changed files with 3 additions and 6 deletions
|
@ -134,7 +134,6 @@ public class CustomItemRegistryPopulator {
|
||||||
.stackSize(customItemData.stackSize())
|
.stackSize(customItemData.stackSize())
|
||||||
.maxDamage(customItemData.maxDamage());
|
.maxDamage(customItemData.maxDamage());
|
||||||
Item item = new Item(customIdentifier, itemBuilder) {
|
Item item = new Item(customIdentifier, itemBuilder) {
|
||||||
// TODO ?
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isValidRepairItem(Item other) {
|
public boolean isValidRepairItem(Item other) {
|
||||||
return repairMaterials != null && repairMaterials.contains(other.javaIdentifier());
|
return repairMaterials != null && repairMaterials.contains(other.javaIdentifier());
|
||||||
|
|
|
@ -368,7 +368,7 @@ public final class Scoreboard {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Contract("-> new")
|
@Contract("-> new")
|
||||||
public LinkedHashMap<String, Set<CommandEnumConstraint>> getTeamNames() {
|
public Map<String, Set<CommandEnumConstraint>> getTeamNames() {
|
||||||
return teams.keySet().stream()
|
return teams.keySet().stream()
|
||||||
.collect(Collectors.toMap(Function.identity(), o -> EnumSet.noneOf(CommandEnumConstraint.class),
|
.collect(Collectors.toMap(Function.identity(), o -> EnumSet.noneOf(CommandEnumConstraint.class),
|
||||||
(o1, o2) -> o1, LinkedHashMap::new));
|
(o1, o2) -> o1, LinkedHashMap::new));
|
||||||
|
|
|
@ -84,7 +84,6 @@ import org.cloudburstmc.math.vector.*;
|
||||||
import org.cloudburstmc.nbt.NbtMap;
|
import org.cloudburstmc.nbt.NbtMap;
|
||||||
import org.cloudburstmc.protocol.bedrock.BedrockServerSession;
|
import org.cloudburstmc.protocol.bedrock.BedrockServerSession;
|
||||||
import org.cloudburstmc.protocol.bedrock.data.*;
|
import org.cloudburstmc.protocol.bedrock.data.*;
|
||||||
import org.cloudburstmc.protocol.bedrock.data.command.CommandEnumConstraint;
|
|
||||||
import org.cloudburstmc.protocol.bedrock.data.command.CommandEnumData;
|
import org.cloudburstmc.protocol.bedrock.data.command.CommandEnumData;
|
||||||
import org.cloudburstmc.protocol.bedrock.data.command.CommandPermission;
|
import org.cloudburstmc.protocol.bedrock.data.command.CommandPermission;
|
||||||
import org.cloudburstmc.protocol.bedrock.data.command.SoftEnumUpdateType;
|
import org.cloudburstmc.protocol.bedrock.data.command.SoftEnumUpdateType;
|
||||||
|
@ -1932,8 +1931,7 @@ public class GeyserSession implements GeyserConnection, GeyserCommandSource {
|
||||||
private void softEnumPacket(String name, SoftEnumUpdateType type, String enums) {
|
private void softEnumPacket(String name, SoftEnumUpdateType type, String enums) {
|
||||||
UpdateSoftEnumPacket packet = new UpdateSoftEnumPacket();
|
UpdateSoftEnumPacket packet = new UpdateSoftEnumPacket();
|
||||||
packet.setType(type);
|
packet.setType(type);
|
||||||
// TODO
|
packet.setSoftEnum(new CommandEnumData(name, Collections.singletonMap(enums, Collections.emptySet()), true));
|
||||||
packet.setSoftEnum(new CommandEnumData(name, new LinkedHashMap<>(Collections.singletonMap(enums, EnumSet.noneOf(CommandEnumConstraint.class))), true));
|
|
||||||
sendUpstreamPacket(packet);
|
sendUpstreamPacket(packet);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -390,7 +390,7 @@ public class JavaCommandsTranslator extends PacketTranslator<ClientboundCommands
|
||||||
// String[] enumOptions = Arrays.copyOf(enumParamInfo.getParamData().getEnumData().getValues(), enumParamInfo.getParamData().getEnumData().getValues().size() + 1);
|
// String[] enumOptions = Arrays.copyOf(enumParamInfo.getParamData().getEnumData().getValues(), enumParamInfo.getParamData().getEnumData().getValues().size() + 1);
|
||||||
// enumOptions[enumOptions.length - 1] = paramNode.getName();
|
// enumOptions[enumOptions.length - 1] = paramNode.getName();
|
||||||
|
|
||||||
LinkedHashMap<String, Set<CommandEnumConstraint>> values = (LinkedHashMap<String, Set<CommandEnumConstraint>>) enumParamInfo.getParamData().getEnumData().getValues().clone();
|
Map<String, Set<CommandEnumConstraint>> values = new LinkedHashMap<>(enumParamInfo.getParamData().getEnumData().getValues());
|
||||||
values.put(paramNode.getName(), Set.of());
|
values.put(paramNode.getName(), Set.of());
|
||||||
|
|
||||||
// Re-create the command using the updated values
|
// Re-create the command using the updated values
|
||||||
|
|
Loading…
Reference in a new issue