feature: finally a decent working mailbox logic

This commit is contained in:
nimsolated
2026-03-05 09:47:02 -08:00
parent ea5d0e4aa6
commit ec2d412b36
26 changed files with 2269 additions and 0 deletions

148
elements/Mailbox.mod.json Normal file
View File

@@ -0,0 +1,148 @@
{
"_fv": 73,
"_type": "block",
"definition": {
"texture": "mailbox_base",
"textureTop": "",
"textureLeft": "",
"textureFront": "",
"textureRight": "",
"textureBack": "",
"renderType": 2,
"customModelName": "mailbox:default",
"rotationMode": 1,
"enablePitch": false,
"emissiveRendering": false,
"displayFluidOverlay": false,
"itemTexture": "",
"particleTexture": "",
"tintType": "No tint",
"isItemTinted": false,
"hasTransparency": true,
"connectedSides": false,
"transparencyType": "SOLID",
"disableOffset": false,
"boundingBoxes": [
{
"mx": 0.0,
"my": 0.0,
"mz": 0.0,
"Mx": 16.0,
"My": 16.0,
"Mz": 16.0,
"subtract": false
}
],
"customProperties": [],
"name": "Mailbox",
"specialInformation": {
"fixedValue": []
},
"hardness": 1.0,
"resistance": 10.0,
"hasGravity": false,
"isWaterloggable": false,
"creativeTabs": [
{
"value": "TRANSPORTATION"
}
],
"destroyTool": "Not specified",
"customDrop": {
"value": ""
},
"dropAmount": 1,
"useLootTableForDrops": false,
"requiresCorrectTool": false,
"enchantPowerBonus": 0.0,
"plantsGrowOn": false,
"canRedstoneConnect": false,
"lightOpacity": 0,
"material": {
"value": "NONE"
},
"tickRate": 0,
"tickRandomly": false,
"isReplaceable": false,
"canProvidePower": false,
"emittedRedstonePower": {
"fixedValue": 15.0
},
"colorOnMap": "DEFAULT",
"creativePickItem": {
"value": ""
},
"offsetType": "NONE",
"aiPathNodeType": "DEFAULT",
"flammability": 0,
"fireSpreadSpeed": 0,
"isLadder": false,
"slipperiness": 0.6,
"speedFactor": 1.0,
"jumpFactor": 1.0,
"reactionToPushing": "NORMAL",
"isNotColidable": false,
"isCustomSoundType": false,
"soundOnStep": {
"value": "METAL"
},
"breakSound": {
"value": ""
},
"fallSound": {
"value": ""
},
"hitSound": {
"value": ""
},
"placeSound": {
"value": ""
},
"stepSound": {
"value": ""
},
"luminance": 0,
"unbreakable": false,
"vanillaToolTier": "NONE",
"isBonemealable": false,
"hasInventory": true,
"guiBoundTo": "MailboxGUI",
"openGUIOnRightClick": true,
"inventorySize": 18,
"inventoryStackSize": 64,
"inventoryDropWhenDestroyed": true,
"inventoryComparatorPower": true,
"inventoryOutSlotIDs": [
0,
1,
2,
3,
4,
5,
6,
7,
8
],
"inventoryInSlotIDs": [],
"hasEnergyStorage": false,
"energyInitial": 0,
"energyCapacity": 400000,
"energyMaxReceive": 200,
"energyMaxExtract": 200,
"isFluidTank": false,
"fluidCapacity": 8000,
"fluidRestrictions": [],
"generateFeature": false,
"restrictionBiomes": [],
"blocksToReplace": [
{
"value": "TAG:stone_ore_replaceables"
}
],
"generationShape": "UNIFORM",
"frequencyPerChunks": 10,
"frequencyOnChunk": 16,
"minGenerateHeight": 0,
"maxGenerateHeight": 64
}
}

View File

