Fix various warnings (deprecated method usage, etc.)
This commit is contained in:
@@ -129,6 +129,10 @@ public class WizardData implements INBTSerializable<NBTTagCompound> {
|
||||
public Set<String> allyNames;
|
||||
|
||||
private Set<UUID> soulboundCreatures;
|
||||
|
||||
public WizardData(){
|
||||
this(null); // Nullary constructor for the registration method factory parameter
|
||||
}
|
||||
|
||||
public WizardData(EntityPlayer player){
|
||||
this.player = player;
|
||||
|
||||
@@ -128,7 +128,7 @@ public class Wizardry {
|
||||
@Override
|
||||
public void readNBT(Capability<WizardData> capability, WizardData instance, EnumFacing side, NBTBase nbt){
|
||||
}
|
||||
}, WizardData.class);
|
||||
}, WizardData::new);
|
||||
|
||||
WizardryRegistry.registerTileEntities();
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@ package electroblob.wizardry.client;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.io.Charsets;
|
||||
import org.apache.commons.lang3.tuple.ImmutablePair;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
@@ -274,7 +274,7 @@ public class GuiWizardHandbook extends GuiScreen {
|
||||
|
||||
bufferedreader = new BufferedReader(new InputStreamReader(
|
||||
this.mc.getResourceManager().getResource(new ResourceLocation(textFilepath)).getInputStream(),
|
||||
Charsets.UTF_8));
|
||||
StandardCharsets.UTF_8));
|
||||
|
||||
}catch (IOException e){
|
||||
|
||||
@@ -287,7 +287,7 @@ public class GuiWizardHandbook extends GuiScreen {
|
||||
|
||||
bufferedreader = new BufferedReader(new InputStreamReader(
|
||||
this.mc.getResourceManager().getResource(new ResourceLocation(textFilepath)).getInputStream(),
|
||||
Charsets.UTF_8));
|
||||
StandardCharsets.UTF_8));
|
||||
|
||||
} catch (IOException x){
|
||||
Wizardry.logger.error("Couldn't find file: " + Wizardry.MODID + ":assets/texts/handbook_en_US.txt. The file may be"
|
||||
|
||||
@@ -198,7 +198,7 @@ public final class WizardryRegistry {
|
||||
|
||||
// TODO: May need fixing
|
||||
List<Biome> biomes = Lists.newArrayList();
|
||||
for (Biome biome : ForgeRegistries.BIOMES.getValues()) {
|
||||
for (Biome biome : ForgeRegistries.BIOMES.getValuesCollection()) {
|
||||
biomes.add(biome);
|
||||
}
|
||||
biomes.remove(Biomes.MUSHROOM_ISLAND);
|
||||
|
||||
@@ -4,7 +4,9 @@ import com.google.common.collect.HashMultimap;
|
||||
import com.google.common.collect.SetMultimap;
|
||||
import com.google.gson.JsonDeserializationContext;
|
||||
import com.google.gson.JsonObject;
|
||||
|
||||
import electroblob.wizardry.Wizardry;
|
||||
import net.minecraft.advancements.ICriterionInstance;
|
||||
import net.minecraft.advancements.ICriterionTrigger;
|
||||
import net.minecraft.advancements.PlayerAdvancements;
|
||||
import net.minecraft.advancements.critereon.AbstractCriterionInstance;
|
||||
@@ -24,7 +26,7 @@ import net.minecraft.util.ResourceLocation;
|
||||
public class CustomAdvancementTrigger implements ICriterionTrigger<CustomAdvancementTrigger.Instance> {
|
||||
|
||||
private final ResourceLocation id;
|
||||
private final SetMultimap<PlayerAdvancements, Listener> listeners = HashMultimap.create();
|
||||
private final SetMultimap<PlayerAdvancements, Listener<? extends ICriterionInstance>> listeners = HashMultimap.create();
|
||||
|
||||
/**
|
||||
* This is a dummy criterion instance that does nothing on its own (but it is bound to this
|
||||
|
||||
Reference in New Issue
Block a user