001 package cpw.mods.fml.common; 002 003 import java.io.File; 004 import java.util.List; 005 import java.util.Set; 006 007 import com.google.common.eventbus.EventBus; 008 009 import cpw.mods.fml.common.versioning.ArtifactVersion; 010 011 public class InjectedModContainer implements ModContainer 012 { 013 private File source; 014 private ModContainer wrappedContainer; 015 016 public InjectedModContainer(ModContainer mc, File source) 017 { 018 this.source = source; 019 this.wrappedContainer = mc; 020 } 021 022 public String getModId() 023 { 024 return wrappedContainer.getModId(); 025 } 026 027 public String getName() 028 { 029 return wrappedContainer.getName(); 030 } 031 032 public String getVersion() 033 { 034 return wrappedContainer.getVersion(); 035 } 036 037 public File getSource() 038 { 039 return source; 040 } 041 042 public ModMetadata getMetadata() 043 { 044 return wrappedContainer.getMetadata(); 045 } 046 047 public void bindMetadata(MetadataCollection mc) 048 { 049 wrappedContainer.bindMetadata(mc); 050 } 051 052 public void setEnabledState(boolean enabled) 053 { 054 wrappedContainer.setEnabledState(enabled); 055 } 056 057 public Set<ArtifactVersion> getRequirements() 058 { 059 return wrappedContainer.getRequirements(); 060 } 061 062 public List<ArtifactVersion> getDependencies() 063 { 064 return wrappedContainer.getDependencies(); 065 } 066 067 public List<ArtifactVersion> getDependants() 068 { 069 return wrappedContainer.getDependants(); 070 } 071 072 public String getSortingRules() 073 { 074 return wrappedContainer.getSortingRules(); 075 } 076 077 public boolean registerBus(EventBus bus, LoadController controller) 078 { 079 return wrappedContainer.registerBus(bus, controller); 080 } 081 082 public boolean matches(Object mod) 083 { 084 return wrappedContainer.matches(mod); 085 } 086 087 public Object getMod() 088 { 089 return wrappedContainer.getMod(); 090 } 091 092 public ArtifactVersion getProcessedVersion() 093 { 094 return wrappedContainer.getProcessedVersion(); 095 } 096 097 @Override 098 public boolean isNetworkMod() 099 { 100 return wrappedContainer.isNetworkMod(); 101 } 102 @Override 103 public boolean isImmutable() 104 { 105 return true; 106 } 107 108 @Override 109 public String getDisplayVersion() 110 { 111 return wrappedContainer.getDisplayVersion(); 112 } 113 }