Merge pull request #3783 from JurgenKuyper/v3.0
updated deprecated interfaces where possible
This commit is contained in:
commit
2d6bcbbca2
4 changed files with 27 additions and 36 deletions
|
|
@ -16,7 +16,7 @@ public class CustomBlockModel extends HDBlockModel {
|
|||
super(bstate, databits, blockset);
|
||||
try {
|
||||
Class<?> cls = Class.forName(classname); /* Get class */
|
||||
render = (CustomRenderer) cls.newInstance();
|
||||
render = (CustomRenderer) cls.getDeclaredConstructor().newInstance();
|
||||
if(render.initializeRenderer(HDBlockModels.pdf, bstate.blockName, databits, classparm) == false) {
|
||||
Log.severe("Error loading custom renderer - " + classname);
|
||||
render = null;
|
||||
|
|
|
|||
|
|
@ -2097,7 +2097,7 @@ public class TexturePack {
|
|||
else if(av[0].equals("custColorMult")) {
|
||||
try {
|
||||
Class<?> cls = Class.forName(av[1]);
|
||||
custColorMult = (CustomColorMultiplier)cls.newInstance();
|
||||
custColorMult = (CustomColorMultiplier)cls.getDeclaredConstructor().newInstance();
|
||||
} catch (Exception x) {
|
||||
Log.severe("Error loading custom color multiplier - " + av[1] + ": " + x.getMessage());
|
||||
}
|
||||
|
|
@ -2263,7 +2263,7 @@ public class TexturePack {
|
|||
else if(av[0].equals("custColorMult")) {
|
||||
try {
|
||||
Class<?> cls = Class.forName(av[1]);
|
||||
custColorMult = (CustomColorMultiplier)cls.newInstance();
|
||||
custColorMult = (CustomColorMultiplier)cls.getDeclaredConstructor().newInstance();
|
||||
} catch (Exception x) {
|
||||
Log.severe("Error loading custom color multiplier - " + av[1] + ": " + x.getMessage());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue