mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-23 21:49:46 +00:00
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]>
19 lines
1.2 KiB
Diff
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) {
|
|
}
|