Removed reliance of TickTracker on implementation detail to generate additional crash information.
This commit is contained in:
@@ -32,6 +32,7 @@ import javax.annotation.Nonnull;
|
|||||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||||
|
import net.minecraft.crash.CrashReportCategory;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.LivingEntity;
|
import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
@@ -371,4 +372,14 @@ public interface IPart extends ICustomCableConnection {
|
|||||||
*/
|
*/
|
||||||
void getBoxes(final IPartCollisionHelper bch);
|
void getBoxes(final IPartCollisionHelper bch);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This will be used by the core to add information about this part to a crash
|
||||||
|
* report if it is attached to a host that caused a crash during tick
|
||||||
|
* processing.
|
||||||
|
*
|
||||||
|
* @param section The crash report section the information will be added to.
|
||||||
|
*/
|
||||||
|
default void addEntityCrashInfo(final CrashReportCategory section) {
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -25,9 +25,9 @@ import net.minecraft.crash.CrashReportCategory;
|
|||||||
import appeng.api.networking.IGridNode;
|
import appeng.api.networking.IGridNode;
|
||||||
import appeng.api.networking.ticking.IGridTickable;
|
import appeng.api.networking.ticking.IGridTickable;
|
||||||
import appeng.api.networking.ticking.TickingRequest;
|
import appeng.api.networking.ticking.TickingRequest;
|
||||||
|
import appeng.api.parts.IPart;
|
||||||
import appeng.api.util.DimensionalCoord;
|
import appeng.api.util.DimensionalCoord;
|
||||||
import appeng.me.cache.TickManagerCache;
|
import appeng.me.cache.TickManagerCache;
|
||||||
import appeng.parts.AEBasePart;
|
|
||||||
|
|
||||||
public class TickTracker implements Comparable<TickTracker> {
|
public class TickTracker implements Comparable<TickTracker> {
|
||||||
|
|
||||||
@@ -72,8 +72,8 @@ public class TickTracker implements Comparable<TickTracker> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void addEntityCrashInfo(final CrashReportCategory crashreportcategory) {
|
public void addEntityCrashInfo(final CrashReportCategory crashreportcategory) {
|
||||||
if (this.getGridTickable() instanceof AEBasePart) {
|
if (this.getGridTickable() instanceof IPart) {
|
||||||
final AEBasePart part = (AEBasePart) this.getGridTickable();
|
final IPart part = (IPart) this.getGridTickable();
|
||||||
part.addEntityCrashInfo(crashreportcategory);
|
part.addEntityCrashInfo(crashreportcategory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -182,6 +182,7 @@ public abstract class AEBasePart implements IPart, IGridProxyable, IActionHost,
|
|||||||
return this.getItemStack().hasDisplayName();
|
return this.getItemStack().hasDisplayName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void addEntityCrashInfo(final CrashReportCategory crashreportcategory) {
|
public void addEntityCrashInfo(final CrashReportCategory crashreportcategory) {
|
||||||
crashreportcategory.addDetail("Part Side", this.getSide());
|
crashreportcategory.addDetail("Part Side", this.getSide());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user