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:
WMF
2025-11-17 05:43:54 +01:00
committed by GitHub
parent bb4534afde
commit f48900d6de
8 changed files with 148 additions and 4 deletions

View File

@@ -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);
}