mirror of
https://github.com/GTNewHorizons/waila.git
synced 2026-11-20 04:10:04 +00:00
And the rest of it..
This commit is contained in:
1 parent
1b3919aa57
commit
6b61229d58
2 files changed
+2
-38
No files matched your search
@@ -71,12 +71,6 @@ public class MetaDataProvider{
|
||||
accessor.resetTimer();
|
||||
HashSet<String> keys = new HashSet<String>();
|
||||
|
||||
if (ModuleRegistrar.instance().hasSyncedNBTKeys(block))
|
||||
keys.addAll(ModuleRegistrar.instance().getSyncedNBTKeys(block));
|
||||
|
||||
if (ModuleRegistrar.instance().hasSyncedNBTKeys(accessor.getTileEntity()))
|
||||
keys.addAll(ModuleRegistrar.instance().getSyncedNBTKeys(accessor.getTileEntity()));
|
||||
|
||||
if (keys.size() != 0 || ModuleRegistrar.instance().hasNBTProviders(block) || ModuleRegistrar.instance().hasNBTProviders(accessor.getTileEntity()))
|
||||
WailaPacketHandler.INSTANCE.sendToServer(new Message0x01TERequest(accessor.getTileEntity(), keys));
|
||||
|
||||
@@ -176,9 +170,6 @@ public class MetaDataProvider{
|
||||
if (accessor.getEntity() != null && Waila.instance.serverPresent && accessor.isTimeElapsed(250)){
|
||||
accessor.resetTimer();
|
||||
HashSet<String> keys = new HashSet<String>();
|
||||
|
||||
if (ModuleRegistrar.instance().hasSyncedNBTKeys(accessor.getEntity()))
|
||||
keys.addAll(ModuleRegistrar.instance().getSyncedNBTKeys(accessor.getEntity()));
|
||||
|
||||
if (keys.size() != 0 || ModuleRegistrar.instance().hasNBTEntityProviders(accessor.getEntity()))
|
||||
WailaPacketHandler.INSTANCE.sendToServer(new Message0x03EntRequest(accessor.getEntity(), keys));
|
||||
|
||||
@@ -212,16 +212,7 @@ public class ModuleRegistrar implements IWailaRegistrar {
|
||||
if (providers.contains(dataProvider)) return;
|
||||
|
||||
target.get(clazz).add(dataProvider);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@Override
|
||||
public void registerSyncedNBTKey(String key, Class target){
|
||||
if (!this.syncedNBTKeys.containsKey(target))
|
||||
this.syncedNBTKeys.put(target, new HashSet<String>());
|
||||
|
||||
this.syncedNBTKeys.get(target).add(key);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerTooltipRenderer(String name, IWailaTooltipRenderer renderer){
|
||||
@@ -319,16 +310,6 @@ public class ModuleRegistrar implements IWailaRegistrar {
|
||||
Map<Integer, List<T>> returnList = new TreeMap<Integer, List<T>>();
|
||||
returnList.put(0, target.get(name));
|
||||
return returnList;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public HashSet<String> getSyncedNBTKeys(Object target){
|
||||
HashSet<String> returnList = new HashSet<String>();
|
||||
for (Class clazz : this.syncedNBTKeys.keySet())
|
||||
if (clazz.isInstance(target))
|
||||
returnList.addAll(this.syncedNBTKeys.get(clazz));
|
||||
|
||||
return returnList;
|
||||
}
|
||||
|
||||
/* HAS METHODS */
|
||||
@@ -406,15 +387,7 @@ public class ModuleRegistrar implements IWailaRegistrar {
|
||||
|
||||
public boolean hasSummaryProvider(Class item){
|
||||
return this.summaryProviders.containsKey(item);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public boolean hasSyncedNBTKeys(Object target){
|
||||
for (Class clazz : this.syncedNBTKeys.keySet())
|
||||
if (clazz.isInstance(target))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------- */
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user