mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-13 12:16:53 +07:00
Fixed crash
This commit is contained in:
parent
6b3329845b
commit
fa0d89b6df
@ -20,5 +20,6 @@
|
||||
<extend-configuration-property name="gdx.reflect.include" value="io.anuke.mindustry.type.Recipe" />
|
||||
<extend-configuration-property name="gdx.reflect.include" value="io.anuke.mindustry.net.Streamable" />
|
||||
<extend-configuration-property name="gdx.reflect.include" value="io.anuke.mindustry.world.meta.BlockBar" />
|
||||
<extend-configuration-property name="gdx.reflect.include" value="io.anuke.mindustry.world.mapgen.WorldGenerator" />
|
||||
<extend-configuration-property name="gdx.reflect.include" value="com.badlogic.gdx.utils.Predicate" />
|
||||
</module>
|
@ -170,7 +170,9 @@ public class TileEntity extends BaseEntity implements TargetTrait {
|
||||
|
||||
@Remote(called = Loc.server, in = In.blocks)
|
||||
public static void onTileDamage(Tile tile, float health){
|
||||
tile.entity.health = health;
|
||||
if(tile.entity != null){
|
||||
tile.entity.health = health;
|
||||
}
|
||||
}
|
||||
|
||||
@Remote(called = Loc.server, in = In.blocks)
|
||||
|
@ -213,7 +213,7 @@ public class BuildBlock extends Block {
|
||||
|
||||
if (amount > 0) { //if it's positive, add it to the core
|
||||
int accepting = core.tile.block().acceptStack(requirements[i].item, accumulated, core.tile, builder);
|
||||
core.tile.block().handleStack(requirements[i].item, accumulated, core.tile, builder);
|
||||
core.tile.block().handleStack(requirements[i].item, accepting, core.tile, builder);
|
||||
|
||||
accumulator[i] -= accepting;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user