interact with inventory objects
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
e68e637a84
commit
5c062ac984
@ -27,6 +27,22 @@
|
|||||||
"offsetY" : 0,
|
"offsetY" : 0,
|
||||||
"offsetZ" : 0
|
"offsetZ" : 0
|
||||||
},
|
},
|
||||||
|
"buttonInteraction" : {
|
||||||
|
"onInteract" : "inventory",
|
||||||
|
"interactionShape" : {
|
||||||
|
"type" : "CUBE",
|
||||||
|
"dimension1" : 2.0,
|
||||||
|
"dimension2" : 2.0,
|
||||||
|
"dimension3" : 2.0,
|
||||||
|
"rotX": 0,
|
||||||
|
"rotY": 0,
|
||||||
|
"rotZ": 0,
|
||||||
|
"rotW": 1,
|
||||||
|
"offsetX" : 0.0,
|
||||||
|
"offsetY" : 0.0,
|
||||||
|
"offsetZ" : 0.0
|
||||||
|
}
|
||||||
|
},
|
||||||
"tokens": [
|
"tokens": [
|
||||||
"GRAVITY"
|
"GRAVITY"
|
||||||
],
|
],
|
||||||
|
|||||||
@ -1746,6 +1746,7 @@ Enitity id collision validation
|
|||||||
Full-sized wheat plants spawn in forest now
|
Full-sized wheat plants spawn in forest now
|
||||||
Natural inventory size explicitly defined in data
|
Natural inventory size explicitly defined in data
|
||||||
Fix server life tree missing nullcheck
|
Fix server life tree missing nullcheck
|
||||||
|
Inventory interaction type
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import electrosphere.entity.state.equip.ClientEquipState;
|
|||||||
import electrosphere.entity.state.inventory.InventoryUtils;
|
import electrosphere.entity.state.inventory.InventoryUtils;
|
||||||
import electrosphere.entity.types.common.CommonEntityFlags;
|
import electrosphere.entity.types.common.CommonEntityFlags;
|
||||||
import electrosphere.entity.types.common.CommonEntityUtils;
|
import electrosphere.entity.types.common.CommonEntityUtils;
|
||||||
|
import electrosphere.logger.LoggerInterface;
|
||||||
import electrosphere.net.parser.net.message.EntityMessage;
|
import electrosphere.net.parser.net.message.EntityMessage;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -61,6 +62,9 @@ public class ButtonInteraction {
|
|||||||
case InteractionData.ON_INTERACT_DIALOG: {
|
case InteractionData.ON_INTERACT_DIALOG: {
|
||||||
DialogMenuGenerator.displayEntityDialog(target);
|
DialogMenuGenerator.displayEntityDialog(target);
|
||||||
} break;
|
} break;
|
||||||
|
case InteractionData.ON_INTERACT_INVENTORY: {
|
||||||
|
LoggerInterface.loggerEngine.WARNING("Interacting with inventory");
|
||||||
|
} break;
|
||||||
default: {
|
default: {
|
||||||
throw new Error("Unhandled interaction signal " + interactionData.getOnInteract());
|
throw new Error("Unhandled interaction signal " + interactionData.getOnInteract());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,6 +26,11 @@ public class InteractionData {
|
|||||||
* A dialog interaction
|
* A dialog interaction
|
||||||
*/
|
*/
|
||||||
public static final String ON_INTERACT_DIALOG = "dialog";
|
public static final String ON_INTERACT_DIALOG = "dialog";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An inventory interaction
|
||||||
|
*/
|
||||||
|
public static final String ON_INTERACT_INVENTORY = "inventory";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The function to run on interaction
|
* The function to run on interaction
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user