-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
2,136 additions
and
131 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
132 changes: 132 additions & 0 deletions
132
src/generated/main/emu/lunarcore/proto/BattleEndReasonOuterClass.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,132 @@ | ||
// Code generated by protocol buffer compiler. Do not edit! | ||
package emu.lunarcore.proto; | ||
|
||
import us.hebi.quickbuf.ProtoEnum; | ||
import us.hebi.quickbuf.ProtoUtil; | ||
|
||
public final class BattleEndReasonOuterClass { | ||
/** | ||
* Protobuf enum {@code BattleEndReason} | ||
*/ | ||
public enum BattleEndReason implements ProtoEnum<BattleEndReason> { | ||
/** | ||
* <code>BATTLE_END_REASON_NONE = 0;</code> | ||
*/ | ||
BATTLE_END_REASON_NONE("BATTLE_END_REASON_NONE", 0), | ||
|
||
/** | ||
* <code>BATTLE_END_REASON_ALL_DIE = 1;</code> | ||
*/ | ||
BATTLE_END_REASON_ALL_DIE("BATTLE_END_REASON_ALL_DIE", 1), | ||
|
||
/** | ||
* <code>BATTLE_END_REASON_TURN_LIMIT = 2;</code> | ||
*/ | ||
BATTLE_END_REASON_TURN_LIMIT("BATTLE_END_REASON_TURN_LIMIT", 2); | ||
|
||
/** | ||
* <code>BATTLE_END_REASON_NONE = 0;</code> | ||
*/ | ||
public static final int BATTLE_END_REASON_NONE_VALUE = 0; | ||
|
||
/** | ||
* <code>BATTLE_END_REASON_ALL_DIE = 1;</code> | ||
*/ | ||
public static final int BATTLE_END_REASON_ALL_DIE_VALUE = 1; | ||
|
||
/** | ||
* <code>BATTLE_END_REASON_TURN_LIMIT = 2;</code> | ||
*/ | ||
public static final int BATTLE_END_REASON_TURN_LIMIT_VALUE = 2; | ||
|
||
private final String name; | ||
|
||
private final int number; | ||
|
||
private BattleEndReason(String name, int number) { | ||
this.name = name; | ||
this.number = number; | ||
} | ||
|
||
/** | ||
* @return the string representation of enum entry | ||
*/ | ||
@Override | ||
public String getName() { | ||
return name; | ||
} | ||
|
||
/** | ||
* @return the numeric wire value of this enum entry | ||
*/ | ||
@Override | ||
public int getNumber() { | ||
return number; | ||
} | ||
|
||
/** | ||
* @return a converter that maps between this enum's numeric and text representations | ||
*/ | ||
public static ProtoEnum.EnumConverter<BattleEndReason> converter() { | ||
return BattleEndReasonConverter.INSTANCE; | ||
} | ||
|
||
/** | ||
* @param value The numeric wire value of the corresponding enum entry. | ||
* @return The enum associated with the given numeric wire value, or null if unknown. | ||
*/ | ||
public static BattleEndReason forNumber(int value) { | ||
return BattleEndReasonConverter.INSTANCE.forNumber(value); | ||
} | ||
|
||
/** | ||
* @param value The numeric wire value of the corresponding enum entry. | ||
* @param other Fallback value in case the value is not known. | ||
* @return The enum associated with the given numeric wire value, or the fallback value if unknown. | ||
*/ | ||
public static BattleEndReason forNumberOr(int number, BattleEndReason other) { | ||
BattleEndReason value = forNumber(number); | ||
return value == null ? other : value; | ||
} | ||
|
||
enum BattleEndReasonConverter implements ProtoEnum.EnumConverter<BattleEndReason> { | ||
INSTANCE; | ||
|
||
private static final BattleEndReason[] lookup = new BattleEndReason[3]; | ||
|
||
static { | ||
lookup[0] = BATTLE_END_REASON_NONE; | ||
lookup[1] = BATTLE_END_REASON_ALL_DIE; | ||
lookup[2] = BATTLE_END_REASON_TURN_LIMIT; | ||
} | ||
|
||
@Override | ||
public final BattleEndReason forNumber(final int value) { | ||
if (value >= 0 && value < lookup.length) { | ||
return lookup[value]; | ||
} | ||
return null; | ||
} | ||
|
||
@Override | ||
public final BattleEndReason forName(final CharSequence value) { | ||
if (value.length() == 22) { | ||
if (ProtoUtil.isEqual("BATTLE_END_REASON_NONE", value)) { | ||
return BATTLE_END_REASON_NONE; | ||
} | ||
} | ||
if (value.length() == 25) { | ||
if (ProtoUtil.isEqual("BATTLE_END_REASON_ALL_DIE", value)) { | ||
return BATTLE_END_REASON_ALL_DIE; | ||
} | ||
} | ||
if (value.length() == 28) { | ||
if (ProtoUtil.isEqual("BATTLE_END_REASON_TURN_LIMIT", value)) { | ||
return BATTLE_END_REASON_TURN_LIMIT; | ||
} | ||
} | ||
return null; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.