mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-29 06:07:54 +07:00
Bugfixes / Mender block / Extra stats / Balancing
This commit is contained in:
@ -7,13 +7,13 @@ import java.lang.annotation.Target;
|
||||
|
||||
public class Annotations{
|
||||
|
||||
@Target(ElementType.METHOD)
|
||||
@Target({ElementType.METHOD, ElementType.FIELD})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface Nullable{
|
||||
|
||||
}
|
||||
|
||||
@Target(ElementType.METHOD)
|
||||
@Target({ElementType.METHOD, ElementType.FIELD})
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
public @interface NonNull{
|
||||
|
||||
|
@ -129,7 +129,7 @@ public class StructAnnotationProcessor extends AbstractProcessor{
|
||||
//floats: need conversion
|
||||
setter.addStatement("return ($T)(($L & $L) | (($T)Float.floatToIntBits(value) << $LL))", structType, structParam, bitString(offset, size, structTotalSize), structType, offset);
|
||||
}else{
|
||||
cons.append(" | (").append("(").append(structType).append(")").append(varName).append(" << ").append(offset).append("L)");
|
||||
cons.append(" | (((").append(structType).append(")").append(varName).append(" << ").append(offset).append("L)").append(" & ").append(bitString(offset, size, structTotalSize)).append(")");
|
||||
|
||||
//bytes, shorts, chars, ints
|
||||
setter.addStatement("return ($T)(($L & $L) | (($T)value << $LL))", structType, structParam, bitString(offset, size, structTotalSize), structType, offset);
|
||||
|
Reference in New Issue
Block a user