Quality of Life changes (#11370)
* overlay light support, bulk Call.setItem implementations, Call.setLiquid implementations * Update core/src/mindustry/graphics/BlockRenderer.java --------- Co-authored-by: Anuken <arnukren@gmail.com>
This commit is contained in:
@@ -829,6 +829,39 @@ public class TypeIO{
|
||||
return new ItemStack(readItem(read), read.i());
|
||||
}
|
||||
|
||||
public static void writeItemStacks(Writes write, ItemStack[] stacks){
|
||||
write.s(stacks.length);
|
||||
for(ItemStack stack : stacks){
|
||||
writeItems(write, stack);
|
||||
}
|
||||
}
|
||||
|
||||
public static ItemStack[] readItemStacks(Reads read){
|
||||
short count = read.s();
|
||||
ItemStack[] stacks = new ItemStack[count];
|
||||
for(int i = 0; i < count; i++)
|
||||
stacks[i] = readItems(read);
|
||||
return stacks;
|
||||
}
|
||||
|
||||
public static void writeLiquidStacks(Writes write, LiquidStack[] stacks){
|
||||
write.s(stacks.length);
|
||||
for(LiquidStack stack : stacks){
|
||||
writeLiquid(write, stack.liquid);
|
||||
write.f(stack.amount);
|
||||
}
|
||||
}
|
||||
|
||||
public static LiquidStack[] readLiquidStacks(Reads read){
|
||||
short count = read.s();
|
||||
LiquidStack[] stacks = new LiquidStack[count];
|
||||
for(int i = 0; i < count; i++){
|
||||
Liquid liquid = readLiquid(read);
|
||||
stacks[i] = new LiquidStack(liquid, read.f());
|
||||
}
|
||||
return stacks;
|
||||
}
|
||||
|
||||
public static void writeTeam(Writes write, Team team){
|
||||
write.b(team == null ? 0 : team.id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user