mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-21 12:32:29 +00:00
Update forge, add max damage
This commit is contained in:
1 parent
0bb0dfb16a
commit
9bb25aee66
5 files changed
+101
-24
No files matched your search
@@ -596,27 +596,27 @@ public class MineTweakerImplementationAPI {
|
||||
events.onPlayerLoggedIn(LISTEN_LOGIN);
|
||||
events.onPlayerLoggedOut(LISTEN_LOGOUT);
|
||||
}
|
||||
|
||||
byte[] currentScript = MineTweakerAPI.tweaker.getScriptData();
|
||||
if (currentScript != null) {
|
||||
System.out.println("Already loaded a script before");
|
||||
|
||||
// alread loaded a script
|
||||
byte[] stagedScript = MineTweakerAPI.tweaker.getStagedScriptData();
|
||||
|
||||
if (Arrays.equals(currentScript, stagedScript)) {
|
||||
System.out.println("No reload needed");
|
||||
return; // no reload necessary
|
||||
}
|
||||
|
||||
if (MineTweakerAPI.game.isLocked()) {
|
||||
System.out.println("Reload blocked");
|
||||
MineTweakerAPI.game.signalLockError();
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
System.out.println("First time loading a script, go ahead");
|
||||
}
|
||||
//
|
||||
// byte[] currentScript = MineTweakerAPI.tweaker.getScriptData();
|
||||
// if (currentScript != null) {
|
||||
// System.out.println("Already loaded a script before");
|
||||
//
|
||||
// // alread loaded a script
|
||||
// byte[] stagedScript = MineTweakerAPI.tweaker.getStagedScriptData();
|
||||
//
|
||||
// if (Arrays.equals(currentScript, stagedScript)) {
|
||||
// System.out.println("No reload needed");
|
||||
// return; // no reload necessary
|
||||
// }
|
||||
//
|
||||
// if (MineTweakerAPI.game.isLocked()) {
|
||||
// System.out.println("Reload blocked");
|
||||
// MineTweakerAPI.game.signalLockError();
|
||||
// return;
|
||||
// }
|
||||
// } else {
|
||||
// System.out.println("First time loading a script, go ahead");
|
||||
// }
|
||||
|
||||
MineTweakerAPI.tweaker.rollback();
|
||||
|
||||
|
||||
@@ -80,13 +80,13 @@ public interface IItemStack extends IIngredient {
|
||||
*/
|
||||
@ZenSetter("maxStackSize")
|
||||
public void setMaxStackSize(int size);
|
||||
|
||||
|
||||
/**
|
||||
* Gets the block hardness
|
||||
*/
|
||||
@ZenGetter("hardness")
|
||||
public float getBlockHardness();
|
||||
|
||||
|
||||
/**
|
||||
* Sets the block hardness
|
||||
*
|
||||
@@ -111,6 +111,14 @@ public interface IItemStack extends IIngredient {
|
||||
@ZenGetter("maxDamage")
|
||||
public int getMaxDamage();
|
||||
|
||||
/**
|
||||
* Sets the max Itemstack damage
|
||||
*
|
||||
* @param damage the new max damage
|
||||
*/
|
||||
@ZenSetter("maxDamage")
|
||||
public void setMaxDamage(int damage);
|
||||
|
||||
/**
|
||||
* Gets the item tag. (NBT data) The resulting data is immutable and can
|
||||
* only be changed with updateTag. Returns empty data if there is no data.
|
||||
|
||||
Reference in new issue
Block a user