@@ -0,0 +1,442 @@
{
"_fv": 73,
"_type": "gui",
"definition": {
"type": 1,
"width": 360,
"height": 180,
"inventoryOffsetX": 0,
"inventoryOffsetY": 0,
"renderBgLayer": true,
"doesPauseGame": false,
"components": [
{
"type": "label",
"data": {
"name": "label_inbox",
"text": {
"fixedValue": "Inbox"
},
"color": {
"value": -12829636,
"falpha": 0.0
},
"x": 132,
"y": 44,
"locked": false
}
},
{
"type": "outputslot",
"data": {
"id": 0,
"disablePickup": {
"fixedValue": false
},
"dropItemsWhenNotBound": false,
"x": 132,
"y": 58,
"locked": false
}
},
{
"type": "outputslot",
"data": {
"id": 1,
"disablePickup": {
"fixedValue": false
},
"dropItemsWhenNotBound": false,
"x": 150,
"y": 58,
"locked": false
}
},
{
"type": "outputslot",
"data": {
"id": 2,
"disablePickup": {
"fixedValue": false
},
"dropItemsWhenNotBound": false,
"x": 168,
"y": 58,
"locked": false
}
},
{
"type": "outputslot",
"data": {
"id": 3,
"disablePickup": {
"fixedValue": false
},
"dropItemsWhenNotBound": false,
"x": 132,
"y": 76,
"locked": false
}
},
{
"type": "outputslot",
"data": {
"id": 4,
"disablePickup": {
"fixedValue": false
},
"dropItemsWhenNotBound": false,
"x": 150,
"y": 76,
"locked": false
}
},
{
"type": "outputslot",
"data": {
"id": 5,
"disablePickup": {
"fixedValue": false
},
"dropItemsWhenNotBound": false,
"x": 168,
"y": 76,
"locked": false
}
},
{
"type": "outputslot",
"data": {
"id": 6,
"disablePickup": {
"fixedValue": false
},
"dropItemsWhenNotBound": false,
"x": 132,
"y": 94,
"locked": false
}
},
{
"type": "outputslot",
"data": {
"id": 7,
"disablePickup": {
"fixedValue": false
},
"dropItemsWhenNotBound": false,
"x": 150,
"y": 94,
"locked": false
}
},
{
"type": "outputslot",
"data": {
"id": 8,
"disablePickup": {
"fixedValue": false
},
"dropItemsWhenNotBound": false,
"x": 168,
"y": 94,
"locked": false
}
},
{
"type": "label",
"data": {
"name": "label_outbox",
"text": {
"fixedValue": "Outbox"
},
"color": {
"value": -12829636,
"falpha": 0.0
},
"x": 195,
"y": 44,
"locked": false
}
},
{
"type": "inputslot",
"data": {
"inputLimit": {
"value": ""
},
"disablePlacement": {
"fixedValue": false
},
"id": 9,
"disablePickup": {
"fixedValue": false
},
"dropItemsWhenNotBound": false,
"x": 195,
"y": 58,
"locked": false
}
},
{
"type": "inputslot",
"data": {
"inputLimit": {
"value": ""
},
"disablePlacement": {
"fixedValue": false
},
"id": 10,
"disablePickup": {
"fixedValue": false
},
"dropItemsWhenNotBound": true,
"x": 213,
"y": 58,
"locked": false
}
},
{
"type": "inputslot",
"data": {
"inputLimit": {
"value": ""
},
"disablePlacement": {
"fixedValue": false
},
"id": 11,
"disablePickup": {
"fixedValue": false
},
"dropItemsWhenNotBound": true,
"x": 231,
"y": 58,
"locked": false
}
},
{
"type": "inputslot",
"data": {
"inputLimit": {
"value": ""
},
"disablePlacement": {
"fixedValue": false
},
"id": 12,
"disablePickup": {
"fixedValue": false
},
"dropItemsWhenNotBound": true,
"x": 195,
"y": 76,
"locked": false
}
},
{
"type": "inputslot",
"data": {
"inputLimit": {
"value": ""
},
"disablePlacement": {
"fixedValue": false
},
"id": 13,
"disablePickup": {
"fixedValue": false
},
"dropItemsWhenNotBound": true,
"x": 213,
"y": 76,
"locked": false
}
},
{
"type": "inputslot",
"data": {
"inputLimit": {
"value": ""
},
"disablePlacement": {
"fixedValue": false
},
"id": 14,
"disablePickup": {
"fixedValue": false
},
"dropItemsWhenNotBound": true,
"x": 231,
"y": 76,
"locked": false
}
},
{
"type": "inputslot",
"data": {
"inputLimit": {
"value": ""
},
"disablePlacement": {
"fixedValue": false
},
"id": 15,
"disablePickup": {
"fixedValue": false
},
"dropItemsWhenNotBound": true,
"x": 195,
"y": 94,
"locked": false
}
},
{
"type": "inputslot",
"data": {
"inputLimit": {
"value": ""
},
"disablePlacement": {
"fixedValue": false
},
"id": 16,
"disablePickup": {
"fixedValue": false
},
"dropItemsWhenNotBound": true,
"x": 213,
"y": 94,
"locked": false
}
},
{
"type": "inputslot",
"data": {
"inputLimit": {
"value": ""
},
"disablePlacement": {
"fixedValue": false
},
"id": 17,
"disablePickup": {
"fixedValue": false
},
"dropItemsWhenNotBound": true,
"x": 231,
"y": 94,
"locked": false
}
},
{
"type": "label",
"data": {
"name": "label_x",
"text": {
"fixedValue": "X:"
},
"color": {
"value": -12829636,
"falpha": 0.0
},
"x": 258,
"y": 49,
"locked": false
}
},
{
"type": "textfield",
"data": {
"placeholder": "0",
"name": "outbox_x_coord",
"width": 120,
"height": 20,
"x": 267,
"y": 44,
"locked": false
}
},
{
"type": "label",
"data": {
"name": "label_y",
"text": {
"fixedValue": "Y:"
},
"color": {
"value": -12829636,
"falpha": 0.0
},
"x": 258,
"y": 71,
"locked": false
}
},
{
"type": "textfield",
"data": {
"placeholder": "0",
"name": "outbox_y_coord",
"width": 120,
"height": 20,
"x": 267,
"y": 67,
"locked": false
}
},
{
"type": "label",
"data": {
"name": "label_z",
"text": {
"fixedValue": "Z:"
},
"color": {
"value": -12829636,
"falpha": 0.0
},
"x": 258,
"y": 94,
"locked": false
}
},
{
"type": "textfield",
"data": {
"placeholder": "0",
"name": "outbox_z_coord",
"width": 120,
"height": 20,
"x": 267,
"y": 89,
"locked": false
}
},
{
"type": "button",
"data": {
"name": "button_send",
"text": "Send",
"isUndecorated": false,
"onClick": {
"name": "MailboxSmartSendLogic"
},
"width": 46,
"height": 20,
"x": 303,
"y": 116,
"locked": false
}
}
],
"gridSettings": {
"sx": 9,
"sy": 9,
"ox": 11,
"oy": 15,
"snapOnGrid": true
}
}
}

File diff suppressed because one or more lines are too long