Use official mappings for in-repo patches, will be converted to SRG during build.

This commit is contained in:
LexManos committed 2023-09-11 14:47:34 -07:00
1 parent 4786fa6f89
commit 40a7998281
641 files changed
+9696 -9678

No files matched your search

@@ -2,91 +2,91 @@
+++ b/net/minecraft/client/gui/components/DebugScreenOverlay.java
@@ -93,9 +_,9 @@
@Nullable
private CompletableFuture<LevelChunk> f_94036_;
private boolean f_291101_;
- private boolean f_291871_;
- private boolean f_290551_;
- private boolean f_291005_;
+ protected boolean f_291871_;
+ protected boolean f_290551_;
+ protected boolean f_291005_;
private final SampleLogger f_291039_ = new SampleLogger();
private final SampleLogger f_291524_ = new SampleLogger();
private final SampleLogger f_290653_ = new SampleLogger();
private CompletableFuture<LevelChunk> serverChunk;
private boolean renderDebug;
- private boolean renderProfilerChart;
- private boolean renderFpsCharts;
- private boolean renderNetworkCharts;
+ protected boolean renderProfilerChart;
+ protected boolean renderFpsCharts;
+ protected boolean renderNetworkCharts;
private final SampleLogger frameTimeLogger = new SampleLogger();
private final SampleLogger tickTimeLogger = new SampleLogger();
private final SampleLogger pingLogger = new SampleLogger();
@@ -120,14 +_,18 @@
this.f_94035_ = null;
this.clientChunk = null;
}
- public void m_94056_(GuiGraphics p_281427_) {
- this.f_94030_.m_91307_().m_6180_("debug");
- public void render(GuiGraphics p_281427_) {
- this.minecraft.getProfiler().push("debug");
+ protected void update() {
Entity entity = this.f_94030_.m_91288_();
this.f_94032_ = entity.m_19907_(20.0D, 0.0F, false);
this.f_94033_ = entity.m_19907_(20.0D, 0.0F, true);
- p_281427_.m_286007_(() -> {
- this.m_280186_(p_281427_);
- this.m_280532_(p_281427_);
Entity entity = this.minecraft.getCameraEntity();
this.block = entity.pick(20.0D, 0.0F, false);
this.liquid = entity.pick(20.0D, 0.0F, true);
- p_281427_.drawManaged(() -> {
- this.drawGameInformation(p_281427_);
- this.drawSystemInformation(p_281427_);
+ }
+
+ protected void drawText(GuiGraphics p_281427_) {
+ this.m_280186_(p_281427_);
+ this.m_280532_(p_281427_);
+ this.drawGameInformation(p_281427_);
+ this.drawSystemInformation(p_281427_);
+ }
+
+ protected void drawFPSCharts(GuiGraphics p_281427_) {
if (this.f_290551_) {
int i = p_281427_.m_280182_();
if (this.renderFpsCharts) {
int i = p_281427_.guiWidth();
int j = i / 2;
@@ -137,7 +_,9 @@
this.f_291179_.m_293623_(p_281427_, i - k, k);
this.tpsChart.drawChart(p_281427_, i - k, k);
}
}
+ }
+ protected void drawNetworkCharts(GuiGraphics p_281427_) {
if (this.f_291005_) {
int l = p_281427_.m_280182_();
if (this.renderNetworkCharts) {
int l = p_281427_.guiWidth();
int i1 = l / 2;
@@ -148,17 +_,32 @@
int j1 = this.f_291349_.m_295014_(i1);
this.f_291349_.m_293623_(p_281427_, l - j1, j1);
int j1 = this.pingChart.getWidth(i1);
this.pingChart.drawChart(p_281427_, l - j1, j1);
}
+ }
+
+ public void m_94056_(GuiGraphics p_281427_) {
+ this.f_94030_.m_91307_().m_6180_("debug");
+ public void render(GuiGraphics p_281427_) {
+ this.minecraft.getProfiler().push("debug");
+ this.update();
+ p_281427_.m_286007_(() -> {
+ p_281427_.drawManaged(() -> {
+ this.drawText(p_281427_);
+ this.drawFPSCharts(p_281427_);
+ this.drawNetworkCharts(p_281427_);
});
this.f_94030_.m_91307_().m_7238_();
this.minecraft.getProfiler().pop();
}
- protected void m_280186_(GuiGraphics p_281525_) {
- List<String> list = this.m_94075_();
- protected void drawGameInformation(GuiGraphics p_281525_) {
- List<String> list = this.getGameInformation();
+ protected List<String> getOverlayHelp() {
+ List<String> list = Lists.newArrayList();
list.add("");
boolean flag = this.f_94030_.m_91092_() != null;
list.add("Debug charts: [F3+1] Profiler " + (this.f_291871_ ? "visible" : "hidden") + "; [F3+2] " + (flag ? "FPS + TPS " : "FPS ") + (this.f_290551_ ? "visible" : "hidden") + "; [F3+3] " + (!this.f_94030_.m_91090_() ? "Bandwidth + Ping" : "Ping") + (this.f_291005_ ? " visible" : " hidden"));
boolean flag = this.minecraft.getSingleplayerServer() != null;
list.add("Debug charts: [F3+1] Profiler " + (this.renderProfilerChart ? "visible" : "hidden") + "; [F3+2] " + (flag ? "FPS + TPS " : "FPS ") + (this.renderFpsCharts ? "visible" : "hidden") + "; [F3+3] " + (!this.minecraft.isLocalServer() ? "Bandwidth + Ping" : "Ping") + (this.renderNetworkCharts ? " visible" : " hidden"));
list.add("For help: press F3 + Q");
+ return list;
+ }
+
+ protected void m_280186_(GuiGraphics p_281525_) {
+ List<String> list = this.m_94075_();
+ protected void drawGameInformation(GuiGraphics p_281525_) {
+ List<String> list = this.getGameInformation();
+ list.addAll(this.getOverlayHelp());
this.m_286013_(p_281525_, list, true);
this.renderLines(p_281525_, list, true);
}
@@ -430,6 +_,7 @@
list.add("");
list.add(ChatFormatting.UNDERLINE + "Targeted Entity");
list.add(String.valueOf((Object)BuiltInRegistries.f_256780_.m_7981_(entity.m_6095_())));
+ entity.m_6095_().m_204041_().m_203616_().forEach(t -> list.add("#" + t.f_203868_()));
list.add(String.valueOf((Object)BuiltInRegistries.ENTITY_TYPE.getKey(entity.getType())));
+ entity.getType().builtInRegistryHolder().tags().forEach(t -> list.add("#" + t.location()));
}
return list;