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