1.15 port
This commit is contained in:
@@ -23,7 +23,7 @@ import java.util.EnumMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
|
||||
import appeng.api.config.LevelEmitterMode;
|
||||
import appeng.api.config.Settings;
|
||||
@@ -82,11 +82,11 @@ public final class ConfigManager implements IConfigManager
|
||||
* @param tagCompound to be written to compound
|
||||
*/
|
||||
@Override
|
||||
public void writeToNBT( final NBTTagCompound tagCompound )
|
||||
public void writeToNBT( final CompoundNBT tagCompound )
|
||||
{
|
||||
for( final Map.Entry<Settings, Enum<?>> entry : this.settings.entrySet() )
|
||||
{
|
||||
tagCompound.setString( entry.getKey().name(), this.settings.get( entry.getKey() ).toString() );
|
||||
tagCompound.putString( entry.getKey().name(), this.settings.get( entry.getKey() ).toString() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,13 +96,13 @@ public final class ConfigManager implements IConfigManager
|
||||
* @param tagCompound to be read from compound
|
||||
*/
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound tagCompound )
|
||||
public void readFromNBT( final CompoundNBT tagCompound )
|
||||
{
|
||||
for( final Map.Entry<Settings, Enum<?>> entry : this.settings.entrySet() )
|
||||
{
|
||||
try
|
||||
{
|
||||
if( tagCompound.hasKey( entry.getKey().name() ) )
|
||||
if( tagCompound.contains( entry.getKey().name() ) )
|
||||
{
|
||||
String value = tagCompound.getString( entry.getKey().name() );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user