Files
MinecraftForge/patches/minecraft/net/minecraft/network/syncher/SynchedEntityData.java.patch
T
SizableShrimp 6845c094ab Forge 1.19.1
Load natives from classpath
Make command argument types a forge registry
Add `EntityMobGriefingEvent` to `Allay#wantsToPickUp`
Overhaul `ServerChatEvent` to use `ChatDecorator` system
Remove `ClientChatEvent#setMessage` for now
Gradle 7.5

Signed-off-by: SizableShrimp <[email protected]>
2022-07-28 00:20:31 -05:00

19 lines
1.2 KiB
Diff

--- a/net/minecraft/network/syncher/SynchedEntityData.java
+++ b/net/minecraft/network/syncher/SynchedEntityData.java
@@ -38,11 +_,13 @@
}
public static <T> EntityDataAccessor<T> m_135353_(Class<? extends Entity> p_135354_, EntityDataSerializer<T> p_135355_) {
- if (f_135342_.isDebugEnabled()) {
+ if (true || f_135342_.isDebugEnabled()) { // Forge: This is very useful for mods that register keys on classes that are not their own
try {
Class<?> oclass = Class.forName(Thread.currentThread().getStackTrace()[2].getClassName());
if (!oclass.equals(p_135354_)) {
- f_135342_.debug("defineId called for: {} from {}", p_135354_, oclass, new RuntimeException());
+ // Forge: log at warn, mods should not add to classes that they don't own, and only add stacktrace when in debug is enabled as it is mostly not needed and consumes time
+ if (f_135342_.isDebugEnabled()) f_135342_.warn("defineId called for: {} from {}", p_135354_, oclass, new RuntimeException());
+ else f_135342_.warn("defineId called for: {} from {}", p_135354_, oclass);
}
} catch (ClassNotFoundException classnotfoundexception) {
}