mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-14 01:04:24 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
44c689f171 | ||
|
|
1f44339d6e | ||
|
|
001372bef2 | ||
|
|
8f72c143a1 | ||
|
|
3c75e1269d | ||
|
|
121120aee1 | ||
|
|
62ce55d8d7 | ||
|
|
183d43f5f8 | ||
|
|
79dfdb0ace | ||
|
|
bb4a0b7dd6 | ||
|
|
4cddc62be7 | ||
|
|
914b2fe984 | ||
|
|
308d4fa68e | ||
|
|
50f325c8fe | ||
|
|
57fd0ecb2e | ||
|
|
94af5cc43a | ||
|
|
3c19a0309e | ||
|
|
0eb9d94bf3 | ||
|
|
4d57a1bec6 | ||
|
|
59ab01a559 | ||
|
|
5946356f8e | ||
|
|
f0f7b18528 | ||
|
|
5311b0bc90 | ||
|
|
43580f5804 |
No files matched your search
@@ -1,16 +1,13 @@
|
||||
name: 'Pull Request Review actions'
|
||||
name: 'PR Review'
|
||||
|
||||
on: pull_request_review
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
pull-requests: write
|
||||
discussions: write
|
||||
|
||||
jobs:
|
||||
labels:
|
||||
uses: MinecraftForge/SharedActions/.github/workflows/pr_review_actions.yml@main
|
||||
secrets:
|
||||
GH_APP_KEY: ${{ secrets.GH_APP_KEY }}
|
||||
GH_APP_NAME: ${{ secrets.GH_APP_NAME }}
|
||||
upload_payload:
|
||||
name: Upload payload
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/upload-artifact@v3 # Payload artifact is consumed in Actionable
|
||||
with:
|
||||
name: payload
|
||||
path: ${{ github.event_path }}
|
||||
@@ -0,0 +1,13 @@
|
||||
name: 'PR Review Comment'
|
||||
|
||||
on: pull_request_review_comment
|
||||
|
||||
jobs:
|
||||
upload_payload:
|
||||
name: Upload payload
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/upload-artifact@v3 # Payload artifact is consumed in Actionable
|
||||
with:
|
||||
name: payload
|
||||
path: ${{ github.event_path }}
|
||||
@@ -0,0 +1,20 @@
|
||||
name: 'Pull Request Review Comment actions'
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: [PR Review Comment]
|
||||
types:
|
||||
- completed
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
pull-requests: write
|
||||
discussions: write
|
||||
|
||||
jobs:
|
||||
labels:
|
||||
uses: MinecraftForge/SharedActions/.github/workflows/pr_review_comment_actions.yml@main
|
||||
secrets:
|
||||
GH_APP_KEY: ${{ secrets.GH_APP_KEY }}
|
||||
GH_APP_NAME: ${{ secrets.GH_APP_NAME }}
|
||||
@@ -0,0 +1,20 @@
|
||||
name: 'Pull Request Review actions'
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: [PR Review]
|
||||
types:
|
||||
- completed
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
issues: write
|
||||
pull-requests: write
|
||||
discussions: write
|
||||
|
||||
jobs:
|
||||
labels:
|
||||
uses: MinecraftForge/SharedActions/.github/workflows/pr_review_actions.yml@main
|
||||
secrets:
|
||||
GH_APP_KEY: ${{ secrets.GH_APP_KEY }}
|
||||
GH_APP_NAME: ${{ secrets.GH_APP_NAME }}
|
||||
@@ -1,6 +1,8 @@
|
||||
name: 'Pull Request actions'
|
||||
|
||||
on: pull_request
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [assigned, unassigned, labeled, unlabeled, opened, edited, closed, reopened, synchronize, converted_to_draft, ready_for_review, locked, unlocked, review_requested, review_request_removed, auto_merge_enabled, auto_merge_disabled]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
+4
-4
@@ -42,16 +42,16 @@ ext {
|
||||
]
|
||||
}
|
||||
MAPPING_CHANNEL = 'official'
|
||||
MAPPING_VERSION = '1.19.3'
|
||||
MC_VERSION = '1.19.3'
|
||||
MAPPING_VERSION = '1.19.4'
|
||||
MC_VERSION = '1.19.4'
|
||||
MC_NEXT_VERSION = '1.20'
|
||||
MCP_VERSION = '20221207.122022'
|
||||
MCP_VERSION = '20230314.122934'
|
||||
SPI_VERSION = '6.0.0'
|
||||
ACCESSTRANSFORMERS_VERSION = '8.0.4'
|
||||
COREMODS_VERSION = '5.0.1'
|
||||
EVENTBUS_VERSION = '6.0.3'
|
||||
MODLAUNCHER_VERSION = '10.0.8'
|
||||
SECUREJARHANDLER_VERSION = '2.1.4'
|
||||
SECUREJARHANDLER_VERSION = '2.1.6'
|
||||
BOOTSTRAPLAUNCHER_VERSION = '1.1.2'
|
||||
ASM_VERSION = '9.3'
|
||||
INSTALLER_VERSION = '2.1.+'
|
||||
|
||||
@@ -66,8 +66,12 @@ public class ConfigTracker {
|
||||
private void closeConfig(final ModConfig config, final Path configBasePath) {
|
||||
if (config.getConfigData() != null) {
|
||||
LOGGER.trace(CONFIG, "Closing config file type {} at {} for {}", config.getType(), config.getFileName(), config.getModId());
|
||||
config.save();
|
||||
// stop the filewatcher before we save the file and close it, so reload doesn't fire
|
||||
config.getHandler().unload(configBasePath, config);
|
||||
var unloading = IConfigEvent.unloading(config);
|
||||
if (unloading != null)
|
||||
config.fireEvent(unloading);
|
||||
config.save();
|
||||
config.setConfigData(null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,8 +10,17 @@ import net.minecraftforge.fml.Bindings;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.jetbrains.annotations.ApiStatus;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public interface IConfigEvent {
|
||||
record ConfigConfig(Function<ModConfig, IConfigEvent> loading, Function<ModConfig, IConfigEvent> reloading) {}
|
||||
record ConfigConfig(Function<ModConfig, IConfigEvent> loading, Function<ModConfig, IConfigEvent> reloading, @Nullable Function<ModConfig, IConfigEvent> unloading) {
|
||||
@Deprecated(since = "1.19.3", forRemoval = true)
|
||||
@ApiStatus.Internal
|
||||
ConfigConfig(Function<ModConfig, IConfigEvent> loading, Function<ModConfig, IConfigEvent> reloading) {
|
||||
this(loading, reloading, null);
|
||||
}
|
||||
}
|
||||
ConfigConfig CONFIGCONFIG = Bindings.getConfigConfiguration().get();
|
||||
|
||||
static IConfigEvent reloading(ModConfig modConfig) {
|
||||
@@ -20,6 +29,9 @@ public interface IConfigEvent {
|
||||
static IConfigEvent loading(ModConfig modConfig) {
|
||||
return CONFIGCONFIG.loading().apply(modConfig);
|
||||
}
|
||||
@Nullable static IConfigEvent unloading(ModConfig modConfig) {
|
||||
return CONFIGCONFIG.unloading() == null ? null : CONFIGCONFIG.unloading().apply(modConfig);
|
||||
}
|
||||
ModConfig getConfig();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
@@ -42,6 +42,6 @@ public class FMLOnlyBindings implements IBindingsProvider {
|
||||
|
||||
@Override
|
||||
public Supplier<IConfigEvent.ConfigConfig> getConfigConfiguration() {
|
||||
return ()->new IConfigEvent.ConfigConfig(ModConfigEvent.Loading::new, ModConfigEvent.Reloading::new);
|
||||
return ()->new IConfigEvent.ConfigConfig(ModConfigEvent.Loading::new, ModConfigEvent.Reloading::new, ModConfigEvent.Unloading::new);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
--- a/com/mojang/blaze3d/platform/GlStateManager.java
|
||||
+++ b/com/mojang/blaze3d/platform/GlStateManager.java
|
||||
@@ -510,9 +_,16 @@
|
||||
f_84077_[f_84076_].f_84800_ = false;
|
||||
@@ -500,9 +_,16 @@
|
||||
|
||||
}
|
||||
|
||||
+ /* Stores the last values sent into glMultiTexCoord2f */
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
if (monitor != null) {
|
||||
VideoMode videomode = monitor.m_84948_(this.f_85355_ ? this.f_85354_ : Optional.empty());
|
||||
this.f_85350_ = this.f_85357_ = monitor.m_84951_() + videomode.m_85332_() / 2 - this.f_85359_ / 2;
|
||||
@@ -263,6 +_,7 @@
|
||||
@@ -260,6 +_,7 @@
|
||||
GLFW.glfwGetFramebufferSize(this.f_85349_, aint, aint1);
|
||||
this.f_85361_ = aint[0] > 0 ? aint[0] : 1;
|
||||
this.f_85362_ = aint1[0] > 0 ? aint1[0] : 1;
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
--- a/com/mojang/math/Transformation.java
|
||||
+++ b/com/mojang/math/Transformation.java
|
||||
@@ -12,7 +_,7 @@
|
||||
@@ -14,7 +_,7 @@
|
||||
import org.joml.Vector3f;
|
||||
import org.joml.Vector3fc;
|
||||
|
||||
-public final class Transformation {
|
||||
+public final class Transformation implements net.minecraftforge.client.extensions.IForgeTransformation {
|
||||
private final Matrix4f f_121078_;
|
||||
private boolean f_121079_;
|
||||
@Nullable
|
||||
@@ -139,6 +_,19 @@
|
||||
public static final Codec<Transformation> f_268453_ = RecordCodecBuilder.create((p_269604_) -> {
|
||||
return p_269604_.group(ExtraCodecs.f_252432_.fieldOf("translation").forGetter((p_269599_) -> {
|
||||
@@ -163,6 +_,19 @@
|
||||
public int hashCode() {
|
||||
return Objects.hash(this.f_121078_);
|
||||
}
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
--- a/com/mojang/realmsclient/gui/screens/RealmsNotificationsScreen.java
|
||||
+++ b/com/mojang/realmsclient/gui/screens/RealmsNotificationsScreen.java
|
||||
@@ -47,9 +_,9 @@
|
||||
}
|
||||
};
|
||||
private final RealmsNotificationsScreen.DataFetcherConfiguration f_273849_ = new RealmsNotificationsScreen.DataFetcherConfiguration() {
|
||||
- public DataFetcher.Subscription m_274316_(RealmsDataFetcher p_275731_) {
|
||||
- DataFetcher.Subscription datafetcher$subscription = p_275731_.f_238549_.m_239139_();
|
||||
- RealmsNotificationsScreen.this.m_274585_(p_275731_, datafetcher$subscription);
|
||||
+ public DataFetcher.Subscription m_274316_(RealmsDataFetcher p_275318_) {
|
||||
+ DataFetcher.Subscription datafetcher$subscription = p_275318_.f_238549_.m_239139_();
|
||||
+ RealmsNotificationsScreen.this.m_274585_(p_275318_, datafetcher$subscription);
|
||||
return datafetcher$subscription;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/SharedConstants.java
|
||||
+++ b/net/minecraft/SharedConstants.java
|
||||
@@ -214,6 +_,7 @@
|
||||
@@ -205,6 +_,7 @@
|
||||
}
|
||||
|
||||
static {
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
+ @SuppressWarnings("unused") private static java.util.function.LongSupplier INNER_CLASS_SHIFT1 = new java.util.function.LongSupplier() { public long getAsLong() { return 0; } };
|
||||
+ @SuppressWarnings("unused") private static java.util.function.LongSupplier INNER_CLASS_SHIFT2 = new java.util.function.LongSupplier() { public long getAsLong() { return 0; } };
|
||||
+
|
||||
public static ExecutorService m_183988_() {
|
||||
return f_137443_;
|
||||
public static ExecutorService m_183991_() {
|
||||
return f_137444_;
|
||||
}
|
||||
@@ -242,7 +_,7 @@
|
||||
@@ -238,7 +_,7 @@
|
||||
try {
|
||||
type = DataFixers.m_14512_().getSchema(DataFixUtils.makeKey(SharedConstants.m_183709_().getWorldVersion())).getChoiceType(p_137552_, p_137553_);
|
||||
type = DataFixers.m_14512_().getSchema(DataFixUtils.makeKey(SharedConstants.m_183709_().m_183476_().m_193006_())).getChoiceType(p_137552_, p_137553_);
|
||||
} catch (IllegalArgumentException illegalargumentexception) {
|
||||
- f_137446_.error("No data fixer registered for {}", (Object)p_137553_);
|
||||
+ f_137446_.debug("No data fixer registered for {}", (Object)p_137553_);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/advancements/Advancement.java
|
||||
+++ b/net/minecraft/advancements/Advancement.java
|
||||
@@ -127,7 +_,7 @@
|
||||
@@ -144,7 +_,7 @@
|
||||
return this.f_138305_;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
@Nullable
|
||||
private ResourceLocation f_138332_;
|
||||
@Nullable
|
||||
@@ -308,7 +_,14 @@
|
||||
@@ -325,7 +_,14 @@
|
||||
return "Task Advancement{parentId=" + this.f_138332_ + ", display=" + this.f_138334_ + ", rewards=" + this.f_138335_ + ", criteria=" + this.f_138336_ + ", requirements=" + Arrays.deepToString(this.f_138337_) + "}";
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/ClientRecipeBook.java
|
||||
+++ b/net/minecraft/client/ClientRecipeBook.java
|
||||
@@ -51,7 +_,7 @@
|
||||
@@ -54,7 +_,7 @@
|
||||
for(Recipe<?> recipe : p_90643_) {
|
||||
if (!recipe.m_5598_() && !recipe.m_142505_()) {
|
||||
RecipeBookCategories recipebookcategories = m_90646_(recipe);
|
||||
@@ -9,7 +9,7 @@
|
||||
if (s.isEmpty()) {
|
||||
map.computeIfAbsent(recipebookcategories, (p_90645_) -> {
|
||||
return Lists.newArrayList();
|
||||
@@ -138,6 +_,8 @@
|
||||
@@ -141,6 +_,8 @@
|
||||
} else if (recipetype == RecipeType.f_44113_) {
|
||||
return RecipeBookCategories.SMITHING;
|
||||
} else {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
--- a/net/minecraft/client/KeyboardHandler.java
|
||||
+++ b/net/minecraft/client/KeyboardHandler.java
|
||||
@@ -298,7 +_,9 @@
|
||||
@@ -328,7 +_,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
Screen screen = this.f_90867_.f_91080_;
|
||||
- if (p_90897_ == 1 && (!(this.f_90867_.f_91080_ instanceof KeyBindsScreen) || ((KeyBindsScreen)screen).f_193976_ <= Util.m_137550_() - 20L)) {
|
||||
+
|
||||
+ if ((!(this.f_90867_.f_91080_ instanceof KeyBindsScreen) || ((KeyBindsScreen)screen).f_193976_ <= Util.m_137550_() - 20L)) {
|
||||
@@ -11,7 +11,7 @@
|
||||
if (this.f_90867_.f_91066_.f_92105_.m_90832_(p_90895_, p_90896_)) {
|
||||
this.f_90867_.m_91268_().m_85438_();
|
||||
this.f_90867_.f_91066_.m_231829_().m_231514_(this.f_90867_.m_91268_().m_85440_());
|
||||
@@ -316,6 +_,8 @@
|
||||
@@ -346,6 +_,8 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
@@ -20,7 +20,7 @@
|
||||
}
|
||||
|
||||
if (this.f_90867_.m_240477_().m_93316_()) {
|
||||
@@ -338,11 +_,15 @@
|
||||
@@ -368,11 +_,15 @@
|
||||
Screen.m_96579_(() -> {
|
||||
if (p_90897_ != 1 && p_90897_ != 2) {
|
||||
if (p_90897_ == 0) {
|
||||
@@ -38,7 +38,7 @@
|
||||
}
|
||||
|
||||
}, "keyPressed event handler", screen.getClass().getCanonicalName());
|
||||
@@ -395,22 +_,26 @@
|
||||
@@ -425,22 +_,26 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/Minecraft.java
|
||||
+++ b/net/minecraft/client/Minecraft.java
|
||||
@@ -245,7 +_,7 @@
|
||||
@@ -247,7 +_,7 @@
|
||||
import org.slf4j.Logger;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -9,7 +9,7 @@
|
||||
static Minecraft f_90981_;
|
||||
private static final Logger f_90982_ = LogUtils.getLogger();
|
||||
public static final boolean f_91002_ = Util.m_137581_() == Util.OS.OSX;
|
||||
@@ -410,7 +_,6 @@
|
||||
@@ -412,7 +_,6 @@
|
||||
this.f_231339_ = SignatureValidator.m_216358_(this.f_231338_.getServicesKey());
|
||||
this.f_90998_ = p_91084_.f_101905_.f_101942_;
|
||||
f_90982_.info("Setting user: {}", (Object)this.f_90998_.m_92546_());
|
||||
@@ -17,7 +17,7 @@
|
||||
this.f_91033_ = p_91084_.f_101908_.f_101926_;
|
||||
this.f_91034_ = !p_91084_.f_101908_.f_101929_;
|
||||
this.f_91035_ = !p_91084_.f_101908_.f_101930_;
|
||||
@@ -459,7 +_,7 @@
|
||||
@@ -462,7 +_,7 @@
|
||||
|
||||
this.f_90990_.m_85380_(this.f_91066_.m_232035_().m_231551_());
|
||||
this.f_91067_ = new MouseHandler(this);
|
||||
@@ -26,7 +26,7 @@
|
||||
this.f_91068_ = new KeyboardHandler(this);
|
||||
this.f_91068_.m_90887_(this.f_90990_.m_85439_());
|
||||
RenderSystem.m_69580_(this.f_91066_.f_92035_, false);
|
||||
@@ -467,6 +_,7 @@
|
||||
@@ -470,6 +_,7 @@
|
||||
this.f_91042_.m_83931_(0.0F, 0.0F, 0.0F, 0.0F);
|
||||
this.f_91042_.m_83954_(f_91002_);
|
||||
this.f_91036_ = new ReloadableResourceManager(PackType.CLIENT_RESOURCES);
|
||||
@@ -34,7 +34,7 @@
|
||||
this.f_91038_.m_10506_();
|
||||
this.f_91066_.m_92145_(this.f_91038_);
|
||||
this.f_91039_ = new LanguageManager(this.f_91066_.f_92075_);
|
||||
@@ -511,10 +_,13 @@
|
||||
@@ -514,10 +_,13 @@
|
||||
this.f_91063_ = new GameRenderer(this, this.f_90994_.m_234586_(), this.f_91036_, this.f_90993_);
|
||||
this.f_91036_.m_7217_(this.f_91063_.m_247116_());
|
||||
this.f_91060_ = new LevelRenderer(this, this.f_90994_, this.f_167845_, this.f_90993_);
|
||||
@@ -49,7 +49,7 @@
|
||||
this.f_91036_.m_7217_(this.f_91061_);
|
||||
this.f_91053_ = new PaintingTextureManager(this.f_90987_);
|
||||
this.f_91036_.m_7217_(this.f_91053_);
|
||||
@@ -523,7 +_,9 @@
|
||||
@@ -526,7 +_,9 @@
|
||||
this.f_91047_ = new GpuWarnlistManager();
|
||||
this.f_91036_.m_7217_(this.f_91047_);
|
||||
this.f_91036_.m_7217_(this.f_205120_);
|
||||
@@ -60,7 +60,7 @@
|
||||
this.f_91064_ = new DebugRenderer(this);
|
||||
this.f_238717_ = new RealmsDataFetcher(RealmsClient.m_239151_(this));
|
||||
RenderSystem.m_69900_(this::m_91113_);
|
||||
@@ -542,6 +_,21 @@
|
||||
@@ -545,6 +_,21 @@
|
||||
TinyFileDialogs.tinyfd_messageBox("Minecraft", stringbuilder.toString(), "ok", "error", false);
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
this.f_90990_.m_85409_(this.f_91066_.m_231817_().m_231551_());
|
||||
this.f_90990_.m_85424_(this.f_91066_.m_232123_().m_231551_());
|
||||
this.f_90990_.m_85426_();
|
||||
@@ -565,24 +_,24 @@
|
||||
@@ -568,26 +_,24 @@
|
||||
}
|
||||
|
||||
this.f_167847_.m_168556_();
|
||||
@@ -117,13 +117,15 @@
|
||||
-
|
||||
- this.m_91152_(new TitleScreen(true));
|
||||
- }, this.m_239210_()));
|
||||
- } else if (this.f_91066_.f_263744_) {
|
||||
- this.m_91152_(new AccessibilityOnboardingScreen(this.f_91066_));
|
||||
- } else {
|
||||
- this.m_91152_(new TitleScreen(true));
|
||||
- }
|
||||
|
||||
}
|
||||
|
||||
@@ -634,6 +_,8 @@
|
||||
@@ -639,6 +_,8 @@
|
||||
|
||||
private UserApiService m_193585_(YggdrasilAuthenticationService p_193586_, GameConfig p_193587_) {
|
||||
try {
|
||||
@@ -132,7 +134,7 @@
|
||||
return p_193586_.createUserApiService(p_193587_.f_101905_.f_101942_.m_92547_());
|
||||
} catch (AuthenticationException authenticationexception) {
|
||||
f_90982_.error("Failed to verify authentication", (Throwable)authenticationexception);
|
||||
@@ -646,7 +_,7 @@
|
||||
@@ -651,7 +_,7 @@
|
||||
}
|
||||
|
||||
private void m_91239_(Throwable p_91240_) {
|
||||
@@ -141,7 +143,7 @@
|
||||
this.m_91241_(p_91240_, (Component)null);
|
||||
} else {
|
||||
Util.m_137559_(p_91240_);
|
||||
@@ -723,7 +_,10 @@
|
||||
@@ -743,7 +_,10 @@
|
||||
}
|
||||
|
||||
public void m_91271_() {
|
||||
@@ -153,7 +155,7 @@
|
||||
return new FullTextSearchTree<>((p_210797_) -> {
|
||||
return p_210797_.m_41651_((Player)null, TooltipFlag.Default.f_256752_.m_257777_()).stream().map((p_210807_) -> {
|
||||
return ChatFormatting.m_126649_(p_210807_.getString()).trim();
|
||||
@@ -734,7 +_,8 @@
|
||||
@@ -754,7 +_,8 @@
|
||||
return Stream.of(BuiltInRegistries.f_257033_.m_7981_(p_91317_.m_41720_()));
|
||||
}, p_231451_);
|
||||
});
|
||||
@@ -163,7 +165,7 @@
|
||||
return new IdSearchTree<>((p_231353_) -> {
|
||||
return p_231353_.m_204131_().map(TagKey::f_203868_);
|
||||
}, p_231430_);
|
||||
@@ -754,9 +_,12 @@
|
||||
@@ -774,9 +_,12 @@
|
||||
});
|
||||
}, p_231389_);
|
||||
});
|
||||
@@ -179,7 +181,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
@@ -808,13 +_,13 @@
|
||||
@@ -828,13 +_,13 @@
|
||||
Bootstrap.m_135875_(p_91333_.m_127526_());
|
||||
if (p_91333_.m_127527_() != null) {
|
||||
Bootstrap.m_135875_("#@!@# Game crashed! Crash report saved to: #@!@# " + p_91333_.m_127527_());
|
||||
@@ -196,7 +198,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -932,10 +_,6 @@
|
||||
@@ -959,10 +_,6 @@
|
||||
f_90982_.error("setScreen called from non-game thread");
|
||||
}
|
||||
|
||||
@@ -207,7 +209,7 @@
|
||||
if (p_91153_ == null && this.f_91073_ == null) {
|
||||
p_91153_ = new TitleScreen();
|
||||
} else if (p_91153_ == null && this.f_91074_.m_21224_()) {
|
||||
@@ -946,6 +_,19 @@
|
||||
@@ -973,6 +_,19 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -225,9 +227,9 @@
|
||||
+ }
|
||||
+
|
||||
this.f_91080_ = p_91153_;
|
||||
BufferUploader.m_166835_();
|
||||
if (p_91153_ != null) {
|
||||
@@ -1091,11 +_,14 @@
|
||||
if (this.f_91080_ != null) {
|
||||
this.f_91080_.m_274333_();
|
||||
@@ -1118,9 +_,12 @@
|
||||
RenderSystem.m_69481_();
|
||||
this.f_91026_.m_7238_();
|
||||
if (!this.f_91079_) {
|
||||
@@ -235,14 +237,12 @@
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onRenderTickStart(this.realPartialTick);
|
||||
this.f_91026_.m_6182_("gameRenderer");
|
||||
this.f_91063_.m_109093_(this.f_91012_ ? this.f_91013_ : this.f_90991_.f_92518_, i, p_91384_);
|
||||
this.f_91026_.m_6182_("toasts");
|
||||
this.f_91003_.m_94920_(new PoseStack());
|
||||
this.f_91026_.m_7238_();
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onRenderTickEnd(this.realPartialTick);
|
||||
}
|
||||
|
||||
if (this.f_91056_ != null) {
|
||||
@@ -1223,10 +_,12 @@
|
||||
@@ -1243,10 +_,12 @@
|
||||
this.f_90990_.m_85378_((double)i);
|
||||
if (this.f_91080_ != null) {
|
||||
this.f_91080_.m_6574_(this, this.f_90990_.m_85445_(), this.f_90990_.m_85446_());
|
||||
@@ -255,7 +255,7 @@
|
||||
this.f_91063_.m_109097_(this.f_90990_.m_85441_(), this.f_90990_.m_85442_());
|
||||
this.f_91067_.m_91599_();
|
||||
}
|
||||
@@ -1499,6 +_,7 @@
|
||||
@@ -1520,6 +_,7 @@
|
||||
}
|
||||
|
||||
public void m_91395_() {
|
||||
@@ -263,7 +263,7 @@
|
||||
this.f_91019_ = false;
|
||||
}
|
||||
|
||||
@@ -1528,10 +_,18 @@
|
||||
@@ -1549,10 +_,18 @@
|
||||
if (p_91387_ && this.f_91077_ != null && this.f_91077_.m_6662_() == HitResult.Type.BLOCK) {
|
||||
BlockHitResult blockhitresult = (BlockHitResult)this.f_91077_;
|
||||
BlockPos blockpos = blockhitresult.m_82425_();
|
||||
@@ -285,7 +285,7 @@
|
||||
this.f_91074_.m_6674_(InteractionHand.MAIN_HAND);
|
||||
}
|
||||
}
|
||||
@@ -1560,14 +_,20 @@
|
||||
@@ -1581,14 +_,20 @@
|
||||
return false;
|
||||
} else {
|
||||
boolean flag = false;
|
||||
@@ -308,7 +308,7 @@
|
||||
this.f_91072_.m_105269_(blockpos, blockhitresult.m_82434_());
|
||||
if (this.f_91073_.m_8055_(blockpos).m_60795_()) {
|
||||
flag = true;
|
||||
@@ -1580,8 +_,10 @@
|
||||
@@ -1601,8 +_,10 @@
|
||||
}
|
||||
|
||||
this.f_91074_.m_36334_();
|
||||
@@ -319,7 +319,7 @@
|
||||
this.f_91074_.m_6674_(InteractionHand.MAIN_HAND);
|
||||
return flag;
|
||||
}
|
||||
@@ -1597,6 +_,11 @@
|
||||
@@ -1618,6 +_,11 @@
|
||||
}
|
||||
|
||||
for(InteractionHand interactionhand : InteractionHand.values()) {
|
||||
@@ -331,7 +331,7 @@
|
||||
ItemStack itemstack = this.f_91074_.m_21120_(interactionhand);
|
||||
if (!itemstack.m_246617_(this.f_91073_.m_246046_())) {
|
||||
return;
|
||||
@@ -1611,13 +_,14 @@
|
||||
@@ -1632,13 +_,14 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -347,7 +347,7 @@
|
||||
this.f_91074_.m_6674_(interactionhand);
|
||||
}
|
||||
|
||||
@@ -1629,7 +_,7 @@
|
||||
@@ -1650,7 +_,7 @@
|
||||
int i = itemstack.m_41613_();
|
||||
InteractionResult interactionresult1 = this.f_91072_.m_233732_(this.f_91074_, interactionhand, blockhitresult);
|
||||
if (interactionresult1.m_19077_()) {
|
||||
@@ -356,7 +356,7 @@
|
||||
this.f_91074_.m_6674_(interactionhand);
|
||||
if (!itemstack.m_41619_() && (itemstack.m_41613_() != i || this.f_91072_.m_105290_())) {
|
||||
this.f_91063_.f_109055_.m_109320_(interactionhand);
|
||||
@@ -1645,6 +_,9 @@
|
||||
@@ -1666,6 +_,9 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -366,7 +366,7 @@
|
||||
if (!itemstack.m_41619_()) {
|
||||
InteractionResult interactionresult2 = this.f_91072_.m_233721_(this.f_91074_, interactionhand);
|
||||
if (interactionresult2.m_19077_()) {
|
||||
@@ -1671,6 +_,8 @@
|
||||
@@ -1692,6 +_,8 @@
|
||||
--this.f_91011_;
|
||||
}
|
||||
|
||||
@@ -375,7 +375,23 @@
|
||||
this.f_91026_.m_6180_("gui");
|
||||
this.f_240378_.m_240688_();
|
||||
this.f_91065_.m_193832_(this.f_91012_);
|
||||
@@ -1800,6 +_,8 @@
|
||||
@@ -1787,6 +_,7 @@
|
||||
|
||||
this.f_91005_.m_120596_();
|
||||
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onPreLevelTick(this.f_91073_, () -> true);
|
||||
try {
|
||||
this.f_91073_.m_104726_(() -> {
|
||||
return true;
|
||||
@@ -1802,6 +_,7 @@
|
||||
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
+ net.minecraftforge.event.ForgeEventFactory.onPostLevelTick(this.f_91073_, () -> true);
|
||||
}
|
||||
|
||||
this.f_91026_.m_6182_("animateTick");
|
||||
@@ -1821,6 +_,8 @@
|
||||
this.f_91026_.m_6182_("keyboard");
|
||||
this.f_91068_.m_90931_();
|
||||
this.f_91026_.m_7238_();
|
||||
@@ -384,7 +400,7 @@
|
||||
}
|
||||
|
||||
private boolean m_91278_() {
|
||||
@@ -1996,6 +_,7 @@
|
||||
@@ -2017,6 +_,7 @@
|
||||
}
|
||||
|
||||
public void m_91156_(ClientLevel p_91157_) {
|
||||
@@ -392,7 +408,7 @@
|
||||
ProgressScreen progressscreen = new ProgressScreen(true);
|
||||
progressscreen.m_6309_(Component.m_237115_("connect.joining"));
|
||||
this.m_91362_(progressscreen);
|
||||
@@ -2029,10 +_,12 @@
|
||||
@@ -2050,10 +_,12 @@
|
||||
IntegratedServer integratedserver = this.f_91007_;
|
||||
this.f_91007_ = null;
|
||||
this.f_91063_.m_109150_();
|
||||
@@ -405,15 +421,15 @@
|
||||
if (integratedserver != null) {
|
||||
this.f_91026_.m_6180_("waitForServer");
|
||||
|
||||
@@ -2046,6 +_,7 @@
|
||||
@@ -2067,6 +_,7 @@
|
||||
this.f_243981_.m_246151_();
|
||||
this.f_91065_.m_93089_();
|
||||
this.f_91010_ = false;
|
||||
+ net.minecraftforge.client.ForgeHooksClient.handleClientLevelClosing(f_91073_);
|
||||
this.f_91004_.m_90740_();
|
||||
}
|
||||
|
||||
@@ -2153,6 +_,7 @@
|
||||
this.f_91073_ = null;
|
||||
@@ -2173,6 +_,7 @@
|
||||
|
||||
private void m_91280_() {
|
||||
if (this.f_91077_ != null && this.f_91077_.m_6662_() != HitResult.Type.MISS) {
|
||||
@@ -421,7 +437,7 @@
|
||||
boolean flag = this.f_91074_.m_150110_().f_35937_;
|
||||
BlockEntity blockentity = null;
|
||||
HitResult.Type hitresult$type = this.f_91077_.m_6662_();
|
||||
@@ -2165,10 +_,7 @@
|
||||
@@ -2185,10 +_,7 @@
|
||||
}
|
||||
|
||||
Block block = blockstate.m_60734_();
|
||||
@@ -433,7 +449,7 @@
|
||||
|
||||
if (flag && Screen.m_96637_() && blockstate.m_155947_()) {
|
||||
blockentity = this.f_91073_.m_7702_(blockpos);
|
||||
@@ -2179,7 +_,7 @@
|
||||
@@ -2199,7 +_,7 @@
|
||||
}
|
||||
|
||||
Entity entity = ((EntityHitResult)this.f_91077_).m_82443_();
|
||||
@@ -442,7 +458,7 @@
|
||||
if (itemstack == null) {
|
||||
return;
|
||||
}
|
||||
@@ -2721,6 +_,19 @@
|
||||
@@ -2737,6 +_,19 @@
|
||||
|
||||
public void m_91312_(int p_91313_) {
|
||||
this.f_91051_.m_119410_(p_91313_);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/MouseHandler.java
|
||||
+++ b/net/minecraft/client/MouseHandler.java
|
||||
@@ -69,6 +_,7 @@
|
||||
@@ -73,6 +_,7 @@
|
||||
this.f_91510_ = -1;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
boolean[] aboolean = new boolean[]{false};
|
||||
if (this.f_91503_.m_91265_() == null) {
|
||||
if (this.f_91503_.f_91080_ == null) {
|
||||
@@ -82,11 +_,19 @@
|
||||
@@ -86,11 +_,19 @@
|
||||
if (flag) {
|
||||
screen.m_169415_();
|
||||
Screen.m_96579_(() -> {
|
||||
@@ -30,7 +30,7 @@
|
||||
}, "mouseReleased event handler", screen.getClass().getCanonicalName());
|
||||
}
|
||||
}
|
||||
@@ -110,19 +_,26 @@
|
||||
@@ -114,19 +_,26 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -60,7 +60,7 @@
|
||||
} else if (this.f_91503_.f_91074_ != null) {
|
||||
if (this.f_91518_ != 0.0D && Math.signum(d0) != Math.signum(this.f_91518_)) {
|
||||
this.f_91518_ = 0.0D;
|
||||
@@ -135,6 +_,7 @@
|
||||
@@ -139,6 +_,7 @@
|
||||
}
|
||||
|
||||
this.f_91518_ -= (double)i;
|
||||
@@ -68,7 +68,7 @@
|
||||
if (this.f_91503_.f_91074_.m_5833_()) {
|
||||
if (this.f_91503_.f_91065_.m_93085_().m_94768_()) {
|
||||
this.f_91503_.f_91065_.m_93085_().m_205380_(-i);
|
||||
@@ -203,7 +_,9 @@
|
||||
@@ -207,7 +_,9 @@
|
||||
double d2 = (p_91563_ - this.f_91507_) * (double)this.f_91503_.m_91268_().m_85445_() / (double)this.f_91503_.m_91268_().m_85443_();
|
||||
double d3 = (p_91564_ - this.f_91508_) * (double)this.f_91503_.m_91268_().m_85446_() / (double)this.f_91503_.m_91268_().m_85444_();
|
||||
Screen.m_96579_(() -> {
|
||||
@@ -79,7 +79,7 @@
|
||||
}, "mouseDragged event handler", screen.getClass().getCanonicalName());
|
||||
}
|
||||
|
||||
@@ -286,6 +_,14 @@
|
||||
@@ -290,6 +_,14 @@
|
||||
|
||||
public double m_91594_() {
|
||||
return this.f_91508_;
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
--- a/net/minecraft/client/Options.java
|
||||
+++ b/net/minecraft/client/Options.java
|
||||
@@ -507,7 +_,8 @@
|
||||
@@ -544,7 +_,8 @@
|
||||
}, new OptionInstance.LazyEnum<>(() -> {
|
||||
return Stream.concat(Stream.of(""), Minecraft.m_91087_().m_91106_().m_194525_().stream()).toList();
|
||||
}, (p_232011_) -> {
|
||||
- return Minecraft.m_91087_().m_91396_() && p_232011_ != "" && !Minecraft.m_91087_().m_91106_().m_194525_().contains(p_232011_) ? Optional.empty() : Optional.of(p_232011_);
|
||||
+ // FORGE: fix incorrect string comparison - PR #8767
|
||||
+ return Minecraft.m_91087_().m_91396_() && (p_232011_ == null || !p_232011_.isEmpty()) && !Minecraft.m_91087_().m_91106_().m_194525_().contains(p_232011_) ? Optional.empty() : Optional.of(p_232011_);
|
||||
}, Codec.STRING), "", (p_231994_) -> {
|
||||
}, Codec.STRING), "", (p_275584_) -> {
|
||||
SoundManager soundmanager = Minecraft.m_91087_().m_91106_();
|
||||
soundmanager.m_194526_();
|
||||
@@ -788,6 +_,7 @@
|
||||
@@ -868,6 +_,7 @@
|
||||
}
|
||||
|
||||
public Options(Minecraft p_92138_, File p_92139_) {
|
||||
@@ -18,9 +18,9 @@
|
||||
this.f_92060_ = p_92138_;
|
||||
this.f_92110_ = new File(p_92139_, "options.txt");
|
||||
boolean flag = p_92138_.m_91103_();
|
||||
@@ -904,11 +_,20 @@
|
||||
p_168428_.m_213982_("panoramaScrollSpeed", this.f_244402_);
|
||||
@@ -989,11 +_,20 @@
|
||||
p_168428_.m_213982_("telemetryOptInExtra", this.f_260461_);
|
||||
this.f_263744_ = p_168428_.m_142682_("onboardAccessibility", this.f_263744_);
|
||||
|
||||
+ processOptionsForge(p_168428_);
|
||||
+ }
|
||||
@@ -41,7 +41,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -927,6 +_,9 @@
|
||||
@@ -1012,6 +_,9 @@
|
||||
}
|
||||
|
||||
public void m_92140_() {
|
||||
@@ -51,7 +51,7 @@
|
||||
try {
|
||||
if (!this.f_92110_.exists()) {
|
||||
return;
|
||||
@@ -955,7 +_,8 @@
|
||||
@@ -1040,7 +_,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
@Nullable
|
||||
private String m_168458_(String p_168459_) {
|
||||
return compoundtag1.m_128441_(p_168459_) ? compoundtag1.m_128461_(p_168459_) : null;
|
||||
@@ -1118,6 +_,7 @@
|
||||
@@ -1203,6 +_,7 @@
|
||||
}
|
||||
|
||||
public void m_92172_() {
|
||||
@@ -69,7 +69,7 @@
|
||||
if (this.f_92060_.f_91074_ != null) {
|
||||
int i = 0;
|
||||
|
||||
@@ -1182,6 +_,23 @@
|
||||
@@ -1267,6 +_,23 @@
|
||||
}
|
||||
|
||||
p_92146_.m_10509_(set);
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
private final Map<Block, Set<Property<?>>> f_92572_ = Maps.newHashMap();
|
||||
|
||||
public static BlockColors m_92574_() {
|
||||
@@ -73,11 +_,12 @@
|
||||
@@ -80,11 +_,12 @@
|
||||
blockcolors.m_92589_((p_92596_, p_92597_, p_92598_, p_92599_) -> {
|
||||
return p_92597_ != null && p_92598_ != null ? 2129968 : 7455580;
|
||||
}, Blocks.f_50196_);
|
||||
@@ -24,7 +24,7 @@
|
||||
if (blockcolor != null) {
|
||||
return blockcolor.m_92566_(p_92583_, (BlockAndTintGetter)null, (BlockPos)null, 0);
|
||||
} else {
|
||||
@@ -87,13 +_,15 @@
|
||||
@@ -94,13 +_,15 @@
|
||||
}
|
||||
|
||||
public int m_92577_(BlockState p_92578_, @Nullable BlockAndTintGetter p_92579_, @Nullable BlockPos p_92580_, int p_92581_) {
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
--- a/net/minecraft/client/gui/Font.java
|
||||
+++ b/net/minecraft/client/gui/Font.java
|
||||
@@ -33,7 +_,7 @@
|
||||
import org.joml.Vector3f;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
-public class Font {
|
||||
+public class Font implements net.minecraftforge.client.extensions.IForgeFont {
|
||||
private static final float f_168643_ = 0.01F;
|
||||
private static final Vector3f f_92712_ = new Vector3f(0.0F, 0.0F, 0.03F);
|
||||
public static final int f_193827_ = 8;
|
||||
@@ -260,6 +_,8 @@
|
||||
public StringSplitter m_92865_() {
|
||||
return this.f_92714_;
|
||||
}
|
||||
+
|
||||
+ @Override public Font self() { return this; }
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public static enum DisplayMode {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/Gui.java
|
||||
+++ b/net/minecraft/client/gui/Gui.java
|
||||
@@ -392,6 +_,7 @@
|
||||
@@ -374,6 +_,7 @@
|
||||
if (this.f_92986_.f_91076_ != null && this.f_92986_.f_91076_ instanceof LivingEntity && f >= 1.0F) {
|
||||
flag = this.f_92986_.f_91074_.m_36333_() > 5.0F;
|
||||
flag &= this.f_92986_.f_91076_.m_6084_();
|
||||
@@ -8,7 +8,7 @@
|
||||
}
|
||||
|
||||
int j = this.f_92978_ / 2 - 7 + 16;
|
||||
@@ -444,6 +_,10 @@
|
||||
@@ -428,6 +_,10 @@
|
||||
|
||||
for(MobEffectInstance mobeffectinstance : Ordering.natural().reverse().sortedCopy(collection)) {
|
||||
MobEffect mobeffect = mobeffectinstance.m_19544_();
|
||||
@@ -19,15 +19,15 @@
|
||||
if (mobeffectinstance.m_19575_()) {
|
||||
int i = this.f_92977_;
|
||||
int j = 1;
|
||||
@@ -472,6 +_,7 @@
|
||||
@@ -456,6 +_,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ if (renderer.renderGuiIcon(mobeffectinstance, this, p_93029_, i, j, this.m_93252_(), f)) continue;
|
||||
+ if (renderer.renderGuiIcon(mobeffectinstance, this, p_93029_, i, j, 0, f)) continue;
|
||||
TextureAtlasSprite textureatlassprite = mobeffecttexturemanager.m_118732_(mobeffect);
|
||||
int l = i;
|
||||
int i1 = j;
|
||||
@@ -603,12 +_,13 @@
|
||||
float f1 = f;
|
||||
@@ -583,12 +_,13 @@
|
||||
public void m_93069_(PoseStack p_93070_) {
|
||||
this.f_92986_.m_91307_().m_6180_("selectedItemName");
|
||||
if (this.f_92993_ > 0 && !this.f_92994_.m_41619_()) {
|
||||
@@ -43,9 +43,9 @@
|
||||
int j = (this.f_92977_ - i) / 2;
|
||||
int k = this.f_92978_ - 59;
|
||||
if (!this.f_92986_.f_91072_.m_105205_()) {
|
||||
@@ -624,7 +_,13 @@
|
||||
RenderSystem.m_69478_();
|
||||
RenderSystem.m_69453_();
|
||||
@@ -602,7 +_,13 @@
|
||||
|
||||
if (l > 0) {
|
||||
m_93172_(p_93070_, j - 2, k - 2, j + i + 2, k + 9 + 2, this.f_92986_.f_91066_.m_92143_(0));
|
||||
- this.m_93082_().m_92763_(p_93070_, mutablecomponent, (float)j, (float)k, 16777215 + (l << 24));
|
||||
+ Font font = net.minecraftforge.client.extensions.common.IClientItemExtensions.of(f_92994_).getFont(f_92994_, net.minecraftforge.client.extensions.common.IClientItemExtensions.FontContext.SELECTED_ITEM_NAME);
|
||||
@@ -55,10 +55,19 @@
|
||||
+ j = (this.f_92977_ - font.m_92852_(highlightTip)) / 2;
|
||||
+ font.m_92763_(p_93070_, highlightTip, (float)j, (float)k, 16777215 + (l << 24));
|
||||
+ }
|
||||
RenderSystem.m_69461_();
|
||||
}
|
||||
}
|
||||
@@ -1138,7 +_,7 @@
|
||||
|
||||
@@ -924,7 +_,7 @@
|
||||
RenderSystem.m_157429_(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
- public void m_264541_(PoseStack p_265563_, float p_265127_) {
|
||||
+ protected void m_264541_(PoseStack p_265563_, float p_265127_) {
|
||||
RenderSystem.m_69465_();
|
||||
RenderSystem.m_69458_(false);
|
||||
float f = (float)Math.min(this.f_92977_, this.f_92978_);
|
||||
@@ -1054,7 +_,7 @@
|
||||
ItemStack itemstack = this.f_92986_.f_91074_.m_150109_().m_36056_();
|
||||
if (itemstack.m_41619_()) {
|
||||
this.f_92993_ = 0;
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/client/gui/components/AbstractButton.java
|
||||
+++ b/net/minecraft/client/gui/components/AbstractButton.java
|
||||
@@ -32,7 +_,7 @@
|
||||
RenderSystem.m_69482_();
|
||||
m_275833_(p_275468_, this.m_252754_(), this.m_252907_(), this.m_5711_(), this.m_93694_(), 20, 4, 200, 20, 0, this.m_274533_());
|
||||
RenderSystem.m_157429_(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
- int i = this.f_93623_ ? 16777215 : 10526880;
|
||||
+ int i = getFGColor();
|
||||
this.m_274375_(p_275468_, minecraft.f_91062_, i | Mth.m_14167_(this.f_93625_ * 255.0F) << 24);
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
--- a/net/minecraft/client/gui/components/AbstractSelectionList.java
|
||||
+++ b/net/minecraft/client/gui/components/AbstractSelectionList.java
|
||||
@@ -536,6 +_,13 @@
|
||||
|
||||
@@ -515,6 +_,13 @@
|
||||
return new ScreenRectangle(this.f_93393_, this.f_93390_, this.f_93392_ - this.f_93393_, this.f_93391_ - this.f_93390_);
|
||||
}
|
||||
|
||||
+ public int getWidth() { return this.f_93388_; }
|
||||
@@ -12,5 +12,5 @@
|
||||
+ public int getRight() { return this.f_93392_; }
|
||||
+
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public abstract static class Entry<E extends AbstractSelectionList.Entry<E>> implements GuiEventListener {
|
||||
protected abstract static class Entry<E extends AbstractSelectionList.Entry<E>> implements GuiEventListener {
|
||||
/** @deprecated */
|
||||
@@ -1,15 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/components/AbstractWidget.java
|
||||
+++ b/net/minecraft/client/gui/components/AbstractWidget.java
|
||||
@@ -130,7 +_,7 @@
|
||||
this.m_93228_(p_93676_, this.m_252754_(), this.m_252907_(), 0, 46 + i * 20, this.f_93618_ / 2, this.f_93619_);
|
||||
this.m_93228_(p_93676_, this.m_252754_() + this.f_93618_ / 2, this.m_252907_(), 200 - this.f_93618_ / 2, 46 + i * 20, this.f_93618_ / 2, this.f_93619_);
|
||||
this.m_7906_(p_93676_, minecraft, p_93677_, p_93678_);
|
||||
- int j = this.f_93623_ ? 16777215 : 10526880;
|
||||
+ int j = getFGColor();
|
||||
m_93215_(p_93676_, font, this.m_6035_(), this.m_252754_() + this.f_93618_ / 2, this.m_252907_() + (this.f_93619_ - 8) / 2, j | Mth.m_14167_(this.f_93625_ * 255.0F) << 24);
|
||||
}
|
||||
|
||||
@@ -222,6 +_,10 @@
|
||||
@@ -231,6 +_,10 @@
|
||||
this.f_93618_ = p_93675_;
|
||||
}
|
||||
|
||||
@@ -20,9 +11,9 @@
|
||||
public void m_93650_(float p_93651_) {
|
||||
this.f_93625_ = p_93651_;
|
||||
}
|
||||
@@ -244,6 +_,19 @@
|
||||
@@ -261,6 +_,19 @@
|
||||
|
||||
protected void m_93692_(boolean p_93693_) {
|
||||
public void m_93692_(boolean p_93693_) {
|
||||
this.f_93616_ = p_93693_;
|
||||
+ }
|
||||
+
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
int k = i / 2 - 91;
|
||||
+ var event = net.minecraftforge.client.ForgeHooksClient.onCustomizeBossEventProgress(p_93705_, this.f_93698_.m_91268_(), lerpingbossevent, k, j, 10 + this.f_93698_.f_91062_.f_92710_);
|
||||
+ if (!event.isCanceled()) {
|
||||
RenderSystem.m_157429_(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
RenderSystem.m_157456_(0, f_93697_);
|
||||
this.m_93706_(p_93705_, k, j, lerpingbossevent);
|
||||
@@ -42,7 +_,8 @@
|
||||
Component component = lerpingbossevent.m_18861_();
|
||||
@@ -41,7 +_,8 @@
|
||||
int i1 = i / 2 - l / 2;
|
||||
int j1 = j - 9;
|
||||
this.f_93698_.f_91062_.m_92763_(p_93705_, component, (float)i1, (float)j1, 16777215);
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/components/toasts/ToastComponent.java
|
||||
+++ b/net/minecraft/client/gui/components/toasts/ToastComponent.java
|
||||
@@ -103,6 +_,7 @@
|
||||
@@ -102,6 +_,7 @@
|
||||
}
|
||||
|
||||
public void m_94922_(Toast p_94923_) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/LoadingOverlay.java
|
||||
+++ b/net/minecraft/client/gui/screens/LoadingOverlay.java
|
||||
@@ -121,6 +_,7 @@
|
||||
@@ -119,6 +_,7 @@
|
||||
int k1 = (int)((double)this.f_96163_.m_91268_().m_85446_() * 0.8325D);
|
||||
float f6 = this.f_96164_.m_7750_();
|
||||
this.f_96167_ = Mth.m_14036_(this.f_96167_ * 0.95F + f6 * 0.050000012F, 0.0F, 1.0F);
|
||||
@@ -8,7 +8,7 @@
|
||||
if (f < 1.0F) {
|
||||
this.m_96182_(p_96178_, i / 2 - j1, k1 - 5, i / 2 + j1, k1 + 5, 1.0F - Mth.m_14036_(f, 0.0F, 1.0F));
|
||||
}
|
||||
@@ -130,6 +_,7 @@
|
||||
@@ -128,6 +_,7 @@
|
||||
}
|
||||
|
||||
if (this.f_96168_ == -1L && this.f_96164_.m_7746_() && (!this.f_96166_ || f1 >= 2.0F)) {
|
||||
@@ -16,7 +16,7 @@
|
||||
try {
|
||||
this.f_96164_.m_7748_();
|
||||
this.f_96165_.accept(Optional.empty());
|
||||
@@ -137,7 +_,6 @@
|
||||
@@ -135,7 +_,6 @@
|
||||
this.f_96165_.accept(Optional.of(throwable));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/MenuScreens.java
|
||||
+++ b/net/minecraft/client/gui/screens/MenuScreens.java
|
||||
@@ -40,6 +_,10 @@
|
||||
@@ -41,6 +_,10 @@
|
||||
private static final Map<MenuType<?>, MenuScreens.ScreenConstructor<?, ?>> f_96196_ = Maps.newHashMap();
|
||||
|
||||
public static <T extends AbstractContainerMenu> void m_96201_(@Nullable MenuType<T> p_96202_, Minecraft p_96203_, int p_96204_, Component p_96205_) {
|
||||
@@ -11,7 +11,7 @@
|
||||
if (p_96202_ == null) {
|
||||
f_96195_.warn("Trying to open invalid screen with name: {}", (Object)p_96205_.getString());
|
||||
} else {
|
||||
@@ -47,9 +_,10 @@
|
||||
@@ -48,9 +_,10 @@
|
||||
if (screenconstructor == null) {
|
||||
f_96195_.warn("Failed to create screen for menu type: {}", (Object)BuiltInRegistries.f_256818_.m_7981_(p_96202_));
|
||||
} else {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/OptionsScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/OptionsScreen.java
|
||||
@@ -168,6 +_,14 @@
|
||||
@@ -151,6 +_,14 @@
|
||||
super.m_86412_(p_96249_, p_96250_, p_96251_, p_96252_);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/Screen.java
|
||||
+++ b/net/minecraft/client/gui/screens/Screen.java
|
||||
@@ -143,7 +_,7 @@
|
||||
@@ -214,7 +_,7 @@
|
||||
}
|
||||
|
||||
public void m_7379_() {
|
||||
@@ -9,7 +9,7 @@
|
||||
}
|
||||
|
||||
protected <T extends GuiEventListener & Renderable & NarratableEntry> T m_142416_(T p_169406_) {
|
||||
@@ -180,15 +_,29 @@
|
||||
@@ -251,15 +_,29 @@
|
||||
this.f_169368_.clear();
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
this.m_262809_(p_169389_, list, p_169392_, p_169393_, DefaultTooltipPositioner.f_262752_);
|
||||
}
|
||||
|
||||
@@ -201,24 +_,48 @@
|
||||
@@ -272,24 +_,48 @@
|
||||
}
|
||||
|
||||
public void m_96597_(PoseStack p_96598_, List<Component> p_96599_, int p_96600_, int p_96601_) {
|
||||
@@ -94,18 +94,16 @@
|
||||
if (k > i) {
|
||||
i = k;
|
||||
}
|
||||
@@ -226,8 +_,8 @@
|
||||
@@ -297,7 +_,7 @@
|
||||
j += clienttooltipcomponent.m_142103_();
|
||||
}
|
||||
|
||||
- int k1 = p_263065_ + 12;
|
||||
- int l1 = p_262996_ - 12;
|
||||
+ int k1 = preEvent.getX() + 12;
|
||||
+ int l1 = preEvent.getY() - 12;
|
||||
Vector2ic vector2ic = p_262920_.m_262814_(this, k1, l1, i, j);
|
||||
k1 = vector2ic.x();
|
||||
l1 = vector2ic.y();
|
||||
@@ -240,6 +_,8 @@
|
||||
- Vector2ic vector2ic = p_262920_.m_262814_(this, p_263065_, p_262996_, i, j);
|
||||
+ Vector2ic vector2ic = p_262920_.m_262814_(this, preEvent.getX(), preEvent.getY(), i, j);
|
||||
int l = vector2ic.x();
|
||||
int i1 = vector2ic.y();
|
||||
p_263064_.m_85836_();
|
||||
@@ -307,6 +_,8 @@
|
||||
RenderSystem.m_157427_(GameRenderer::m_172811_);
|
||||
bufferbuilder.m_166779_(VertexFormat.Mode.QUADS, DefaultVertexFormat.f_85815_);
|
||||
Matrix4f matrix4f = p_263064_.m_85850_().m_252922_();
|
||||
@@ -113,29 +111,29 @@
|
||||
+ // net.minecraftforge.client.event.RenderTooltipEvent.Color colorEvent = net.minecraftforge.client.ForgeHooksClient.onRenderTooltipColor(this.tooltipStack, p_263064_, k1, l1, preEvent.getFont(), p_262990_);
|
||||
TooltipRenderUtil.m_262796_((p_262872_, p_262873_, p_262874_, p_262875_, p_262876_, p_262877_, p_262878_, p_262879_, p_262880_) -> {
|
||||
GuiComponent.m_93123_(p_262872_, p_262873_, p_262874_, p_262875_, p_262876_, p_262877_, p_262878_, p_262879_, p_262880_);
|
||||
}, matrix4f, bufferbuilder, k1, l1, i, j, 400);
|
||||
@@ -256,7 +_,7 @@
|
||||
}, matrix4f, bufferbuilder, l, i1, i, j, 400);
|
||||
@@ -320,7 +_,7 @@
|
||||
|
||||
for(int j1 = 0; j1 < p_262990_.size(); ++j1) {
|
||||
ClientTooltipComponent clienttooltipcomponent1 = p_262990_.get(j1);
|
||||
- clienttooltipcomponent1.m_142440_(this.f_96547_, k1, i1, matrix4f, multibuffersource$buffersource);
|
||||
+ clienttooltipcomponent1.m_142440_(preEvent.getFont(), k1, i1, matrix4f, multibuffersource$buffersource);
|
||||
i1 += clienttooltipcomponent1.m_142103_() + (j1 == 0 ? 2 : 0);
|
||||
for(int l1 = 0; l1 < p_262990_.size(); ++l1) {
|
||||
ClientTooltipComponent clienttooltipcomponent1 = p_262990_.get(l1);
|
||||
- clienttooltipcomponent1.m_142440_(this.f_96547_, l, k1, matrix4f, multibuffersource$buffersource);
|
||||
+ clienttooltipcomponent1.m_142440_(preEvent.getFont(), l, k1, matrix4f, multibuffersource$buffersource);
|
||||
k1 += clienttooltipcomponent1.m_142103_() + (l1 == 0 ? 2 : 0);
|
||||
}
|
||||
|
||||
@@ -266,7 +_,7 @@
|
||||
@@ -329,7 +_,7 @@
|
||||
|
||||
for(int i2 = 0; i2 < p_262990_.size(); ++i2) {
|
||||
ClientTooltipComponent clienttooltipcomponent2 = p_262990_.get(i2);
|
||||
- clienttooltipcomponent2.m_183452_(this.f_96547_, k1, i1, p_263064_, this.f_96542_, 400);
|
||||
+ clienttooltipcomponent2.m_183452_(preEvent.getFont(), k1, i1, p_263064_, this.f_96542_, 400);
|
||||
i1 += clienttooltipcomponent2.m_142103_() + (i2 == 0 ? 2 : 0);
|
||||
- clienttooltipcomponent2.m_183452_(this.f_96547_, l, k1, p_263064_, this.f_96542_);
|
||||
+ clienttooltipcomponent2.m_183452_(preEvent.getFont(), k1, i1, p_263064_, this.f_96542_);
|
||||
k1 += clienttooltipcomponent2.m_142103_() + (i2 == 0 ? 2 : 0);
|
||||
}
|
||||
|
||||
@@ -368,9 +_,19 @@
|
||||
this.f_96547_ = p_96607_.f_91062_;
|
||||
this.f_96543_ = p_96608_;
|
||||
this.f_96544_ = p_96609_;
|
||||
@@ -438,8 +_,18 @@
|
||||
}
|
||||
|
||||
this.f_267454_ = true;
|
||||
+ java.util.function.Consumer<GuiEventListener> add = (b) -> {
|
||||
+ if (b instanceof Renderable r)
|
||||
+ this.f_169369_.add(r);
|
||||
@@ -144,7 +142,6 @@
|
||||
+ f_96540_.add(b);
|
||||
+ };
|
||||
+ if (!net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.ScreenEvent.Init.Pre(this, this.f_96540_, add, this::m_169411_))) {
|
||||
this.m_232761_();
|
||||
this.m_169407_(false);
|
||||
this.m_169378_(f_169370_);
|
||||
+ }
|
||||
@@ -152,23 +149,23 @@
|
||||
}
|
||||
|
||||
protected void m_232761_() {
|
||||
@@ -399,6 +_,7 @@
|
||||
public void m_96558_(PoseStack p_96559_, int p_96560_) {
|
||||
@@ -467,6 +_,7 @@
|
||||
public void m_7333_(PoseStack p_96557_) {
|
||||
if (this.f_96541_.f_91073_ != null) {
|
||||
this.m_93179_(p_96559_, 0, 0, this.f_96543_, this.f_96544_, -1072689136, -804253680);
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.ScreenEvent.BackgroundRendered(this, p_96559_));
|
||||
m_93179_(p_96557_, 0, 0, this.f_96543_, this.f_96544_, -1072689136, -804253680);
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.ScreenEvent.BackgroundRendered(this, p_96557_));
|
||||
} else {
|
||||
this.m_96626_(p_96560_);
|
||||
this.m_264065_(p_96557_);
|
||||
}
|
||||
@@ -418,6 +_,7 @@
|
||||
bufferbuilder.m_5483_((double)this.f_96543_, 0.0D, 0.0D).m_7421_((float)this.f_96543_ / 32.0F, (float)p_96627_).m_6122_(64, 64, 64, 255).m_5752_();
|
||||
bufferbuilder.m_5483_(0.0D, 0.0D, 0.0D).m_7421_(0.0F, (float)p_96627_).m_6122_(64, 64, 64, 255).m_5752_();
|
||||
tesselator.m_85914_();
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.ScreenEvent.BackgroundRendered(this, new PoseStack()));
|
||||
@@ -479,6 +_,7 @@
|
||||
int i = 32;
|
||||
m_93143_(p_265092_, 0, 0, 0, 0.0F, 0.0F, this.f_96543_, this.f_96544_, 32, 32);
|
||||
RenderSystem.m_157429_(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.ScreenEvent.BackgroundRendered(this, p_265092_));
|
||||
}
|
||||
|
||||
public boolean m_7043_() {
|
||||
@@ -503,6 +_,10 @@
|
||||
@@ -570,6 +_,10 @@
|
||||
}
|
||||
|
||||
public void m_7400_(List<Path> p_96591_) {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
--- a/net/minecraft/client/gui/screens/TitleScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/TitleScreen.java
|
||||
@@ -68,6 +_,7 @@
|
||||
private long f_96715_;
|
||||
@@ -63,6 +_,7 @@
|
||||
@Nullable
|
||||
private TitleScreen.WarningLabel f_232768_;
|
||||
private final LogoRenderer f_263781_;
|
||||
+ private net.minecraftforge.client.gui.TitleScreenModUpdateIndicator modUpdateNotification;
|
||||
|
||||
public TitleScreen() {
|
||||
this(false);
|
||||
@@ -112,11 +_,15 @@
|
||||
@@ -113,11 +_,15 @@
|
||||
int j = this.f_96543_ - i - 2;
|
||||
int k = 24;
|
||||
int l = this.f_96544_ / 4 + 48;
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
this.m_142416_(new ImageButton(this.f_96543_ / 2 - 124, l + 72 + 12, 20, 20, 0, 106, 20, Button.f_93617_, 256, 256, (p_96791_) -> {
|
||||
this.f_96541_.m_91152_(new LanguageSelectScreen(this, this.f_96541_.f_91066_, this.f_96541_.m_91102_()));
|
||||
@@ -161,7 +_,7 @@
|
||||
@@ -162,7 +_,7 @@
|
||||
}).m_252987_(this.f_96543_ / 2 - 100, p_96764_ + p_96765_ * 1, 200, 20).m_257505_(tooltip).m_253136_())).f_93623_ = flag;
|
||||
(this.m_142416_(Button.m_253074_(Component.m_237115_("menu.online"), (p_210872_) -> {
|
||||
this.m_96793_();
|
||||
@@ -33,31 +33,31 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -267,6 +_,7 @@
|
||||
this.f_232768_.m_232790_(p_96739_, l);
|
||||
@@ -245,6 +_,7 @@
|
||||
this.f_232768_.m_232790_(p_96739_, i);
|
||||
}
|
||||
|
||||
+ net.minecraftforge.client.ForgeHooksClient.renderMainMenu(this, p_96739_, this.f_96547_, this.f_96543_, this.f_96544_, l);
|
||||
+ net.minecraftforge.client.ForgeHooksClient.renderMainMenu(this, p_96739_, this.f_96547_, this.f_96543_, this.f_96544_, i);
|
||||
if (this.f_96721_ != null) {
|
||||
p_96739_.m_85836_();
|
||||
p_96739_.m_252880_((float)(this.f_96543_ / 2 + 90), 70.0F, 0.0F);
|
||||
@@ -289,7 +_,14 @@
|
||||
@@ -267,7 +_,14 @@
|
||||
s = s + I18n.m_118938_("menu.modded");
|
||||
}
|
||||
|
||||
- m_93236_(p_96739_, this.f_96547_, s, 2, this.f_96544_ - 10, 16777215 | l);
|
||||
- m_93236_(p_96739_, this.f_96547_, s, 2, this.f_96544_ - 10, 16777215 | i);
|
||||
+ net.minecraftforge.internal.BrandingControl.forEachLine(true, true, (brdline, brd) ->
|
||||
+ m_93236_(p_96739_, this.f_96547_, brd, 2, this.f_96544_ - ( 10 + brdline * (this.f_96547_.f_92710_ + 1)), 16777215 | l)
|
||||
+ m_93236_(p_96739_, this.f_96547_, brd, 2, this.f_96544_ - ( 10 + brdline * (this.f_96547_.f_92710_ + 1)), 16777215 | i)
|
||||
+ );
|
||||
+
|
||||
+ net.minecraftforge.internal.BrandingControl.forEachAboveCopyrightLine((brdline, brd) ->
|
||||
+ m_93236_(p_96739_, this.f_96547_, brd, this.f_96543_ - f_96547_.m_92895_(brd), this.f_96544_ - (10 + (brdline + 1) * ( this.f_96547_.f_92710_ + 1)), 16777215 | l)
|
||||
+ m_93236_(p_96739_, this.f_96547_, brd, this.f_96543_ - f_96547_.m_92895_(brd), this.f_96544_ - (10 + (brdline + 1) * ( this.f_96547_.f_92710_ + 1)), 16777215 | i)
|
||||
+ );
|
||||
+
|
||||
|
||||
for(GuiEventListener guieventlistener : this.m_6702_()) {
|
||||
if (guieventlistener instanceof AbstractWidget) {
|
||||
@@ -302,6 +_,7 @@
|
||||
@@ -280,6 +_,7 @@
|
||||
RenderSystem.m_69482_();
|
||||
this.f_96726_.m_86412_(p_96739_, p_96740_, p_96741_, p_96742_);
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/advancements/AdvancementTab.java
|
||||
+++ b/net/minecraft/client/gui/screens/advancements/AdvancementTab.java
|
||||
@@ -39,6 +_,7 @@
|
||||
@@ -38,6 +_,7 @@
|
||||
private int f_97141_ = Integer.MIN_VALUE;
|
||||
private float f_97142_;
|
||||
private boolean f_97143_;
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
public AdvancementTab(Minecraft p_97145_, AdvancementsScreen p_97146_, AdvancementTabType p_97147_, int p_97148_, Advancement p_97149_, DisplayInfo p_97150_) {
|
||||
this.f_97126_ = p_97145_;
|
||||
@@ -53,6 +_,15 @@
|
||||
@@ -52,6 +_,15 @@
|
||||
this.m_97175_(this.f_97134_, p_97149_);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
public AdvancementTabType m_169538_() {
|
||||
return this.f_97128_;
|
||||
}
|
||||
@@ -165,8 +_,8 @@
|
||||
@@ -151,8 +_,8 @@
|
||||
return null;
|
||||
} else {
|
||||
for(AdvancementTabType advancementtabtype : AdvancementTabType.values()) {
|
||||
|
||||
+8
-10
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/advancements/AdvancementsScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/advancements/AdvancementsScreen.java
|
||||
@@ -42,6 +_,7 @@
|
||||
@@ -41,6 +_,7 @@
|
||||
@Nullable
|
||||
private AdvancementTab f_97336_;
|
||||
private boolean f_97337_;
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
public AdvancementsScreen(ClientAdvancements p_97340_) {
|
||||
super(GameNarrator.f_93310_);
|
||||
@@ -57,7 +_,15 @@
|
||||
@@ -56,7 +_,15 @@
|
||||
} else {
|
||||
this.f_97334_.m_104401_(this.f_97336_ == null ? null : this.f_97336_.m_97182_(), true);
|
||||
}
|
||||
@@ -25,7 +25,7 @@
|
||||
}
|
||||
|
||||
public void m_7861_() {
|
||||
@@ -75,7 +_,7 @@
|
||||
@@ -74,7 +_,7 @@
|
||||
int j = (this.f_96544_ - 140) / 2;
|
||||
|
||||
for(AdvancementTab advancementtab : this.f_97335_.values()) {
|
||||
@@ -34,7 +34,7 @@
|
||||
this.f_97334_.m_104401_(advancementtab.m_97182_(), true);
|
||||
break;
|
||||
}
|
||||
@@ -99,6 +_,11 @@
|
||||
@@ -98,6 +_,11 @@
|
||||
int i = (this.f_96543_ - 252) / 2;
|
||||
int j = (this.f_96544_ - 140) / 2;
|
||||
this.m_7333_(p_97361_);
|
||||
@@ -46,7 +46,7 @@
|
||||
this.m_97373_(p_97361_, p_97362_, p_97363_, i, j);
|
||||
this.m_97356_(p_97361_, i, j);
|
||||
this.m_97381_(p_97361_, p_97362_, p_97363_, i, j);
|
||||
@@ -149,12 +_,14 @@
|
||||
@@ -138,10 +_,12 @@
|
||||
RenderSystem.m_157456_(0, f_97330_);
|
||||
|
||||
for(AdvancementTab advancementtab : this.f_97335_.values()) {
|
||||
@@ -54,14 +54,12 @@
|
||||
advancementtab.m_97165_(p_97357_, p_97358_, p_97359_, advancementtab == this.f_97336_);
|
||||
}
|
||||
|
||||
RenderSystem.m_69453_();
|
||||
|
||||
for(AdvancementTab advancementtab1 : this.f_97335_.values()) {
|
||||
+ if (advancementtab1.getPage() == tabPage)
|
||||
advancementtab1.m_97159_(p_97358_, p_97359_, this.f_96542_);
|
||||
advancementtab1.m_274613_(p_97357_, p_97358_, p_97359_, this.f_96542_);
|
||||
}
|
||||
|
||||
@@ -180,7 +_,7 @@
|
||||
}
|
||||
@@ -161,7 +_,7 @@
|
||||
|
||||
if (this.f_97335_.size() > 1) {
|
||||
for(AdvancementTab advancementtab : this.f_97335_.values()) {
|
||||
|
||||
+17
-31
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/controls/KeyBindsList.java
|
||||
+++ b/net/minecraft/client/gui/screens/controls/KeyBindsList.java
|
||||
@@ -50,7 +_,7 @@
|
||||
@@ -65,7 +_,7 @@
|
||||
}
|
||||
|
||||
protected int m_5756_() {
|
||||
@@ -9,48 +9,34 @@
|
||||
}
|
||||
|
||||
public int m_5759_() {
|
||||
@@ -108,10 +_,11 @@
|
||||
this.f_193911_ = p_193917_;
|
||||
this.f_193912_ = Button.m_253074_(p_193917_, (p_193939_) -> {
|
||||
@@ -130,10 +_,11 @@
|
||||
this.f_193912_ = Button.m_253074_(p_193917_, (p_269618_) -> {
|
||||
KeyBindsList.this.f_193858_.f_193975_ = p_193916_;
|
||||
KeyBindsList.this.m_269130_();
|
||||
- }).m_252987_(0, 0, 75, 20).m_252778_((p_253311_) -> {
|
||||
+ }).m_252987_(0, 0, 75 + 20 /* Forge: Add space */, 20).m_252778_((p_253311_) -> {
|
||||
return p_193916_.m_90862_() ? Component.m_237110_("narrator.controls.unbound", p_193917_) : Component.m_237110_("narrator.controls.bound", p_193917_, p_253311_.get());
|
||||
}).m_253136_();
|
||||
this.f_193913_ = Button.m_253074_(Component.m_237115_("controls.reset"), (p_193935_) -> {
|
||||
this.f_193913_ = Button.m_253074_(Component.m_237115_("controls.reset"), (p_269616_) -> {
|
||||
+ this.f_193910_.setToDefault();
|
||||
KeyBindsList.this.f_93386_.f_91066_.m_92159_(p_193916_, p_193916_.m_90861_());
|
||||
KeyMapping.m_90854_();
|
||||
KeyBindsList.this.m_269130_();
|
||||
}).m_252987_(0, 0, 50, 20).m_252778_((p_253313_) -> {
|
||||
@@ -123,7 +_,7 @@
|
||||
boolean flag = KeyBindsList.this.f_193858_.f_193975_ == this.f_193910_;
|
||||
@@ -145,7 +_,7 @@
|
||||
public void m_6311_(PoseStack p_193923_, int p_193924_, int p_193925_, int p_193926_, int p_193927_, int p_193928_, int p_193929_, int p_193930_, boolean p_193931_, float p_193932_) {
|
||||
float f = (float)(p_193926_ + 90 - KeyBindsList.this.f_193859_);
|
||||
KeyBindsList.this.f_93386_.f_91062_.m_92889_(p_193923_, this.f_193911_, f, (float)(p_193925_ + p_193928_ / 2 - 9 / 2), 16777215);
|
||||
- this.f_193913_.m_252865_(p_193926_ + 190);
|
||||
+ this.f_193913_.m_252865_(p_193926_ + 190 + 20);
|
||||
this.f_193913_.m_252888_(p_193925_);
|
||||
this.f_193913_.f_93623_ = !this.f_193910_.m_90864_();
|
||||
this.f_193913_.m_253211_(p_193925_);
|
||||
this.f_193913_.m_86412_(p_193923_, p_193929_, p_193930_, p_193932_);
|
||||
@@ -131,11 +_,12 @@
|
||||
this.f_193912_.m_252888_(p_193925_);
|
||||
this.f_193912_.m_93666_(this.f_193910_.m_90863_());
|
||||
boolean flag1 = false;
|
||||
+ boolean keyCodeModifierConflict = true; // gracefully handle conflicts like SHIFT vs SHIFT+G
|
||||
this.f_193912_.m_252865_(p_193926_ + 105);
|
||||
@@ -174,7 +_,7 @@
|
||||
MutableComponent mutablecomponent = Component.m_237119_();
|
||||
if (!this.f_193910_.m_90862_()) {
|
||||
for(KeyMapping keymapping : KeyBindsList.this.f_93386_.f_91066_.f_92059_) {
|
||||
if (keymapping != this.f_193910_ && this.f_193910_.m_90850_(keymapping)) {
|
||||
flag1 = true;
|
||||
- break;
|
||||
+ keyCodeModifierConflict &= keymapping.hasKeyModifierConflict(this.f_193910_);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -143,7 +_,7 @@
|
||||
if (flag) {
|
||||
this.f_193912_.m_93666_(Component.m_237113_("> ").m_7220_(this.f_193912_.m_6035_().m_6881_().m_130940_(ChatFormatting.YELLOW)).m_130946_(" <").m_130940_(ChatFormatting.YELLOW));
|
||||
} else if (flag1) {
|
||||
- this.f_193912_.m_93666_(this.f_193912_.m_6035_().m_6881_().m_130940_(ChatFormatting.RED));
|
||||
+ this.f_193912_.m_93666_(this.f_193912_.m_6035_().m_6881_().m_130940_(keyCodeModifierConflict ? ChatFormatting.GOLD : ChatFormatting.RED));
|
||||
}
|
||||
|
||||
this.f_193912_.m_86412_(p_193923_, p_193929_, p_193930_, p_193932_);
|
||||
- if (keymapping != this.f_193910_ && this.f_193910_.m_90850_(keymapping)) {
|
||||
+ if ((keymapping != this.f_193910_ && this.f_193910_.m_90850_(keymapping)) || keymapping.hasKeyModifierConflict(this.f_193910_)) { // FORGE: gracefully handle conflicts like SHIFT vs SHIFT+G
|
||||
if (this.f_268447_) {
|
||||
mutablecomponent.m_130946_(", ");
|
||||
}
|
||||
+3
-3
@@ -2,13 +2,13 @@
|
||||
+++ b/net/minecraft/client/gui/screens/controls/KeyBindsScreen.java
|
||||
@@ -31,7 +_,7 @@
|
||||
this.m_7787_(this.f_193977_);
|
||||
this.f_193978_ = this.m_142416_(Button.m_253074_(Component.m_237115_("controls.resetAll"), (p_193999_) -> {
|
||||
this.f_193978_ = this.m_142416_(Button.m_253074_(Component.m_237115_("controls.resetAll"), (p_269619_) -> {
|
||||
for(KeyMapping keymapping : this.f_96282_.f_92059_) {
|
||||
- keymapping.m_90848_(keymapping.m_90861_());
|
||||
+ keymapping.setToDefault();
|
||||
}
|
||||
|
||||
KeyMapping.m_90854_();
|
||||
this.f_193977_.m_269130_();
|
||||
@@ -55,11 +_,14 @@
|
||||
public boolean m_7933_(int p_193987_, int p_193988_, int p_193989_) {
|
||||
if (this.f_193975_ != null) {
|
||||
@@ -23,4 +23,4 @@
|
||||
+ if(!net.minecraftforge.client.settings.KeyModifier.isKeyCodeModifier(this.f_193975_.getKey()))
|
||||
this.f_193975_ = null;
|
||||
this.f_193976_ = Util.m_137550_();
|
||||
KeyMapping.m_90854_();
|
||||
this.f_193977_.m_269130_();
|
||||
+24
-26
@@ -1,19 +1,19 @@
|
||||
--- a/net/minecraft/client/gui/screens/inventory/AbstractContainerScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/inventory/AbstractContainerScreen.java
|
||||
@@ -89,6 +_,7 @@
|
||||
@@ -88,6 +_,7 @@
|
||||
int i = this.f_97735_;
|
||||
int j = this.f_97736_;
|
||||
this.m_7286_(p_97795_, p_97798_, p_97796_, p_97797_);
|
||||
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.ContainerScreenEvent.Render.Background(this, p_97795_, p_97796_, p_97797_));
|
||||
RenderSystem.m_69465_();
|
||||
super.m_86412_(p_97795_, p_97796_, p_97797_, p_97798_);
|
||||
PoseStack posestack = RenderSystem.m_157191_();
|
||||
@@ -110,11 +_,12 @@
|
||||
p_97795_.m_85836_();
|
||||
@@ -104,11 +_,12 @@
|
||||
this.f_97734_ = slot;
|
||||
int l = slot.f_40220_;
|
||||
int i1 = slot.f_40221_;
|
||||
- m_169606_(p_97795_, l, i1, this.m_93252_());
|
||||
+ renderSlotHighlight(p_97795_, l, i1, this.m_93252_(), this.getSlotColor(k));
|
||||
- m_169606_(p_97795_, l, i1, 0);
|
||||
+ renderSlotHighlight(p_97795_, l, i1, 0, this.getSlotColor(k));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
ItemStack itemstack = this.f_97711_.m_41619_() ? this.f_97732_.m_142621_() : this.f_97711_;
|
||||
if (!itemstack.m_41619_()) {
|
||||
int l1 = 8;
|
||||
@@ -154,9 +_,13 @@
|
||||
@@ -147,9 +_,13 @@
|
||||
}
|
||||
|
||||
public static void m_169606_(PoseStack p_169607_, int p_169608_, int p_169609_, int p_169610_) {
|
||||
@@ -37,19 +37,17 @@
|
||||
RenderSystem.m_69444_(true, true, true, true);
|
||||
RenderSystem.m_69482_();
|
||||
}
|
||||
@@ -174,8 +_,10 @@
|
||||
RenderSystem.m_157182_();
|
||||
this.m_93250_(200);
|
||||
this.f_96542_.f_115093_ = 200.0F;
|
||||
+ var font = net.minecraftforge.client.extensions.common.IClientItemExtensions.of(p_97783_).getFont(p_97783_, net.minecraftforge.client.extensions.common.IClientItemExtensions.FontContext.ITEM_COUNT);
|
||||
+ if (font == null) font = this.f_96547_;
|
||||
this.f_96542_.m_115203_(p_97783_, p_97784_, p_97785_);
|
||||
- this.f_96542_.m_115174_(this.f_96547_, p_97783_, p_97784_, p_97785_ - (this.f_97711_.m_41619_() ? 0 : 8), p_97786_);
|
||||
+ this.f_96542_.m_115174_(font, p_97783_, p_97784_, p_97785_ - (this.f_97711_.m_41619_() ? 0 : 8), p_97786_);
|
||||
this.m_93250_(0);
|
||||
this.f_96542_.f_115093_ = 0.0F;
|
||||
@@ -165,7 +_,8 @@
|
||||
p_275498_.m_85836_();
|
||||
p_275498_.m_252880_(0.0F, 0.0F, 232.0F);
|
||||
this.f_96542_.m_274369_(p_275498_, p_275341_, p_275289_, p_275690_);
|
||||
- this.f_96542_.m_274364_(p_275498_, this.f_96547_, p_275341_, p_275289_, p_275690_ - (this.f_97711_.m_41619_() ? 0 : 8), p_275201_);
|
||||
+ var font = net.minecraftforge.client.extensions.common.IClientItemExtensions.of(p_275341_).getFont(p_275341_, net.minecraftforge.client.extensions.common.IClientItemExtensions.FontContext.ITEM_COUNT);
|
||||
+ this.f_96542_.m_274364_(p_275498_, font == null ? this.f_96547_ : font, p_275341_, p_275289_, p_275690_ - (this.f_97711_.m_41619_() ? 0 : 8), p_275201_);
|
||||
p_275498_.m_85849_();
|
||||
}
|
||||
@@ -285,7 +_,8 @@
|
||||
|
||||
@@ -272,7 +_,8 @@
|
||||
if (super.m_6375_(p_97748_, p_97749_, p_97750_)) {
|
||||
return true;
|
||||
} else {
|
||||
@@ -59,7 +57,7 @@
|
||||
Slot slot = this.m_97744_(p_97748_, p_97749_);
|
||||
long i = Util.m_137550_();
|
||||
this.f_97723_ = this.f_97709_ == slot && i - this.f_97721_ < 250L && this.f_97722_ == p_97750_;
|
||||
@@ -296,6 +_,7 @@
|
||||
@@ -283,6 +_,7 @@
|
||||
int j = this.f_97735_;
|
||||
int k = this.f_97736_;
|
||||
boolean flag1 = this.m_7467_(p_97748_, p_97749_, j, k, p_97750_);
|
||||
@@ -67,7 +65,7 @@
|
||||
int l = -1;
|
||||
if (slot != null) {
|
||||
l = slot.f_40219_;
|
||||
@@ -321,7 +_,7 @@
|
||||
@@ -308,7 +_,7 @@
|
||||
}
|
||||
} else if (!this.f_97738_) {
|
||||
if (this.f_97732_.m_142621_().m_41619_()) {
|
||||
@@ -76,7 +74,7 @@
|
||||
this.m_6597_(slot, l, p_97750_, ClickType.CLONE);
|
||||
} else {
|
||||
boolean flag2 = l != -999 && (InputConstants.m_84830_(Minecraft.m_91087_().m_91268_().m_85439_(), 340) || InputConstants.m_84830_(Minecraft.m_91087_().m_91268_().m_85439_(), 344));
|
||||
@@ -345,7 +_,7 @@
|
||||
@@ -332,7 +_,7 @@
|
||||
this.f_97717_ = 0;
|
||||
} else if (p_97750_ == 1) {
|
||||
this.f_97717_ = 1;
|
||||
@@ -85,7 +83,7 @@
|
||||
this.f_97717_ = 2;
|
||||
}
|
||||
}
|
||||
@@ -414,10 +_,13 @@
|
||||
@@ -401,10 +_,13 @@
|
||||
}
|
||||
|
||||
public boolean m_6348_(double p_97812_, double p_97813_, int p_97814_) {
|
||||
@@ -99,7 +97,7 @@
|
||||
int k = -1;
|
||||
if (slot != null) {
|
||||
k = slot.f_40219_;
|
||||
@@ -431,7 +_,7 @@
|
||||
@@ -418,7 +_,7 @@
|
||||
if (m_96638_()) {
|
||||
if (!this.f_97724_.m_41619_()) {
|
||||
for(Slot slot2 : this.f_97732_.f_38839_) {
|
||||
@@ -108,7 +106,7 @@
|
||||
this.m_6597_(slot2, slot2.f_40219_, p_97814_, ClickType.QUICK_MOVE);
|
||||
}
|
||||
}
|
||||
@@ -494,7 +_,7 @@
|
||||
@@ -481,7 +_,7 @@
|
||||
|
||||
this.m_6597_((Slot)null, -999, AbstractContainerMenu.m_38930_(2, this.f_97717_), ClickType.QUICK_CRAFT);
|
||||
} else if (!this.f_97732_.m_142621_().m_41619_()) {
|
||||
@@ -117,7 +115,7 @@
|
||||
this.m_6597_(slot, k, p_97814_, ClickType.CLONE);
|
||||
} else {
|
||||
boolean flag1 = k != -999 && (InputConstants.m_84830_(Minecraft.m_91087_().m_91268_().m_85439_(), 340) || InputConstants.m_84830_(Minecraft.m_91087_().m_91268_().m_85439_(), 344));
|
||||
@@ -541,34 +_,39 @@
|
||||
@@ -528,34 +_,39 @@
|
||||
}
|
||||
|
||||
public boolean m_7933_(int p_97765_, int p_97766_, int p_97767_) {
|
||||
@@ -164,7 +162,7 @@
|
||||
this.m_6597_(this.f_97734_, this.f_97734_.f_40219_, i, ClickType.SWAP);
|
||||
return true;
|
||||
}
|
||||
@@ -603,6 +_,18 @@
|
||||
@@ -590,6 +_,18 @@
|
||||
|
||||
public T m_6262_() {
|
||||
return this.f_97732_;
|
||||
|
||||
+31
-36
@@ -92,16 +92,17 @@
|
||||
}
|
||||
|
||||
(this.f_97732_).f_98639_.addAll(searchtree.m_6293_(s.toLowerCase(Locale.ROOT)));
|
||||
@@ -416,7 +_,7 @@
|
||||
@@ -415,7 +_,8 @@
|
||||
|
||||
protected void m_7027_(PoseStack p_98616_, int p_98617_, int p_98618_) {
|
||||
if (f_98507_.m_40789_()) {
|
||||
RenderSystem.m_69461_();
|
||||
- this.f_96547_.m_92889_(p_98616_, f_98507_.m_40786_(), 8.0F, 6.0F, 4210752);
|
||||
+ RenderSystem.m_69461_();
|
||||
+ this.f_96547_.m_92889_(p_98616_, f_98507_.m_40786_(), 8.0F, 6.0F, f_98507_.getLabelColor());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -426,7 +_,7 @@
|
||||
@@ -425,7 +_,7 @@
|
||||
double d0 = p_98531_ - (double)this.f_97735_;
|
||||
double d1 = p_98532_ - (double)this.f_97736_;
|
||||
|
||||
@@ -110,7 +111,7 @@
|
||||
if (this.m_98562_(creativemodetab, d0, d1)) {
|
||||
return true;
|
||||
}
|
||||
@@ -447,7 +_,7 @@
|
||||
@@ -446,7 +_,7 @@
|
||||
double d1 = p_98623_ - (double)this.f_97736_;
|
||||
this.f_98509_ = false;
|
||||
|
||||
@@ -119,7 +120,7 @@
|
||||
if (this.m_98562_(creativemodetab, d0, d1)) {
|
||||
this.m_98560_(creativemodetab);
|
||||
return true;
|
||||
@@ -465,6 +_,7 @@
|
||||
@@ -464,6 +_,7 @@
|
||||
private void m_98560_(CreativeModeTab p_98561_) {
|
||||
CreativeModeTab creativemodetab = f_98507_;
|
||||
f_98507_ = p_98561_;
|
||||
@@ -127,7 +128,7 @@
|
||||
this.f_97737_.clear();
|
||||
(this.f_97732_).f_98639_.clear();
|
||||
this.m_238391_();
|
||||
@@ -541,13 +_,15 @@
|
||||
@@ -540,13 +_,15 @@
|
||||
this.f_98511_ = null;
|
||||
}
|
||||
|
||||
@@ -135,7 +136,7 @@
|
||||
+ if (f_98507_.hasSearchBar()) {
|
||||
this.f_98510_.m_94194_(true);
|
||||
this.f_98510_.m_94190_(false);
|
||||
this.f_98510_.m_94178_(true);
|
||||
this.f_98510_.m_93692_(true);
|
||||
if (creativemodetab != p_98561_) {
|
||||
this.f_98510_.m_94144_("");
|
||||
}
|
||||
@@ -144,7 +145,7 @@
|
||||
|
||||
this.m_98630_();
|
||||
} else {
|
||||
@@ -604,7 +_,7 @@
|
||||
@@ -603,7 +_,7 @@
|
||||
this.m_7333_(p_98577_);
|
||||
super.m_86412_(p_98577_, p_98578_, p_98579_, p_98580_);
|
||||
|
||||
@@ -153,23 +154,22 @@
|
||||
if (this.m_98584_(p_98577_, creativemodetab, p_98578_, p_98579_)) {
|
||||
break;
|
||||
}
|
||||
@@ -614,6 +_,15 @@
|
||||
@@ -613,13 +_,22 @@
|
||||
this.m_96602_(p_98577_, f_98506_, p_98578_, p_98579_);
|
||||
}
|
||||
|
||||
+ if (this.pages.size() != 1) {
|
||||
+ Component page = Component.m_237113_(String.format("%d / %d", this.pages.indexOf(this.currentPage) + 1, this.pages.size()));
|
||||
+ this.m_93250_(300);
|
||||
+ this.f_96542_.f_115093_ = 300.0F;
|
||||
+ p_98577_.m_85836_();
|
||||
+ p_98577_.m_252880_(0F, 0F, 300F);
|
||||
+ f_96547_.m_92744_(p_98577_, page.m_7532_(), f_97735_ + (f_97726_ / 2f) - (f_96547_.m_92852_(page) / 2f), f_97736_ - 44, -1);
|
||||
+ this.m_93250_(0);
|
||||
+ this.f_96542_.f_115093_ = 0.0F;
|
||||
+ p_98577_.m_85849_();
|
||||
+ }
|
||||
+
|
||||
RenderSystem.m_157429_(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
+ RenderSystem.m_157429_(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.m_7025_(p_98577_, p_98578_, p_98579_);
|
||||
}
|
||||
@@ -621,7 +_,7 @@
|
||||
|
||||
protected void m_6057_(PoseStack p_98590_, ItemStack p_98591_, int p_98592_, int p_98593_) {
|
||||
boolean flag = this.f_97734_ != null && this.f_97734_ instanceof CreativeModeInventoryScreen.CustomCreativeSlot;
|
||||
boolean flag1 = f_98507_.m_257962_() == CreativeModeTab.Type.CATEGORY;
|
||||
@@ -178,7 +178,7 @@
|
||||
TooltipFlag.Default tooltipflag$default = this.f_96541_.f_91066_.f_92125_ ? TooltipFlag.Default.f_256730_ : TooltipFlag.Default.f_256752_;
|
||||
TooltipFlag tooltipflag = flag ? tooltipflag$default.m_257777_() : tooltipflag$default;
|
||||
List<Component> list = p_98591_.m_41651_(this.f_96541_.f_91074_, tooltipflag);
|
||||
@@ -641,20 +_,20 @@
|
||||
@@ -639,35 +_,36 @@
|
||||
|
||||
int i = 1;
|
||||
|
||||
@@ -196,37 +196,32 @@
|
||||
}
|
||||
|
||||
protected void m_7286_(PoseStack p_98572_, float p_98573_, int p_98574_, int p_98575_) {
|
||||
RenderSystem.m_157429_(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
- for(CreativeModeTab creativemodetab : CreativeModeTabs.m_257388_()) {
|
||||
+ for(CreativeModeTab creativemodetab : currentPage.getVisibleTabs()) {
|
||||
RenderSystem.m_157427_(GameRenderer::m_172817_);
|
||||
RenderSystem.m_157456_(0, f_98504_);
|
||||
if (creativemodetab != f_98507_) {
|
||||
@@ -663,7 +_,7 @@
|
||||
this.m_98581_(p_98572_, creativemodetab);
|
||||
}
|
||||
}
|
||||
|
||||
RenderSystem.m_157427_(GameRenderer::m_172817_);
|
||||
- RenderSystem.m_157456_(0, new ResourceLocation("textures/gui/container/creative_inventory/tab_" + f_98507_.m_40788_()));
|
||||
+ RenderSystem.m_157456_(0, f_98507_.getBackgroundLocation());
|
||||
this.m_93228_(p_98572_, this.f_97735_, this.f_97736_, 0, 0, this.f_97726_, this.f_97727_);
|
||||
m_93228_(p_98572_, this.f_97735_, this.f_97736_, 0, 0, this.f_97726_, this.f_97727_);
|
||||
this.f_98510_.m_86412_(p_98572_, p_98574_, p_98575_, p_98573_);
|
||||
RenderSystem.m_157429_(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
@@ -671,11 +_,12 @@
|
||||
int j = this.f_97735_ + 175;
|
||||
int k = this.f_97736_ + 18;
|
||||
int i = k + 112;
|
||||
RenderSystem.m_157427_(GameRenderer::m_172817_);
|
||||
- RenderSystem.m_157456_(0, f_98504_);
|
||||
+ RenderSystem.m_157456_(0, f_98507_.getTabsImage());
|
||||
if (f_98507_.m_40791_()) {
|
||||
this.m_93228_(p_98572_, j, k + (int)((float)(i - k - 17) * this.f_98508_), 232 + (this.m_98631_() ? 0 : 12), 0, 12, 15);
|
||||
m_93228_(p_98572_, j, k + (int)((float)(i - k - 17) * this.f_98508_), 232 + (this.m_98631_() ? 0 : 12), 0, 12, 15);
|
||||
}
|
||||
|
||||
+ if (currentPage.getVisibleTabs().contains(f_98507_)) //Forge: only display tab selection when the selected tab is on the current page
|
||||
this.m_98581_(p_98572_, f_98507_);
|
||||
if (f_98507_.m_257962_() == CreativeModeTab.Type.INVENTORY) {
|
||||
InventoryScreen.m_98850_(this.f_97735_ + 88, this.f_97736_ + 45, 20, (float)(this.f_97735_ + 88 - p_98574_), (float)(this.f_97736_ + 45 - 30 - p_98575_), this.f_96541_.f_91074_);
|
||||
@@ -684,7 +_,7 @@
|
||||
InventoryScreen.m_274545_(p_98572_, this.f_97735_ + 88, this.f_97736_ + 45, 20, (float)(this.f_97735_ + 88 - p_98574_), (float)(this.f_97736_ + 45 - 30 - p_98575_), this.f_96541_.f_91074_);
|
||||
@@ -676,7 +_,7 @@
|
||||
}
|
||||
|
||||
private int m_258094_(CreativeModeTab p_260136_) {
|
||||
@@ -235,7 +230,7 @@
|
||||
int j = 27;
|
||||
int k = 27 * i;
|
||||
if (p_260136_.m_6563_()) {
|
||||
@@ -696,7 +_,7 @@
|
||||
@@ -688,7 +_,7 @@
|
||||
|
||||
private int m_257995_(CreativeModeTab p_260181_) {
|
||||
int i = 0;
|
||||
@@ -244,7 +239,7 @@
|
||||
i -= 32;
|
||||
} else {
|
||||
i += this.f_97727_;
|
||||
@@ -724,8 +_,8 @@
|
||||
@@ -716,8 +_,8 @@
|
||||
|
||||
protected void m_98581_(PoseStack p_98582_, CreativeModeTab p_98583_) {
|
||||
boolean flag = p_98583_ == f_98507_;
|
||||
@@ -255,15 +250,15 @@
|
||||
int j = i * 26;
|
||||
int k = 0;
|
||||
int l = this.f_97735_ + this.m_258094_(p_98583_);
|
||||
@@ -742,6 +_,7 @@
|
||||
@@ -734,6 +_,7 @@
|
||||
i1 += this.f_97727_ - 4;
|
||||
}
|
||||
|
||||
+ RenderSystem.m_69478_(); //Forge: Make sure blend is enabled else tabs show a white border.
|
||||
this.m_93228_(p_98582_, l, i1, j, k, 26, 32);
|
||||
this.f_96542_.f_115093_ = 100.0F;
|
||||
l += 5;
|
||||
@@ -784,6 +_,14 @@
|
||||
m_93228_(p_98582_, l, i1, j, k, 26, 32);
|
||||
p_98582_.m_85836_();
|
||||
p_98582_.m_252880_(0.0F, 0.0F, 100.0F);
|
||||
@@ -777,6 +_,14 @@
|
||||
|
||||
}
|
||||
|
||||
@@ -278,7 +273,7 @@
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
static class CustomCreativeSlot extends Slot {
|
||||
public CustomCreativeSlot(Container p_98633_, int p_98634_, int p_98635_, int p_98636_) {
|
||||
@@ -947,6 +_,22 @@
|
||||
@@ -944,6 +_,22 @@
|
||||
|
||||
public boolean m_8010_(Player p_98665_) {
|
||||
return this.f_98655_.m_8010_(p_98665_);
|
||||
|
||||
+6
-6
@@ -1,8 +1,8 @@
|
||||
--- a/net/minecraft/client/gui/screens/inventory/EffectRenderingInventoryScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/inventory/EffectRenderingInventoryScreen.java
|
||||
@@ -42,12 +_,17 @@
|
||||
Collection<MobEffectInstance> collection = this.f_96541_.f_91074_.m_21220_();
|
||||
if (!collection.isEmpty() && j >= 32) {
|
||||
RenderSystem.m_157429_(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
boolean flag = j >= 120;
|
||||
+ var event = net.minecraftforge.client.ForgeHooksClient.onScreenPotionSize(this, j, !flag, i);
|
||||
+ if (event.isCanceled()) return;
|
||||
@@ -19,27 +19,27 @@
|
||||
this.m_194002_(p_194015_, i, k, iterable, flag);
|
||||
this.m_194008_(p_194015_, i, k, iterable, flag);
|
||||
if (flag) {
|
||||
@@ -95,6 +_,11 @@
|
||||
@@ -94,6 +_,11 @@
|
||||
int i = this.f_97736_;
|
||||
|
||||
for(MobEffectInstance mobeffectinstance : p_194012_) {
|
||||
+ var renderer = net.minecraftforge.client.extensions.common.IClientMobEffectExtensions.of(mobeffectinstance);
|
||||
+ if (renderer.renderInventoryIcon(mobeffectinstance, this, p_194009_, p_194010_ + (p_194013_ ? 6 : 7), i, this.m_93252_())) {
|
||||
+ if (renderer.renderInventoryIcon(mobeffectinstance, this, p_194009_, p_194010_ + (p_194013_ ? 6 : 7), i, 0)) {
|
||||
+ i += p_194011_;
|
||||
+ continue;
|
||||
+ }
|
||||
MobEffect mobeffect = mobeffectinstance.m_19544_();
|
||||
TextureAtlasSprite textureatlassprite = mobeffecttexturemanager.m_118732_(mobeffect);
|
||||
RenderSystem.m_157456_(0, textureatlassprite.m_247685_());
|
||||
@@ -108,6 +_,11 @@
|
||||
@@ -107,6 +_,11 @@
|
||||
int i = this.f_97736_;
|
||||
|
||||
for(MobEffectInstance mobeffectinstance : p_98726_) {
|
||||
+ var renderer = net.minecraftforge.client.extensions.common.IClientMobEffectExtensions.of(mobeffectinstance);
|
||||
+ if (renderer.renderInventoryText(mobeffectinstance, this, p_98723_, p_98724_, i, this.m_93252_())) {
|
||||
+ if (renderer.renderInventoryText(mobeffectinstance, this, p_98723_, p_98724_, i, 0)) {
|
||||
+ i += p_98725_;
|
||||
+ continue;
|
||||
+ }
|
||||
Component component = this.m_194000_(mobeffectinstance);
|
||||
this.f_96547_.m_92763_(p_98723_, component, (float)(p_98724_ + 10 + 18), (float)(i + 6), 16777215);
|
||||
String s = MobEffectUtil.m_19581_(mobeffectinstance, 1.0F);
|
||||
Component component1 = MobEffectUtil.m_267641_(mobeffectinstance, 1.0F);
|
||||
+5
-5
@@ -1,15 +1,15 @@
|
||||
--- a/net/minecraft/client/gui/screens/inventory/EnchantmentScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/inventory/EnchantmentScreen.java
|
||||
@@ -147,7 +_,7 @@
|
||||
@@ -140,7 +_,7 @@
|
||||
int i2 = 86 - this.f_96547_.m_92895_(s);
|
||||
FormattedText formattedtext = EnchantmentNames.m_98734_().m_98737_(this.f_96547_, i2);
|
||||
int j2 = 6839882;
|
||||
- if ((l < i1 + 1 || this.f_96541_.f_91074_.f_36078_ < l1) && !this.f_96541_.f_91074_.m_150110_().f_35937_) {
|
||||
+ if (((l < i1 + 1 || this.f_96541_.f_91074_.f_36078_ < l1) && !this.f_96541_.f_91074_.m_150110_().f_35937_) || this.f_97732_.f_39447_[i1] == -1) { // Forge: render buttons as disabled when enchantable but enchantability not met on lower levels
|
||||
this.m_93228_(p_98762_, j1, j + 14 + 19 * i1, 0, 185, 108, 19);
|
||||
this.m_93228_(p_98762_, j1 + 1, j + 15 + 19 * i1, 16 * i1, 239, 16, 16);
|
||||
this.f_96547_.m_92857_(formattedtext, k1, j + 16 + 19 * i1, i2, (j2 & 16711422) >> 1);
|
||||
@@ -186,10 +_,13 @@
|
||||
m_93228_(p_98762_, j1, j + 14 + 19 * i1, 0, 185, 108, 19);
|
||||
m_93228_(p_98762_, j1 + 1, j + 15 + 19 * i1, 16 * i1, 239, 16, 16);
|
||||
this.f_96547_.m_274535_(p_98762_, formattedtext, k1, j + 16 + 19 * i1, i2, (j2 & 16711422) >> 1);
|
||||
@@ -179,10 +_,13 @@
|
||||
Enchantment enchantment = Enchantment.m_44697_((this.f_97732_).f_39447_[j]);
|
||||
int l = (this.f_97732_).f_39448_[j];
|
||||
int i1 = j + 1;
|
||||
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/client/gui/screens/inventory/HangingSignEditScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/inventory/HangingSignEditScreen.java
|
||||
@@ -17,7 +_,7 @@
|
||||
private static final Vector3f f_243728_ = new Vector3f(1.0F, 1.0F, 1.0F);
|
||||
private static final int f_244604_ = 16;
|
||||
private static final int f_244207_ = 16;
|
||||
- private final ResourceLocation f_243720_ = new ResourceLocation("textures/gui/hanging_signs/" + this.f_244069_.f_61839_() + ".png");
|
||||
+ private final ResourceLocation f_243720_ = new ResourceLocation(this.f_244069_.f_61839_() + ".png").m_246208_("textures/gui/hanging_signs/");
|
||||
|
||||
public HangingSignEditScreen(SignBlockEntity p_249425_, boolean p_250356_) {
|
||||
super(p_249425_, p_250356_, Component.m_237115_("hanging_sign.edit"));
|
||||
+11
-9
@@ -1,14 +1,16 @@
|
||||
--- a/net/minecraft/client/gui/screens/inventory/InventoryScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/inventory/InventoryScreen.java
|
||||
@@ -99,6 +_,11 @@
|
||||
public static void m_98850_(int p_98851_, int p_98852_, int p_98853_, float p_98854_, float p_98855_, LivingEntity p_98856_) {
|
||||
float f = (float)Math.atan((double)(p_98854_ / 40.0F));
|
||||
float f1 = (float)Math.atan((double)(p_98855_ / 40.0F));
|
||||
+ renderEntityInInventoryRaw(p_98851_, p_98852_, p_98853_, f, f1, p_98856_);
|
||||
@@ -98,6 +_,13 @@
|
||||
public static void m_274545_(PoseStack p_275396_, int p_275688_, int p_275245_, int p_275535_, float p_275604_, float p_275546_, LivingEntity p_275689_) {
|
||||
float f = (float)Math.atan((double)(p_275604_ / 40.0F));
|
||||
float f1 = (float)Math.atan((double)(p_275546_ / 40.0F));
|
||||
+ // Forge: Allow passing in direct angle components instead of mouse position
|
||||
+ renderEntityInInventoryFollowsAngle(p_275396_, p_275688_, p_275245_, p_275535_, f, f1, p_275689_);
|
||||
+ }
|
||||
+ public static void renderEntityInInventoryRaw(int p_98851_, int p_98852_, int p_98853_, float angleXComponent, float angleYComponent, LivingEntity p_98856_) {
|
||||
+
|
||||
+ public static void renderEntityInInventoryFollowsAngle(PoseStack p_275396_, int p_275688_, int p_275245_, int p_275535_, float angleXComponent, float angleYComponent, LivingEntity p_275689_) {
|
||||
+ float f = angleXComponent;
|
||||
+ float f1 = angleYComponent;
|
||||
PoseStack posestack = RenderSystem.m_157191_();
|
||||
posestack.m_85836_();
|
||||
posestack.m_252880_((float)p_98851_, (float)p_98852_, 1050.0F);
|
||||
Quaternionf quaternionf = (new Quaternionf()).rotateZ((float)Math.PI);
|
||||
Quaternionf quaternionf1 = (new Quaternionf()).rotateX(f1 * 20.0F * ((float)Math.PI / 180F));
|
||||
quaternionf.mul(quaternionf1);
|
||||
+8
-8
@@ -1,16 +1,16 @@
|
||||
--- a/net/minecraft/client/gui/screens/inventory/MerchantScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/inventory/MerchantScreen.java
|
||||
@@ -240,7 +_,12 @@
|
||||
this.f_96542_.m_115169_(this.f_96547_, p_99164_, p_99166_, p_99167_);
|
||||
@@ -234,7 +_,12 @@
|
||||
this.f_96542_.m_274412_(p_99163_, this.f_96547_, p_99164_, p_99166_, p_99167_);
|
||||
} else {
|
||||
this.f_96542_.m_115174_(this.f_96547_, p_99165_, p_99166_, p_99167_, p_99165_.m_41613_() == 1 ? "1" : null);
|
||||
- this.f_96542_.m_115174_(this.f_96547_, p_99164_, p_99166_ + 14, p_99167_, p_99164_.m_41613_() == 1 ? "1" : null);
|
||||
this.f_96542_.m_274364_(p_99163_, this.f_96547_, p_99165_, p_99166_, p_99167_, p_99165_.m_41613_() == 1 ? "1" : null);
|
||||
- this.f_96542_.m_274364_(p_99163_, this.f_96547_, p_99164_, p_99166_ + 14, p_99167_, p_99164_.m_41613_() == 1 ? "1" : null);
|
||||
+ // Forge: fixes Forge-8806, code for count rendering taken from ItemRenderer#renderGuiItemDecorations
|
||||
+ PoseStack posestack = new PoseStack();
|
||||
+ posestack.m_85837_(0.0D, 0.0D, (f_96542_.f_115093_ + 200.0F));
|
||||
+ posestack.m_85837_(0.0D, 0.0D, 200F);
|
||||
+ net.minecraft.client.renderer.MultiBufferSource.BufferSource bufferSource = net.minecraft.client.renderer.MultiBufferSource.m_109898_(com.mojang.blaze3d.vertex.Tesselator.m_85913_().m_85915_());
|
||||
+ f_96547_.m_252905_(String.valueOf(p_99164_.m_41613_()), (p_99166_ + 14) + 19 - 2 - f_96547_.m_92895_(String.valueOf(p_99164_.m_41613_())), p_99167_ + 6 + 3, 0xFFFFFF, true, posestack.m_85850_().m_252922_(), bufferSource, false, 0, 15728880);
|
||||
+ f_96547_.m_272078_(String.valueOf(p_99164_.m_41613_()), (float) (p_99166_ + 14) + 19 - 2 - f_96547_.m_92895_(String.valueOf(p_99164_.m_41613_())), (float)p_99167_ + 6 + 3, 0xFFFFFF, true, posestack.m_85850_().m_252922_(), bufferSource, net.minecraft.client.gui.Font.DisplayMode.NORMAL, 0, 15728880, false);
|
||||
+ bufferSource.m_109911_();
|
||||
RenderSystem.m_157427_(GameRenderer::m_172817_);
|
||||
RenderSystem.m_157456_(0, f_99113_);
|
||||
this.m_93250_(this.m_93252_() + 300);
|
||||
p_99163_.m_85836_();
|
||||
p_99163_.m_252880_(0.0F, 0.0F, 300.0F);
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/multiplayer/JoinMultiplayerScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/multiplayer/JoinMultiplayerScreen.java
|
||||
@@ -259,6 +_,11 @@
|
||||
@@ -281,6 +_,11 @@
|
||||
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/multiplayer/ServerSelectionList.java
|
||||
+++ b/net/minecraft/client/gui/screens/multiplayer/ServerSelectionList.java
|
||||
@@ -321,6 +_,8 @@
|
||||
@@ -330,6 +_,8 @@
|
||||
this.f_99855_.m_99707_(list1);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/packs/PackSelectionModel.java
|
||||
+++ b/net/minecraft/client/gui/screens/packs/PackSelectionModel.java
|
||||
@@ -102,6 +_,8 @@
|
||||
@@ -110,6 +_,8 @@
|
||||
boolean m_7802_();
|
||||
|
||||
boolean m_7803_();
|
||||
@@ -9,7 +9,7 @@
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -176,6 +_,11 @@
|
||||
@@ -198,6 +_,11 @@
|
||||
|
||||
public void m_7845_() {
|
||||
this.m_99938_(1);
|
||||
|
||||
+7
-7
@@ -1,11 +1,11 @@
|
||||
--- a/net/minecraft/client/gui/screens/packs/PackSelectionScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/packs/PackSelectionScreen.java
|
||||
@@ -130,7 +_,7 @@
|
||||
private void m_100013_(TransferableSelectionList p_100014_, Stream<PackSelectionModel.Entry> p_100015_) {
|
||||
p_100014_.m_6702_().clear();
|
||||
TransferableSelectionList.PackEntry transferableselectionlist$packentry = p_100014_.m_93511_();
|
||||
String s = transferableselectionlist$packentry == null ? "" : transferableselectionlist$packentry.m_264411_();
|
||||
p_100014_.m_6987_((TransferableSelectionList.PackEntry)null);
|
||||
- p_100015_.forEach((p_170000_) -> {
|
||||
+ p_100015_.filter(PackSelectionModel.Entry::notHidden).forEach((p_170000_) -> {
|
||||
p_100014_.m_6702_().add(new TransferableSelectionList.PackEntry(this.f_96541_, p_100014_, this, p_170000_));
|
||||
});
|
||||
}
|
||||
- p_100015_.forEach((p_264692_) -> {
|
||||
+ p_100015_.filter(PackSelectionModel.Entry::notHidden).forEach((p_264692_) -> {
|
||||
TransferableSelectionList.PackEntry transferableselectionlist$packentry1 = new TransferableSelectionList.PackEntry(this.f_96541_, p_100014_, p_264692_);
|
||||
p_100014_.m_6702_().add(transferableselectionlist$packentry1);
|
||||
if (p_264692_.m_264249_().equals(s)) {
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/recipebook/RecipeBookComponent.java
|
||||
+++ b/net/minecraft/client/gui/screens/recipebook/RecipeBookComponent.java
|
||||
@@ -108,7 +_,7 @@
|
||||
@@ -106,7 +_,7 @@
|
||||
this.m_5674_();
|
||||
this.f_100279_.clear();
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
this.f_100279_.add(new RecipeBookTabButton(recipebookcategories));
|
||||
}
|
||||
|
||||
@@ -305,7 +_,7 @@
|
||||
@@ -297,7 +_,7 @@
|
||||
}
|
||||
|
||||
if (itemstack != null && this.f_100272_.f_91080_ != null) {
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
public void m_100417_(PoseStack p_100418_, int p_100419_, int p_100420_) {
|
||||
if (this.f_100397_.f_91080_ != null && this.f_100395_ != null && !this.f_100396_.m_100212_()) {
|
||||
- this.f_100397_.f_91080_.m_96597_(p_100418_, this.f_100395_.m_100477_(this.f_100397_.f_91080_), p_100419_, p_100420_);
|
||||
+ this.f_100397_.f_91080_.renderComponentTooltip(p_100418_, this.f_100395_.m_100477_(this.f_100397_.f_91080_), p_100419_, p_100420_, this.f_100395_.m_100488_().m_8043_());
|
||||
+ this.f_100397_.f_91080_.renderComponentTooltip(p_100418_, this.f_100395_.m_100477_(this.f_100397_.f_91080_), p_100419_, p_100420_, this.f_100395_.m_100488_().m_8043_(f_100397_.f_91073_.m_9598_()));
|
||||
}
|
||||
|
||||
}
|
||||
+15
-15
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/worldselection/CreateWorldScreen.java
|
||||
+++ b/net/minecraft/client/gui/screens/worldselection/CreateWorldScreen.java
|
||||
@@ -113,7 +_,8 @@
|
||||
@@ -119,7 +_,8 @@
|
||||
public static void m_232896_(Minecraft p_232897_, @Nullable Screen p_232898_) {
|
||||
m_232899_(p_232897_, f_232866_);
|
||||
PackRepository packrepository = new PackRepository(new ServerPacksSource());
|
||||
@@ -10,28 +10,28 @@
|
||||
CompletableFuture<WorldCreationContext> completablefuture = WorldLoader.m_214362_(worldloader$initconfig, (p_247792_) -> {
|
||||
return new WorldLoader.DataLoadOutput<>(new CreateWorldScreen.DataPackReloadCookie(new WorldGenSettings(WorldOptions.m_247394_(), WorldPresets.m_246552_(p_247792_.f_244104_())), p_247792_.f_244127_()), p_247792_.f_243759_());
|
||||
}, (p_247798_, p_247799_, p_247800_, p_247801_) -> {
|
||||
@@ -121,7 +_,10 @@
|
||||
@@ -127,7 +_,10 @@
|
||||
return new WorldCreationContext(p_247801_.f_243966_(), p_247800_, p_247799_, p_247801_.f_243979_());
|
||||
}, Util.m_183991_(), p_232897_);
|
||||
p_232897_.m_18701_(completablefuture::isDone);
|
||||
- p_232897_.m_91152_(new CreateWorldScreen(p_232898_, WorldDataConfiguration.f_244649_, new WorldGenSettingsComponent(completablefuture.join(), Optional.of(WorldPresets.f_226437_), OptionalLong.empty())));
|
||||
- p_232897_.m_91152_(new CreateWorldScreen(p_232897_, p_232898_, completablefuture.join(), Optional.of(WorldPresets.f_226437_), OptionalLong.empty()));
|
||||
+ // FORGE: Force load mods' datapacks after setting screen and ensure datapack selection reverts to vanilla if invalid.
|
||||
+ CreateWorldScreen createWorldScreen = new CreateWorldScreen(p_232898_, new WorldDataConfiguration(new DataPackConfig(ImmutableList.of("vanilla"), ImmutableList.of()), FeatureFlags.f_244332_), new WorldGenSettingsComponent(completablefuture.join(), Optional.of(WorldPresets.f_226437_), OptionalLong.empty()));
|
||||
+ CreateWorldScreen createWorldScreen = new CreateWorldScreen(p_232897_, p_232898_, completablefuture.join().withDataConfiguration(new WorldDataConfiguration(new DataPackConfig(ImmutableList.of("vanilla"), ImmutableList.of()), FeatureFlags.f_244332_)), Optional.of(WorldPresets.f_226437_), OptionalLong.empty());
|
||||
+ p_232897_.m_91152_(createWorldScreen);
|
||||
+ createWorldScreen.m_100878_(packrepository);
|
||||
+ createWorldScreen.m_269443_(packrepository, true, createWorldScreen::m_267734_);
|
||||
}
|
||||
|
||||
public static CreateWorldScreen m_247077_(@Nullable Screen p_249522_, LevelSettings p_249091_, WorldCreationContext p_249742_, @Nullable Path p_252076_) {
|
||||
@@ -491,7 +_,7 @@
|
||||
if (p_232949_) {
|
||||
this.m_100975_();
|
||||
} else {
|
||||
- this.f_244371_ = WorldDataConfiguration.f_244649_;
|
||||
+ this.f_244371_ = new WorldDataConfiguration(new DataPackConfig(ImmutableList.of("vanilla"), ImmutableList.of()), FeatureFlags.f_244332_); // FORGE: Revert to *actual* vanilla data
|
||||
this.f_96541_.m_91152_(this);
|
||||
}
|
||||
public static CreateWorldScreen m_275847_(Minecraft p_276017_, @Nullable Screen p_276029_, LevelSettings p_276055_, WorldCreationContext p_276028_, @Nullable Path p_276040_) {
|
||||
@@ -368,7 +_,7 @@
|
||||
if (p_269627_) {
|
||||
p_270552_.accept(this.f_267389_.m_267573_().f_243842_());
|
||||
} else {
|
||||
- p_270552_.accept(WorldDataConfiguration.f_244649_);
|
||||
+ p_270552_.accept(new WorldDataConfiguration(new DataPackConfig(ImmutableList.of("vanilla"), ImmutableList.of()), FeatureFlags.f_244332_)); // FORGE: Revert to *actual* vanilla data
|
||||
}
|
||||
|
||||
@@ -612,6 +_,7 @@
|
||||
}, Component.m_237115_("dataPack.validation.failed"), CommonComponents.f_237098_, Component.m_237115_("dataPack.validation.back"), Component.m_237115_("dataPack.validation.reset")));
|
||||
@@ -482,6 +_,7 @@
|
||||
if (path != null) {
|
||||
if (this.f_100832_ == null) {
|
||||
this.f_100832_ = ServerPacksSource.m_245786_(path);
|
||||
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
--- a/net/minecraft/client/gui/screens/worldselection/WorldCreationContext.java
|
||||
+++ b/net/minecraft/client/gui/screens/worldselection/WorldCreationContext.java
|
||||
@@ -38,6 +_,10 @@
|
||||
return new WorldCreationContext(this.f_244272_, this.f_244375_, p_250676_.apply(this.m_246480_(), this.f_243796_), this.f_243708_, this.f_232990_, this.f_243842_);
|
||||
}
|
||||
|
||||
+ public WorldCreationContext withDataConfiguration(WorldDataConfiguration dataConfiguration) {
|
||||
+ return new WorldCreationContext(this.f_244272_, this.f_244375_, this.f_243796_, this.f_243708_, this.f_232990_, dataConfiguration);
|
||||
+ }
|
||||
+
|
||||
public RegistryAccess.Frozen m_246480_() {
|
||||
return this.f_243708_.m_247579_();
|
||||
}
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/worldselection/WorldOpenFlows.java
|
||||
+++ b/net/minecraft/client/gui/screens/worldselection/WorldOpenFlows.java
|
||||
@@ -158,13 +_,23 @@
|
||||
@@ -159,13 +_,23 @@
|
||||
}
|
||||
|
||||
private void m_233145_(Screen p_233146_, String p_233147_, boolean p_233148_, boolean p_233149_) {
|
||||
@@ -23,8 +23,8 @@
|
||||
+ }
|
||||
} catch (Exception exception) {
|
||||
f_233088_.warn("Failed to load level data or datapacks, can't proceed with server load", (Throwable)exception);
|
||||
this.f_233089_.m_91152_(new DatapackLoadFailureScreen(() -> {
|
||||
@@ -177,7 +_,9 @@
|
||||
if (!p_233148_) {
|
||||
@@ -185,7 +_,9 @@
|
||||
WorldData worlddata = worldstem.f_206895_();
|
||||
boolean flag = worlddata.m_246337_().m_247070_();
|
||||
boolean flag1 = worlddata.m_5754_() != Lifecycle.stable();
|
||||
@@ -35,7 +35,7 @@
|
||||
this.f_233089_.m_247489_().m_247400_(levelstoragesource$levelstorageaccess).thenApply((p_233177_) -> {
|
||||
return true;
|
||||
}).exceptionallyComposeAsync((p_233183_) -> {
|
||||
@@ -199,9 +_,11 @@
|
||||
@@ -207,9 +_,11 @@
|
||||
return null;
|
||||
});
|
||||
} else {
|
||||
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/gui/screens/worldselection/WorldSelectionList.java
|
||||
+++ b/net/minecraft/client/gui/screens/worldselection/WorldSelectionList.java
|
||||
@@ -65,6 +_,7 @@
|
||||
@@ -63,6 +_,7 @@
|
||||
static final DateFormat f_101646_ = new SimpleDateFormat();
|
||||
static final ResourceLocation f_101647_ = new ResourceLocation("textures/misc/unknown_server.png");
|
||||
static final ResourceLocation f_101648_ = new ResourceLocation("textures/gui/world_selection.png");
|
||||
@@ -8,7 +8,7 @@
|
||||
static final Component f_101649_ = Component.m_237115_("selectWorld.tooltip.fromNewerVersion1").m_130940_(ChatFormatting.RED);
|
||||
static final Component f_101650_ = Component.m_237115_("selectWorld.tooltip.fromNewerVersion2").m_130940_(ChatFormatting.RED);
|
||||
static final Component f_101651_ = Component.m_237115_("selectWorld.tooltip.snapshot1").m_130940_(ChatFormatting.GOLD);
|
||||
@@ -325,6 +_,7 @@
|
||||
@@ -313,6 +_,7 @@
|
||||
RenderSystem.m_69478_();
|
||||
GuiComponent.m_93133_(p_101721_, p_101724_, p_101723_, 0.0F, 0.0F, 32, 32, 32, 32);
|
||||
RenderSystem.m_69461_();
|
||||
@@ -16,7 +16,7 @@
|
||||
if (this.f_101693_.f_91066_.m_231828_().m_231551_() || p_101729_) {
|
||||
RenderSystem.m_157456_(0, WorldSelectionList.f_101648_);
|
||||
GuiComponent.m_93172_(p_101721_, p_101724_, p_101723_, p_101724_ + 32, p_101723_ + 32, -1601138544);
|
||||
@@ -560,6 +_,21 @@
|
||||
@@ -545,6 +_,21 @@
|
||||
|
||||
public boolean m_214209_() {
|
||||
return !this.f_101695_.m_164916_();
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
--- a/net/minecraft/client/main/Main.java
|
||||
+++ b/net/minecraft/client/main/Main.java
|
||||
@@ -48,7 +_,7 @@
|
||||
|
||||
@DontObfuscate
|
||||
public static void main(String[] p_129642_) {
|
||||
- m_239872_(p_129642_, true);
|
||||
+ m_239872_(p_129642_, !net.minecraftforge.fml.loading.FMLConfig.isOptimizedDFUDisabled());
|
||||
}
|
||||
|
||||
public static void m_239872_(String[] p_239873_, boolean p_239874_) {
|
||||
@@ -142,7 +_,7 @@
|
||||
@@ -135,7 +_,7 @@
|
||||
}
|
||||
|
||||
CrashReport.m_127529_();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/model/HumanoidModel.java
|
||||
+++ b/net/minecraft/client/model/HumanoidModel.java
|
||||
@@ -264,6 +_,8 @@
|
||||
@@ -270,6 +_,8 @@
|
||||
case TOOT_HORN:
|
||||
this.f_102811_.f_104203_ = Mth.m_14036_(this.f_102808_.f_104203_, -1.2F, 1.2F) - 1.4835298F;
|
||||
this.f_102811_.f_104204_ = this.f_102808_.f_104204_ - ((float)Math.PI / 6F);
|
||||
@@ -9,7 +9,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -304,6 +_,8 @@
|
||||
@@ -314,6 +_,8 @@
|
||||
case TOOT_HORN:
|
||||
this.f_102812_.f_104203_ = Mth.m_14036_(this.f_102808_.f_104203_, -1.2F, 1.2F) - 1.4835298F;
|
||||
this.f_102812_.f_104204_ = this.f_102808_.f_104204_ + ((float)Math.PI / 6F);
|
||||
@@ -18,7 +18,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -396,7 +_,7 @@
|
||||
@@ -406,7 +_,7 @@
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@@ -27,7 +27,7 @@
|
||||
EMPTY(false),
|
||||
ITEM(false),
|
||||
BLOCK(false),
|
||||
@@ -411,10 +_,29 @@
|
||||
@@ -422,10 +_,29 @@
|
||||
|
||||
private ArmPose(boolean p_102896_) {
|
||||
this.f_102890_ = p_102896_;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/model/geom/LayerDefinitions.java
|
||||
+++ b/net/minecraft/client/model/geom/LayerDefinitions.java
|
||||
@@ -313,6 +_,7 @@
|
||||
@@ -319,6 +_,7 @@
|
||||
WoodType.m_61843_().forEach((p_247864_) -> {
|
||||
builder.put(ModelLayers.m_247439_(p_247864_), layerdefinition24);
|
||||
});
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
--- a/net/minecraft/client/model/geom/ModelLayers.java
|
||||
+++ b/net/minecraft/client/model/geom/ModelLayers.java
|
||||
@@ -217,11 +_,13 @@
|
||||
@@ -220,11 +_,13 @@
|
||||
}
|
||||
|
||||
public static ModelLayerLocation m_171291_(WoodType p_171292_) {
|
||||
- return m_171300_("sign/" + p_171292_.m_61846_(), "main");
|
||||
+ ResourceLocation location = new ResourceLocation(p_171292_.m_61846_());
|
||||
- return m_171300_("sign/" + p_171292_.f_61839_(), "main");
|
||||
+ ResourceLocation location = new ResourceLocation(p_171292_.f_61839_());
|
||||
+ return new ModelLayerLocation(new ResourceLocation(location.m_135827_(), "sign/" + location.m_135815_()), "main");
|
||||
}
|
||||
|
||||
public static ModelLayerLocation m_247439_(WoodType p_252225_) {
|
||||
- return m_171300_("hanging_sign/" + p_252225_.m_61846_(), "main");
|
||||
+ ResourceLocation location = new ResourceLocation(p_252225_.m_61846_());
|
||||
- return m_171300_("hanging_sign/" + p_252225_.f_61839_(), "main");
|
||||
+ ResourceLocation location = new ResourceLocation(p_252225_.f_61839_());
|
||||
+ return new ModelLayerLocation(new ResourceLocation(location.m_135827_(), "hanging_sign/" + location.m_135815_()), "main");
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
this.f_104410_.m_104487_(i, levelchunk, (LevelChunk)null);
|
||||
}
|
||||
|
||||
@@ -100,6 +_,7 @@
|
||||
@@ -115,6 +_,7 @@
|
||||
}
|
||||
|
||||
this.f_104411_.m_171649_(chunkpos);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/multiplayer/ClientLevel.java
|
||||
+++ b/net/minecraft/client/multiplayer/ClientLevel.java
|
||||
@@ -117,12 +_,15 @@
|
||||
@@ -116,12 +_,15 @@
|
||||
p_194170_.put(BiomeColors.f_108791_, new BlockTintCache((p_194168_) -> {
|
||||
return this.m_104762_(p_194168_, BiomeColors.f_108791_);
|
||||
}));
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
public void m_233651_(int p_233652_) {
|
||||
this.f_233599_.m_233856_(p_233652_, this);
|
||||
@@ -176,6 +_,8 @@
|
||||
@@ -175,6 +_,8 @@
|
||||
this.f_194123_ = p_205510_;
|
||||
this.m_46465_();
|
||||
this.m_46466_();
|
||||
@@ -25,7 +25,7 @@
|
||||
}
|
||||
|
||||
public void m_194171_(Runnable p_194172_) {
|
||||
@@ -262,6 +_,7 @@
|
||||
@@ -261,6 +_,7 @@
|
||||
this.m_46473_().m_6521_(() -> {
|
||||
return BuiltInRegistries.f_256780_.m_7981_(p_104640_.m_6095_()).toString();
|
||||
});
|
||||
@@ -33,7 +33,7 @@
|
||||
p_104640_.m_8119_();
|
||||
this.m_46473_().m_7238_();
|
||||
|
||||
@@ -324,8 +_,10 @@
|
||||
@@ -323,8 +_,10 @@
|
||||
}
|
||||
|
||||
private void m_104739_(int p_104740_, Entity p_104741_) {
|
||||
@@ -44,7 +44,7 @@
|
||||
}
|
||||
|
||||
public void m_171642_(int p_171643_, Entity.RemovalReason p_171644_) {
|
||||
@@ -452,6 +_,12 @@
|
||||
@@ -451,6 +_,12 @@
|
||||
}
|
||||
|
||||
public void m_262808_(@Nullable Player p_263381_, double p_263372_, double p_263404_, double p_263365_, Holder<SoundEvent> p_263335_, SoundSource p_263417_, float p_263416_, float p_263349_, long p_263408_) {
|
||||
@@ -57,7 +57,7 @@
|
||||
if (p_263381_ == this.f_104565_.f_91074_) {
|
||||
this.m_233602_(p_263372_, p_263404_, p_263365_, p_263335_.m_203334_(), p_263417_, p_263416_, p_263349_, false, p_263408_);
|
||||
}
|
||||
@@ -459,6 +_,12 @@
|
||||
@@ -458,6 +_,12 @@
|
||||
}
|
||||
|
||||
public void m_213890_(@Nullable Player p_263514_, Entity p_263536_, Holder<SoundEvent> p_263518_, SoundSource p_263487_, float p_263538_, float p_263524_, long p_263509_) {
|
||||
@@ -70,7 +70,7 @@
|
||||
if (p_263514_ == this.f_104565_.f_91074_) {
|
||||
this.f_104565_.m_91106_().m_120367_(new EntityBoundSoundInstance(p_263518_.m_203334_(), p_263487_, p_263538_, p_263524_, p_263536_, p_263509_));
|
||||
}
|
||||
@@ -907,6 +_,7 @@
|
||||
@@ -902,6 +_,7 @@
|
||||
}
|
||||
|
||||
public void m_104851_(Difficulty p_104852_) {
|
||||
@@ -78,7 +78,7 @@
|
||||
this.f_104840_ = p_104852_;
|
||||
}
|
||||
|
||||
@@ -944,14 +_,46 @@
|
||||
@@ -939,14 +_,46 @@
|
||||
ClientLevel.this.f_104566_.add((AbstractClientPlayer)p_171712_);
|
||||
}
|
||||
|
||||
|
||||
+15
-15
@@ -1,33 +1,33 @@
|
||||
--- a/net/minecraft/client/multiplayer/ClientPacketListener.java
|
||||
+++ b/net/minecraft/client/multiplayer/ClientPacketListener.java
|
||||
@@ -398,6 +_,7 @@
|
||||
@@ -411,6 +_,7 @@
|
||||
|
||||
this.f_104888_.f_91064_.m_113434_();
|
||||
this.f_104888_.f_91074_.m_172530_();
|
||||
+ net.minecraftforge.client.ForgeHooksClient.firePlayerLogin(this.f_104888_.f_91072_, this.f_104888_.f_91074_, this.f_104888_.m_91403_().m_6198_());
|
||||
+ net.minecraftforge.client.ForgeHooksClient.firePlayerLogin(this.f_104888_.f_91072_, this.f_104888_.f_91074_, this.f_104888_.m_91403_().f_104885_);
|
||||
int i = p_105030_.f_132360_();
|
||||
this.f_104888_.f_91074_.m_20234_(i);
|
||||
this.f_104889_.m_104630_(i, this.f_104888_.f_91074_);
|
||||
@@ -410,6 +_,7 @@
|
||||
@@ -423,6 +_,7 @@
|
||||
this.f_104888_.f_91074_.m_219749_(p_105030_.f_238174_());
|
||||
this.f_104888_.f_91072_.m_171805_(p_105030_.f_132363_(), p_105030_.f_132364_());
|
||||
this.f_104888_.f_91066_.m_193770_(p_105030_.f_132370_());
|
||||
+ net.minecraftforge.network.NetworkHooks.sendMCRegistryPackets(f_104885_, "PLAY_TO_SERVER");
|
||||
this.f_104888_.f_91066_.m_92172_();
|
||||
this.f_104885_.m_129512_(new ServerboundCustomPayloadPacket(ServerboundCustomPayloadPacket.f_133979_, (new FriendlyByteBuf(Unpooled.buffer())).m_130070_(ClientBrandRetriever.m_129629_())));
|
||||
this.f_244346_ = new LastSeenMessagesTracker(20);
|
||||
@@ -1003,8 +_,10 @@
|
||||
this.f_252517_ = null;
|
||||
@@ -1055,8 +_,10 @@
|
||||
localplayer1.m_21204_().m_22159_(localplayer.m_21204_());
|
||||
}
|
||||
|
||||
+ localplayer1.updateSyncFields(localplayer); // Forge: fix MC-10657
|
||||
localplayer1.m_172530_();
|
||||
localplayer1.m_108748_(s);
|
||||
+ net.minecraftforge.client.ForgeHooksClient.firePlayerRespawn(this.f_104888_.f_91072_, localplayer, localplayer1, localplayer1.f_108617_.m_6198_());
|
||||
+ net.minecraftforge.client.ForgeHooksClient.firePlayerRespawn(this.f_104888_.f_91072_, localplayer, localplayer1, localplayer1.f_108617_.f_104885_);
|
||||
this.f_104889_.m_104630_(i, localplayer1);
|
||||
localplayer1.m_146922_(-180.0F);
|
||||
localplayer1.f_108618_ = new KeyboardInput(this.f_104888_.f_91066_);
|
||||
@@ -1109,10 +_,7 @@
|
||||
@@ -1161,10 +_,7 @@
|
||||
PacketUtils.m_131363_(p_104976_, this, this.f_104888_);
|
||||
BlockPos blockpos = p_104976_.m_131704_();
|
||||
this.f_104888_.f_91073_.m_141902_(blockpos, p_104976_.m_195645_()).ifPresent((p_205557_) -> {
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
if (p_205557_ instanceof CommandBlockEntity && this.f_104888_.f_91080_ instanceof CommandBlockEditScreen) {
|
||||
((CommandBlockEditScreen)this.f_104888_.f_91080_).m_98398_();
|
||||
@@ -1257,7 +_,9 @@
|
||||
@@ -1310,7 +_,9 @@
|
||||
|
||||
public void m_7443_(ClientboundCommandsPacket p_104990_) {
|
||||
PacketUtils.m_131363_(p_104990_, this, this.f_104888_);
|
||||
@@ -50,15 +50,15 @@
|
||||
}
|
||||
|
||||
public void m_7183_(ClientboundStopSoundPacket p_105116_) {
|
||||
@@ -1276,6 +_,7 @@
|
||||
@@ -1329,6 +_,7 @@
|
||||
ClientRecipeBook clientrecipebook = this.f_104888_.f_91074_.m_108631_();
|
||||
clientrecipebook.m_90625_(this.f_104900_.m_44051_());
|
||||
clientrecipebook.m_266394_(this.f_104900_.m_44051_(), this.f_104888_.f_91073_.m_9598_());
|
||||
this.f_104888_.m_231374_(SearchRegistry.f_119943_, clientrecipebook.m_90639_());
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onRecipesUpdated(this.f_104900_);
|
||||
}
|
||||
|
||||
public void m_7244_(ClientboundPlayerLookAtPacket p_105054_) {
|
||||
@@ -1368,7 +_,8 @@
|
||||
@@ -1424,7 +_,8 @@
|
||||
Blocks.m_50758_();
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
}
|
||||
|
||||
public void m_241155_(ClientboundUpdateEnabledFeaturesPacket p_251591_) {
|
||||
@@ -1753,6 +_,7 @@
|
||||
@@ -1826,6 +_,7 @@
|
||||
}
|
||||
|
||||
public void m_7413_(ClientboundCustomPayloadPacket p_105004_) {
|
||||
@@ -76,7 +76,7 @@
|
||||
PacketUtils.m_131363_(p_105004_, this, this.f_104888_);
|
||||
ResourceLocation resourcelocation = p_105004_.m_132042_();
|
||||
FriendlyByteBuf friendlybytebuf = null;
|
||||
@@ -1950,7 +_,7 @@
|
||||
@@ -2023,7 +_,7 @@
|
||||
int j5 = friendlybytebuf.m_130242_();
|
||||
this.f_104888_.f_91064_.f_173815_.m_173830_(positionsource, j5);
|
||||
} else {
|
||||
@@ -85,7 +85,7 @@
|
||||
}
|
||||
} finally {
|
||||
if (friendlybytebuf != null) {
|
||||
@@ -2284,6 +_,8 @@
|
||||
@@ -2370,6 +_,8 @@
|
||||
}
|
||||
|
||||
public void m_246175_(String p_249888_) {
|
||||
@@ -94,7 +94,7 @@
|
||||
Instant instant = Instant.now();
|
||||
long i = Crypt.SaltSupplier.m_216113_();
|
||||
LastSeenMessagesTracker.Update lastseenmessagestracker$update = this.f_244346_.m_246442_();
|
||||
@@ -2292,6 +_,7 @@
|
||||
@@ -2378,6 +_,7 @@
|
||||
}
|
||||
|
||||
public void m_246623_(String p_250092_) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
--- a/net/minecraft/client/multiplayer/ServerData.java
|
||||
+++ b/net/minecraft/client/multiplayer/ServerData.java
|
||||
@@ -26,6 +_,7 @@
|
||||
private String f_105372_;
|
||||
@@ -32,6 +_,7 @@
|
||||
private byte[] f_271511_;
|
||||
private boolean f_105373_;
|
||||
private boolean f_242950_;
|
||||
+ public net.minecraftforge.client.ExtendedServerListData forgeData = null;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
--- a/net/minecraft/client/multiplayer/ServerStatusPinger.java
|
||||
+++ b/net/minecraft/client/multiplayer/ServerStatusPinger.java
|
||||
@@ -124,6 +_,7 @@
|
||||
p_105461_.run();
|
||||
}
|
||||
@@ -116,6 +_,7 @@
|
||||
}
|
||||
|
||||
});
|
||||
+ net.minecraftforge.client.ForgeHooksClient.processForgeListPingData(serverstatus, p_105460_);
|
||||
this.f_105477_ = Util.m_137550_();
|
||||
connection.m_129512_(new ServerboundPingRequestPacket(this.f_105477_));
|
||||
|
||||
@@ -30,3 +30,12 @@
|
||||
this.m_241119_(p_251766_, component);
|
||||
}
|
||||
}
|
||||
@@ -159,6 +_,8 @@
|
||||
|
||||
public void m_240494_(Component p_240522_, boolean p_240642_) {
|
||||
if (!this.f_240348_.f_91066_.m_231833_().m_231551_() || !this.f_240348_.m_91246_(this.m_240473_(p_240522_))) {
|
||||
+ p_240522_ = net.minecraftforge.client.ForgeHooksClient.onClientSystemChat(p_240522_, p_240642_);
|
||||
+ if (p_240522_ == null) return;
|
||||
if (p_240642_) {
|
||||
this.f_240348_.f_91065_.m_93063_(p_240522_, false);
|
||||
} else {
|
||||
@@ -14,7 +14,7 @@
|
||||
private final Queue<Particle> f_107294_ = Queues.newArrayDeque();
|
||||
private final Map<ResourceLocation, ParticleEngine.MutableSpriteSet> f_107295_ = Maps.newHashMap();
|
||||
private final TextureAtlas f_107296_;
|
||||
@@ -188,14 +_,18 @@
|
||||
@@ -191,10 +_,14 @@
|
||||
this.m_107378_(ParticleTypes.f_235901_, ShriekParticle.Provider::new);
|
||||
}
|
||||
|
||||
@@ -25,6 +25,15 @@
|
||||
+ this.f_107293_.put(BuiltInRegistries.f_257034_.m_7981_(p_107382_), p_107383_);
|
||||
}
|
||||
|
||||
+ /** @deprecated Register via {@link net.minecraftforge.client.event.RegisterParticleProvidersEvent} */
|
||||
+ @Deprecated
|
||||
public <T extends ParticleOptions> void m_272137_(ParticleType<T> p_273423_, ParticleProvider.Sprite<T> p_273134_) {
|
||||
this.m_107378_(p_273423_, (p_272320_) -> {
|
||||
return (p_272323_, p_272324_, p_272325_, p_272326_, p_272327_, p_272328_, p_272329_, p_272330_) -> {
|
||||
@@ -208,10 +_,12 @@
|
||||
});
|
||||
}
|
||||
|
||||
+ /** @deprecated Register via {@link net.minecraftforge.client.event.RegisterParticleProvidersEvent} */
|
||||
+ @Deprecated
|
||||
public <T extends ParticleOptions> void m_107378_(ParticleType<T> p_107379_, ParticleEngine.SpriteParticleRegistration<T> p_107380_) {
|
||||
@@ -35,7 +44,7 @@
|
||||
}
|
||||
|
||||
public CompletableFuture<Void> m_5540_(PreparableReloadListener.PreparationBarrier p_107305_, ResourceManager p_107306_, ProfilerFiller p_107307_, ProfilerFiller p_107308_, Executor p_107309_, Executor p_107310_) {
|
||||
@@ -313,7 +_,7 @@
|
||||
@@ -310,7 +_,7 @@
|
||||
|
||||
@Nullable
|
||||
private <T extends ParticleOptions> Particle m_107395_(T p_107396_, double p_107397_, double p_107398_, double p_107399_, double p_107400_, double p_107401_, double p_107402_) {
|
||||
@@ -44,7 +53,7 @@
|
||||
return particleprovider == null ? null : particleprovider.m_6966_(p_107396_, this.f_107287_, p_107397_, p_107398_, p_107399_, p_107400_, p_107401_, p_107402_);
|
||||
}
|
||||
|
||||
@@ -394,15 +_,25 @@
|
||||
@@ -391,15 +_,24 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +67,6 @@
|
||||
p_107339_.m_109896_();
|
||||
RenderSystem.m_69482_();
|
||||
+ RenderSystem.m_69388_(org.lwjgl.opengl.GL13.GL_TEXTURE2);
|
||||
+ RenderSystem.m_69493_();
|
||||
+ RenderSystem.m_69388_(org.lwjgl.opengl.GL13.GL_TEXTURE0);
|
||||
PoseStack posestack = RenderSystem.m_157191_();
|
||||
posestack.m_85836_();
|
||||
@@ -71,7 +79,7 @@
|
||||
Iterable<Particle> iterable = this.f_107289_.get(particlerendertype);
|
||||
if (iterable != null) {
|
||||
RenderSystem.m_157427_(GameRenderer::m_172829_);
|
||||
@@ -412,6 +_,7 @@
|
||||
@@ -408,6 +_,7 @@
|
||||
particlerendertype.m_6505_(bufferbuilder, this.f_107291_);
|
||||
|
||||
for(Particle particle : iterable) {
|
||||
@@ -79,7 +87,7 @@
|
||||
try {
|
||||
particle.m_5744_(bufferbuilder, p_107340_, p_107341_);
|
||||
} catch (Throwable throwable) {
|
||||
@@ -441,7 +_,7 @@
|
||||
@@ -437,7 +_,7 @@
|
||||
}
|
||||
|
||||
public void m_107355_(BlockPos p_107356_, BlockState p_107357_) {
|
||||
@@ -88,7 +96,7 @@
|
||||
VoxelShape voxelshape = p_107357_.m_60808_(this.f_107287_, p_107356_);
|
||||
double d0 = 0.25D;
|
||||
voxelshape.m_83286_((p_172273_, p_172274_, p_172275_, p_172276_, p_172277_, p_172278_) -> {
|
||||
@@ -461,7 +_,7 @@
|
||||
@@ -457,7 +_,7 @@
|
||||
double d7 = d4 * d1 + p_172273_;
|
||||
double d8 = d5 * d2 + p_172274_;
|
||||
double d9 = d6 * d3 + p_172275_;
|
||||
@@ -97,7 +105,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -505,12 +_,18 @@
|
||||
@@ -501,12 +_,18 @@
|
||||
d0 = (double)i + aabb.f_82291_ + (double)0.1F;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/player/AbstractClientPlayer.java
|
||||
+++ b/net/minecraft/client/player/AbstractClientPlayer.java
|
||||
@@ -136,6 +_,6 @@
|
||||
@@ -147,6 +_,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/player/LocalPlayer.java
|
||||
+++ b/net/minecraft/client/player/LocalPlayer.java
|
||||
@@ -150,6 +_,7 @@
|
||||
@@ -149,6 +_,7 @@
|
||||
}
|
||||
|
||||
public boolean m_6469_(DamageSource p_108662_, float p_108663_) {
|
||||
@@ -8,7 +8,15 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -462,7 +_,14 @@
|
||||
@@ -275,6 +_,7 @@
|
||||
|
||||
public boolean m_108700_(boolean p_108701_) {
|
||||
ServerboundPlayerActionPacket.Action serverboundplayeractionpacket$action = p_108701_ ? ServerboundPlayerActionPacket.Action.DROP_ALL_ITEMS : ServerboundPlayerActionPacket.Action.DROP_ITEM;
|
||||
+ if (m_6117_() && m_7655_() == InteractionHand.MAIN_HAND && (p_108701_ || m_21211_().m_41613_() == 1)) m_5810_(); // Forge: fix MC-231097 on the clientside
|
||||
ItemStack itemstack = this.m_150109_().m_182403_(p_108701_);
|
||||
this.f_108617_.m_104955_(new ServerboundPlayerActionPacket(serverboundplayeractionpacket$action, BlockPos.f_121853_, Direction.DOWN));
|
||||
return !itemstack.m_41619_();
|
||||
@@ -456,7 +_,14 @@
|
||||
}
|
||||
|
||||
public void m_5496_(SoundEvent p_108651_, float p_108652_, float p_108653_) {
|
||||
@@ -24,7 +32,7 @@
|
||||
}
|
||||
|
||||
public void m_6330_(SoundEvent p_108655_, SoundSource p_108656_, float p_108657_, float p_108658_) {
|
||||
@@ -634,6 +_,7 @@
|
||||
@@ -627,6 +_,7 @@
|
||||
this.f_108601_ = !this.m_150110_().f_35935_ && !this.m_6069_() && this.m_20175_(Pose.CROUCHING) && (this.m_6144_() || !this.m_5803_() && !this.m_20175_(Pose.STANDING));
|
||||
float f = Mth.m_14036_(0.3F + EnchantmentHelper.m_220302_(this), 0.0F, 1.0F);
|
||||
this.f_108618_.m_214106_(this.m_108635_(), f);
|
||||
@@ -32,37 +40,37 @@
|
||||
this.f_108619_.m_91301_().m_120586_(this.f_108618_);
|
||||
if (this.m_6117_() && !this.m_20159_()) {
|
||||
this.f_108618_.f_108566_ *= 0.2F;
|
||||
@@ -660,7 +_,7 @@
|
||||
}
|
||||
|
||||
boolean flag4 = this.m_255269_();
|
||||
- if ((this.f_19861_ || this.m_5842_() || this.m_20159_() && this.m_20202_().m_20096_()) && !flag1 && !flag2 && this.m_108733_() && !this.m_20142_() && flag4 && !this.m_6117_() && !this.m_21023_(MobEffects.f_19610_)) {
|
||||
+ if ((this.f_19861_ || this.m_5842_() || this.m_20159_() && this.m_20202_().m_20096_() || this.canStartSwimming()) && !flag1 && !flag2 && this.m_108733_() && !this.m_20142_() && flag4 && !this.m_6117_() && !this.m_21023_(MobEffects.f_19610_)) {
|
||||
@@ -655,7 +_,7 @@
|
||||
boolean flag4 = this.m_264082_();
|
||||
boolean flag5 = this.m_20159_() ? this.m_20202_().m_20096_() : this.f_19861_;
|
||||
boolean flag6 = !flag1 && !flag2;
|
||||
- if ((flag5 || this.m_5842_()) && flag6 && flag4) {
|
||||
+ if ((flag5 || this.m_5842_() || this.canStartSwimming()) && flag6 && flag4) {
|
||||
if (this.f_108583_ <= 0 && !this.f_108619_.f_91066_.f_92091_.m_90857_()) {
|
||||
this.f_108583_ = 7;
|
||||
} else {
|
||||
@@ -668,15 +_,15 @@
|
||||
@@ -663,15 +_,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (!this.m_20142_() && (!this.m_20069_() || this.m_5842_()) && this.m_108733_() && flag4 && !this.m_6117_() && !this.m_21023_(MobEffects.f_19610_) && this.f_108619_.f_91066_.f_92091_.m_90857_()) {
|
||||
- if ((!this.m_20069_() || this.m_5842_()) && flag4 && this.f_108619_.f_91066_.f_92091_.m_90857_()) {
|
||||
+ if (!this.m_20142_() && (!(this.m_20069_() || this.isInFluidType((fluidType, height) -> this.canSwimInFluidType(fluidType))) || (this.m_5842_() || this.canStartSwimming())) && this.m_108733_() && flag4 && !this.m_6117_() && !this.m_21023_(MobEffects.f_19610_) && this.f_108619_.f_91066_.f_92091_.m_90857_()) {
|
||||
this.m_6858_(true);
|
||||
}
|
||||
|
||||
if (this.m_20142_()) {
|
||||
boolean flag5 = !this.f_108618_.m_108577_() || !flag4;
|
||||
- boolean flag6 = flag5 || this.f_19862_ && !this.f_185931_ || this.m_20069_() && !this.m_5842_();
|
||||
+ boolean flag6 = flag5 || this.f_19862_ && !this.f_185931_ || (this.m_20069_() && !this.m_5842_()) || (this.isInFluidType((fluidType, height) -> this.canSwimInFluidType(fluidType)) && !this.canStartSwimming());
|
||||
boolean flag7 = !this.f_108618_.m_108577_() || !this.m_255269_();
|
||||
- boolean flag8 = flag7 || this.f_19862_ && !this.f_185931_ || this.m_20069_() && !this.m_5842_();
|
||||
+ boolean flag8 = flag7 || this.f_19862_ && !this.f_185931_ || this.m_20069_() && !this.m_5842_() || (this.isInFluidType((fluidType, height) -> this.canSwimInFluidType(fluidType)) && !this.canStartSwimming());
|
||||
if (this.m_6069_()) {
|
||||
- if (!this.f_19861_ && !this.f_108618_.f_108573_ && flag5 || !this.m_20069_()) {
|
||||
- if (!this.f_19861_ && !this.f_108618_.f_108573_ && flag7 || !this.m_20069_()) {
|
||||
+ if (!this.f_19861_ && !this.f_108618_.f_108573_ && flag5 || !(this.m_20069_() || this.isInFluidType((fluidType, height) -> this.canSwimInFluidType(fluidType)))) {
|
||||
this.m_6858_(false);
|
||||
}
|
||||
} else if (flag6) {
|
||||
@@ -706,14 +_,15 @@
|
||||
} else if (flag8) {
|
||||
@@ -701,14 +_,15 @@
|
||||
|
||||
if (this.f_108618_.f_108572_ && !flag7 && !flag && !this.m_150110_().f_35935_ && !this.m_20159_() && !this.m_6147_()) {
|
||||
if (this.f_108618_.f_108572_ && !flag9 && !flag && !this.m_150110_().f_35935_ && !this.m_20159_() && !this.m_6147_()) {
|
||||
ItemStack itemstack = this.m_6844_(EquipmentSlot.CHEST);
|
||||
- if (itemstack.m_150930_(Items.f_42741_) && ElytraItem.m_41140_(itemstack) && this.m_36319_()) {
|
||||
+ if (itemstack.canElytraFly(this) && this.m_36319_()) {
|
||||
@@ -79,15 +87,15 @@
|
||||
}
|
||||
|
||||
if (this.m_204029_(FluidTags.f_13131_)) {
|
||||
@@ -824,6 +_,7 @@
|
||||
@@ -819,6 +_,7 @@
|
||||
|
||||
public void m_6083_() {
|
||||
super.m_6083_();
|
||||
+ if (this.m_36342_() && this.m_20159_()) this.f_108618_.f_108573_ = false;
|
||||
this.f_108611_ = false;
|
||||
if (this.m_20202_() instanceof Boat) {
|
||||
Boat boat = (Boat)this.m_20202_();
|
||||
@@ -1041,6 +_,18 @@
|
||||
Entity entity = this.m_275832_();
|
||||
if (entity instanceof Boat boat) {
|
||||
@@ -1044,6 +_,18 @@
|
||||
} else {
|
||||
return super.m_7398_(p_108758_);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/player/RemotePlayer.java
|
||||
+++ b/net/minecraft/client/player/RemotePlayer.java
|
||||
@@ -28,6 +_,7 @@
|
||||
@@ -32,6 +_,7 @@
|
||||
}
|
||||
|
||||
public boolean m_6469_(DamageSource p_108772_, float p_108773_) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/GameRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/GameRenderer.java
|
||||
@@ -299,6 +_,8 @@
|
||||
@@ -304,6 +_,8 @@
|
||||
this.m_109128_(new ResourceLocation("shaders/post/spider.json"));
|
||||
} else if (p_109107_ instanceof EnderMan) {
|
||||
this.m_109128_(new ResourceLocation("shaders/post/invert.json"));
|
||||
@@ -9,7 +9,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -586,6 +_,7 @@
|
||||
@@ -597,6 +_,7 @@
|
||||
list1.add(Pair.of(new ShaderInstance(p_250719_, "rendertype_crumbling", DefaultVertexFormat.f_85811_), (p_234230_) -> {
|
||||
f_172607_ = p_234230_;
|
||||
}));
|
||||
@@ -17,7 +17,7 @@
|
||||
} catch (IOException ioexception) {
|
||||
list1.forEach((p_172729_) -> {
|
||||
p_172729_.getFirst().close();
|
||||
@@ -667,19 +_,21 @@
|
||||
@@ -678,19 +_,21 @@
|
||||
boolean flag = false;
|
||||
int i = 3;
|
||||
double d1 = d0;
|
||||
@@ -42,16 +42,16 @@
|
||||
d1 = this.f_109059_.f_91077_.m_82450_().m_82557_(vec3);
|
||||
}
|
||||
|
||||
@@ -694,7 +_,7 @@
|
||||
@@ -705,7 +_,7 @@
|
||||
Entity entity1 = entityhitresult.m_82443_();
|
||||
Vec3 vec33 = entityhitresult.m_82450_();
|
||||
double d2 = vec3.m_82557_(vec33);
|
||||
- if (flag && d2 > 9.0D) {
|
||||
+ if (false && flag && d2 > 9.0D) { //Forge: Always keep the entity result to allow for extended reach interactions.
|
||||
this.f_109059_.f_91077_ = BlockHitResult.m_82426_(vec33, Direction.m_122366_(vec31.f_82479_, vec31.f_82480_, vec31.f_82481_), new BlockPos(vec33));
|
||||
this.f_109059_.f_91077_ = BlockHitResult.m_82426_(vec33, Direction.m_122366_(vec31.f_82479_, vec31.f_82480_, vec31.f_82481_), BlockPos.m_274446_(vec33));
|
||||
} else if (d2 < d1 || this.f_109059_.f_91077_ == null) {
|
||||
this.f_109059_.f_91077_ = entityhitresult;
|
||||
@@ -748,7 +_,7 @@
|
||||
@@ -759,7 +_,7 @@
|
||||
d0 *= Mth.m_14139_(this.f_109059_.f_91066_.m_231925_().m_231551_(), 1.0D, (double)0.85714287F);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -883,11 +_,11 @@
|
||||
@@ -894,12 +_,12 @@
|
||||
|
||||
Window window = this.f_109059_.m_91268_();
|
||||
RenderSystem.m_69421_(256, Minecraft.f_91002_);
|
||||
@@ -68,13 +68,14 @@
|
||||
+ Matrix4f matrix4f = (new Matrix4f()).setOrtho(0.0F, (float)((double)window.m_85441_() / window.m_85449_()), (float)((double)window.m_85442_() / window.m_85449_()), 0.0F, 1000.0F, net.minecraftforge.client.ForgeHooksClient.getGuiFarPlane());
|
||||
RenderSystem.m_252934_(matrix4f);
|
||||
PoseStack posestack = RenderSystem.m_157191_();
|
||||
posestack.m_85836_();
|
||||
posestack.m_166856_();
|
||||
- posestack.m_252880_(0.0F, 0.0F, -2000.0F);
|
||||
+ posestack.m_85837_(0.0D, 0.0D, 1000F-net.minecraftforge.client.ForgeHooksClient.getGuiFarPlane());
|
||||
RenderSystem.m_157182_();
|
||||
Lighting.m_84931_();
|
||||
PoseStack posestack1 = new PoseStack();
|
||||
@@ -923,7 +_,7 @@
|
||||
@@ -935,7 +_,7 @@
|
||||
}
|
||||
} else if (this.f_109059_.f_91080_ != null) {
|
||||
try {
|
||||
@@ -83,7 +84,7 @@
|
||||
} catch (Throwable throwable1) {
|
||||
CrashReport crashreport1 = CrashReport.m_127521_(throwable1, "Rendering screen");
|
||||
CrashReportCategory crashreportcategory1 = crashreport1.m_127514_("Screen render details");
|
||||
@@ -1068,12 +_,19 @@
|
||||
@@ -1085,12 +_,19 @@
|
||||
Matrix4f matrix4f = posestack.m_85850_().m_252922_();
|
||||
this.m_252879_(matrix4f);
|
||||
camera.m_90575_(this.f_109059_.f_91073_, (Entity)(this.f_109059_.m_91288_() == null ? this.f_109059_.f_91074_ : this.f_109059_.m_91288_()), !this.f_109059_.f_91066_.m_92176_().m_90612_(), this.f_109059_.f_91066_.m_92176_().m_90613_(), p_109090_);
|
||||
|
||||
@@ -5,18 +5,18 @@
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public class ItemBlockRenderTypes {
|
||||
+ @Deprecated
|
||||
private static final Map<Block, RenderType> f_109275_ = Util.m_137469_(Maps.newHashMap(), (p_109296_) -> {
|
||||
private static final Map<Block, RenderType> f_109275_ = Util.m_137469_(Maps.newHashMap(), (p_272331_) -> {
|
||||
RenderType rendertype = RenderType.m_110503_();
|
||||
p_109296_.put(Blocks.f_50267_, rendertype);
|
||||
@@ -298,6 +_,7 @@
|
||||
p_109296_.put(Blocks.f_50628_, rendertype3);
|
||||
p_109296_.put(Blocks.f_152498_, rendertype3);
|
||||
p_272331_.put(Blocks.f_50267_, rendertype);
|
||||
@@ -307,6 +_,7 @@
|
||||
p_272331_.put(Blocks.f_50628_, rendertype3);
|
||||
p_272331_.put(Blocks.f_152498_, rendertype3);
|
||||
});
|
||||
+ @Deprecated
|
||||
private static final Map<Fluid, RenderType> f_109276_ = Util.m_137469_(Maps.newHashMap(), (p_109290_) -> {
|
||||
RenderType rendertype = RenderType.m_110466_();
|
||||
p_109290_.put(Fluids.f_76192_, rendertype);
|
||||
@@ -305,6 +_,8 @@
|
||||
@@ -314,6 +_,8 @@
|
||||
});
|
||||
private static boolean f_109277_;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
public static RenderType m_109282_(BlockState p_109283_) {
|
||||
Block block = p_109283_.m_60734_();
|
||||
if (block instanceof LeavesBlock) {
|
||||
@@ -315,6 +_,8 @@
|
||||
@@ -324,6 +_,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
public static RenderType m_109293_(BlockState p_109294_) {
|
||||
Block block = p_109294_.m_60734_();
|
||||
if (block instanceof LeavesBlock) {
|
||||
@@ -329,6 +_,8 @@
|
||||
@@ -338,6 +_,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
public static RenderType m_109284_(BlockState p_109285_, boolean p_109286_) {
|
||||
RenderType rendertype = m_109282_(p_109285_);
|
||||
if (rendertype == RenderType.m_110466_()) {
|
||||
@@ -342,6 +_,8 @@
|
||||
@@ -351,6 +_,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
public static RenderType m_109279_(ItemStack p_109280_, boolean p_109281_) {
|
||||
Item item = p_109280_.m_41720_();
|
||||
if (item instanceof BlockItem) {
|
||||
@@ -353,8 +_,73 @@
|
||||
@@ -362,8 +_,73 @@
|
||||
}
|
||||
|
||||
public static RenderType m_109287_(FluidState p_109288_) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/ItemInHandRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/ItemInHandRenderer.java
|
||||
@@ -286,12 +_,14 @@
|
||||
@@ -312,12 +_,14 @@
|
||||
if (iteminhandrenderer$handrenderselection.f_172921_) {
|
||||
float f4 = interactionhand == InteractionHand.MAIN_HAND ? f : 0.0F;
|
||||
float f5 = 1.0F - Mth.m_14179_(p_109315_, this.f_109303_, this.f_109302_);
|
||||
@@ -15,7 +15,7 @@
|
||||
this.m_109371_(p_109318_, p_109315_, f1, InteractionHand.OFF_HAND, f6, this.f_109301_, f7, p_109316_, p_109317_, p_109319_);
|
||||
}
|
||||
|
||||
@@ -342,7 +_,7 @@
|
||||
@@ -368,7 +_,7 @@
|
||||
} else {
|
||||
this.m_109353_(p_109379_, p_109380_, p_109381_, p_109378_, humanoidarm, p_109376_, p_109377_);
|
||||
}
|
||||
@@ -24,15 +24,15 @@
|
||||
boolean flag1 = CrossbowItem.m_40932_(p_109377_);
|
||||
boolean flag2 = humanoidarm == HumanoidArm.RIGHT;
|
||||
int i = flag2 ? 1 : -1;
|
||||
@@ -384,6 +_,7 @@
|
||||
this.m_109322_(p_109372_, p_109377_, flag2 ? ItemTransforms.TransformType.FIRST_PERSON_RIGHT_HAND : ItemTransforms.TransformType.FIRST_PERSON_LEFT_HAND, !flag2, p_109379_, p_109380_, p_109381_);
|
||||
@@ -410,6 +_,7 @@
|
||||
this.m_269530_(p_109372_, p_109377_, flag2 ? ItemDisplayContext.FIRST_PERSON_RIGHT_HAND : ItemDisplayContext.FIRST_PERSON_LEFT_HAND, !flag2, p_109379_, p_109380_, p_109381_);
|
||||
} else {
|
||||
boolean flag3 = humanoidarm == HumanoidArm.RIGHT;
|
||||
+ if (!net.minecraftforge.client.extensions.common.IClientItemExtensions.of(p_109377_).applyForgeHandTransform(p_109379_, f_109299_.f_91074_, humanoidarm, p_109377_, p_109373_, p_109378_, p_109376_)) // FORGE: Allow items to define custom arm animation
|
||||
if (p_109372_.m_6117_() && p_109372_.m_21212_() > 0 && p_109372_.m_7655_() == p_109375_) {
|
||||
int k = flag3 ? 1 : -1;
|
||||
switch (p_109377_.m_41780_()) {
|
||||
@@ -487,8 +_,16 @@
|
||||
@@ -516,8 +_,16 @@
|
||||
this.f_109304_ = Mth.m_14036_(this.f_109304_ - 0.4F, 0.0F, 1.0F);
|
||||
} else {
|
||||
float f = localplayer.m_36403_(1.0F);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/LevelRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/LevelRenderer.java
|
||||
@@ -264,6 +_,8 @@
|
||||
@@ -265,6 +_,8 @@
|
||||
}
|
||||
|
||||
private void m_109703_(LightTexture p_109704_, float p_109705_, double p_109706_, double p_109707_, double p_109708_) {
|
||||
@@ -18,7 +18,7 @@
|
||||
float f = this.f_109461_.f_91073_.m_46722_(1.0F) / (Minecraft.m_91405_() ? 1.0F : 2.0F);
|
||||
if (!(f <= 0.0F)) {
|
||||
RandomSource randomsource = RandomSource.m_216335_((long)this.f_109477_ * 312987231L);
|
||||
@@ -1141,11 +_,13 @@
|
||||
@@ -1144,11 +_,13 @@
|
||||
RenderSystem.m_69421_(16640, Minecraft.f_91002_);
|
||||
float f = p_109605_.m_109152_();
|
||||
boolean flag2 = this.f_109461_.f_91073_.m_104583_().m_5781_(Mth.m_14107_(d0), Mth.m_14107_(d1)) || this.f_109461_.f_91065_.m_93090_().m_93715_();
|
||||
@@ -32,7 +32,7 @@
|
||||
profilerfiller.m_6182_("fog");
|
||||
FogRenderer.m_234172_(p_109604_, FogRenderer.FogMode.FOG_TERRAIN, Math.max(f, 32.0F), flag2, p_109601_);
|
||||
profilerfiller.m_6182_("terrain_setup");
|
||||
@@ -1154,7 +_,9 @@
|
||||
@@ -1157,7 +_,9 @@
|
||||
this.m_194370_(p_109604_);
|
||||
profilerfiller.m_6182_("terrain");
|
||||
this.m_172993_(RenderType.m_110451_(), p_109600_, d0, d1, d2, p_254120_);
|
||||
@@ -42,7 +42,7 @@
|
||||
this.m_172993_(RenderType.m_110463_(), p_109600_, d0, d1, d2, p_254120_);
|
||||
if (this.f_109465_.m_104583_().m_108885_()) {
|
||||
Lighting.m_252995_(p_109600_.m_85850_().m_252922_());
|
||||
@@ -1186,7 +_,7 @@
|
||||
@@ -1189,7 +_,7 @@
|
||||
for(Entity entity : this.f_109465_.m_104735_()) {
|
||||
if (this.f_109463_.m_114397_(entity, frustum, d0, d1, d2) || entity.m_20367_(this.f_109461_.f_91074_)) {
|
||||
BlockPos blockpos = entity.m_20183_();
|
||||
@@ -51,9 +51,9 @@
|
||||
++this.f_109439_;
|
||||
if (entity.f_19797_ == 0) {
|
||||
entity.f_19790_ = entity.m_20185_();
|
||||
@@ -1206,6 +_,9 @@
|
||||
int i1 = i & 255;
|
||||
outlinebuffersource.m_109929_(k, l, i1, 255);
|
||||
@@ -1205,6 +_,9 @@
|
||||
int i = entity.m_19876_();
|
||||
outlinebuffersource.m_109929_(FastColor.ARGB32.m_13665_(i), FastColor.ARGB32.m_13667_(i), FastColor.ARGB32.m_13669_(i), 255);
|
||||
} else {
|
||||
+ if (this.m_109817_() && entity.hasCustomOutlineRendering(this.f_109461_.f_91074_)) { // FORGE: allow custom outline rendering
|
||||
+ flag3 = true;
|
||||
@@ -61,7 +61,14 @@
|
||||
multibuffersource = multibuffersource$buffersource;
|
||||
}
|
||||
|
||||
@@ -1226,6 +_,7 @@
|
||||
@@ -1219,12 +_,14 @@
|
||||
multibuffersource$buffersource.m_109912_(RenderType.m_110452_(TextureAtlas.f_118259_));
|
||||
multibuffersource$buffersource.m_109912_(RenderType.m_110458_(TextureAtlas.f_118259_));
|
||||
multibuffersource$buffersource.m_109912_(RenderType.m_110476_(TextureAtlas.f_118259_));
|
||||
+ net.minecraftforge.client.ForgeHooksClient.dispatchRenderStage(net.minecraftforge.client.event.RenderLevelStageEvent.Stage.AFTER_ENTITIES, this, p_109600_, p_254120_, this.f_109477_, p_109604_, frustum);
|
||||
profilerfiller.m_6182_("blockentities");
|
||||
|
||||
for(LevelRenderer.RenderChunkInfo levelrenderer$renderchunkinfo : this.f_194297_) {
|
||||
List<BlockEntity> list = levelrenderer$renderchunkinfo.f_109839_.m_112835_().m_112773_();
|
||||
if (!list.isEmpty()) {
|
||||
for(BlockEntity blockentity1 : list) {
|
||||
@@ -69,7 +76,7 @@
|
||||
BlockPos blockpos4 = blockentity1.m_58899_();
|
||||
MultiBufferSource multibuffersource1 = multibuffersource$buffersource;
|
||||
p_109600_.m_85836_();
|
||||
@@ -1242,6 +_,9 @@
|
||||
@@ -1241,6 +_,9 @@
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -79,7 +86,7 @@
|
||||
|
||||
this.f_172946_.m_112267_(blockentity1, p_109601_, p_109600_, multibuffersource1);
|
||||
p_109600_.m_85849_();
|
||||
@@ -1251,9 +_,13 @@
|
||||
@@ -1250,9 +_,13 @@
|
||||
|
||||
synchronized(this.f_109468_) {
|
||||
for(BlockEntity blockentity : this.f_109468_) {
|
||||
@@ -93,17 +100,25 @@
|
||||
this.f_172946_.m_112267_(blockentity, p_109601_, p_109600_, multibuffersource$buffersource);
|
||||
p_109600_.m_85849_();
|
||||
}
|
||||
@@ -1291,7 +_,8 @@
|
||||
@@ -1275,6 +_,7 @@
|
||||
this.f_109461_.m_91385_().m_83947_(false);
|
||||
}
|
||||
|
||||
+ net.minecraftforge.client.ForgeHooksClient.dispatchRenderStage(net.minecraftforge.client.event.RenderLevelStageEvent.Stage.AFTER_BLOCK_ENTITIES, this, p_109600_, p_254120_, this.f_109477_, p_109604_, frustum);
|
||||
profilerfiller.m_6182_("destroyProgress");
|
||||
|
||||
for(Long2ObjectMap.Entry<SortedSet<BlockDestructionProgress>> entry : this.f_109409_.long2ObjectEntrySet()) {
|
||||
@@ -1290,7 +_,8 @@
|
||||
p_109600_.m_85837_((double)blockpos2.m_123341_() - d0, (double)blockpos2.m_123342_() - d1, (double)blockpos2.m_123343_() - d2);
|
||||
PoseStack.Pose posestack$pose = p_109600_.m_85850_();
|
||||
VertexConsumer vertexconsumer1 = new SheetedDecalTextureGenerator(this.f_109464_.m_110108_().m_6299_(ModelBakery.f_119229_.get(k1)), posestack$pose.m_252922_(), posestack$pose.m_252943_(), 1.0F);
|
||||
PoseStack.Pose posestack$pose1 = p_109600_.m_85850_();
|
||||
VertexConsumer vertexconsumer1 = new SheetedDecalTextureGenerator(this.f_109464_.m_110108_().m_6299_(ModelBakery.f_119229_.get(k)), posestack$pose1.m_252922_(), posestack$pose1.m_252943_(), 1.0F);
|
||||
- this.f_109461_.m_91289_().m_110918_(this.f_109465_.m_8055_(blockpos2), blockpos2, this.f_109465_, p_109600_, vertexconsumer1);
|
||||
+ net.minecraftforge.client.model.data.ModelData modelData = f_109465_.getModelDataManager().getAt(blockpos2);
|
||||
+ this.f_109461_.m_91289_().renderBreakingTexture(this.f_109465_.m_8055_(blockpos2), blockpos2, this.f_109465_, p_109600_, vertexconsumer1, modelData == null ? net.minecraftforge.client.model.data.ModelData.EMPTY : modelData);
|
||||
p_109600_.m_85849_();
|
||||
}
|
||||
}
|
||||
@@ -1303,10 +_,13 @@
|
||||
@@ -1302,10 +_,13 @@
|
||||
profilerfiller.m_6182_("outline");
|
||||
BlockPos blockpos1 = ((BlockHitResult)hitresult).m_82425_();
|
||||
BlockState blockstate = this.f_109465_.m_8055_(blockpos1);
|
||||
@@ -116,8 +131,8 @@
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onDrawHighlight(this, p_109604_, hitresult, p_109601_, p_109600_, multibuffersource$buffersource);
|
||||
}
|
||||
|
||||
PoseStack posestack = RenderSystem.m_157191_();
|
||||
@@ -1341,7 +_,8 @@
|
||||
this.f_109461_.f_91064_.m_113457_(p_109600_, multibuffersource$buffersource, d0, d1, d2);
|
||||
@@ -1337,7 +_,8 @@
|
||||
this.f_109415_.m_83945_(this.f_109461_.m_91385_());
|
||||
RenderStateShard.f_110126_.m_110185_();
|
||||
profilerfiller.m_6182_("particles");
|
||||
@@ -127,7 +142,7 @@
|
||||
RenderStateShard.f_110126_.m_110188_();
|
||||
} else {
|
||||
profilerfiller.m_6182_("translucent");
|
||||
@@ -1355,7 +_,8 @@
|
||||
@@ -1351,7 +_,8 @@
|
||||
profilerfiller.m_6182_("string");
|
||||
this.m_172993_(RenderType.m_110503_(), p_109600_, d0, d1, d2, p_254120_);
|
||||
profilerfiller.m_6182_("particles");
|
||||
@@ -137,7 +152,7 @@
|
||||
}
|
||||
|
||||
posestack.m_85836_();
|
||||
@@ -1379,6 +_,7 @@
|
||||
@@ -1375,6 +_,7 @@
|
||||
RenderStateShard.f_110127_.m_110185_();
|
||||
profilerfiller.m_6182_("weather");
|
||||
this.m_109703_(p_109606_, p_109601_, d0, d1, d2);
|
||||
@@ -145,7 +160,7 @@
|
||||
this.m_173012_(p_109604_);
|
||||
RenderStateShard.f_110127_.m_110188_();
|
||||
this.f_109418_.m_110023_(p_109601_);
|
||||
@@ -1387,6 +_,7 @@
|
||||
@@ -1383,6 +_,7 @@
|
||||
RenderSystem.m_69458_(false);
|
||||
profilerfiller.m_6182_("weather");
|
||||
this.m_109703_(p_109606_, p_109601_, d0, d1, d2);
|
||||
@@ -153,7 +168,7 @@
|
||||
this.m_173012_(p_109604_);
|
||||
RenderSystem.m_69458_(true);
|
||||
}
|
||||
@@ -1521,6 +_,7 @@
|
||||
@@ -1526,6 +_,7 @@
|
||||
shaderinstance.m_173362_();
|
||||
VertexBuffer.m_85931_();
|
||||
this.f_109461_.m_91307_().m_7238_();
|
||||
@@ -161,7 +176,7 @@
|
||||
p_172994_.m_110188_();
|
||||
}
|
||||
|
||||
@@ -1782,6 +_,8 @@
|
||||
@@ -1740,6 +_,8 @@
|
||||
}
|
||||
|
||||
public void m_202423_(PoseStack p_202424_, Matrix4f p_254034_, float p_202426_, Camera p_202427_, boolean p_202428_, Runnable p_202429_) {
|
||||
@@ -170,7 +185,7 @@
|
||||
p_202429_.run();
|
||||
if (!p_202428_) {
|
||||
FogType fogtype = p_202427_.m_167685_();
|
||||
@@ -1914,6 +_,8 @@
|
||||
@@ -1861,6 +_,8 @@
|
||||
}
|
||||
|
||||
public void m_253054_(PoseStack p_254145_, Matrix4f p_254537_, float p_254364_, double p_253843_, double p_253663_, double p_253795_) {
|
||||
@@ -179,7 +194,7 @@
|
||||
float f = this.f_109465_.m_104583_().m_108871_();
|
||||
if (!Float.isNaN(f)) {
|
||||
RenderSystem.m_69464_();
|
||||
@@ -2100,7 +_,7 @@
|
||||
@@ -2047,7 +_,7 @@
|
||||
boolean flag = false;
|
||||
if (this.f_109461_.f_91066_.m_232080_().m_231551_() == PrioritizeChunkUpdates.NEARBY) {
|
||||
BlockPos blockpos1 = chunkrenderdispatcher$renderchunk.m_112839_().m_7918_(8, 8, 8);
|
||||
@@ -188,7 +203,7 @@
|
||||
} else if (this.f_109461_.f_91066_.m_232080_().m_231551_() == PrioritizeChunkUpdates.PLAYER_AFFECTED) {
|
||||
flag = chunkrenderdispatcher$renderchunk.m_112842_();
|
||||
}
|
||||
@@ -2400,7 +_,12 @@
|
||||
@@ -2354,7 +_,12 @@
|
||||
this.f_109469_.m_110859_(p_109502_, p_109503_, p_109504_, p_109505_);
|
||||
}
|
||||
|
||||
@@ -201,7 +216,7 @@
|
||||
SoundInstance soundinstance = this.f_109410_.get(p_109516_);
|
||||
if (soundinstance != null) {
|
||||
this.f_109461_.m_91106_().m_120399_(soundinstance);
|
||||
@@ -2408,7 +_,7 @@
|
||||
@@ -2362,7 +_,7 @@
|
||||
}
|
||||
|
||||
if (p_109515_ != null) {
|
||||
@@ -210,16 +225,7 @@
|
||||
if (recorditem != null) {
|
||||
this.f_109461_.f_91065_.m_93055_(recorditem.m_43050_());
|
||||
}
|
||||
@@ -2548,7 +_,7 @@
|
||||
break;
|
||||
case 1010:
|
||||
if (Item.m_41445_(p_234307_) instanceof RecordItem) {
|
||||
- this.m_109514_(((RecordItem)Item.m_41445_(p_234307_)).m_43051_(), p_234306_);
|
||||
+ this.playStreamingMusic(((RecordItem)Item.m_41445_(p_234307_)).m_43051_(), p_234306_, (RecordItem) Item.m_41445_(p_234307_));
|
||||
} else {
|
||||
this.m_109514_((SoundEvent)null, p_234306_);
|
||||
}
|
||||
@@ -2700,7 +_,7 @@
|
||||
@@ -2656,7 +_,7 @@
|
||||
case 2001:
|
||||
BlockState blockstate = Block.m_49803_(p_234307_);
|
||||
if (!blockstate.m_60795_()) {
|
||||
@@ -228,7 +234,16 @@
|
||||
this.f_109465_.m_245747_(p_234306_, soundtype.m_56775_(), SoundSource.BLOCKS, (soundtype.m_56773_() + 1.0F) / 2.0F, soundtype.m_56774_() * 0.8F, false);
|
||||
}
|
||||
|
||||
@@ -2915,7 +_,7 @@
|
||||
@@ -2751,7 +_,7 @@
|
||||
break;
|
||||
case 3002:
|
||||
if (p_234307_ >= 0 && p_234307_ < Direction.Axis.f_122448_.length) {
|
||||
- ParticleUtils.m_144967_(Direction.Axis.f_122448_[p_234307_], this.f_109465_, p_234306_, 0.125D, ParticleTypes.f_175830_, UniformInt.m_146622_(10, 19));
|
||||
+ this.playStreamingMusic(((RecordItem)Item.m_41445_(p_234307_)).m_43051_(), p_234306_, (RecordItem) Item.m_41445_(p_234307_));
|
||||
} else {
|
||||
ParticleUtils.m_216313_(this.f_109465_, p_234306_, ParticleTypes.f_175830_, UniformInt.m_146622_(3, 5));
|
||||
}
|
||||
@@ -2875,7 +_,7 @@
|
||||
} else {
|
||||
int i = p_109538_.m_45517_(LightLayer.SKY, p_109540_);
|
||||
int j = p_109538_.m_45517_(LightLayer.BLOCK, p_109540_);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/LightTexture.java
|
||||
+++ b/net/minecraft/client/renderer/LightTexture.java
|
||||
@@ -136,6 +_,8 @@
|
||||
@@ -135,6 +_,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
if (f5 > 0.0F) {
|
||||
float f13 = Math.max(vector3f1.x(), Math.max(vector3f1.y(), vector3f1.z()));
|
||||
if (f13 < 1.0F) {
|
||||
@@ -193,7 +_,7 @@
|
||||
@@ -192,7 +_,7 @@
|
||||
}
|
||||
|
||||
public static int m_109883_(int p_109884_) {
|
||||
|
||||
@@ -1,26 +1,21 @@
|
||||
--- a/net/minecraft/client/renderer/RenderType.java
|
||||
+++ b/net/minecraft/client/renderer/RenderType.java
|
||||
@@ -301,27 +_,27 @@
|
||||
}
|
||||
|
||||
public static RenderType m_110497_(ResourceLocation p_110498_) {
|
||||
- return f_173173_.apply(p_110498_);
|
||||
+ return net.minecraftforge.client.ForgeRenderTypes.getText(p_110498_);
|
||||
@@ -316,19 +_,19 @@
|
||||
}
|
||||
|
||||
public static RenderType m_173237_(ResourceLocation p_173238_) {
|
||||
- return f_173174_.apply(p_173238_);
|
||||
+ return net.minecraftforge.client.ForgeRenderTypes.getTextIntensity(p_173238_);
|
||||
+ return net.minecraftforge.client.ForgeRenderTypes.getText(p_173238_);
|
||||
}
|
||||
|
||||
public static RenderType m_181444_(ResourceLocation p_181445_) {
|
||||
- return f_181442_.apply(p_181445_);
|
||||
+ return net.minecraftforge.client.ForgeRenderTypes.getTextPolygonOffset(p_181445_);
|
||||
+ return net.minecraftforge.client.ForgeRenderTypes.getTextIntensity(p_181445_);
|
||||
}
|
||||
|
||||
public static RenderType m_181446_(ResourceLocation p_181447_) {
|
||||
- return f_181443_.apply(p_181447_);
|
||||
+ return net.minecraftforge.client.ForgeRenderTypes.getTextIntensityPolygonOffset(p_181447_);
|
||||
+ return net.minecraftforge.client.ForgeRenderTypes.getTextPolygonOffset(p_181447_);
|
||||
}
|
||||
|
||||
public static RenderType m_110500_(ResourceLocation p_110501_) {
|
||||
@@ -28,13 +23,17 @@
|
||||
+ return net.minecraftforge.client.ForgeRenderTypes.getTextSeeThrough(p_110501_);
|
||||
}
|
||||
|
||||
public static RenderType m_269508_() {
|
||||
@@ -336,7 +_,7 @@
|
||||
}
|
||||
|
||||
public static RenderType m_173240_(ResourceLocation p_173241_) {
|
||||
- return f_173176_.apply(p_173241_);
|
||||
+ return net.minecraftforge.client.ForgeRenderTypes.getTextIntensitySeeThrough(p_173241_);
|
||||
}
|
||||
|
||||
public static RenderType m_110502_() {
|
||||
@@ -608,4 +_,17 @@
|
||||
@@ -635,4 +_,17 @@
|
||||
return this.f_110696_;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,9 +_,13 @@
|
||||
@@ -90,8 +_,12 @@
|
||||
}
|
||||
|
||||
private static void m_110725_(Minecraft p_110726_, PoseStack p_110727_) {
|
||||
@@ -56,9 +56,8 @@
|
||||
+
|
||||
+ public static void renderFluid(Minecraft p_110726_, PoseStack p_110727_, ResourceLocation texture) {
|
||||
RenderSystem.m_157427_(GameRenderer::m_172817_);
|
||||
RenderSystem.m_69493_();
|
||||
- RenderSystem.m_157456_(0, f_110714_);
|
||||
+ RenderSystem.m_157456_(0, texture);
|
||||
BufferBuilder bufferbuilder = Tesselator.m_85913_().m_85915_();
|
||||
BlockPos blockpos = new BlockPos(p_110726_.f_91074_.m_20185_(), p_110726_.f_91074_.m_20188_(), p_110726_.f_91074_.m_20189_());
|
||||
BlockPos blockpos = BlockPos.m_274561_(p_110726_.f_91074_.m_20185_(), p_110726_.f_91074_.m_20188_(), p_110726_.f_91074_.m_20189_());
|
||||
float f = LightTexture.m_234316_(p_110726_.f_91074_.f_19853_.m_6042_(), p_110726_.f_91074_.f_19853_.m_46803_(blockpos));
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/ShaderInstance.java
|
||||
+++ b/net/minecraft/client/renderer/ShaderInstance.java
|
||||
@@ -96,10 +_,14 @@
|
||||
@@ -98,10 +_,14 @@
|
||||
@Nullable
|
||||
public final Uniform f_173320_;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
try (Reader reader = p_173336_.m_215597_(resourcelocation)) {
|
||||
JsonObject jsonobject = GsonHelper.m_13859_(reader);
|
||||
@@ -205,8 +_,10 @@
|
||||
@@ -208,8 +_,10 @@
|
||||
Program program1 = p_173342_.m_85570_().get(p_173343_);
|
||||
Program program;
|
||||
if (program1 == null) {
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
try (InputStream inputstream = resource.m_215507_()) {
|
||||
final String s1 = FileUtil.m_179922_(s);
|
||||
@@ -214,11 +_,11 @@
|
||||
@@ -217,16 +_,17 @@
|
||||
private final Set<String> f_173369_ = Sets.newHashSet();
|
||||
|
||||
public String m_142138_(boolean p_173374_, String p_173375_) {
|
||||
@@ -43,11 +43,8 @@
|
||||
} else {
|
||||
- ResourceLocation resourcelocation = new ResourceLocation(p_173375_);
|
||||
|
||||
try {
|
||||
String s2;
|
||||
@@ -228,7 +_,8 @@
|
||||
|
||||
return s2;
|
||||
try (Reader reader = p_173341_.m_215597_(resourcelocation)) {
|
||||
return IOUtils.toString(reader);
|
||||
} catch (IOException ioexception) {
|
||||
- ShaderInstance.f_173323_.error("Could not open GLSL import {}: {}", p_173375_, ioexception.getMessage());
|
||||
+ // FORGE: specify the namespace of the failed import in case of duplicates from multiple mods
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
--- a/net/minecraft/client/renderer/Sheets.java
|
||||
+++ b/net/minecraft/client/renderer/Sheets.java
|
||||
@@ -135,11 +_,13 @@
|
||||
@@ -145,11 +_,13 @@
|
||||
}
|
||||
|
||||
private static Material m_173385_(WoodType p_173386_) {
|
||||
- return new Material(f_110739_, new ResourceLocation("entity/signs/" + p_173386_.m_61846_()));
|
||||
+ ResourceLocation location = new ResourceLocation(p_173386_.m_61846_());
|
||||
- return new Material(f_110739_, new ResourceLocation("entity/signs/" + p_173386_.f_61839_()));
|
||||
+ ResourceLocation location = new ResourceLocation(p_173386_.f_61839_());
|
||||
+ return new Material(f_110739_, new ResourceLocation(location.m_135827_(), "entity/signs/" + location.m_135815_()));
|
||||
}
|
||||
|
||||
private static Material m_245275_(WoodType p_251735_) {
|
||||
- return new Material(f_110739_, new ResourceLocation("entity/signs/hanging/" + p_251735_.m_61846_()));
|
||||
+ ResourceLocation location = new ResourceLocation(p_251735_.m_61846_());
|
||||
- return new Material(f_110739_, new ResourceLocation("entity/signs/hanging/" + p_251735_.f_61839_()));
|
||||
+ ResourceLocation location = new ResourceLocation(p_251735_.f_61839_());
|
||||
+ return new Material(f_110739_, new ResourceLocation(location.m_135827_(), "entity/signs/hanging/" + location.m_135815_()));
|
||||
}
|
||||
|
||||
public static Material m_173381_(WoodType p_173382_) {
|
||||
@@ -190,5 +_,12 @@
|
||||
@@ -209,5 +_,13 @@
|
||||
default:
|
||||
return p_110773_;
|
||||
}
|
||||
@@ -27,5 +27,6 @@
|
||||
+ */
|
||||
+ public static void addWoodType(WoodType woodType) {
|
||||
+ f_110743_.put(woodType, m_173385_(woodType));
|
||||
+ f_244291_.put(woodType, m_245275_(woodType));
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -63,9 +63,9 @@
|
||||
+ this.f_110900_.renderModel(p_110914_.m_85850_(), p_110915_.m_6299_(renderType != null ? renderType : net.minecraftforge.client.RenderTypeHelper.getEntityRenderType(rt, false)), p_110913_, bakedmodel, f, f1, f2, p_110916_, p_110917_, modelData, rt);
|
||||
break;
|
||||
case ENTITYBLOCK_ANIMATED:
|
||||
- this.f_173397_.m_108829_(new ItemStack(p_110913_.m_60734_()), ItemTransforms.TransformType.NONE, p_110914_, p_110915_, p_110916_, p_110917_);
|
||||
- this.f_173397_.m_108829_(new ItemStack(p_110913_.m_60734_()), ItemDisplayContext.NONE, p_110914_, p_110915_, p_110916_, p_110917_);
|
||||
+ ItemStack stack = new ItemStack(p_110913_.m_60734_());
|
||||
+ net.minecraftforge.client.extensions.common.IClientItemExtensions.of(stack).getCustomRenderer().m_108829_(stack, ItemTransforms.TransformType.NONE, p_110914_, p_110915_, p_110916_, p_110917_);
|
||||
+ net.minecraftforge.client.extensions.common.IClientItemExtensions.of(stack).getCustomRenderer().m_108829_(stack, ItemDisplayContext.NONE, p_110914_, p_110915_, p_110916_, p_110917_);
|
||||
}
|
||||
|
||||
}
|
||||
+17
-2
@@ -1,9 +1,10 @@
|
||||
--- a/net/minecraft/client/renderer/block/model/BlockElement.java
|
||||
+++ b/net/minecraft/client/renderer/block/model/BlockElement.java
|
||||
@@ -28,14 +_,21 @@
|
||||
@@ -28,14 +_,22 @@
|
||||
public final Map<Direction, BlockElementFace> f_111310_;
|
||||
public final BlockElementRotation f_111311_;
|
||||
public final boolean f_111312_;
|
||||
+ @Deprecated // TODO: 1.20 - Make private. Use getter / setter methods to access.
|
||||
+ public net.minecraftforge.client.model.ForgeFaceData faceData;
|
||||
|
||||
public BlockElement(Vector3f p_253626_, Vector3f p_254426_, Map<Direction, BlockElementFace> p_254454_, @Nullable BlockElementRotation p_254229_, boolean p_253661_) {
|
||||
@@ -17,7 +18,7 @@
|
||||
this.f_111311_ = p_254229_;
|
||||
this.f_111312_ = p_253661_;
|
||||
this.m_111319_();
|
||||
+ this.faceData = faceData;
|
||||
+ this.setFaceData(faceData);
|
||||
+ this.f_111310_.values().forEach(face -> face.parent = this);
|
||||
}
|
||||
|
||||
@@ -32,3 +33,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,5 +_,13 @@
|
||||
return new Vector3f(afloat[0], afloat[1], afloat[2]);
|
||||
}
|
||||
}
|
||||
+ }
|
||||
+
|
||||
+ public net.minecraftforge.client.model.ForgeFaceData getFaceData() {
|
||||
+ return this.faceData;
|
||||
+ }
|
||||
+
|
||||
+ public void setFaceData(net.minecraftforge.client.model.ForgeFaceData faceData) {
|
||||
+ this.faceData = java.util.Objects.requireNonNull(faceData);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -25,7 +25,7 @@
|
||||
+ if(this.faceData != null) {
|
||||
+ return this.faceData;
|
||||
+ } else if(this.parent != null) {
|
||||
+ return this.parent.faceData;
|
||||
+ return this.parent.getFaceData();
|
||||
+ }
|
||||
+ return net.minecraftforge.client.model.ForgeFaceData.DEFAULT;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/block/model/BlockModel.java
|
||||
+++ b/net/minecraft/client/renderer/block/model/BlockModel.java
|
||||
@@ -65,9 +_,10 @@
|
||||
@@ -68,9 +_,10 @@
|
||||
public BlockModel f_111418_;
|
||||
@Nullable
|
||||
protected ResourceLocation f_111419_;
|
||||
@@ -12,8 +12,8 @@
|
||||
}
|
||||
|
||||
public static BlockModel m_111463_(String p_111464_) {
|
||||
@@ -84,10 +_,15 @@
|
||||
this.f_111426_ = p_111435_;
|
||||
@@ -87,10 +_,15 @@
|
||||
this.f_111426_ = p_273099_;
|
||||
}
|
||||
|
||||
+ @Deprecated
|
||||
@@ -26,9 +26,9 @@
|
||||
+ public ResourceLocation getParentLocation() { return f_111419_; }
|
||||
+
|
||||
public boolean m_111476_() {
|
||||
return this.f_111418_ != null ? this.f_111418_.m_111476_() : this.f_111424_;
|
||||
}
|
||||
@@ -112,6 +_,10 @@
|
||||
if (this.f_111424_ != null) {
|
||||
return this.f_111424_;
|
||||
@@ -119,6 +_,10 @@
|
||||
return this.f_111426_.isEmpty() ? ItemOverrides.f_111734_ : new ItemOverrides(p_250138_, p_251800_, this.f_111426_);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
public Collection<ResourceLocation> m_7970_() {
|
||||
Set<ResourceLocation> set = Sets.newHashSet();
|
||||
|
||||
@@ -127,6 +_,10 @@
|
||||
@@ -134,6 +_,10 @@
|
||||
}
|
||||
|
||||
public void m_5500_(Function<ResourceLocation, UnbakedModel> p_249059_) {
|
||||
@@ -50,7 +50,7 @@
|
||||
Set<UnbakedModel> set = Sets.newLinkedHashSet();
|
||||
|
||||
for(BlockModel blockmodel = this; blockmodel.f_111419_ != null && blockmodel.f_111418_ == null; blockmodel = blockmodel.f_111418_) {
|
||||
@@ -161,11 +_,24 @@
|
||||
@@ -168,11 +_,24 @@
|
||||
});
|
||||
}
|
||||
|
||||
@@ -75,16 +75,16 @@
|
||||
TextureAtlasSprite textureatlassprite = p_111452_.apply(this.m_111480_("particle"));
|
||||
if (this.m_111490_() == ModelBakery.f_119233_) {
|
||||
return new BuiltInModel(this.m_111491_(), this.m_246736_(p_249720_, p_111451_), textureatlassprite, this.m_111479_().m_111526_());
|
||||
@@ -248,7 +_,18 @@
|
||||
ItemTransform itemtransform5 = this.m_111444_(ItemTransforms.TransformType.GUI);
|
||||
ItemTransform itemtransform6 = this.m_111444_(ItemTransforms.TransformType.GROUND);
|
||||
ItemTransform itemtransform7 = this.m_111444_(ItemTransforms.TransformType.FIXED);
|
||||
@@ -255,7 +_,18 @@
|
||||
ItemTransform itemtransform5 = this.m_269178_(ItemDisplayContext.GUI);
|
||||
ItemTransform itemtransform6 = this.m_269178_(ItemDisplayContext.GROUND);
|
||||
ItemTransform itemtransform7 = this.m_269178_(ItemDisplayContext.FIXED);
|
||||
- return new ItemTransforms(itemtransform, itemtransform1, itemtransform2, itemtransform3, itemtransform4, itemtransform5, itemtransform6, itemtransform7);
|
||||
+
|
||||
+ var builder = com.google.common.collect.ImmutableMap.<ItemTransforms.TransformType, ItemTransform>builder();
|
||||
+ for(ItemTransforms.TransformType type : ItemTransforms.TransformType.values()) {
|
||||
+ var builder = com.google.common.collect.ImmutableMap.<ItemDisplayContext, ItemTransform>builder();
|
||||
+ for(ItemDisplayContext type : ItemDisplayContext.values()) {
|
||||
+ if (type.isModded()) {
|
||||
+ var transform = this.m_111444_(type);
|
||||
+ var transform = this.m_269178_(type);
|
||||
+ if (transform != ItemTransform.f_111754_) {
|
||||
+ builder.put(type, transform);
|
||||
+ }
|
||||
@@ -94,8 +94,8 @@
|
||||
+ return new ItemTransforms(itemtransform, itemtransform1, itemtransform2, itemtransform3, itemtransform4, itemtransform5, itemtransform6, itemtransform7, builder.build());
|
||||
}
|
||||
|
||||
private ItemTransform m_111444_(ItemTransforms.TransformType p_111445_) {
|
||||
@@ -367,6 +_,8 @@
|
||||
private ItemTransform m_269178_(ItemDisplayContext p_270662_) {
|
||||
@@ -373,6 +_,8 @@
|
||||
public boolean m_111526_() {
|
||||
return this == SIDE;
|
||||
}
|
||||
|
||||
+4
-4
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/block/model/ItemOverrides.java
|
||||
+++ b/net/minecraft/client/renderer/block/model/ItemOverrides.java
|
||||
@@ -31,7 +_,15 @@
|
||||
@@ -32,7 +_,15 @@
|
||||
this.f_173461_ = new ResourceLocation[0];
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
this.f_173461_ = p_111743_.stream().flatMap(ItemOverride::m_173449_).map(ItemOverride.Predicate::m_173459_).distinct().toArray((p_173479_) -> {
|
||||
return new ResourceLocation[p_173479_];
|
||||
});
|
||||
@@ -45,7 +_,7 @@
|
||||
@@ -46,7 +_,7 @@
|
||||
|
||||
for(int j = p_111743_.size() - 1; j >= 0; --j) {
|
||||
ItemOverride itemoverride = p_111743_.get(j);
|
||||
@@ -25,7 +25,7 @@
|
||||
ItemOverrides.PropertyMatcher[] aitemoverrides$propertymatcher = itemoverride.m_173449_().map((p_173477_) -> {
|
||||
int k = object2intmap.getInt(p_173477_.m_173459_());
|
||||
return new ItemOverrides.PropertyMatcher(k, p_173477_.m_173460_());
|
||||
@@ -59,9 +_,9 @@
|
||||
@@ -60,9 +_,9 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -37,7 +37,7 @@
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@@ -94,6 +_,10 @@
|
||||
@@ -95,6 +_,10 @@
|
||||
}
|
||||
|
||||
return p_173465_;
|
||||
|
||||
+23
-97
@@ -1,10 +1,10 @@
|
||||
--- a/net/minecraft/client/renderer/block/model/ItemTransforms.java
|
||||
+++ b/net/minecraft/client/renderer/block/model/ItemTransforms.java
|
||||
@@ -20,11 +_,13 @@
|
||||
@@ -21,11 +_,13 @@
|
||||
public final ItemTransform f_111792_;
|
||||
public final ItemTransform f_111793_;
|
||||
public final ItemTransform f_111794_;
|
||||
+ public final com.google.common.collect.ImmutableMap<TransformType, ItemTransform> moddedTransforms;
|
||||
+ public final com.google.common.collect.ImmutableMap<ItemDisplayContext, ItemTransform> moddedTransforms;
|
||||
|
||||
private ItemTransforms() {
|
||||
this(ItemTransform.f_111754_, ItemTransform.f_111754_, ItemTransform.f_111754_, ItemTransform.f_111754_, ItemTransform.f_111754_, ItemTransform.f_111754_, ItemTransform.f_111754_, ItemTransform.f_111754_);
|
||||
@@ -14,7 +14,7 @@
|
||||
public ItemTransforms(ItemTransforms p_111807_) {
|
||||
this.f_111787_ = p_111807_.f_111787_;
|
||||
this.f_111788_ = p_111807_.f_111788_;
|
||||
@@ -34,9 +_,16 @@
|
||||
@@ -35,9 +_,16 @@
|
||||
this.f_111792_ = p_111807_.f_111792_;
|
||||
this.f_111793_ = p_111807_.f_111793_;
|
||||
this.f_111794_ = p_111807_.f_111794_;
|
||||
@@ -27,41 +27,41 @@
|
||||
+ }
|
||||
+
|
||||
+ public ItemTransforms(ItemTransform p_111798_, ItemTransform p_111799_, ItemTransform p_111800_, ItemTransform p_111801_, ItemTransform p_111802_, ItemTransform p_111803_, ItemTransform p_111804_, ItemTransform p_111805_,
|
||||
+ com.google.common.collect.ImmutableMap<TransformType, ItemTransform> moddedTransforms) {
|
||||
+ com.google.common.collect.ImmutableMap<ItemDisplayContext, ItemTransform> moddedTransforms) {
|
||||
this.f_111787_ = p_111798_;
|
||||
this.f_111788_ = p_111799_;
|
||||
this.f_111789_ = p_111800_;
|
||||
@@ -45,6 +_,7 @@
|
||||
@@ -46,6 +_,7 @@
|
||||
this.f_111792_ = p_111803_;
|
||||
this.f_111793_ = p_111804_;
|
||||
this.f_111794_ = p_111805_;
|
||||
+ this.moddedTransforms = moddedTransforms;
|
||||
}
|
||||
|
||||
public ItemTransform m_111808_(ItemTransforms.TransformType p_111809_) {
|
||||
@@ -66,7 +_,7 @@
|
||||
case FIXED:
|
||||
return this.f_111794_;
|
||||
public ItemTransform m_269404_(ItemDisplayContext p_270619_) {
|
||||
@@ -76,7 +_,7 @@
|
||||
itemtransform = this.f_111794_;
|
||||
break;
|
||||
default:
|
||||
- return ItemTransform.f_111754_;
|
||||
+ return moddedTransforms.getOrDefault(p_111809_, ItemTransform.f_111754_);
|
||||
- itemtransform = ItemTransform.f_111754_;
|
||||
+ return moddedTransforms.getOrDefault(p_270619_, ItemTransform.f_111754_);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +_,23 @@
|
||||
ItemTransform itemtransform5 = this.m_111815_(p_111822_, jsonobject, "gui");
|
||||
ItemTransform itemtransform6 = this.m_111815_(p_111822_, jsonobject, "ground");
|
||||
ItemTransform itemtransform7 = this.m_111815_(p_111822_, jsonobject, "fixed");
|
||||
return itemtransform;
|
||||
@@ -106,7 +_,23 @@
|
||||
ItemTransform itemtransform5 = this.m_269518_(p_111822_, jsonobject, ItemDisplayContext.GUI);
|
||||
ItemTransform itemtransform6 = this.m_269518_(p_111822_, jsonobject, ItemDisplayContext.GROUND);
|
||||
ItemTransform itemtransform7 = this.m_269518_(p_111822_, jsonobject, ItemDisplayContext.FIXED);
|
||||
- return new ItemTransforms(itemtransform1, itemtransform, itemtransform3, itemtransform2, itemtransform4, itemtransform5, itemtransform6, itemtransform7);
|
||||
+
|
||||
+ var builder = com.google.common.collect.ImmutableMap.<TransformType, ItemTransform>builder();
|
||||
+ for (TransformType type : TransformType.values()) {
|
||||
+ var builder = com.google.common.collect.ImmutableMap.<ItemDisplayContext, ItemTransform>builder();
|
||||
+ for (ItemDisplayContext type : ItemDisplayContext.values()) {
|
||||
+ if (type.isModded()) {
|
||||
+ var transform = this.m_111815_(p_111822_, jsonobject, type.getSerializeName());
|
||||
+ var transform = this.m_269518_(p_111822_, jsonobject, type);
|
||||
+ var fallbackType = type;
|
||||
+ while (transform == ItemTransform.f_111754_ && fallbackType.fallback != null) {
|
||||
+ fallbackType = fallbackType.fallback;
|
||||
+ transform = this.m_111815_(p_111822_, jsonobject, fallbackType.getSerializeName());
|
||||
+ while (transform == ItemTransform.f_111754_ && fallbackType.fallback() != null) {
|
||||
+ fallbackType = fallbackType.fallback();
|
||||
+ transform = this.m_269518_(p_111822_, jsonobject, fallbackType);
|
||||
+ }
|
||||
+ if (transform != ItemTransform.f_111754_){
|
||||
+ builder.put(type, transform);
|
||||
@@ -72,78 +72,4 @@
|
||||
+ return new ItemTransforms(itemtransform1, itemtransform, itemtransform3, itemtransform2, itemtransform4, itemtransform5, itemtransform6, itemtransform7, builder.build());
|
||||
}
|
||||
|
||||
private ItemTransform m_111815_(JsonDeserializationContext p_111816_, JsonObject p_111817_, String p_111818_) {
|
||||
@@ -103,19 +_,63 @@
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
- public static enum TransformType {
|
||||
- NONE,
|
||||
- THIRD_PERSON_LEFT_HAND,
|
||||
- THIRD_PERSON_RIGHT_HAND,
|
||||
- FIRST_PERSON_LEFT_HAND,
|
||||
- FIRST_PERSON_RIGHT_HAND,
|
||||
- HEAD,
|
||||
- GUI,
|
||||
- GROUND,
|
||||
- FIXED;
|
||||
+ public static enum TransformType implements net.minecraftforge.common.IExtensibleEnum {
|
||||
+ NONE("none"),
|
||||
+ THIRD_PERSON_LEFT_HAND("thirdperson_lefthand"),
|
||||
+ THIRD_PERSON_RIGHT_HAND("thirdperson_righthand"),
|
||||
+ FIRST_PERSON_LEFT_HAND("firstperson_lefthand"),
|
||||
+ FIRST_PERSON_RIGHT_HAND("firstperson_righthand"),
|
||||
+ HEAD("head"),
|
||||
+ GUI("gui"),
|
||||
+ GROUND("ground"),
|
||||
+ FIXED("fixed");
|
||||
|
||||
public boolean m_111841_() {
|
||||
return this == FIRST_PERSON_LEFT_HAND || this == FIRST_PERSON_RIGHT_HAND;
|
||||
+ }
|
||||
+
|
||||
+ // Forge start
|
||||
+ private final String serializeName;
|
||||
+ private final boolean isModded;
|
||||
+ @javax.annotation.Nullable
|
||||
+ private final TransformType fallback;
|
||||
+
|
||||
+ private TransformType(String name) {
|
||||
+ serializeName = name;
|
||||
+ isModded = false;
|
||||
+ fallback = null;
|
||||
+ }
|
||||
+
|
||||
+ private TransformType(net.minecraft.resources.ResourceLocation serializeName) {
|
||||
+ this.serializeName = java.util.Objects.requireNonNull(serializeName, "Modded TransformTypes must have a non-null serializeName").toString();
|
||||
+ isModded = true;
|
||||
+ fallback = null;
|
||||
+ }
|
||||
+
|
||||
+ private TransformType(net.minecraft.resources.ResourceLocation serializeName, TransformType fallback) {
|
||||
+ this.serializeName = java.util.Objects.requireNonNull(serializeName, "Modded TransformTypes must have a non-null serializeName").toString();
|
||||
+ isModded = true;
|
||||
+ this.fallback = fallback;
|
||||
+ }
|
||||
+
|
||||
+ public boolean isModded() {
|
||||
+ return isModded;
|
||||
+ }
|
||||
+
|
||||
+ @javax.annotation.Nullable
|
||||
+ public TransformType fallback() {
|
||||
+ return fallback;
|
||||
+ }
|
||||
+
|
||||
+ public String getSerializeName() {
|
||||
+ return serializeName;
|
||||
+ }
|
||||
+
|
||||
+ public static TransformType create(String keyName, net.minecraft.resources.ResourceLocation serializeName) {
|
||||
+ throw new IllegalStateException("Enum not extended!");
|
||||
+ }
|
||||
+ public static TransformType create(String keyName, net.minecraft.resources.ResourceLocation serializeName, TransformType fallback) {
|
||||
+ throw new IllegalStateException("Enum not extended!");
|
||||
}
|
||||
}
|
||||
}
|
||||
private ItemTransform m_269518_(JsonDeserializationContext p_270385_, JsonObject p_270436_, ItemDisplayContext p_270100_) {
|
||||
@@ -4,7 +4,7 @@
|
||||
p_113932_.m_252781_((new Quaternionf()).setAngleAxis(p_113929_.m_38352_(p_113931_) * ((float)Math.PI / 180F), 1.0F, 0.0F, 1.0F));
|
||||
}
|
||||
|
||||
- Pair<ResourceLocation, ListModel<Boat>> pair = this.f_173934_.get(p_113929_.m_262365_());
|
||||
- Pair<ResourceLocation, ListModel<Boat>> pair = this.f_173934_.get(p_113929_.m_28554_());
|
||||
+ Pair<ResourceLocation, ListModel<Boat>> pair = getModelWithLocation(p_113929_);
|
||||
ResourceLocation resourcelocation = pair.getFirst();
|
||||
ListModel<Boat> listmodel = pair.getSecond();
|
||||
@@ -15,9 +15,9 @@
|
||||
|
||||
+ @Deprecated // forge: override getModelWithLocation to change the texture / model
|
||||
public ResourceLocation m_5478_(Boat p_113927_) {
|
||||
- return this.f_173934_.get(p_113927_.m_262365_()).getFirst();
|
||||
- return this.f_173934_.get(p_113927_.m_28554_()).getFirst();
|
||||
+ return getModelWithLocation(p_113927_).getFirst();
|
||||
}
|
||||
+
|
||||
+ public Pair<ResourceLocation, ListModel<Boat>> getModelWithLocation(Boat boat) { return this.f_173934_.get(boat.m_262365_()); }
|
||||
+ public Pair<ResourceLocation, ListModel<Boat>> getModelWithLocation(Boat boat) { return this.f_173934_.get(boat.m_28554_()); }
|
||||
}
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
+++ b/net/minecraft/client/renderer/entity/FallingBlockRenderer.java
|
||||
@@ -34,7 +_,9 @@
|
||||
p_114637_.m_85836_();
|
||||
BlockPos blockpos = new BlockPos(p_114634_.m_20185_(), p_114634_.m_20191_().f_82292_, p_114634_.m_20189_());
|
||||
BlockPos blockpos = BlockPos.m_274561_(p_114634_.m_20185_(), p_114634_.m_20191_().f_82292_, p_114634_.m_20189_());
|
||||
p_114637_.m_85837_(-0.5D, 0.0D, -0.5D);
|
||||
- this.f_234617_.m_110937_().m_234379_(level, this.f_234617_.m_110910_(blockstate), blockstate, blockpos, p_114637_, p_114638_.m_6299_(ItemBlockRenderTypes.m_109293_(blockstate)), false, RandomSource.m_216327_(), blockstate.m_60726_(p_114634_.m_31978_()), OverlayTexture.f_118083_);
|
||||
+ var model = this.f_234617_.m_110910_(blockstate);
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
float f = 0.25F;
|
||||
- float f1 = Mth.m_14031_(((float)p_115036_.m_32059_() + p_115038_) / 10.0F + p_115036_.f_31983_) * 0.1F + 0.1F;
|
||||
+ float f1 = shouldBob() ? Mth.m_14031_(((float)p_115036_.m_32059_() + p_115038_) / 10.0F + p_115036_.f_31983_) * 0.1F + 0.1F : 0;
|
||||
float f2 = bakedmodel.m_7442_().m_111808_(ItemTransforms.TransformType.GROUND).f_111757_.y();
|
||||
float f2 = bakedmodel.m_7442_().m_269404_(ItemDisplayContext.GROUND).f_111757_.y();
|
||||
p_115039_.m_252880_(0.0F, f1 + 0.25F * f2, 0.0F);
|
||||
float f3 = p_115036_.m_32008_(p_115038_);
|
||||
p_115039_.m_252781_(Axis.f_252436_.m_252961_(f3));
|
||||
@@ -37,7 +37,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
this.f_115019_.m_115143_(itemstack, ItemTransforms.TransformType.GROUND, false, p_115039_, p_115040_, p_115041_, OverlayTexture.f_118083_, bakedmodel);
|
||||
this.f_115019_.m_115143_(itemstack, ItemDisplayContext.GROUND, false, p_115039_, p_115040_, p_115041_, OverlayTexture.f_118083_, bakedmodel);
|
||||
p_115039_.m_85849_();
|
||||
if (!flag) {
|
||||
- p_115039_.m_252880_(0.0F * f4, 0.0F * f5, 0.09375F * f6);
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
} else {
|
||||
int k = this.m_174208_(p_115076_, 15728880, p_115081_);
|
||||
p_115079_.m_85841_(0.5F, 0.5F, 0.5F);
|
||||
this.f_115047_.m_174269_(itemstack, ItemTransforms.TransformType.FIXED, k, OverlayTexture.f_118083_, p_115079_, p_115080_, p_115076_.m_19879_());
|
||||
this.f_115047_.m_269128_(itemstack, ItemDisplayContext.FIXED, k, OverlayTexture.f_118083_, p_115079_, p_115080_, p_115076_.f_19853_, p_115076_.m_19879_());
|
||||
}
|
||||
+ }
|
||||
}
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
--- a/net/minecraft/client/renderer/entity/ItemRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/entity/ItemRenderer.java
|
||||
@@ -83,7 +_,7 @@
|
||||
|
||||
public ItemRenderer(TextureManager p_174225_, ModelManager p_174226_, ItemColors p_174227_, BlockEntityWithoutLevelRenderer p_174228_) {
|
||||
this.f_115096_ = p_174225_;
|
||||
- this.f_115095_ = new ItemModelShaper(p_174226_);
|
||||
+ this.f_115095_ = new net.minecraftforge.client.model.ForgeItemModelShaper(p_174226_);
|
||||
this.f_174223_ = p_174228_;
|
||||
@@ -80,7 +_,7 @@
|
||||
public ItemRenderer(Minecraft p_266926_, TextureManager p_266774_, ModelManager p_266850_, ItemColors p_267016_, BlockEntityWithoutLevelRenderer p_267049_) {
|
||||
this.f_265848_ = p_266926_;
|
||||
this.f_115096_ = p_266774_;
|
||||
- this.f_115095_ = new ItemModelShaper(p_266850_);
|
||||
+ this.f_115095_ = new net.minecraftforge.client.model.ForgeItemModelShaper(p_266850_);
|
||||
this.f_174223_ = p_267049_;
|
||||
|
||||
for(Item item : BuiltInRegistries.f_257033_) {
|
||||
@@ -124,7 +_,7 @@
|
||||
@@ -121,7 +_,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- p_115151_.m_7442_().m_111808_(p_115145_).m_111763_(p_115146_, p_115147_);
|
||||
+ p_115151_ = net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(p_115147_, p_115151_, p_115145_, p_115146_);
|
||||
- p_115151_.m_7442_().m_269404_(p_270188_).m_111763_(p_115146_, p_115147_);
|
||||
+ p_115151_ = net.minecraftforge.client.ForgeHooksClient.handleCameraTransforms(p_115147_, p_115151_, p_270188_, p_115146_);
|
||||
p_115147_.m_252880_(-0.5F, -0.5F, -0.5F);
|
||||
if (!p_115151_.m_7521_() && (!p_115144_.m_150930_(Items.f_42713_) || flag)) {
|
||||
boolean flag1;
|
||||
@@ -134,8 +_,8 @@
|
||||
@@ -131,8 +_,8 @@
|
||||
} else {
|
||||
flag1 = true;
|
||||
}
|
||||
@@ -29,7 +29,7 @@
|
||||
VertexConsumer vertexconsumer;
|
||||
if (p_115144_.m_204117_(ItemTags.f_215866_) && p_115144_.m_41790_()) {
|
||||
p_115147_.m_85836_();
|
||||
@@ -159,9 +_,11 @@
|
||||
@@ -156,9 +_,11 @@
|
||||
vertexconsumer = m_115211_(p_115148_, rendertype, true, p_115144_.m_41790_());
|
||||
}
|
||||
|
||||
@@ -38,12 +38,12 @@
|
||||
+ }
|
||||
+ }
|
||||
} else {
|
||||
- this.f_174223_.m_108829_(p_115144_, p_115145_, p_115147_, p_115148_, p_115149_, p_115150_);
|
||||
+ net.minecraftforge.client.extensions.common.IClientItemExtensions.of(p_115144_).getCustomRenderer().m_108829_(p_115144_, p_115145_, p_115147_, p_115148_, p_115149_, p_115150_);
|
||||
- this.f_174223_.m_108829_(p_115144_, p_270188_, p_115147_, p_115148_, p_115149_, p_115150_);
|
||||
+ net.minecraftforge.client.extensions.common.IClientItemExtensions.of(p_115144_).getCustomRenderer().m_108829_(p_115144_, p_270188_, p_115147_, p_115148_, p_115149_, p_115150_);
|
||||
}
|
||||
|
||||
p_115147_.m_85849_();
|
||||
@@ -205,7 +_,7 @@
|
||||
@@ -202,7 +_,7 @@
|
||||
float f = (float)(i >> 16 & 255) / 255.0F;
|
||||
float f1 = (float)(i >> 8 & 255) / 255.0F;
|
||||
float f2 = (float)(i & 255) / 255.0F;
|
||||
@@ -52,24 +52,22 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -308,6 +_,7 @@
|
||||
@@ -303,6 +_,7 @@
|
||||
crashreportcategory.m_128165_("Item Type", () -> {
|
||||
return String.valueOf((Object)p_174237_.m_41720_());
|
||||
return String.valueOf((Object)p_275431_.m_41720_());
|
||||
});
|
||||
+ crashreportcategory.m_128165_("Registry Name", () -> String.valueOf(net.minecraftforge.registries.ForgeRegistries.ITEMS.getKey(p_174237_.m_41720_())));
|
||||
+ crashreportcategory.m_128165_("Registry Name", () -> String.valueOf(net.minecraftforge.registries.ForgeRegistries.ITEMS.getKey(p_275431_.m_41720_())));
|
||||
crashreportcategory.m_128165_("Item Damage", () -> {
|
||||
return String.valueOf(p_174237_.m_41773_());
|
||||
return String.valueOf(p_275431_.m_41773_());
|
||||
});
|
||||
@@ -368,6 +_,7 @@
|
||||
RenderSystem.m_69482_();
|
||||
@@ -356,10 +_,15 @@
|
||||
}
|
||||
|
||||
+ net.minecraftforge.client.ItemDecoratorHandler.of(p_115176_).render(p_115175_, p_115176_, p_115177_, p_115178_, f_115093_);
|
||||
p_275269_.m_85849_();
|
||||
+ net.minecraftforge.client.ItemDecoratorHandler.of(p_275590_).render(p_275652_, p_275590_, p_275202_, p_275508_, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -383,5 +_,9 @@
|
||||
|
||||
public void m_6213_(ResourceManager p_115105_) {
|
||||
this.f_115095_.m_109403_();
|
||||
+ }
|
||||
|
||||
+2
-2
@@ -26,8 +26,8 @@
|
||||
float f5 = 0.0F;
|
||||
- if (!p_115308_.m_20159_() && p_115308_.m_6084_()) {
|
||||
+ if (!shouldSit && p_115308_.m_6084_()) {
|
||||
f8 = Mth.m_14179_(p_115310_, p_115308_.f_20923_, p_115308_.f_20924_);
|
||||
f5 = p_115308_.f_20925_ - p_115308_.f_20924_ * (1.0F - p_115310_);
|
||||
f8 = p_115308_.f_267362_.m_267711_(p_115310_);
|
||||
f5 = p_115308_.f_267362_.m_267590_(p_115310_);
|
||||
if (p_115308_.m_6162_()) {
|
||||
@@ -131,6 +_,7 @@
|
||||
|
||||
|
||||
+9
-9
@@ -1,12 +1,12 @@
|
||||
--- a/net/minecraft/client/renderer/entity/layers/HumanoidArmorLayer.java
|
||||
+++ b/net/minecraft/client/renderer/entity/layers/HumanoidArmorLayer.java
|
||||
@@ -46,17 +_,18 @@
|
||||
@@ -56,17 +_,18 @@
|
||||
if (armoritem.m_40402_() == p_117122_) {
|
||||
this.m_117386_().m_102872_(p_117124_);
|
||||
this.m_117125_(p_117124_, p_117122_);
|
||||
+ net.minecraft.client.model.Model model = getArmorModelHook(p_117121_, itemstack, p_117122_, p_117124_);
|
||||
boolean flag = this.m_117128_(p_117122_);
|
||||
boolean flag1 = itemstack.m_41790_();
|
||||
boolean flag1 = this.m_117128_(p_117122_);
|
||||
boolean flag = itemstack.m_41790_();
|
||||
- if (armoritem instanceof DyeableArmorItem) {
|
||||
- int i = ((DyeableArmorItem)armoritem).m_41121_(itemstack);
|
||||
+ if (armoritem instanceof net.minecraft.world.item.DyeableLeatherItem) {
|
||||
@@ -14,17 +14,17 @@
|
||||
float f = (float)(i >> 16 & 255) / 255.0F;
|
||||
float f1 = (float)(i >> 8 & 255) / 255.0F;
|
||||
float f2 = (float)(i & 255) / 255.0F;
|
||||
- this.m_117106_(p_117119_, p_117120_, p_117123_, armoritem, flag1, p_117124_, flag, f, f1, f2, (String)null);
|
||||
- this.m_117106_(p_117119_, p_117120_, p_117123_, armoritem, flag1, p_117124_, flag, 1.0F, 1.0F, 1.0F, "overlay");
|
||||
- this.m_117106_(p_117119_, p_117120_, p_117123_, armoritem, flag, p_117124_, flag1, f, f1, f2, (String)null);
|
||||
- this.m_117106_(p_117119_, p_117120_, p_117123_, armoritem, flag, p_117124_, flag1, 1.0F, 1.0F, 1.0F, "overlay");
|
||||
+ this.renderModel(p_117119_, p_117120_, p_117123_, flag1, model, f, f1, f2, this.getArmorResource(p_117121_, itemstack, p_117122_, null));
|
||||
+ this.renderModel(p_117119_, p_117120_, p_117123_, flag1, model, 1.0F, 1.0F, 1.0F, this.getArmorResource(p_117121_, itemstack, p_117122_, "overlay"));
|
||||
} else {
|
||||
- this.m_117106_(p_117119_, p_117120_, p_117123_, armoritem, flag1, p_117124_, flag, 1.0F, 1.0F, 1.0F, (String)null);
|
||||
- this.m_117106_(p_117119_, p_117120_, p_117123_, armoritem, flag, p_117124_, flag1, 1.0F, 1.0F, 1.0F, (String)null);
|
||||
+ this.renderModel(p_117119_, p_117120_, p_117123_, flag1, model, 1.0F, 1.0F, 1.0F, this.getArmorResource(p_117121_, itemstack, p_117122_, null));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -88,7 +_,10 @@
|
||||
if (p_117121_.f_19853_.m_246046_().m_245372_(FeatureFlags.f_244168_)) {
|
||||
@@ -104,7 +_,10 @@
|
||||
}
|
||||
|
||||
private void m_117106_(PoseStack p_117107_, MultiBufferSource p_117108_, int p_117109_, ArmorItem p_117110_, boolean p_117111_, A p_117112_, boolean p_117113_, float p_117114_, float p_117115_, float p_117116_, @Nullable String p_117117_) {
|
||||
@@ -36,7 +36,7 @@
|
||||
p_117112_.m_7695_(p_117107_, vertexconsumer, p_117109_, OverlayTexture.f_118083_, p_117114_, p_117115_, p_117116_, 1.0F);
|
||||
}
|
||||
|
||||
@@ -100,8 +_,50 @@
|
||||
@@ -122,8 +_,50 @@
|
||||
return p_117129_ == EquipmentSlot.LEGS;
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/entity/player/PlayerRenderer.java
|
||||
+++ b/net/minecraft/client/renderer/entity/player/PlayerRenderer.java
|
||||
@@ -57,7 +_,9 @@
|
||||
@@ -59,7 +_,9 @@
|
||||
|
||||
public void m_7392_(AbstractClientPlayer p_117788_, float p_117789_, float p_117790_, PoseStack p_117791_, MultiBufferSource p_117792_, int p_117793_) {
|
||||
this.m_117818_(p_117788_);
|
||||
@@ -10,9 +10,9 @@
|
||||
}
|
||||
|
||||
public Vec3 m_7860_(AbstractClientPlayer p_117785_, float p_117786_) {
|
||||
@@ -126,10 +_,13 @@
|
||||
if (useanim == UseAnim.TOOT_HORN) {
|
||||
return HumanoidModel.ArmPose.TOOT_HORN;
|
||||
@@ -132,10 +_,13 @@
|
||||
if (useanim == UseAnim.BRUSH) {
|
||||
return HumanoidModel.ArmPose.BRUSH;
|
||||
}
|
||||
- } else if (!p_117795_.f_20911_ && itemstack.m_150930_(Items.f_42717_) && CrossbowItem.m_40932_(itemstack)) {
|
||||
+ } else if (!p_117795_.f_20911_ && itemstack.m_41720_() instanceof CrossbowItem && CrossbowItem.m_40932_(itemstack)) {
|
||||
@@ -25,7 +25,7 @@
|
||||
return HumanoidModel.ArmPose.ITEM;
|
||||
}
|
||||
}
|
||||
@@ -161,10 +_,12 @@
|
||||
@@ -167,10 +_,12 @@
|
||||
}
|
||||
|
||||
public void m_117770_(PoseStack p_117771_, MultiBufferSource p_117772_, int p_117773_, AbstractClientPlayer p_117774_) {
|
||||
@@ -38,7 +38,7 @@
|
||||
this.m_117775_(p_117814_, p_117815_, p_117816_, p_117817_, (this.f_115290_).f_102812_, (this.f_115290_).f_103374_);
|
||||
}
|
||||
|
||||
@@ -202,7 +_,7 @@
|
||||
@@ -208,7 +_,7 @@
|
||||
}
|
||||
} else if (f > 0.0F) {
|
||||
super.m_7523_(p_117802_, p_117803_, p_117804_, p_117805_, p_117806_);
|
||||
|
||||
@@ -1,153 +1,22 @@
|
||||
--- a/net/minecraft/client/renderer/item/ItemProperties.java
|
||||
+++ b/net/minecraft/client/renderer/item/ItemProperties.java
|
||||
@@ -40,7 +_,7 @@
|
||||
};
|
||||
@@ -47,6 +_,9 @@
|
||||
private static final Map<Item, Map<ResourceLocation, ItemPropertyFunction>> f_117825_ = Maps.newHashMap();
|
||||
|
||||
- private static ClampedItemPropertyFunction m_174581_(ResourceLocation p_174582_, ClampedItemPropertyFunction p_174583_) {
|
||||
private static ClampedItemPropertyFunction m_174581_(ResourceLocation p_174582_, ClampedItemPropertyFunction p_174583_) {
|
||||
+ return (ClampedItemPropertyFunction) registerGeneric(p_174582_, (ItemPropertyFunction) p_174583_);
|
||||
+ }
|
||||
+ public static ItemPropertyFunction registerGeneric(ResourceLocation p_174582_, ItemPropertyFunction p_174583_) {
|
||||
f_117820_.put(p_174582_, p_174583_);
|
||||
return p_174583_;
|
||||
}
|
||||
@@ -49,7 +_,7 @@
|
||||
f_117820_.put(new ResourceLocation("custom_model_data"), p_174580_);
|
||||
@@ -56,6 +_,9 @@
|
||||
}
|
||||
|
||||
- private static void m_174570_(Item p_174571_, ResourceLocation p_174572_, ClampedItemPropertyFunction p_174573_) {
|
||||
private static void m_174570_(Item p_174571_, ResourceLocation p_174572_, ClampedItemPropertyFunction p_174573_) {
|
||||
+ register(p_174571_, p_174572_, (ItemPropertyFunction) p_174573_);
|
||||
+ }
|
||||
+ public static void register(Item p_174571_, ResourceLocation p_174572_, ItemPropertyFunction p_174573_) {
|
||||
f_117825_.computeIfAbsent(p_174571_, (p_117828_) -> {
|
||||
return Maps.newHashMap();
|
||||
}).put(p_174572_, p_174573_);
|
||||
@@ -77,29 +_,29 @@
|
||||
}
|
||||
|
||||
static {
|
||||
- m_174581_(new ResourceLocation("lefthanded"), (p_174650_, p_174651_, p_174652_, p_174653_) -> {
|
||||
+ registerGeneric(new ResourceLocation("lefthanded"), (p_174650_, p_174651_, p_174652_, p_174653_) -> {
|
||||
return p_174652_ != null && p_174652_.m_5737_() != HumanoidArm.RIGHT ? 1.0F : 0.0F;
|
||||
});
|
||||
- m_174581_(new ResourceLocation("cooldown"), (p_174645_, p_174646_, p_174647_, p_174648_) -> {
|
||||
+ registerGeneric(new ResourceLocation("cooldown"), (p_174645_, p_174646_, p_174647_, p_174648_) -> {
|
||||
return p_174647_ instanceof Player ? ((Player)p_174647_).m_36335_().m_41521_(p_174645_.m_41720_(), 0.0F) : 0.0F;
|
||||
});
|
||||
m_174579_((p_174640_, p_174641_, p_174642_, p_174643_) -> {
|
||||
return p_174640_.m_41782_() ? (float)p_174640_.m_41783_().m_128451_("CustomModelData") : 0.0F;
|
||||
});
|
||||
- m_174570_(Items.f_42411_, new ResourceLocation("pull"), (p_174635_, p_174636_, p_174637_, p_174638_) -> {
|
||||
+ register(Items.f_42411_, new ResourceLocation("pull"), (p_174635_, p_174636_, p_174637_, p_174638_) -> {
|
||||
if (p_174637_ == null) {
|
||||
return 0.0F;
|
||||
} else {
|
||||
return p_174637_.m_21211_() != p_174635_ ? 0.0F : (float)(p_174635_.m_41779_() - p_174637_.m_21212_()) / 20.0F;
|
||||
}
|
||||
});
|
||||
- m_174570_(Items.f_42411_, new ResourceLocation("pulling"), (p_174630_, p_174631_, p_174632_, p_174633_) -> {
|
||||
+ register(Items.f_42411_, new ResourceLocation("pulling"), (p_174630_, p_174631_, p_174632_, p_174633_) -> {
|
||||
return p_174632_ != null && p_174632_.m_6117_() && p_174632_.m_21211_() == p_174630_ ? 1.0F : 0.0F;
|
||||
});
|
||||
- m_174570_(Items.f_151058_, new ResourceLocation("filled"), (p_174625_, p_174626_, p_174627_, p_174628_) -> {
|
||||
+ register(Items.f_151058_, new ResourceLocation("filled"), (p_174625_, p_174626_, p_174627_, p_174628_) -> {
|
||||
return BundleItem.m_150766_(p_174625_);
|
||||
});
|
||||
- m_174570_(Items.f_42524_, new ResourceLocation("time"), new ClampedItemPropertyFunction() {
|
||||
+ register(Items.f_42524_, new ResourceLocation("time"), new ClampedItemPropertyFunction() {
|
||||
private double f_117899_;
|
||||
private double f_117900_;
|
||||
private long f_117901_;
|
||||
@@ -142,56 +_,56 @@
|
||||
return this.f_117899_;
|
||||
}
|
||||
});
|
||||
- m_174570_(Items.f_42522_, new ResourceLocation("angle"), new CompassItemPropertyFunction((p_234992_, p_234993_, p_234994_) -> {
|
||||
+ register(Items.f_42522_, new ResourceLocation("angle"), new CompassItemPropertyFunction((p_234992_, p_234993_, p_234994_) -> {
|
||||
return CompassItem.m_40736_(p_234993_) ? CompassItem.m_220021_(p_234993_.m_41784_()) : CompassItem.m_220019_(p_234992_);
|
||||
}));
|
||||
- m_174570_(Items.f_220211_, new ResourceLocation("angle"), new CompassItemPropertyFunction((p_234983_, p_234984_, p_234985_) -> {
|
||||
+ register(Items.f_220211_, new ResourceLocation("angle"), new CompassItemPropertyFunction((p_234983_, p_234984_, p_234985_) -> {
|
||||
if (p_234985_ instanceof Player player) {
|
||||
return player.m_219759_().orElse((GlobalPos)null);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}));
|
||||
- m_174570_(Items.f_42717_, new ResourceLocation("pull"), (p_174610_, p_174611_, p_174612_, p_174613_) -> {
|
||||
- if (p_174612_ == null) {
|
||||
+ register(Items.f_42717_, new ResourceLocation("pull"), (p_174620_, p_174621_, p_174622_, p_174623_) -> {
|
||||
+ if (p_174622_ == null) {
|
||||
return 0.0F;
|
||||
} else {
|
||||
- return CrossbowItem.m_40932_(p_174610_) ? 0.0F : (float)(p_174610_.m_41779_() - p_174612_.m_21212_()) / (float)CrossbowItem.m_40939_(p_174610_);
|
||||
+ return CrossbowItem.m_40932_(p_174620_) ? 0.0F : (float)(p_174620_.m_41779_() - p_174622_.m_21212_()) / (float)CrossbowItem.m_40939_(p_174620_);
|
||||
}
|
||||
});
|
||||
- m_174570_(Items.f_42717_, new ResourceLocation("pulling"), (p_174605_, p_174606_, p_174607_, p_174608_) -> {
|
||||
- return p_174607_ != null && p_174607_.m_6117_() && p_174607_.m_21211_() == p_174605_ && !CrossbowItem.m_40932_(p_174605_) ? 1.0F : 0.0F;
|
||||
- });
|
||||
- m_174570_(Items.f_42717_, new ResourceLocation("charged"), (p_174600_, p_174601_, p_174602_, p_174603_) -> {
|
||||
- return p_174602_ != null && CrossbowItem.m_40932_(p_174600_) ? 1.0F : 0.0F;
|
||||
- });
|
||||
- m_174570_(Items.f_42717_, new ResourceLocation("firework"), (p_174595_, p_174596_, p_174597_, p_174598_) -> {
|
||||
- return p_174597_ != null && CrossbowItem.m_40932_(p_174595_) && CrossbowItem.m_40871_(p_174595_, Items.f_42688_) ? 1.0F : 0.0F;
|
||||
- });
|
||||
- m_174570_(Items.f_42741_, new ResourceLocation("broken"), (p_174590_, p_174591_, p_174592_, p_174593_) -> {
|
||||
- return ElytraItem.m_41140_(p_174590_) ? 0.0F : 1.0F;
|
||||
- });
|
||||
- m_174570_(Items.f_42523_, new ResourceLocation("cast"), (p_174585_, p_174586_, p_174587_, p_174588_) -> {
|
||||
- if (p_174587_ == null) {
|
||||
+ register(Items.f_42717_, new ResourceLocation("pulling"), (p_174615_, p_174616_, p_174617_, p_174618_) -> {
|
||||
+ return p_174617_ != null && p_174617_.m_6117_() && p_174617_.m_21211_() == p_174615_ && !CrossbowItem.m_40932_(p_174615_) ? 1.0F : 0.0F;
|
||||
+ });
|
||||
+ register(Items.f_42717_, new ResourceLocation("charged"), (p_174610_, p_174611_, p_174612_, p_174613_) -> {
|
||||
+ return p_174612_ != null && CrossbowItem.m_40932_(p_174610_) ? 1.0F : 0.0F;
|
||||
+ });
|
||||
+ register(Items.f_42717_, new ResourceLocation("firework"), (p_174605_, p_174606_, p_174607_, p_174608_) -> {
|
||||
+ return p_174607_ != null && CrossbowItem.m_40932_(p_174605_) && CrossbowItem.m_40871_(p_174605_, Items.f_42688_) ? 1.0F : 0.0F;
|
||||
+ });
|
||||
+ register(Items.f_42741_, new ResourceLocation("broken"), (p_174600_, p_174601_, p_174602_, p_174603_) -> {
|
||||
+ return ElytraItem.m_41140_(p_174600_) ? 0.0F : 1.0F;
|
||||
+ });
|
||||
+ register(Items.f_42523_, new ResourceLocation("cast"), (p_174595_, p_174596_, p_174597_, p_174598_) -> {
|
||||
+ if (p_174597_ == null) {
|
||||
return 0.0F;
|
||||
} else {
|
||||
- boolean flag = p_174587_.m_21205_() == p_174585_;
|
||||
- boolean flag1 = p_174587_.m_21206_() == p_174585_;
|
||||
- if (p_174587_.m_21205_().m_41720_() instanceof FishingRodItem) {
|
||||
+ boolean flag = p_174597_.m_21205_() == p_174595_;
|
||||
+ boolean flag1 = p_174597_.m_21206_() == p_174595_;
|
||||
+ if (p_174597_.m_21205_().m_41720_() instanceof FishingRodItem) {
|
||||
flag1 = false;
|
||||
}
|
||||
|
||||
- return (flag || flag1) && p_174587_ instanceof Player && ((Player)p_174587_).f_36083_ != null ? 1.0F : 0.0F;
|
||||
+ return (flag || flag1) && p_174597_ instanceof Player && ((Player)p_174597_).f_36083_ != null ? 1.0F : 0.0F;
|
||||
}
|
||||
});
|
||||
- m_174570_(Items.f_42740_, new ResourceLocation("blocking"), (p_174575_, p_174576_, p_174577_, p_174578_) -> {
|
||||
- return p_174577_ != null && p_174577_.m_6117_() && p_174577_.m_21211_() == p_174575_ ? 1.0F : 0.0F;
|
||||
- });
|
||||
- m_174570_(Items.f_42713_, new ResourceLocation("throwing"), (p_234996_, p_234997_, p_234998_, p_234999_) -> {
|
||||
- return p_234998_ != null && p_234998_.m_6117_() && p_234998_.m_21211_() == p_234996_ ? 1.0F : 0.0F;
|
||||
- });
|
||||
- m_174570_(Items.f_151033_, new ResourceLocation("level"), (p_234987_, p_234988_, p_234989_, p_234990_) -> {
|
||||
- CompoundTag compoundtag = p_234987_.m_41737_("BlockStateTag");
|
||||
+ register(Items.f_42740_, new ResourceLocation("blocking"), (p_174590_, p_174591_, p_174592_, p_174593_) -> {
|
||||
+ return p_174592_ != null && p_174592_.m_6117_() && p_174592_.m_21211_() == p_174590_ ? 1.0F : 0.0F;
|
||||
+ });
|
||||
+ register(Items.f_42713_, new ResourceLocation("throwing"), (p_174585_, p_174586_, p_174587_, p_174588_) -> {
|
||||
+ return p_174587_ != null && p_174587_.m_6117_() && p_174587_.m_21211_() == p_174585_ ? 1.0F : 0.0F;
|
||||
+ });
|
||||
+ register(Items.f_151033_, new ResourceLocation("level"), (p_174575_, p_174576_, p_174577_, p_174578_) -> {
|
||||
+ CompoundTag compoundtag = p_174575_.m_41737_("BlockStateTag");
|
||||
|
||||
try {
|
||||
if (compoundtag != null) {
|
||||
@@ -205,7 +_,7 @@
|
||||
|
||||
return 1.0F;
|
||||
});
|
||||
- m_174570_(Items.f_220219_, new ResourceLocation("tooting"), (p_234978_, p_234979_, p_234980_, p_234981_) -> {
|
||||
+ register(Items.f_220219_, new ResourceLocation("tooting"), (p_234978_, p_234979_, p_234980_, p_234981_) -> {
|
||||
return p_234980_ != null && p_234980_.m_6117_() && p_234980_.m_21211_() == p_234978_ ? 1.0F : 0.0F;
|
||||
});
|
||||
}
|
||||
@@ -1,33 +1,33 @@
|
||||
--- a/net/minecraft/client/renderer/texture/SpriteLoader.java
|
||||
+++ b/net/minecraft/client/renderer/texture/SpriteLoader.java
|
||||
@@ -64,7 +_,7 @@
|
||||
int i1 = Math.min(j, k);
|
||||
int j1 = Mth.m_14173_(i1);
|
||||
int k1;
|
||||
- if (j1 < p_261919_) {
|
||||
@@ -68,7 +_,7 @@
|
||||
int j1 = Math.min(j, k);
|
||||
int k1 = Mth.m_14173_(j1);
|
||||
int l1;
|
||||
- if (k1 < p_261919_) {
|
||||
+ if (false) { // Forge: Do not lower the mipmap level
|
||||
f_244357_.warn("{}: dropping miplevel from {} to {}, because of minimum power of two: {}", this.f_244500_, p_261919_, j1, i1);
|
||||
k1 = j1;
|
||||
f_244357_.warn("{}: dropping miplevel from {} to {}, because of minimum power of two: {}", this.f_244500_, p_261919_, k1, j1);
|
||||
l1 = k1;
|
||||
} else {
|
||||
@@ -138,6 +_,9 @@
|
||||
@@ -144,6 +_,9 @@
|
||||
|
||||
FrameSize framesize = animationmetadatasection.m_245821_(nativeimage.m_84982_(), nativeimage.m_85084_());
|
||||
if (Mth.m_246985_(nativeimage.m_84982_(), framesize.f_244129_()) && Mth.m_246985_(nativeimage.m_85084_(), framesize.f_244503_())) {
|
||||
if (Mth.m_264612_(nativeimage.m_84982_(), framesize.f_244129_()) && Mth.m_264612_(nativeimage.m_85084_(), framesize.f_244503_())) {
|
||||
+ SpriteContents contents = net.minecraftforge.client.ForgeHooksClient.loadSpriteContents(p_251630_, p_250558_, framesize, nativeimage, animationmetadatasection);
|
||||
+ if (contents != null)
|
||||
+ return contents;
|
||||
return new SpriteContents(p_251630_, framesize, nativeimage, animationmetadatasection);
|
||||
} else {
|
||||
f_244357_.error("Image {} size {},{} is not multiple of frame size {},{}", p_251630_, nativeimage.m_84982_(), nativeimage.m_85084_(), framesize.f_244129_(), framesize.f_244503_());
|
||||
@@ -151,6 +_,11 @@
|
||||
int i = p_249904_.m_118174_();
|
||||
int j = p_249904_.m_118187_();
|
||||
p_249904_.m_118180_((p_251421_, p_250533_, p_251913_) -> {
|
||||
+ TextureAtlasSprite sprite = net.minecraftforge.client.ForgeHooksClient.loadTextureAtlasSprite(this.f_244500_, p_251421_, i, j, p_250533_, p_251913_, p_251421_.f_243731_.length - 1);
|
||||
@@ -155,6 +_,11 @@
|
||||
private Map<ResourceLocation, TextureAtlasSprite> m_276091_(Stitcher<SpriteContents> p_276117_, int p_276111_, int p_276112_) {
|
||||
Map<ResourceLocation, TextureAtlasSprite> map = new HashMap<>();
|
||||
p_276117_.m_118180_((p_251421_, p_250533_, p_251913_) -> {
|
||||
+ TextureAtlasSprite sprite = net.minecraftforge.client.ForgeHooksClient.loadTextureAtlasSprite(this.f_244500_, p_251421_, p_276111_, p_276112_, p_250533_, p_251913_, p_251421_.f_243731_.length - 1);
|
||||
+ if (sprite != null) {
|
||||
+ map.put(p_251421_.m_246162_(), sprite);
|
||||
+ return;
|
||||
+ }
|
||||
map.put(p_251421_.m_246162_(), new TextureAtlasSprite(this.f_244500_, p_251421_, i, j, p_250533_, p_251913_));
|
||||
map.put(p_251421_.m_246162_(), new TextureAtlasSprite(this.f_244500_, p_251421_, p_276111_, p_276112_, p_250533_, p_251913_));
|
||||
});
|
||||
return map;
|
||||
@@ -24,7 +24,7 @@
|
||||
throw new StitcherException(holder.f_244486_, list.stream().map((p_247946_) -> {
|
||||
return p_247946_.f_244486_;
|
||||
}).collect(ImmutableList.toImmutableList()));
|
||||
@@ -97,7 +_,7 @@
|
||||
@@ -95,7 +_,7 @@
|
||||
boolean flag4 = flag2 && j != l;
|
||||
boolean flag;
|
||||
if (flag3 ^ flag4) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/texture/TextureAtlas.java
|
||||
+++ b/net/minecraft/client/renderer/texture/TextureAtlas.java
|
||||
@@ -74,6 +_,8 @@
|
||||
@@ -80,6 +_,8 @@
|
||||
|
||||
this.f_118263_ = List.copyOf(list);
|
||||
this.f_118262_ = List.copyOf(list1);
|
||||
@@ -8,8 +8,8 @@
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onTextureStitchedPost(this);
|
||||
}
|
||||
|
||||
private void m_246472_(int p_252243_, int p_251110_, int p_249203_) {
|
||||
@@ -145,5 +_,12 @@
|
||||
public void m_276079_(ResourceLocation p_276106_, Path p_276127_) throws IOException {
|
||||
@@ -151,5 +_,12 @@
|
||||
|
||||
public void m_247255_(SpriteLoader.Preparations p_251993_) {
|
||||
this.m_117960_(false, p_251993_.f_244353_() > 0);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/renderer/texture/TextureManager.java
|
||||
+++ b/net/minecraft/client/renderer/texture/TextureManager.java
|
||||
@@ -166,6 +_,7 @@
|
||||
@@ -168,6 +_,7 @@
|
||||
public void m_118513_(ResourceLocation p_118514_) {
|
||||
AbstractTexture abstracttexture = this.m_174786_(p_118514_, MissingTextureAtlasSprite.m_118080_());
|
||||
if (abstracttexture != MissingTextureAtlasSprite.m_118080_()) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/client/resources/language/ClientLanguage.java
|
||||
+++ b/net/minecraft/client/resources/language/ClientLanguage.java
|
||||
@@ -80,4 +_,9 @@
|
||||
@@ -74,4 +_,9 @@
|
||||
public FormattedCharSequence m_5536_(FormattedText p_118925_) {
|
||||
return FormattedBidiReorder.m_118931_(p_118925_, this.f_118911_);
|
||||
}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
--- a/net/minecraft/client/resources/language/LanguageInfo.java
|
||||
+++ b/net/minecraft/client/resources/language/LanguageInfo.java
|
||||
@@ -17,6 +_,12 @@
|
||||
this.f_118944_ = p_118949_;
|
||||
this.f_118945_ = p_118950_;
|
||||
this.f_118946_ = p_118951_;
|
||||
+ String[] splitLangCode = f_118943_.split("_", 2);
|
||||
+ if (splitLangCode.length == 1) { // Vanilla has some languages without underscores
|
||||
+ this.javaLocale = new java.util.Locale(f_118943_);
|
||||
+ } else {
|
||||
+ this.javaLocale = new java.util.Locale(splitLangCode[0], splitLangCode[1]);
|
||||
+ }
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
@@ -54,4 +_,8 @@
|
||||
public int compareTo(LanguageInfo p_118954_) {
|
||||
return this.f_118943_.compareTo(p_118954_.f_118943_);
|
||||
}
|
||||
+
|
||||
+ // Forge: add access to Locale so modders can create correct string and number formatters
|
||||
+ private final java.util.Locale javaLocale;
|
||||
+ public java.util.Locale getJavaLocale() { return javaLocale; }
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
--- a/net/minecraft/client/resources/language/LanguageManager.java
|
||||
+++ b/net/minecraft/client/resources/language/LanguageManager.java
|
||||
@@ -29,7 +_,7 @@
|
||||
private String f_118967_;
|
||||
|
||||
public LanguageManager(String p_118971_) {
|
||||
- this.f_118967_ = p_118971_;
|
||||
+ m_264110_(p_118971_);
|
||||
}
|
||||
|
||||
private static Map<String, LanguageInfo> m_118981_(Stream<PackResources> p_118982_) {
|
||||
@@ -66,8 +_,12 @@
|
||||
Language.m_128114_(clientlanguage);
|
||||
}
|
||||
|
||||
+ private java.util.Locale javaLocale; // Forge: add locale information for modders
|
||||
+ public java.util.Locale getJavaLocale() { return javaLocale; }
|
||||
public void m_264110_(String p_265224_) {
|
||||
this.f_118967_ = p_265224_;
|
||||
+ final String[] langSplit = p_265224_.split("_", 2);
|
||||
+ this.javaLocale = langSplit.length == 1 ? new java.util.Locale(langSplit[0]) : new java.util.Locale(langSplit[0], langSplit[1]);
|
||||
}
|
||||
|
||||
public String m_264236_() {
|
||||
Loaded 100 of 394 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user