Some improvements to render speed of cables
This commit is contained in:
parent
7c56cd25f6
commit
37467cab7e
5 changed files with 21 additions and 19 deletions
|
@ -39,12 +39,14 @@ public class ModPartItem extends Item {
|
|||
try {
|
||||
if(modPart instanceof CablePart){
|
||||
if (ModPartRegistry.masterProvider.placePart(item, player, world, x, y, z, face, x_, y_, z_, modPart.getClass().getDeclaredConstructor(int.class).newInstance(((CablePart) modPart).type))) {
|
||||
player.swingItem();
|
||||
return true;
|
||||
}
|
||||
}else{
|
||||
if (ModPartRegistry.masterProvider.placePart(item, player,
|
||||
world, x, y, z, face, x_, y_, z_, modPart.getClass()
|
||||
.newInstance())) {
|
||||
player.swingItem();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -64,7 +66,8 @@ public class ModPartItem extends Item {
|
|||
if(modPart instanceof CablePart){
|
||||
try {
|
||||
if (partProvider.placePart(item, player, world, x, y, z, face, x_, y_, z_, modPart.getClass().getDeclaredConstructor(int.class).newInstance(((CablePart) modPart).type))) {
|
||||
return true;
|
||||
player.swingItem();
|
||||
return true;
|
||||
}
|
||||
} catch (InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -73,7 +76,8 @@ public class ModPartItem extends Item {
|
|||
}
|
||||
} else {
|
||||
if (partProvider.placePart(item, player, world, x, y, z, face, x_, y_, z_, modPart.getClass().newInstance())) {
|
||||
return true;
|
||||
player.swingItem();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue