mirror of
https://github.com/nimsolated/Nims-Random-BS.git
synced 2026-04-02 02:05:20 -07:00
update: 1.6.2
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
"_type": "recipe",
|
||||
"definition": {
|
||||
"recipeType": "Crafting",
|
||||
"recipeRetstackSize": 1,
|
||||
"recipeRetstackSize": 2,
|
||||
"group": "",
|
||||
"cookingBookCategory": "MISC",
|
||||
"xpReward": 0.0,
|
||||
@@ -12,10 +12,7 @@
|
||||
"recipeShapeless": true,
|
||||
"recipeSlots": [
|
||||
{
|
||||
"value": "Items.PAPER"
|
||||
},
|
||||
{
|
||||
"value": "Items.DYE#0"
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"value": ""
|
||||
@@ -26,6 +23,9 @@
|
||||
{
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"value": "CUSTOM:Shit"
|
||||
},
|
||||
{
|
||||
"value": ""
|
||||
},
|
||||
@@ -40,9 +40,9 @@
|
||||
}
|
||||
],
|
||||
"recipeReturnStack": {
|
||||
"value": "CUSTOM:ShippingLabel"
|
||||
"value": "Items.DYE#17"
|
||||
},
|
||||
"name": "shipping_label_recipe",
|
||||
"name": "brown_dye_shit_recipe",
|
||||
"namespace": "mod"
|
||||
}
|
||||
}
|
||||
10
elements/GiftCommand.mod.json
Normal file
10
elements/GiftCommand.mod.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"_fv": 73,
|
||||
"_type": "command",
|
||||
"definition": {
|
||||
"commandName": "gift",
|
||||
"type": "MULTIPLAYER_ONLY",
|
||||
"permissionLevel": "No requirement",
|
||||
"argsxml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"args_start\" deletable=\"false\" x=\"40\" y=\"40\"><next><block type=\"entity\"><field name=\"name\">player</field><field name=\"type\">player</field><statement name=\"args\"><block type=\"call_procedure\"><field name=\"procedure\">GiftCommandLogic</field></block></statement></block></next></block></xml>"
|
||||
}
|
||||
}
|
||||
7
elements/GiftCommandLogic.mod.json
Normal file
7
elements/GiftCommandLogic.mod.json
Normal file
File diff suppressed because one or more lines are too long
@@ -1,138 +0,0 @@
|
||||
{
|
||||
"_fv": 73,
|
||||
"_type": "block",
|
||||
"definition": {
|
||||
"texture": "label_copy_machine_buttons",
|
||||
"textureTop": "",
|
||||
"textureLeft": "",
|
||||
"textureFront": "",
|
||||
"textureRight": "",
|
||||
"textureBack": "",
|
||||
"renderType": 2,
|
||||
"customModelName": "label_copy_machine: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": "Label Copy Machine",
|
||||
"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": "LabelCopyMachineGUI",
|
||||
"openGUIOnRightClick": true,
|
||||
"inventorySize": 4,
|
||||
"inventoryStackSize": 64,
|
||||
"inventoryDropWhenDestroyed": true,
|
||||
"inventoryComparatorPower": true,
|
||||
"inventoryOutSlotIDs": [],
|
||||
"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
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"_fv": 73,
|
||||
"_type": "procedure",
|
||||
"definition": {
|
||||
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"event_trigger\" deletable=\"false\" x=\"40\" y=\"40\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"logic_negate\"><value name=\"BOOL\"><block type=\"world_data_isremote\"></block></value></block></value><statement name=\"DO0\"><block type=\"controls_if\"><value name=\"IF0\"><block type=\"logic_binary_ops\" inline=\"false\"><field name=\"OP\">AND</field><value name=\"A\"><block type=\"compare_mcitems\" inline=\"false\"><value name=\"a\"><block type=\"gui_get_item_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"b\"><block type=\"mcitem_all\"><field name=\"value\">CUSTOM:ShippingLabel</field></block></value></block></value><value name=\"B\"><block type=\"logic_binary_ops\" inline=\"false\"><field name=\"OP\">AND</field><value name=\"A\"><block type=\"math_binary_ops\"><field name=\"OP\">GT</field><value name=\"A\"><block type=\"gui_get_amount_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value></block></value><value name=\"B\"><block type=\"math_binary_ops\"><field name=\"OP\">GT</field><value name=\"A\"><block type=\"gui_get_amount_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">2</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value></block></value></block></value></block></value><statement name=\"DO0\"><block type=\"gui_set_items\" inline=\"false\"><value name=\"amount\"><block type=\"math_dual_ops\"><field name=\"OP\">MINUS</field><value name=\"A\"><block type=\"gui_get_amount_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value></block></value><value name=\"item\"><block type=\"gui_get_item_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><next><block type=\"gui_set_items\" inline=\"false\"><value name=\"amount\"><block type=\"math_dual_ops\"><field name=\"OP\">MINUS</field><value name=\"A\"><block type=\"gui_get_amount_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">2</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value></block></value><value name=\"item\"><block type=\"gui_get_item_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">2</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">2</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><next><block type=\"gui_set_items\" inline=\"false\"><value name=\"amount\"><block type=\"math_dual_ops\"><field name=\"OP\">ADD</field><value name=\"A\"><block type=\"gui_get_amount_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">3</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value></block></value><value name=\"item\"><block type=\"gui_get_item_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">3</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></next></block></next></block></statement></block></statement></block></next></block></xml>"
|
||||
}
|
||||
}
|
||||
@@ -1,248 +0,0 @@
|
||||
{
|
||||
"_fv": 73,
|
||||
"_type": "gui",
|
||||
"definition": {
|
||||
"type": 1,
|
||||
"width": 176,
|
||||
"height": 188,
|
||||
"inventoryOffsetX": 0,
|
||||
"inventoryOffsetY": 0,
|
||||
"renderBgLayer": true,
|
||||
"doesPauseGame": false,
|
||||
"components": [
|
||||
{
|
||||
"type": "inputslot",
|
||||
"data": {
|
||||
"inputLimit": {
|
||||
"value": "CUSTOM:ShippingLabel"
|
||||
},
|
||||
"disablePlacement": {
|
||||
"fixedValue": false
|
||||
},
|
||||
"color": {
|
||||
"value": -3355444,
|
||||
"falpha": 0.0
|
||||
},
|
||||
"id": 0,
|
||||
"disablePickup": {
|
||||
"fixedValue": false
|
||||
},
|
||||
"dropItemsWhenNotBound": false,
|
||||
"x": 146,
|
||||
"y": 76,
|
||||
"locked": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "inputslot",
|
||||
"data": {
|
||||
"inputLimit": {
|
||||
"value": "Items.PAPER"
|
||||
},
|
||||
"disablePlacement": {
|
||||
"fixedValue": false
|
||||
},
|
||||
"color": {
|
||||
"value": -3342337,
|
||||
"falpha": 0.0
|
||||
},
|
||||
"id": 1,
|
||||
"disablePickup": {
|
||||
"fixedValue": false
|
||||
},
|
||||
"dropItemsWhenNotBound": false,
|
||||
"x": 182,
|
||||
"y": 49,
|
||||
"locked": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "inputslot",
|
||||
"data": {
|
||||
"inputLimit": {
|
||||
"value": "Items.DYE#0"
|
||||
},
|
||||
"disablePlacement": {
|
||||
"fixedValue": false
|
||||
},
|
||||
"color": {
|
||||
"value": -13421773,
|
||||
"falpha": 0.0
|
||||
},
|
||||
"id": 2,
|
||||
"disablePickup": {
|
||||
"fixedValue": false
|
||||
},
|
||||
"dropItemsWhenNotBound": false,
|
||||
"x": 222,
|
||||
"y": 49,
|
||||
"locked": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "outputslot",
|
||||
"data": {
|
||||
"color": {
|
||||
"value": -6684775,
|
||||
"falpha": 0.0
|
||||
},
|
||||
"id": 3,
|
||||
"disablePickup": {
|
||||
"fixedValue": false
|
||||
},
|
||||
"dropItemsWhenNotBound": false,
|
||||
"x": 258,
|
||||
"y": 76,
|
||||
"locked": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "label",
|
||||
"data": {
|
||||
"name": "label_label_copy_machine",
|
||||
"text": {
|
||||
"fixedValue": "Label Copy Machine"
|
||||
},
|
||||
"color": {
|
||||
"value": -12829636,
|
||||
"falpha": 0.0
|
||||
},
|
||||
"x": 132,
|
||||
"y": 31,
|
||||
"locked": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "image",
|
||||
"data": {
|
||||
"image": "plus_sign.png",
|
||||
"use1Xscale": false,
|
||||
"x": 204,
|
||||
"y": 49,
|
||||
"locked": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "image",
|
||||
"data": {
|
||||
"image": "copy_icon.png",
|
||||
"use1Xscale": false,
|
||||
"x": 204,
|
||||
"y": 76,
|
||||
"locked": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "image",
|
||||
"data": {
|
||||
"image": "right_arrow_sign.png",
|
||||
"use1Xscale": false,
|
||||
"x": 168,
|
||||
"y": 76,
|
||||
"locked": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "image",
|
||||
"data": {
|
||||
"image": "right_arrow_sign.png",
|
||||
"use1Xscale": false,
|
||||
"x": 222,
|
||||
"y": 76,
|
||||
"locked": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "button",
|
||||
"data": {
|
||||
"name": "button_copy",
|
||||
"text": "Copy",
|
||||
"isUndecorated": false,
|
||||
"onClick": {
|
||||
"name": "LabelCopyMachineCopyButtonPressed"
|
||||
},
|
||||
"width": 46,
|
||||
"height": 20,
|
||||
"x": 191,
|
||||
"y": 98,
|
||||
"locked": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "tooltip",
|
||||
"data": {
|
||||
"name": "tooltip_shipping_label_slot",
|
||||
"text": {
|
||||
"fixedValue": "Shipping Label Slot"
|
||||
},
|
||||
"displayCondition": {
|
||||
"name": "LabelCopyMachineGUISlot0TooltipCondition"
|
||||
},
|
||||
"width": 24,
|
||||
"height": 24,
|
||||
"x": 141,
|
||||
"y": 71,
|
||||
"locked": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "tooltip",
|
||||
"data": {
|
||||
"name": "tooltip_paper_slot",
|
||||
"text": {
|
||||
"fixedValue": "Paper Slot"
|
||||
},
|
||||
"displayCondition": {
|
||||
"name": "LabelCopyMachineGUISlot1TooltipCondition"
|
||||
},
|
||||
"width": 24,
|
||||
"height": 24,
|
||||
"x": 177,
|
||||
"y": 44,
|
||||
"locked": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "tooltip",
|
||||
"data": {
|
||||
"name": "tooltip_ink_sac_slot",
|
||||
"text": {
|
||||
"fixedValue": "Ink Sac Slot"
|
||||
},
|
||||
"displayCondition": {
|
||||
"name": "LabelCopyMachineGUISlot2TooltipCondition"
|
||||
},
|
||||
"width": 24,
|
||||
"height": 24,
|
||||
"x": 218,
|
||||
"y": 44,
|
||||
"locked": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "tooltip",
|
||||
"data": {
|
||||
"name": "tooltip_output_copy_of_shipping_label",
|
||||
"text": {
|
||||
"fixedValue": "Output (copy of shipping label)"
|
||||
},
|
||||
"displayCondition": {
|
||||
"name": "LabelCopyMachineGUISlot3TooltipCondition"
|
||||
},
|
||||
"width": 24,
|
||||
"height": 24,
|
||||
"x": 254,
|
||||
"y": 71,
|
||||
"locked": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"gridSettings": {
|
||||
"sx": 9,
|
||||
"sy": 9,
|
||||
"ox": 11,
|
||||
"oy": 15,
|
||||
"snapOnGrid": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"_fv": 73,
|
||||
"_type": "procedure",
|
||||
"definition": {
|
||||
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"event_trigger\" deletable=\"false\" x=\"40\" y=\"40\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"math_binary_ops\"><field name=\"OP\">GT</field><value name=\"A\"><block type=\"gui_get_amount_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value></block></value><statement name=\"DO0\"><block type=\"return_logic\"><value name=\"return\"><block type=\"logic_boolean\"><field name=\"BOOL\">FALSE</field></block></value></block></statement><next><block type=\"return_logic\"><value name=\"return\"><block type=\"logic_boolean\"><field name=\"BOOL\">TRUE</field></block></value></block></next></block></next></block></xml>"
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"_fv": 73,
|
||||
"_type": "procedure",
|
||||
"definition": {
|
||||
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"event_trigger\" deletable=\"false\" x=\"40\" y=\"40\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"math_binary_ops\"><field name=\"OP\">GT</field><value name=\"A\"><block type=\"gui_get_amount_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value></block></value><statement name=\"DO0\"><block type=\"return_logic\"><value name=\"return\"><block type=\"logic_boolean\"><field name=\"BOOL\">FALSE</field></block></value></block></statement><next><block type=\"return_logic\"><value name=\"return\"><block type=\"logic_boolean\"><field name=\"BOOL\">TRUE</field></block></value></block></next></block></next></block></xml>"
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"_fv": 73,
|
||||
"_type": "procedure",
|
||||
"definition": {
|
||||
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"event_trigger\" deletable=\"false\" x=\"40\" y=\"40\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"math_binary_ops\"><field name=\"OP\">GT</field><value name=\"A\"><block type=\"gui_get_amount_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">2</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value></block></value><statement name=\"DO0\"><block type=\"return_logic\"><value name=\"return\"><block type=\"logic_boolean\"><field name=\"BOOL\">FALSE</field></block></value></block></statement><next><block type=\"return_logic\"><value name=\"return\"><block type=\"logic_boolean\"><field name=\"BOOL\">TRUE</field></block></value></block></next></block></next></block></xml>"
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"_fv": 73,
|
||||
"_type": "procedure",
|
||||
"definition": {
|
||||
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"event_trigger\" deletable=\"false\" x=\"40\" y=\"40\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"math_binary_ops\"><field name=\"OP\">GT</field><value name=\"A\"><block type=\"gui_get_amount_inslot\"><value name=\"slotid\"><block type=\"math_number\"><field name=\"NUM\">3</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value></block></value><statement name=\"DO0\"><block type=\"return_logic\"><value name=\"return\"><block type=\"logic_boolean\"><field name=\"BOOL\">FALSE</field></block></value></block></statement><next><block type=\"return_logic\"><value name=\"return\"><block type=\"logic_boolean\"><field name=\"BOOL\">TRUE</field></block></value></block></next></block></next></block></xml>"
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
{
|
||||
"_fv": 73,
|
||||
"_type": "recipe",
|
||||
"definition": {
|
||||
"recipeType": "Crafting",
|
||||
"recipeRetstackSize": 1,
|
||||
"group": "",
|
||||
"cookingBookCategory": "MISC",
|
||||
"xpReward": 0.0,
|
||||
"cookingTime": 200,
|
||||
"craftingBookCategory": "MISC",
|
||||
"recipeShapeless": false,
|
||||
"recipeSlots": [
|
||||
{
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"value": "Blocks.DISPENSER"
|
||||
},
|
||||
{
|
||||
"value": "Blocks.DISPENSER"
|
||||
},
|
||||
{
|
||||
"value": "Blocks.IRON_BLOCK"
|
||||
},
|
||||
{
|
||||
"value": "Blocks.IRON_BLOCK"
|
||||
},
|
||||
{
|
||||
"value": "Blocks.IRON_BLOCK"
|
||||
},
|
||||
{
|
||||
"value": "Blocks.IRON_BLOCK"
|
||||
}
|
||||
],
|
||||
"recipeReturnStack": {
|
||||
"value": "CUSTOM:LabelCopyMachine"
|
||||
},
|
||||
"name": "label_copy_machine_recipe",
|
||||
"namespace": "mod"
|
||||
}
|
||||
}
|
||||
@@ -1,151 +0,0 @@
|
||||
{
|
||||
"_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": 100,
|
||||
"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": [],
|
||||
"onBlockPlayedBy": {
|
||||
"name": "MailboxBlockIsPlacedBy"
|
||||
},
|
||||
"generateFeature": false,
|
||||
"restrictionBiomes": [],
|
||||
"blocksToReplace": [
|
||||
{
|
||||
"value": "TAG:stone_ore_replaceables"
|
||||
}
|
||||
],
|
||||
"generationShape": "UNIFORM",
|
||||
"frequencyPerChunks": 10,
|
||||
"frequencyOnChunk": 16,
|
||||
"minGenerateHeight": 0,
|
||||
"maxGenerateHeight": 64
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"_fv": 73,
|
||||
"_type": "procedure",
|
||||
"definition": {
|
||||
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"event_trigger\" deletable=\"false\" x=\"158\" y=\"139\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"logic_negate\"><value name=\"BOOL\"><block type=\"world_data_isremote\"></block></value></block></value><statement name=\"DO0\"><block type=\"entity_open_gui\"><field name=\"guiname\">MailboxNameEntryGUI</field><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"x\"><block type=\"coord_x\"></block></value><value name=\"y\"><block type=\"coord_y\"></block></value><value name=\"z\"><block type=\"coord_z\"></block></value></block></statement></block></next></block></xml>"
|
||||
}
|
||||
}
|
||||
@@ -1,382 +0,0 @@
|
||||
{
|
||||
"_fv": 73,
|
||||
"_type": "gui",
|
||||
"definition": {
|
||||
"type": 1,
|
||||
"width": 240,
|
||||
"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": "button",
|
||||
"data": {
|
||||
"name": "button_send",
|
||||
"text": "Send",
|
||||
"isUndecorated": false,
|
||||
"onClick": {
|
||||
"name": "MailboxSmartSendLogic"
|
||||
},
|
||||
"width": 46,
|
||||
"height": 20,
|
||||
"x": 263,
|
||||
"y": 85,
|
||||
"locked": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "inputslot",
|
||||
"data": {
|
||||
"inputLimit": {
|
||||
"value": "CUSTOM:ShippingLabel"
|
||||
},
|
||||
"disablePlacement": {
|
||||
"fixedValue": false,
|
||||
"name": "MailboxSlot99ShippingLabelInsertionCondition"
|
||||
},
|
||||
"color": {
|
||||
"value": -16777216,
|
||||
"falpha": 0.0
|
||||
},
|
||||
"id": 99,
|
||||
"disablePickup": {
|
||||
"fixedValue": false
|
||||
},
|
||||
"dropItemsWhenNotBound": false,
|
||||
"x": 276,
|
||||
"y": 58,
|
||||
"locked": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"gridSettings": {
|
||||
"sx": 9,
|
||||
"sy": 9,
|
||||
"ox": 11,
|
||||
"oy": 15,
|
||||
"snapOnGrid": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"_fv": 73,
|
||||
"_type": "procedure",
|
||||
"definition": {
|
||||
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"event_trigger\" deletable=\"false\" x=\"40\" y=\"40\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"logic_negate\"><value name=\"BOOL\"><block type=\"world_data_isremote\"></block></value></block></value><statement name=\"DO0\"><block type=\"block_nbt_text_set\"><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">mailbox_name</field></block></value><value name=\"x\"><block type=\"coord_x\"></block></value><value name=\"y\"><block type=\"coord_y\"></block></value><value name=\"z\"><block type=\"coord_z\"></block></value><value name=\"tagValue\"><block type=\"gui_get_text_textfield\"><field name=\"textfield\">mailbox_name_field</field></block></value><next><block type=\"entity_close_gui\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></next></block></statement></block></next></block></xml>"
|
||||
}
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
{
|
||||
"_fv": 73,
|
||||
"_type": "gui",
|
||||
"definition": {
|
||||
"type": 0,
|
||||
"width": 176,
|
||||
"height": 166,
|
||||
"inventoryOffsetX": 0,
|
||||
"inventoryOffsetY": 0,
|
||||
"renderBgLayer": false,
|
||||
"doesPauseGame": false,
|
||||
"components": [
|
||||
{
|
||||
"type": "label",
|
||||
"data": {
|
||||
"name": "label_mailbox_name",
|
||||
"text": {
|
||||
"fixedValue": "Mailbox Name:"
|
||||
},
|
||||
"color": {
|
||||
"value": -16724839,
|
||||
"falpha": 0.0
|
||||
},
|
||||
"x": 177,
|
||||
"y": 85,
|
||||
"locked": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "textfield",
|
||||
"data": {
|
||||
"placeholder": "",
|
||||
"name": "mailbox_name_field",
|
||||
"width": 120,
|
||||
"height": 20,
|
||||
"x": 155,
|
||||
"y": 98,
|
||||
"locked": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "button",
|
||||
"data": {
|
||||
"name": "button_done",
|
||||
"text": "Done",
|
||||
"isUndecorated": false,
|
||||
"onClick": {
|
||||
"name": "MailboxNameEntryButtonPressed"
|
||||
},
|
||||
"width": 46,
|
||||
"height": 20,
|
||||
"x": 191,
|
||||
"y": 130,
|
||||
"locked": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"onClosed": {
|
||||
"name": "MailboxNameEntryGUIThisGUIIsClosed"
|
||||
},
|
||||
"gridSettings": {
|
||||
"sx": 9,
|
||||
"sy": 9,
|
||||
"ox": 11,
|
||||
"oy": 15,
|
||||
"snapOnGrid": true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"_fv": 73,
|
||||
"_type": "procedure",
|
||||
"definition": {
|
||||
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"event_trigger\" deletable=\"false\" x=\"200\" y=\"161\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"logic_negate\"><value name=\"BOOL\"><block type=\"world_data_isremote\"></block></value></block></value><statement name=\"DO0\"><block type=\"controls_if\"><mutation else=\"1\"></mutation><value name=\"IF0\"><block type=\"text_binary_ops\"><value name=\"A\"><block type=\"gui_get_text_textfield\"><field name=\"textfield\">mailbox_name_field</field></block></value><value name=\"B\"><block type=\"text\"><field name=\"TEXT\"></field></block></value></block></value><statement name=\"DO0\"><block type=\"block_nbt_text_set\"><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">mailbox_name</field></block></value><value name=\"x\"><block type=\"coord_x\"></block></value><value name=\"y\"><block type=\"coord_y\"></block></value><value name=\"z\"><block type=\"coord_z\"></block></value><value name=\"tagValue\"><block type=\"text\"><field name=\"TEXT\">Unnamed</field></block></value></block></statement><statement name=\"ELSE\"><block type=\"block_nbt_text_set\"><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">mailbox_name</field></block></value><value name=\"x\"><block type=\"coord_x\"></block></value><value name=\"y\"><block type=\"coord_y\"></block></value><value name=\"z\"><block type=\"coord_z\"></block></value><value name=\"tagValue\"><block type=\"gui_get_text_textfield\"><field name=\"textfield\">mailbox_name_field</field></block></value></block></statement></block></statement></block></next></block></xml>"
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
{
|
||||
"_fv": 73,
|
||||
"_type": "recipe",
|
||||
"definition": {
|
||||
"recipeType": "Crafting",
|
||||
"recipeRetstackSize": 1,
|
||||
"group": "",
|
||||
"cookingBookCategory": "MISC",
|
||||
"xpReward": 0.0,
|
||||
"cookingTime": 200,
|
||||
"craftingBookCategory": "MISC",
|
||||
"recipeShapeless": false,
|
||||
"recipeSlots": [
|
||||
{
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"value": "Blocks.IRON_BLOCK"
|
||||
},
|
||||
{
|
||||
"value": "Blocks.LEVER"
|
||||
},
|
||||
{
|
||||
"value": ""
|
||||
},
|
||||
{
|
||||
"value": "Items.STICK"
|
||||
},
|
||||
{
|
||||
"value": ""
|
||||
}
|
||||
],
|
||||
"recipeReturnStack": {
|
||||
"value": "CUSTOM:Mailbox"
|
||||
},
|
||||
"name": "mailbox_recipe",
|
||||
"namespace": "mod"
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"_fv": 73,
|
||||
"_type": "procedure",
|
||||
"definition": {
|
||||
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"event_trigger\" deletable=\"false\" x=\"178\" y=\"147\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"logic_binary_ops\" inline=\"false\"><field name=\"OP\">AND</field><value name=\"A\"><block type=\"compare_mcitems\"><value name=\"a\"><block type=\"itemstack_to_mcitem\"></block></value><value name=\"b\"><block type=\"mcitem_all\"><field name=\"value\">CUSTOM:ShippingLabel</field></block></value></block></value><value name=\"B\"><block type=\"item_nbt_logic_get\"><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">connected</field></block></value><value name=\"item\"><block type=\"itemstack_to_mcitem\"></block></value></block></value></block></value><statement name=\"DO0\"><block type=\"return_logic\"><value name=\"return\"><block type=\"logic_boolean\"><field name=\"BOOL\">FALSE</field></block></value></block></statement><next><block type=\"return_logic\"><value name=\"return\"><block type=\"logic_boolean\"><field name=\"BOOL\">TRUE</field></block></value></block></next></block></next></block></xml>"
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"_fv": 73,
|
||||
"_type": "villagerprofession",
|
||||
"definition": {
|
||||
"displayName": "Mailman Profession",
|
||||
"pointOfInterest": {
|
||||
"value": "CUSTOM:Mailbox"
|
||||
},
|
||||
"actionSound": {
|
||||
"value": "item.book.page_turn"
|
||||
},
|
||||
"hat": "None",
|
||||
"professionTextureFile": "mailman.png",
|
||||
"zombifiedProfessionTextureFile": "mailman.png"
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
{
|
||||
"_fv": 73,
|
||||
"_type": "villagertrade",
|
||||
"definition": {
|
||||
"tradeEntries": [
|
||||
{
|
||||
"villagerProfession": {
|
||||
"value": "CUSTOM:MailmanProfession"
|
||||
},
|
||||
"entries": [
|
||||
{
|
||||
"price1": {
|
||||
"value": "Items.EMERALD"
|
||||
},
|
||||
"countPrice1": 1,
|
||||
"price2": {
|
||||
"value": ""
|
||||
},
|
||||
"countPrice2": 1,
|
||||
"offer": {
|
||||
"value": "CUSTOM:ShippingLabel"
|
||||
},
|
||||
"countOffer": 12,
|
||||
"level": 1,
|
||||
"maxTrades": 100,
|
||||
"xp": 5,
|
||||
"priceMultiplier": 0.05
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
"type": "inputslot",
|
||||
"data": {
|
||||
"inputLimit": {
|
||||
"value": "Items.DIAMOND_PICKAXE"
|
||||
"value": "TAG:mod:ore_miner_acceptable_inputs"
|
||||
},
|
||||
"disablePlacement": {
|
||||
"fixedValue": false
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,68 +0,0 @@
|
||||
{
|
||||
"_fv": 73,
|
||||
"_type": "item",
|
||||
"definition": {
|
||||
"renderType": 0,
|
||||
"texture": "shipping_label",
|
||||
"customModelName": "Normal",
|
||||
"customProperties": {},
|
||||
"states": [],
|
||||
"name": "Shipping Label",
|
||||
"rarity": "COMMON",
|
||||
"creativeTabs": [
|
||||
{
|
||||
"value": "TOOLS"
|
||||
}
|
||||
],
|
||||
"stackSize": 64,
|
||||
"enchantability": 0,
|
||||
"useDuration": 0,
|
||||
"toolType": 1.0,
|
||||
"damageCount": 0,
|
||||
"recipeRemainder": {
|
||||
"value": ""
|
||||
},
|
||||
"destroyAnyBlock": false,
|
||||
"immuneToFire": false,
|
||||
"stayInGridWhenCrafting": false,
|
||||
"damageOnCrafting": false,
|
||||
"enableMeleeDamage": false,
|
||||
"damageVsEntity": 0.0,
|
||||
"specialInformation": {
|
||||
"fixedValue": [],
|
||||
"name": "ShippingLabelSpecialInformation"
|
||||
},
|
||||
"glowCondition": {
|
||||
"fixedValue": false,
|
||||
"name": "ShippingLabelHasItemGlowingEffect"
|
||||
},
|
||||
"inventorySize": 9,
|
||||
"inventoryStackSize": 64,
|
||||
"onRightClickedOnBlock": {
|
||||
"name": "ShippingLabelRightclickedOnBlock"
|
||||
},
|
||||
"enableRanged": false,
|
||||
"shootConstantly": false,
|
||||
"rangedItemChargesPower": false,
|
||||
"projectile": {
|
||||
"value": "CUSTOM:ShitProjectile"
|
||||
},
|
||||
"projectileDisableAmmoCheck": false,
|
||||
"isFood": false,
|
||||
"nutritionalValue": 4,
|
||||
"saturation": 0.3,
|
||||
"eatResultItem": {
|
||||
"value": ""
|
||||
},
|
||||
"isMeat": false,
|
||||
"isAlwaysEdible": false,
|
||||
"animation": "none",
|
||||
"isMusicDisc": false,
|
||||
"musicDiscMusic": {
|
||||
"value": ""
|
||||
},
|
||||
"musicDiscDescription": "",
|
||||
"musicDiscLengthInTicks": 100,
|
||||
"musicDiscAnalogOutput": 0
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"_fv": 73,
|
||||
"_type": "procedure",
|
||||
"definition": {
|
||||
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"event_trigger\" deletable=\"false\" x=\"40\" y=\"40\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"item_nbt_logic_get\"><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">connected</field></block></value><value name=\"item\"><block type=\"itemstack_to_mcitem\"></block></value></block></value><statement name=\"DO0\"><block type=\"return_logic\"><value name=\"return\"><block type=\"logic_boolean\"><field name=\"BOOL\">TRUE</field></block></value></block></statement><next><block type=\"return_logic\"><value name=\"return\"><block type=\"logic_boolean\"><field name=\"BOOL\">FALSE</field></block></value></block></next></block></next></block></xml>"
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"_fv": 73,
|
||||
"_type": "procedure",
|
||||
"definition": {
|
||||
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"event_trigger\" deletable=\"false\" x=\"40\" y=\"40\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"logic_negate\"><value name=\"BOOL\"><block type=\"world_data_isremote\"></block></value></block></value><statement name=\"DO0\"><block type=\"controls_if\"><value name=\"IF0\"><block type=\"logic_binary_ops\" inline=\"false\"><field name=\"OP\">AND</field><value name=\"A\"><block type=\"compare_mcblocks\"><value name=\"a\"><block type=\"blockstate_from_deps\"></block></value><value name=\"b\"><block type=\"mcitem_allblocks\"><field name=\"value\">CUSTOM:Mailbox</field></block></value></block></value><value name=\"B\"><block type=\"entity_issneaking\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value></block></value><statement name=\"DO0\"><block type=\"item_nbt_num_set\"><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">connected_mailbox_x</field></block></value><value name=\"item\"><block type=\"itemstack_to_mcitem\"></block></value><value name=\"tagValue\"><block type=\"coord_x\"></block></value><next><block type=\"item_nbt_num_set\"><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">connected_mailbox_y</field></block></value><value name=\"item\"><block type=\"itemstack_to_mcitem\"></block></value><value name=\"tagValue\"><block type=\"coord_y\"></block></value><next><block type=\"item_nbt_num_set\"><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">connected_mailbox_z</field></block></value><value name=\"item\"><block type=\"itemstack_to_mcitem\"></block></value><value name=\"tagValue\"><block type=\"coord_z\"></block></value><next><block type=\"item_nbt_logic_set\"><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">connected</field></block></value><value name=\"item\"><block type=\"itemstack_to_mcitem\"></block></value><value name=\"tagValue\"><block type=\"logic_boolean\"><field name=\"BOOL\">TRUE</field></block></value><next><block type=\"item_set_display_name\"><value name=\"item\"><block type=\"itemstack_to_mcitem\"></block></value><value name=\"displayname\"><block type=\"text_join\"><mutation items=\"2\"></mutation><value name=\"ADD0\"><block type=\"block_nbt_text_get\"><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">mailbox_name</field></block></value><value name=\"x\"><block type=\"coord_x\"></block></value><value name=\"y\"><block type=\"coord_y\"></block></value><value name=\"z\"><block type=\"coord_z\"></block></value></block></value><value name=\"ADD1\"><block type=\"text\"><field name=\"TEXT\">'s Mailbox</field></block></value></block></value><next><block type=\"play_sound\"><field name=\"sound\">entity.player.levelup</field><field name=\"soundcategory\">player</field><value name=\"x\"><block type=\"coord_x\"></block></value><value name=\"y\"><block type=\"coord_y\"></block></value><value name=\"z\"><block type=\"coord_z\"></block></value><value name=\"level\"><block type=\"math_number\"><field name=\"NUM\">0.75</field></block></value><value name=\"pitch\"><block type=\"math_random_number_between\"><value name=\"min\"><block type=\"math_number\"><field name=\"NUM\">0.95</field></block></value><value name=\"max\"><block type=\"math_number\"><field name=\"NUM\">1.05</field></block></value></block></value></block></next></block></next></block></next></block></next></block></next></block></statement></block></statement></block></next></block></xml>"
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"_fv": 73,
|
||||
"_type": "procedure",
|
||||
"definition": {
|
||||
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"event_trigger\" deletable=\"false\" x=\"240\" y=\"202\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"item_nbt_logic_get\"><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">connected</field></block></value><value name=\"item\"><block type=\"itemstack_to_mcitem\"></block></value></block></value><statement name=\"DO0\"><block type=\"return_string\"><value name=\"return\"><block type=\"text_join\"><mutation items=\"3\"></mutation><value name=\"ADD0\"><block type=\"text_join\"><mutation items=\"3\"></mutation><value name=\"ADD0\"><block type=\"text\"><field name=\"TEXT\">Dest. Mailbox X:</field></block></value><value name=\"ADD1\"><block type=\"item_nbt_num_get\"><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">connected_mailbox_x</field></block></value><value name=\"item\"><block type=\"itemstack_to_mcitem\"></block></value></block></value><value name=\"ADD2\"><block type=\"text_new_line\"></block></value></block></value><value name=\"ADD1\"><block type=\"text_join\"><mutation items=\"3\"></mutation><value name=\"ADD0\"><block type=\"text\"><field name=\"TEXT\">Dest. Mailbox Y:</field></block></value><value name=\"ADD1\"><block type=\"item_nbt_num_get\"><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">connected_mailbox_y</field></block></value><value name=\"item\"><block type=\"itemstack_to_mcitem\"></block></value></block></value><value name=\"ADD2\"><block type=\"text_new_line\"></block></value></block></value><value name=\"ADD2\"><block type=\"text_join\"><mutation items=\"3\"></mutation><value name=\"ADD0\"><block type=\"text\"><field name=\"TEXT\">Dest. Mailbox Z:</field></block></value><value name=\"ADD1\"><block type=\"item_nbt_num_get\"><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">connected_mailbox_z</field></block></value><value name=\"item\"><block type=\"itemstack_to_mcitem\"></block></value></block></value><value name=\"ADD2\"><block type=\"text_new_line\"></block></value></block></value></block></value></block></statement><next><block type=\"return_string\"><value name=\"return\"><block type=\"text\"><field name=\"TEXT\">No assigned destination.</field></block></value></block></next></block></next></block></xml>"
|
||||
}
|
||||
}
|
||||
@@ -1314,341 +1314,6 @@
|
||||
},
|
||||
"path": "~/Other"
|
||||
},
|
||||
{
|
||||
"name": "Mailbox",
|
||||
"type": "block",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "mailbox",
|
||||
"metadata": {
|
||||
"files": [
|
||||
"src/main/resources/assets/nims_random_bullshit/blockstates/mailbox.json",
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/block/MailboxBlock.java",
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/block/entity/MailboxBlockEntity.java",
|
||||
"src/main/resources/assets/nims_random_bullshit/models/item/mailbox.json",
|
||||
"src/main/resources/assets/nims_random_bullshit/models/block/mailbox.json",
|
||||
"src/main/resources/data/nims_random_bullshit/loot_tables/blocks/mailbox.json"
|
||||
]
|
||||
},
|
||||
"path": "~/Mailbox"
|
||||
},
|
||||
{
|
||||
"name": "MailboxGUI",
|
||||
"type": "gui",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "mailbox_gui",
|
||||
"metadata": {
|
||||
"files": [
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/world/inventory/MailboxGUIMenu.java",
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/network/MailboxGUIButtonMessage.java",
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/client/gui/MailboxGUIScreen.java"
|
||||
]
|
||||
},
|
||||
"path": "~/Mailbox"
|
||||
},
|
||||
{
|
||||
"name": "MailboxSmartSendLogic",
|
||||
"type": "procedure",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "mailbox_smart_send_logic",
|
||||
"metadata": {
|
||||
"files": [
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/procedures/MailboxSmartSendLogicProcedure.java"
|
||||
],
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "entity",
|
||||
"type": "entity"
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "z",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "world",
|
||||
"type": "world"
|
||||
}
|
||||
]
|
||||
},
|
||||
"path": "~/Mailbox"
|
||||
},
|
||||
{
|
||||
"name": "MailboxRecipe",
|
||||
"type": "recipe",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "mailbox_recipe",
|
||||
"metadata": {
|
||||
"files": [
|
||||
"src/main/resources/data/nims_random_bullshit/recipes/mailbox_recipe.json"
|
||||
]
|
||||
},
|
||||
"path": "~/Mailbox"
|
||||
},
|
||||
{
|
||||
"name": "ShippingLabel",
|
||||
"type": "item",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "shipping_label",
|
||||
"metadata": {
|
||||
"files": [
|
||||
"src/main/resources/assets/nims_random_bullshit/models/item/shipping_label.json",
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/item/ShippingLabelItem.java"
|
||||
]
|
||||
},
|
||||
"path": "~/Mailbox"
|
||||
},
|
||||
{
|
||||
"name": "ShippingLabelRightclickedOnBlock",
|
||||
"type": "procedure",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "shipping_label_rightclicked_on_block",
|
||||
"metadata": {
|
||||
"files": [
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/procedures/ShippingLabelRightclickedOnBlockProcedure.java"
|
||||
],
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "blockstate",
|
||||
"type": "blockstate"
|
||||
},
|
||||
{
|
||||
"name": "entity",
|
||||
"type": "entity"
|
||||
},
|
||||
{
|
||||
"name": "itemstack",
|
||||
"type": "itemstack"
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "z",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "world",
|
||||
"type": "world"
|
||||
}
|
||||
]
|
||||
},
|
||||
"path": "~/Mailbox"
|
||||
},
|
||||
{
|
||||
"name": "ShippingLabelHasItemGlowingEffect",
|
||||
"type": "procedure",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "shipping_label_has_item_glowing_effect",
|
||||
"metadata": {
|
||||
"return_type": "logic",
|
||||
"files": [
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/procedures/ShippingLabelHasItemGlowingEffectProcedure.java"
|
||||
],
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "itemstack",
|
||||
"type": "itemstack"
|
||||
}
|
||||
]
|
||||
},
|
||||
"path": "~/Mailbox"
|
||||
},
|
||||
{
|
||||
"name": "ShippingLabelSpecialInformation",
|
||||
"type": "procedure",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "shipping_label_special_information",
|
||||
"metadata": {
|
||||
"return_type": "string",
|
||||
"files": [
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/procedures/ShippingLabelSpecialInformationProcedure.java"
|
||||
],
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "itemstack",
|
||||
"type": "itemstack"
|
||||
}
|
||||
]
|
||||
},
|
||||
"path": "~/Mailbox"
|
||||
},
|
||||
{
|
||||
"name": "ShippingLabelRecipe",
|
||||
"type": "recipe",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "shipping_label_recipe",
|
||||
"metadata": {
|
||||
"files": [
|
||||
"src/main/resources/data/nims_random_bullshit/recipes/shipping_label_recipe.json"
|
||||
]
|
||||
},
|
||||
"path": "~/Mailbox"
|
||||
},
|
||||
{
|
||||
"name": "MailboxSlot99ShippingLabelInsertionCondition",
|
||||
"type": "procedure",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "mailbox_slot_99_shipping_label_insertion_condition",
|
||||
"metadata": {
|
||||
"return_type": "logic",
|
||||
"files": [
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/procedures/MailboxSlot99ShippingLabelInsertionConditionProcedure.java"
|
||||
],
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "itemstack",
|
||||
"type": "itemstack"
|
||||
}
|
||||
]
|
||||
},
|
||||
"path": "~/Mailbox"
|
||||
},
|
||||
{
|
||||
"name": "MailboxNameEntryGUI",
|
||||
"type": "gui",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "mailbox_name_entry_gui",
|
||||
"metadata": {
|
||||
"files": [
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/world/inventory/MailboxNameEntryGUIMenu.java",
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/client/gui/MailboxNameEntryGUIScreen.java",
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/network/MailboxNameEntryGUIButtonMessage.java"
|
||||
]
|
||||
},
|
||||
"path": "~/Mailbox"
|
||||
},
|
||||
{
|
||||
"name": "MailboxBlockIsPlacedBy",
|
||||
"type": "procedure",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "mailbox_block_is_placed_by",
|
||||
"metadata": {
|
||||
"files": [
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/procedures/MailboxBlockIsPlacedByProcedure.java"
|
||||
],
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "entity",
|
||||
"type": "entity"
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "z",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "world",
|
||||
"type": "world"
|
||||
}
|
||||
]
|
||||
},
|
||||
"path": "~/Mailbox"
|
||||
},
|
||||
{
|
||||
"name": "MailboxNameEntryButtonPressed",
|
||||
"type": "procedure",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "mailbox_name_entry_button_pressed",
|
||||
"metadata": {
|
||||
"files": [
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/procedures/MailboxNameEntryButtonPressedProcedure.java"
|
||||
],
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "entity",
|
||||
"type": "entity"
|
||||
},
|
||||
{
|
||||
"name": "guistate",
|
||||
"type": "map"
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "z",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "world",
|
||||
"type": "world"
|
||||
}
|
||||
]
|
||||
},
|
||||
"path": "~/Mailbox"
|
||||
},
|
||||
{
|
||||
"name": "MailboxNameEntryGUIThisGUIIsClosed",
|
||||
"type": "procedure",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "mailbox_name_entry_gui_this_gui_is_closed",
|
||||
"metadata": {
|
||||
"files": [
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/procedures/MailboxNameEntryGUIThisGUIIsClosedProcedure.java"
|
||||
],
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "guistate",
|
||||
"type": "map"
|
||||
},
|
||||
{
|
||||
"name": "x",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "y",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "z",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"name": "world",
|
||||
"type": "world"
|
||||
}
|
||||
]
|
||||
},
|
||||
"path": "~/Mailbox"
|
||||
},
|
||||
{
|
||||
"name": "Tux",
|
||||
"type": "livingentity",
|
||||
@@ -1664,155 +1329,6 @@
|
||||
},
|
||||
"path": "~/Tux"
|
||||
},
|
||||
{
|
||||
"name": "LabelCopyMachine",
|
||||
"type": "block",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "label_copy_machine",
|
||||
"metadata": {
|
||||
"files": [
|
||||
"src/main/resources/assets/nims_random_bullshit/models/block/label_copy_machine.json",
|
||||
"src/main/resources/assets/nims_random_bullshit/blockstates/label_copy_machine.json",
|
||||
"src/main/resources/data/nims_random_bullshit/loot_tables/blocks/label_copy_machine.json",
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/block/LabelCopyMachineBlock.java",
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/block/entity/LabelCopyMachineBlockEntity.java",
|
||||
"src/main/resources/assets/nims_random_bullshit/models/item/label_copy_machine.json"
|
||||
]
|
||||
},
|
||||
"path": "~/Mailbox"
|
||||
},
|
||||
{
|
||||
"name": "LabelCopyMachineRecipe",
|
||||
"type": "recipe",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "label_copy_machine_recipe",
|
||||
"metadata": {
|
||||
"files": [
|
||||
"src/main/resources/data/nims_random_bullshit/recipes/label_copy_machine_recipe.json"
|
||||
]
|
||||
},
|
||||
"path": "~/Mailbox"
|
||||
},
|
||||
{
|
||||
"name": "LabelCopyMachineGUI",
|
||||
"type": "gui",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "label_copy_machine_gui",
|
||||
"metadata": {
|
||||
"files": [
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/world/inventory/LabelCopyMachineGUIMenu.java",
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/client/gui/LabelCopyMachineGUIScreen.java",
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/network/LabelCopyMachineGUIButtonMessage.java"
|
||||
]
|
||||
},
|
||||
"path": "~/Mailbox"
|
||||
},
|
||||
{
|
||||
"name": "LabelCopyMachineCopyButtonPressed",
|
||||
"type": "procedure",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "label_copy_machine_copy_button_pressed",
|
||||
"metadata": {
|
||||
"files": [
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/procedures/LabelCopyMachineCopyButtonPressedProcedure.java"
|
||||
],
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "entity",
|
||||
"type": "entity"
|
||||
},
|
||||
{
|
||||
"name": "world",
|
||||
"type": "world"
|
||||
}
|
||||
]
|
||||
},
|
||||
"path": "~/Mailbox"
|
||||
},
|
||||
{
|
||||
"name": "LabelCopyMachineGUISlot0TooltipCondition",
|
||||
"type": "procedure",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "label_copy_machine_gui_slot_0_tooltip_condition",
|
||||
"metadata": {
|
||||
"return_type": "logic",
|
||||
"files": [
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/procedures/LabelCopyMachineGUISlot0TooltipConditionProcedure.java"
|
||||
],
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "entity",
|
||||
"type": "entity"
|
||||
}
|
||||
]
|
||||
},
|
||||
"path": "~/Mailbox"
|
||||
},
|
||||
{
|
||||
"name": "LabelCopyMachineGUISlot1TooltipCondition",
|
||||
"type": "procedure",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "label_copy_machine_gui_slot_1_tooltip_condition",
|
||||
"metadata": {
|
||||
"return_type": "logic",
|
||||
"files": [
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/procedures/LabelCopyMachineGUISlot1TooltipConditionProcedure.java"
|
||||
],
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "entity",
|
||||
"type": "entity"
|
||||
}
|
||||
]
|
||||
},
|
||||
"path": "~/Mailbox"
|
||||
},
|
||||
{
|
||||
"name": "LabelCopyMachineGUISlot2TooltipCondition",
|
||||
"type": "procedure",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "label_copy_machine_gui_slot_2_tooltip_condition",
|
||||
"metadata": {
|
||||
"return_type": "logic",
|
||||
"files": [
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/procedures/LabelCopyMachineGUISlot2TooltipConditionProcedure.java"
|
||||
],
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "entity",
|
||||
"type": "entity"
|
||||
}
|
||||
]
|
||||
},
|
||||
"path": "~/Mailbox"
|
||||
},
|
||||
{
|
||||
"name": "LabelCopyMachineGUISlot3TooltipCondition",
|
||||
"type": "procedure",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "label_copy_machine_gui_slot_3_tooltip_condition",
|
||||
"metadata": {
|
||||
"return_type": "logic",
|
||||
"files": [
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/procedures/LabelCopyMachineGUISlot3TooltipConditionProcedure.java"
|
||||
],
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "entity",
|
||||
"type": "entity"
|
||||
}
|
||||
]
|
||||
},
|
||||
"path": "~/Mailbox"
|
||||
},
|
||||
{
|
||||
"name": "TuxPlaybackConditionJumpUp",
|
||||
"type": "procedure",
|
||||
@@ -2477,28 +1993,6 @@
|
||||
},
|
||||
"path": "~/Other"
|
||||
},
|
||||
{
|
||||
"name": "MailmanProfession",
|
||||
"type": "villagerprofession",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "mailman_profession",
|
||||
"metadata": {
|
||||
"files": []
|
||||
},
|
||||
"path": "~/Other"
|
||||
},
|
||||
{
|
||||
"name": "MailmanTrades",
|
||||
"type": "villagertrade",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "mailman_trades",
|
||||
"metadata": {
|
||||
"files": []
|
||||
},
|
||||
"path": "~/Other"
|
||||
},
|
||||
{
|
||||
"name": "Bedrockifier",
|
||||
"type": "block",
|
||||
@@ -3206,6 +2700,59 @@
|
||||
"files": []
|
||||
},
|
||||
"path": "~/Shit"
|
||||
},
|
||||
{
|
||||
"name": "BrownDyeShitRecipe",
|
||||
"type": "recipe",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "brown_dye_shit_recipe",
|
||||
"metadata": {
|
||||
"files": [
|
||||
"src/main/resources/data/nims_random_bullshit/recipes/brown_dye_shit_recipe.json"
|
||||
]
|
||||
},
|
||||
"path": "~/Shit"
|
||||
},
|
||||
{
|
||||
"name": "GiftCommandLogic",
|
||||
"type": "procedure",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "gift_command_logic",
|
||||
"metadata": {
|
||||
"files": [
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/procedures/GiftCommandLogicProcedure.java"
|
||||
],
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "arguments",
|
||||
"type": "cmdcontext"
|
||||
},
|
||||
{
|
||||
"name": "entity",
|
||||
"type": "entity"
|
||||
},
|
||||
{
|
||||
"name": "world",
|
||||
"type": "world"
|
||||
}
|
||||
]
|
||||
},
|
||||
"path": "~/Other"
|
||||
},
|
||||
{
|
||||
"name": "GiftCommand",
|
||||
"type": "command",
|
||||
"compiles": true,
|
||||
"locked_code": false,
|
||||
"registry_name": "gift_command",
|
||||
"metadata": {
|
||||
"files": [
|
||||
"src/main/java/net/mcreator/nimsrandombullshit/command/GiftCommandCommand.java"
|
||||
]
|
||||
},
|
||||
"path": "~/Other"
|
||||
}
|
||||
],
|
||||
"variable_elements": [],
|
||||
@@ -3217,6 +2764,15 @@
|
||||
"BLOCKS:minecraft:needs_diamond_tool": [
|
||||
"~CUSTOM:Bedrockifier"
|
||||
],
|
||||
"ITEMS:minecraft:pickaxes": [
|
||||
"~CUSTOM:BedrockPickaxe",
|
||||
"~CUSTOM:StarWand",
|
||||
"~CUSTOM:NetherrackitePickaxe"
|
||||
],
|
||||
"ITEMS:mod:ore_miner_acceptable_inputs": [
|
||||
"CUSTOM:BedrockPickaxe",
|
||||
"Items.DIAMOND_PICKAXE"
|
||||
],
|
||||
"BLOCKS:minecraft:mineable/pickaxe": [
|
||||
"~CUSTOM:Bedrockifier",
|
||||
"~CUSTOM:MagmaBrickButton",
|
||||
@@ -3244,11 +2800,6 @@
|
||||
"BLOCKS:minecraft:fences": [
|
||||
"~CUSTOM:RubberFence"
|
||||
],
|
||||
"ITEMS:minecraft:pickaxes": [
|
||||
"~CUSTOM:BedrockPickaxe",
|
||||
"~CUSTOM:StarWand",
|
||||
"~CUSTOM:NetherrackitePickaxe"
|
||||
],
|
||||
"BLOCKS:minecraft:walls": [
|
||||
"~CUSTOM:MagmaBrickWalls",
|
||||
"~CUSTOM:RedstoneBrickWalls"
|
||||
@@ -3277,26 +2828,21 @@
|
||||
"language_map": {
|
||||
"en_us": {
|
||||
"item.nims_random_bullshit.star_wand": "Star Wand",
|
||||
"gui.nims_random_bullshit.mailbox_name_entry_gui.button_done": "Done",
|
||||
"gui.nims_random_bullshit.ore_miner_gui.button_mine": "Mine",
|
||||
"block.nims_random_bullshit.penta_condensed_netherrack": "Penta-condensed Netherrack",
|
||||
"item.nims_random_bullshit.magic_dust": "Magic Dust",
|
||||
"block.nims_random_bullshit.magma_brick_button": "Magma Brick Button",
|
||||
"painting.nims_random_bullshit.shit_painting.title": "Shit Painting",
|
||||
"enchantment.nims_random_bullshit.passive_income_enchantment": "Passive Income",
|
||||
"gui.nims_random_bullshit.label_copy_machine_gui.button_copy": "Copy",
|
||||
"painting.nims_random_bullshit.shit_painting.author": "nim",
|
||||
"gui.nims_random_bullshit.mailbox_gui.outbox_x_coord": "0",
|
||||
"block.nims_random_bullshit.broken_glass": "Broken Glass",
|
||||
"block.nims_random_bullshit.redstone_brick_walls": "Redstone Brick Wall",
|
||||
"block.nims_random_bullshit.rubber_fence": "Rubber Fence",
|
||||
"block.nims_random_bullshit.label_copy_machine": "Label Copy Machine",
|
||||
"item.nims_random_bullshit.bean": "Bean",
|
||||
"effect.nims_random_bullshit.summoned_entity_effect": "Summoned Entity",
|
||||
"block.nims_random_bullshit.rubber_slab": "Rubber Slab",
|
||||
"gui.nims_random_bullshit.mailbox_name_entry_gui.mailbox_name_field": "",
|
||||
"item.nims_random_bullshit.bedrock_upgrade_template": "Bedrock Upgrade Template",
|
||||
"item.nims_random_bullshit.shipping_label": "Shipping Label",
|
||||
"item.nims_random_bullshit.ghoul_spawn_egg": "Ghoul Spawn Egg",
|
||||
"block.nims_random_bullshit.magma_brick_walls": "Magma Brick Wall",
|
||||
"gui.nims_random_bullshit.mailbox_gui.label_y": "Y:",
|
||||
@@ -3305,20 +2851,14 @@
|
||||
"item.nims_random_bullshit.iron_golem_question_mark": "Iron Golem...?",
|
||||
"item.nims_random_bullshit.tux_spawn_egg": "Tux Spawn Egg",
|
||||
"gui.nims_random_bullshit.mailbox_gui.label_x": "X:",
|
||||
"gui.nims_random_bullshit.label_copy_machine_gui.label_label_copy_machine": "Label Copy Machine",
|
||||
"item.nims_random_bullshit.lapis_lazuli_nugget": "Lapis Lazuli Nugget",
|
||||
"item.nims_random_bullshit.gravedigger.description_1": "We must dig!",
|
||||
"item.nims_random_bullshit.gravedigger.description_0": "Right-Click on soul sand or soul soil to use them, summoning a ghoul that attacks hostile mobs.",
|
||||
"block.nims_random_bullshit.rubber_fence_gate": "Rubber Fence Gate",
|
||||
"gui.nims_random_bullshit.label_copy_machine_gui.tooltip_ink_sac_slot": "Ink Sac Slot",
|
||||
"gui.nims_random_bullshit.label_copy_machine_gui.tooltip_paper_slot": "Paper Slot",
|
||||
"item.nims_random_bullshit.snow_golem_question_mark": "Snow Golem...?",
|
||||
"item.nims_random_bullshit.bedrock_sword": "Bedrock Sword",
|
||||
"block.nims_random_bullshit.mailbox": "Mailbox",
|
||||
"gui.nims_random_bullshit.mailbox_gui.button_send": "Send",
|
||||
"block.nims_random_bullshit.redstone_brick_stairs": "Redstone Brick Stairs",
|
||||
"gui.nims_random_bullshit.mailbox_gui.outbox_y_coord": "0",
|
||||
"gui.nims_random_bullshit.mailbox_gui.label_inbox": "Inbox",
|
||||
"item.nims_random_bullshit.wither_question_mark": "Wither...?",
|
||||
"block.nims_random_bullshit.magma_brick_pressure_plate": "Magma Brick Pressure Plate",
|
||||
"item.nims_random_bullshit.cheese": "Cheese",
|
||||
@@ -3328,14 +2868,12 @@
|
||||
"fluid.nims_random_bullshit.netherrack_juice": "Netherrack Juice",
|
||||
"block.nims_random_bullshit.quadra_condensed_netherrack": "Quadra-condensed Netherrack",
|
||||
"gui.nims_random_bullshit.mailbox_gui.outbox_z_coord": "0",
|
||||
"gui.nims_random_bullshit.label_copy_machine_gui.tooltip_output_copy_of_shipping_label": "Output (copy of shipping label)",
|
||||
"item.nims_random_bullshit.netherrackite_pickaxe.description_0": "Non-condensed netherracks broken by this pickaxe drop themselves an additional time.",
|
||||
"gui.nims_random_bullshit.bedrockifier_gui.button_empty": "-\u003e",
|
||||
"item.nims_random_bullshit.netherrackite_pickaxe": "Netherrackite Pickaxe",
|
||||
"effect.nims_random_bullshit.stinky_effect": "Stinky",
|
||||
"block.nims_random_bullshit.hexa_condensed_netherrack": "Hexa-condensed Netherrack",
|
||||
"block.nims_random_bullshit.ore_miner": "Ore Miner",
|
||||
"gui.nims_random_bullshit.mailbox_gui.label_outbox": "Outbox",
|
||||
"block.nims_random_bullshit.rubber_stairs": "Rubber Stairs",
|
||||
"block.nims_random_bullshit.netherrack_juice": "Netherrack Juice",
|
||||
"block.nims_random_bullshit.rubber_button": "Rubber Button",
|
||||
@@ -3352,7 +2890,6 @@
|
||||
"item.nims_random_bullshit.star": "Star",
|
||||
"gui.nims_random_bullshit.shit_gui.label_uh_ohh_stinky": "UH OHH!!! STINKY!!! UH OHH!!! STINKY!!! UH OHH!!! STINKY!!! UH OHH!!! STINKY!!! ",
|
||||
"block.nims_random_bullshit.magma_bricks": "Magma Bricks",
|
||||
"entity.minecraft.villager.nims_random_bullshit.mailman_profession": "Mailman Profession",
|
||||
"gui.nims_random_bullshit.bedrockifier_gui.label_bedrockifier": "Bedrockifier",
|
||||
"block.nims_random_bullshit.rubber_pressure_plate": "Rubber Pressure Plate",
|
||||
"item.nims_random_bullshit.shit": "Shit",
|
||||
@@ -3360,9 +2897,7 @@
|
||||
"item.nims_random_bullshit.bedrock_pickaxe": "Bedrock Pickaxe",
|
||||
"block.nims_random_bullshit.magma_brick_stairs": "Magma Brick Stairs",
|
||||
"block.nims_random_bullshit.magma_brick_slabs": "Magma Brick Slab",
|
||||
"gui.nims_random_bullshit.label_copy_machine_gui.tooltip_shipping_label_slot": "Shipping Label Slot",
|
||||
"block.nims_random_bullshit.redstone_brick_slabs": "Redstone Brick Slab",
|
||||
"gui.nims_random_bullshit.mailbox_name_entry_gui.label_mailbox_name": "Mailbox Name:"
|
||||
"block.nims_random_bullshit.redstone_brick_slabs": "Redstone Brick Slab"
|
||||
}
|
||||
},
|
||||
"foldersRoot": {
|
||||
@@ -3396,10 +2931,6 @@
|
||||
"name": "OreMiner",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "Mailbox",
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "Tux",
|
||||
"children": []
|
||||
@@ -3425,7 +2956,7 @@
|
||||
"workspaceSettings": {
|
||||
"modid": "nims_random_bullshit",
|
||||
"modName": "Nim\u0027s Random Bullshit",
|
||||
"version": "1.6.1",
|
||||
"version": "1.6.2",
|
||||
"description": "Random shit added by Nim. Created with MCreator.",
|
||||
"author": "nimsolated, MCreator",
|
||||
"websiteURL": "https://mcreator.net",
|
||||
|
||||
@@ -17,7 +17,6 @@ import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
|
||||
import net.mcreator.nimsrandombullshit.init.NimsRandomBullshitModVillagerProfessions;
|
||||
import net.mcreator.nimsrandombullshit.init.NimsRandomBullshitModTabs;
|
||||
import net.mcreator.nimsrandombullshit.init.NimsRandomBullshitModPaintings;
|
||||
import net.mcreator.nimsrandombullshit.init.NimsRandomBullshitModMobEffects;
|
||||
@@ -61,7 +60,6 @@ public class NimsRandomBullshitMod {
|
||||
|
||||
NimsRandomBullshitModPaintings.REGISTRY.register(bus);
|
||||
|
||||
NimsRandomBullshitModVillagerProfessions.PROFESSIONS.register(bus);
|
||||
NimsRandomBullshitModMenus.REGISTRY.register(bus);
|
||||
NimsRandomBullshitModFluids.REGISTRY.register(bus);
|
||||
NimsRandomBullshitModFluidTypes.REGISTRY.register(bus);
|
||||
|
||||
@@ -1,146 +0,0 @@
|
||||
|
||||
package net.mcreator.nimsrandombullshit.block;
|
||||
|
||||
import net.minecraftforge.network.NetworkHooks;
|
||||
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraft.world.phys.shapes.Shapes;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.BlockHitResult;
|
||||
import net.minecraft.world.level.block.state.properties.DirectionProperty;
|
||||
import net.minecraft.world.level.block.state.StateDefinition;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.block.Rotation;
|
||||
import net.minecraft.world.level.block.Mirror;
|
||||
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
|
||||
import net.minecraft.world.level.block.EntityBlock;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.player.Inventory;
|
||||
import net.minecraft.world.MenuProvider;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.Containers;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.nimsrandombullshit.world.inventory.LabelCopyMachineGUIMenu;
|
||||
import net.mcreator.nimsrandombullshit.block.entity.LabelCopyMachineBlockEntity;
|
||||
|
||||
import io.netty.buffer.Unpooled;
|
||||
|
||||
public class LabelCopyMachineBlock extends Block implements EntityBlock {
|
||||
public static final DirectionProperty FACING = HorizontalDirectionalBlock.FACING;
|
||||
|
||||
public LabelCopyMachineBlock() {
|
||||
super(BlockBehaviour.Properties.of().sound(SoundType.METAL).strength(1f, 10f).noOcclusion().isRedstoneConductor((bs, br, bp) -> false));
|
||||
this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean propagatesSkylightDown(BlockState state, BlockGetter reader, BlockPos pos) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightBlock(BlockState state, BlockGetter worldIn, BlockPos pos) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getVisualShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) {
|
||||
return Shapes.empty();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
|
||||
super.createBlockStateDefinition(builder);
|
||||
builder.add(FACING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockPlaceContext context) {
|
||||
return super.getStateForPlacement(context).setValue(FACING, context.getHorizontalDirection().getOpposite());
|
||||
}
|
||||
|
||||
public BlockState rotate(BlockState state, Rotation rot) {
|
||||
return state.setValue(FACING, rot.rotate(state.getValue(FACING)));
|
||||
}
|
||||
|
||||
public BlockState mirror(BlockState state, Mirror mirrorIn) {
|
||||
return state.rotate(mirrorIn.getRotation(state.getValue(FACING)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public InteractionResult use(BlockState blockstate, Level world, BlockPos pos, Player entity, InteractionHand hand, BlockHitResult hit) {
|
||||
super.use(blockstate, world, pos, entity, hand, hit);
|
||||
if (entity instanceof ServerPlayer player) {
|
||||
NetworkHooks.openScreen(player, new MenuProvider() {
|
||||
@Override
|
||||
public Component getDisplayName() {
|
||||
return Component.literal("Label Copy Machine");
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractContainerMenu createMenu(int id, Inventory inventory, Player player) {
|
||||
return new LabelCopyMachineGUIMenu(id, inventory, new FriendlyByteBuf(Unpooled.buffer()).writeBlockPos(pos));
|
||||
}
|
||||
}, pos);
|
||||
}
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuProvider getMenuProvider(BlockState state, Level worldIn, BlockPos pos) {
|
||||
BlockEntity tileEntity = worldIn.getBlockEntity(pos);
|
||||
return tileEntity instanceof MenuProvider menuProvider ? menuProvider : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
|
||||
return new LabelCopyMachineBlockEntity(pos, state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean triggerEvent(BlockState state, Level world, BlockPos pos, int eventID, int eventParam) {
|
||||
super.triggerEvent(state, world, pos, eventID, eventParam);
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
return blockEntity == null ? false : blockEntity.triggerEvent(eventID, eventParam);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean isMoving) {
|
||||
if (state.getBlock() != newState.getBlock()) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity instanceof LabelCopyMachineBlockEntity be) {
|
||||
Containers.dropContents(world, pos, be);
|
||||
world.updateNeighbourForOutputSignal(pos, this);
|
||||
}
|
||||
super.onRemove(state, world, pos, newState, isMoving);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasAnalogOutputSignal(BlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAnalogOutputSignal(BlockState blockState, Level world, BlockPos pos) {
|
||||
BlockEntity tileentity = world.getBlockEntity(pos);
|
||||
if (tileentity instanceof LabelCopyMachineBlockEntity be)
|
||||
return AbstractContainerMenu.getRedstoneSignalFromContainer(be);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -1,155 +0,0 @@
|
||||
|
||||
package net.mcreator.nimsrandombullshit.block;
|
||||
|
||||
import net.minecraftforge.network.NetworkHooks;
|
||||
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraft.world.phys.shapes.Shapes;
|
||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||
import net.minecraft.world.phys.BlockHitResult;
|
||||
import net.minecraft.world.level.block.state.properties.DirectionProperty;
|
||||
import net.minecraft.world.level.block.state.StateDefinition;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.SoundType;
|
||||
import net.minecraft.world.level.block.Rotation;
|
||||
import net.minecraft.world.level.block.Mirror;
|
||||
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
|
||||
import net.minecraft.world.level.block.EntityBlock;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.player.Inventory;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.MenuProvider;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.Containers;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.nimsrandombullshit.world.inventory.MailboxGUIMenu;
|
||||
import net.mcreator.nimsrandombullshit.procedures.MailboxBlockIsPlacedByProcedure;
|
||||
import net.mcreator.nimsrandombullshit.block.entity.MailboxBlockEntity;
|
||||
|
||||
import io.netty.buffer.Unpooled;
|
||||
|
||||
public class MailboxBlock extends Block implements EntityBlock {
|
||||
public static final DirectionProperty FACING = HorizontalDirectionalBlock.FACING;
|
||||
|
||||
public MailboxBlock() {
|
||||
super(BlockBehaviour.Properties.of().sound(SoundType.METAL).strength(1f, 10f).noOcclusion().isRedstoneConductor((bs, br, bp) -> false));
|
||||
this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean propagatesSkylightDown(BlockState state, BlockGetter reader, BlockPos pos) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightBlock(BlockState state, BlockGetter worldIn, BlockPos pos) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public VoxelShape getVisualShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) {
|
||||
return Shapes.empty();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
|
||||
super.createBlockStateDefinition(builder);
|
||||
builder.add(FACING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getStateForPlacement(BlockPlaceContext context) {
|
||||
return super.getStateForPlacement(context).setValue(FACING, context.getHorizontalDirection().getOpposite());
|
||||
}
|
||||
|
||||
public BlockState rotate(BlockState state, Rotation rot) {
|
||||
return state.setValue(FACING, rot.rotate(state.getValue(FACING)));
|
||||
}
|
||||
|
||||
public BlockState mirror(BlockState state, Mirror mirrorIn) {
|
||||
return state.rotate(mirrorIn.getRotation(state.getValue(FACING)));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPlacedBy(Level world, BlockPos pos, BlockState blockstate, LivingEntity entity, ItemStack itemstack) {
|
||||
super.setPlacedBy(world, pos, blockstate, entity, itemstack);
|
||||
MailboxBlockIsPlacedByProcedure.execute(world, pos.getX(), pos.getY(), pos.getZ(), entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InteractionResult use(BlockState blockstate, Level world, BlockPos pos, Player entity, InteractionHand hand, BlockHitResult hit) {
|
||||
super.use(blockstate, world, pos, entity, hand, hit);
|
||||
if (entity instanceof ServerPlayer player) {
|
||||
NetworkHooks.openScreen(player, new MenuProvider() {
|
||||
@Override
|
||||
public Component getDisplayName() {
|
||||
return Component.literal("Mailbox");
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractContainerMenu createMenu(int id, Inventory inventory, Player player) {
|
||||
return new MailboxGUIMenu(id, inventory, new FriendlyByteBuf(Unpooled.buffer()).writeBlockPos(pos));
|
||||
}
|
||||
}, pos);
|
||||
}
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MenuProvider getMenuProvider(BlockState state, Level worldIn, BlockPos pos) {
|
||||
BlockEntity tileEntity = worldIn.getBlockEntity(pos);
|
||||
return tileEntity instanceof MenuProvider menuProvider ? menuProvider : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockEntity newBlockEntity(BlockPos pos, BlockState state) {
|
||||
return new MailboxBlockEntity(pos, state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean triggerEvent(BlockState state, Level world, BlockPos pos, int eventID, int eventParam) {
|
||||
super.triggerEvent(state, world, pos, eventID, eventParam);
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
return blockEntity == null ? false : blockEntity.triggerEvent(eventID, eventParam);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean isMoving) {
|
||||
if (state.getBlock() != newState.getBlock()) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity instanceof MailboxBlockEntity be) {
|
||||
Containers.dropContents(world, pos, be);
|
||||
world.updateNeighbourForOutputSignal(pos, this);
|
||||
}
|
||||
super.onRemove(state, world, pos, newState, isMoving);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasAnalogOutputSignal(BlockState state) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAnalogOutputSignal(BlockState blockState, Level world, BlockPos pos) {
|
||||
BlockEntity tileentity = world.getBlockEntity(pos);
|
||||
if (tileentity instanceof MailboxBlockEntity be)
|
||||
return AbstractContainerMenu.getRedstoneSignalFromContainer(be);
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -1,143 +0,0 @@
|
||||
package net.mcreator.nimsrandombullshit.block.entity;
|
||||
|
||||
import net.minecraftforge.items.wrapper.SidedInvWrapper;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.common.capabilities.ForgeCapabilities;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||
import net.minecraft.world.entity.player.Inventory;
|
||||
import net.minecraft.world.WorldlyContainer;
|
||||
import net.minecraft.world.ContainerHelper;
|
||||
import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.core.NonNullList;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.nimsrandombullshit.world.inventory.LabelCopyMachineGUIMenu;
|
||||
import net.mcreator.nimsrandombullshit.init.NimsRandomBullshitModBlockEntities;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
import io.netty.buffer.Unpooled;
|
||||
|
||||
public class LabelCopyMachineBlockEntity extends RandomizableContainerBlockEntity implements WorldlyContainer {
|
||||
private NonNullList<ItemStack> stacks = NonNullList.<ItemStack>withSize(4, ItemStack.EMPTY);
|
||||
private final LazyOptional<? extends IItemHandler>[] handlers = SidedInvWrapper.create(this, Direction.values());
|
||||
|
||||
public LabelCopyMachineBlockEntity(BlockPos position, BlockState state) {
|
||||
super(NimsRandomBullshitModBlockEntities.LABEL_COPY_MACHINE.get(), position, state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void load(CompoundTag compound) {
|
||||
super.load(compound);
|
||||
if (!this.tryLoadLootTable(compound))
|
||||
this.stacks = NonNullList.withSize(this.getContainerSize(), ItemStack.EMPTY);
|
||||
ContainerHelper.loadAllItems(compound, this.stacks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveAdditional(CompoundTag compound) {
|
||||
super.saveAdditional(compound);
|
||||
if (!this.trySaveLootTable(compound)) {
|
||||
ContainerHelper.saveAllItems(compound, this.stacks);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClientboundBlockEntityDataPacket getUpdatePacket() {
|
||||
return ClientboundBlockEntityDataPacket.create(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundTag getUpdateTag() {
|
||||
return this.saveWithFullMetadata();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getContainerSize() {
|
||||
return stacks.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
for (ItemStack itemstack : this.stacks)
|
||||
if (!itemstack.isEmpty())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Component getDefaultName() {
|
||||
return Component.literal("label_copy_machine");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxStackSize() {
|
||||
return 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractContainerMenu createMenu(int id, Inventory inventory) {
|
||||
return new LabelCopyMachineGUIMenu(id, inventory, new FriendlyByteBuf(Unpooled.buffer()).writeBlockPos(this.worldPosition));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Component getDisplayName() {
|
||||
return Component.literal("Label Copy Machine");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected NonNullList<ItemStack> getItems() {
|
||||
return this.stacks;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setItems(NonNullList<ItemStack> stacks) {
|
||||
this.stacks = stacks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceItem(int index, ItemStack stack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getSlotsForFace(Direction side) {
|
||||
return IntStream.range(0, this.getContainerSize()).toArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceItemThroughFace(int index, ItemStack stack, @Nullable Direction direction) {
|
||||
return this.canPlaceItem(index, stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTakeItemThroughFace(int index, ItemStack stack, Direction direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> LazyOptional<T> getCapability(Capability<T> capability, @Nullable Direction facing) {
|
||||
if (!this.remove && facing != null && capability == ForgeCapabilities.ITEM_HANDLER)
|
||||
return handlers[facing.ordinal()].cast();
|
||||
return super.getCapability(capability, facing);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRemoved() {
|
||||
super.setRemoved();
|
||||
for (LazyOptional<? extends IItemHandler> handler : handlers)
|
||||
handler.invalidate();
|
||||
}
|
||||
}
|
||||
@@ -1,161 +0,0 @@
|
||||
package net.mcreator.nimsrandombullshit.block.entity;
|
||||
|
||||
import net.minecraftforge.items.wrapper.SidedInvWrapper;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.common.util.LazyOptional;
|
||||
import net.minecraftforge.common.capabilities.ForgeCapabilities;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||
import net.minecraft.world.entity.player.Inventory;
|
||||
import net.minecraft.world.WorldlyContainer;
|
||||
import net.minecraft.world.ContainerHelper;
|
||||
import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.core.NonNullList;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.nimsrandombullshit.world.inventory.MailboxGUIMenu;
|
||||
import net.mcreator.nimsrandombullshit.init.NimsRandomBullshitModBlockEntities;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
import io.netty.buffer.Unpooled;
|
||||
|
||||
public class MailboxBlockEntity extends RandomizableContainerBlockEntity implements WorldlyContainer {
|
||||
private NonNullList<ItemStack> stacks = NonNullList.<ItemStack>withSize(100, ItemStack.EMPTY);
|
||||
private final LazyOptional<? extends IItemHandler>[] handlers = SidedInvWrapper.create(this, Direction.values());
|
||||
|
||||
public MailboxBlockEntity(BlockPos position, BlockState state) {
|
||||
super(NimsRandomBullshitModBlockEntities.MAILBOX.get(), position, state);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void load(CompoundTag compound) {
|
||||
super.load(compound);
|
||||
if (!this.tryLoadLootTable(compound))
|
||||
this.stacks = NonNullList.withSize(this.getContainerSize(), ItemStack.EMPTY);
|
||||
ContainerHelper.loadAllItems(compound, this.stacks);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveAdditional(CompoundTag compound) {
|
||||
super.saveAdditional(compound);
|
||||
if (!this.trySaveLootTable(compound)) {
|
||||
ContainerHelper.saveAllItems(compound, this.stacks);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ClientboundBlockEntityDataPacket getUpdatePacket() {
|
||||
return ClientboundBlockEntityDataPacket.create(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundTag getUpdateTag() {
|
||||
return this.saveWithFullMetadata();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getContainerSize() {
|
||||
return stacks.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty() {
|
||||
for (ItemStack itemstack : this.stacks)
|
||||
if (!itemstack.isEmpty())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Component getDefaultName() {
|
||||
return Component.literal("mailbox");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxStackSize() {
|
||||
return 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractContainerMenu createMenu(int id, Inventory inventory) {
|
||||
return new MailboxGUIMenu(id, inventory, new FriendlyByteBuf(Unpooled.buffer()).writeBlockPos(this.worldPosition));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Component getDisplayName() {
|
||||
return Component.literal("Mailbox");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected NonNullList<ItemStack> getItems() {
|
||||
return this.stacks;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setItems(NonNullList<ItemStack> stacks) {
|
||||
this.stacks = stacks;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceItem(int index, ItemStack stack) {
|
||||
if (index == 0)
|
||||
return false;
|
||||
if (index == 1)
|
||||
return false;
|
||||
if (index == 2)
|
||||
return false;
|
||||
if (index == 3)
|
||||
return false;
|
||||
if (index == 4)
|
||||
return false;
|
||||
if (index == 5)
|
||||
return false;
|
||||
if (index == 6)
|
||||
return false;
|
||||
if (index == 7)
|
||||
return false;
|
||||
if (index == 8)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getSlotsForFace(Direction side) {
|
||||
return IntStream.range(0, this.getContainerSize()).toArray();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canPlaceItemThroughFace(int index, ItemStack stack, @Nullable Direction direction) {
|
||||
return this.canPlaceItem(index, stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTakeItemThroughFace(int index, ItemStack stack, Direction direction) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> LazyOptional<T> getCapability(Capability<T> capability, @Nullable Direction facing) {
|
||||
if (!this.remove && facing != null && capability == ForgeCapabilities.ITEM_HANDLER)
|
||||
return handlers[facing.ordinal()].cast();
|
||||
return super.getCapability(capability, facing);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRemoved() {
|
||||
super.setRemoved();
|
||||
for (LazyOptional<? extends IItemHandler> handler : handlers)
|
||||
handler.invalidate();
|
||||
}
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
package net.mcreator.nimsrandombullshit.client.gui;
|
||||
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.player.Inventory;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
|
||||
import net.minecraft.client.gui.components.Button;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
|
||||
import net.mcreator.nimsrandombullshit.world.inventory.LabelCopyMachineGUIMenu;
|
||||
import net.mcreator.nimsrandombullshit.procedures.LabelCopyMachineGUISlot3TooltipConditionProcedure;
|
||||
import net.mcreator.nimsrandombullshit.procedures.LabelCopyMachineGUISlot2TooltipConditionProcedure;
|
||||
import net.mcreator.nimsrandombullshit.procedures.LabelCopyMachineGUISlot1TooltipConditionProcedure;
|
||||
import net.mcreator.nimsrandombullshit.procedures.LabelCopyMachineGUISlot0TooltipConditionProcedure;
|
||||
import net.mcreator.nimsrandombullshit.network.LabelCopyMachineGUIButtonMessage;
|
||||
import net.mcreator.nimsrandombullshit.NimsRandomBullshitMod;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
|
||||
public class LabelCopyMachineGUIScreen extends AbstractContainerScreen<LabelCopyMachineGUIMenu> {
|
||||
private final static HashMap<String, Object> guistate = LabelCopyMachineGUIMenu.guistate;
|
||||
private final Level world;
|
||||
private final int x, y, z;
|
||||
private final Player entity;
|
||||
Button button_copy;
|
||||
|
||||
public LabelCopyMachineGUIScreen(LabelCopyMachineGUIMenu container, Inventory inventory, Component text) {
|
||||
super(container, inventory, text);
|
||||
this.world = container.world;
|
||||
this.x = container.x;
|
||||
this.y = container.y;
|
||||
this.z = container.z;
|
||||
this.entity = container.entity;
|
||||
this.imageWidth = 176;
|
||||
this.imageHeight = 188;
|
||||
}
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation("nims_random_bullshit:textures/screens/label_copy_machine_gui.png");
|
||||
|
||||
@Override
|
||||
public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) {
|
||||
this.renderBackground(guiGraphics);
|
||||
super.render(guiGraphics, mouseX, mouseY, partialTicks);
|
||||
this.renderTooltip(guiGraphics, mouseX, mouseY);
|
||||
if (LabelCopyMachineGUISlot0TooltipConditionProcedure.execute(entity))
|
||||
if (mouseX > leftPos + 15 && mouseX < leftPos + 39 && mouseY > topPos + 45 && mouseY < topPos + 69)
|
||||
guiGraphics.renderTooltip(font, Component.translatable("gui.nims_random_bullshit.label_copy_machine_gui.tooltip_shipping_label_slot"), mouseX, mouseY);
|
||||
if (LabelCopyMachineGUISlot1TooltipConditionProcedure.execute(entity))
|
||||
if (mouseX > leftPos + 51 && mouseX < leftPos + 75 && mouseY > topPos + 18 && mouseY < topPos + 42)
|
||||
guiGraphics.renderTooltip(font, Component.translatable("gui.nims_random_bullshit.label_copy_machine_gui.tooltip_paper_slot"), mouseX, mouseY);
|
||||
if (LabelCopyMachineGUISlot2TooltipConditionProcedure.execute(entity))
|
||||
if (mouseX > leftPos + 92 && mouseX < leftPos + 116 && mouseY > topPos + 18 && mouseY < topPos + 42)
|
||||
guiGraphics.renderTooltip(font, Component.translatable("gui.nims_random_bullshit.label_copy_machine_gui.tooltip_ink_sac_slot"), mouseX, mouseY);
|
||||
if (LabelCopyMachineGUISlot3TooltipConditionProcedure.execute(entity))
|
||||
if (mouseX > leftPos + 128 && mouseX < leftPos + 152 && mouseY > topPos + 45 && mouseY < topPos + 69)
|
||||
guiGraphics.renderTooltip(font, Component.translatable("gui.nims_random_bullshit.label_copy_machine_gui.tooltip_output_copy_of_shipping_label"), mouseX, mouseY);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderBg(GuiGraphics guiGraphics, float partialTicks, int gx, int gy) {
|
||||
RenderSystem.setShaderColor(1, 1, 1, 1);
|
||||
RenderSystem.enableBlend();
|
||||
RenderSystem.defaultBlendFunc();
|
||||
guiGraphics.blit(texture, this.leftPos, this.topPos, 0, 0, this.imageWidth, this.imageHeight, this.imageWidth, this.imageHeight);
|
||||
|
||||
guiGraphics.blit(new ResourceLocation("nims_random_bullshit:textures/screens/plus_sign.png"), this.leftPos + 78, this.topPos + 23, 0, 0, 16, 16, 16, 16);
|
||||
|
||||
guiGraphics.blit(new ResourceLocation("nims_random_bullshit:textures/screens/copy_icon.png"), this.leftPos + 78, this.topPos + 50, 0, 0, 16, 16, 16, 16);
|
||||
|
||||
guiGraphics.blit(new ResourceLocation("nims_random_bullshit:textures/screens/right_arrow_sign.png"), this.leftPos + 42, this.topPos + 50, 0, 0, 32, 16, 32, 16);
|
||||
|
||||
guiGraphics.blit(new ResourceLocation("nims_random_bullshit:textures/screens/right_arrow_sign.png"), this.leftPos + 96, this.topPos + 50, 0, 0, 32, 16, 32, 16);
|
||||
|
||||
RenderSystem.disableBlend();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean keyPressed(int key, int b, int c) {
|
||||
if (key == 256) {
|
||||
this.minecraft.player.closeContainer();
|
||||
return true;
|
||||
}
|
||||
return super.keyPressed(key, b, c);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderLabels(GuiGraphics guiGraphics, int mouseX, int mouseY) {
|
||||
guiGraphics.drawString(this.font, Component.translatable("gui.nims_random_bullshit.label_copy_machine_gui.label_label_copy_machine"), 6, 5, -12829636, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
super.init();
|
||||
button_copy = Button.builder(Component.translatable("gui.nims_random_bullshit.label_copy_machine_gui.button_copy"), e -> {
|
||||
if (true) {
|
||||
NimsRandomBullshitMod.PACKET_HANDLER.sendToServer(new LabelCopyMachineGUIButtonMessage(0, x, y, z));
|
||||
LabelCopyMachineGUIButtonMessage.handleButtonAction(entity, 0, x, y, z);
|
||||
}
|
||||
}).bounds(this.leftPos + 65, this.topPos + 72, 46, 20).build();
|
||||
guistate.put("button:button_copy", button_copy);
|
||||
this.addRenderableWidget(button_copy);
|
||||
}
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
package net.mcreator.nimsrandombullshit.client.gui;
|
||||
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.player.Inventory;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
|
||||
import net.minecraft.client.gui.components.Button;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
|
||||
import net.mcreator.nimsrandombullshit.world.inventory.MailboxGUIMenu;
|
||||
import net.mcreator.nimsrandombullshit.network.MailboxGUIButtonMessage;
|
||||
import net.mcreator.nimsrandombullshit.NimsRandomBullshitMod;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
|
||||
public class MailboxGUIScreen extends AbstractContainerScreen<MailboxGUIMenu> {
|
||||
private final static HashMap<String, Object> guistate = MailboxGUIMenu.guistate;
|
||||
private final Level world;
|
||||
private final int x, y, z;
|
||||
private final Player entity;
|
||||
Button button_send;
|
||||
|
||||
public MailboxGUIScreen(MailboxGUIMenu container, Inventory inventory, Component text) {
|
||||
super(container, inventory, text);
|
||||
this.world = container.world;
|
||||
this.x = container.x;
|
||||
this.y = container.y;
|
||||
this.z = container.z;
|
||||
this.entity = container.entity;
|
||||
this.imageWidth = 240;
|
||||
this.imageHeight = 180;
|
||||
}
|
||||
|
||||
private static final ResourceLocation texture = new ResourceLocation("nims_random_bullshit:textures/screens/mailbox_gui.png");
|
||||
|
||||
@Override
|
||||
public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) {
|
||||
this.renderBackground(guiGraphics);
|
||||
super.render(guiGraphics, mouseX, mouseY, partialTicks);
|
||||
this.renderTooltip(guiGraphics, mouseX, mouseY);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderBg(GuiGraphics guiGraphics, float partialTicks, int gx, int gy) {
|
||||
RenderSystem.setShaderColor(1, 1, 1, 1);
|
||||
RenderSystem.enableBlend();
|
||||
RenderSystem.defaultBlendFunc();
|
||||
guiGraphics.blit(texture, this.leftPos, this.topPos, 0, 0, this.imageWidth, this.imageHeight, this.imageWidth, this.imageHeight);
|
||||
RenderSystem.disableBlend();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean keyPressed(int key, int b, int c) {
|
||||
if (key == 256) {
|
||||
this.minecraft.player.closeContainer();
|
||||
return true;
|
||||
}
|
||||
return super.keyPressed(key, b, c);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderLabels(GuiGraphics guiGraphics, int mouseX, int mouseY) {
|
||||
guiGraphics.drawString(this.font, Component.translatable("gui.nims_random_bullshit.mailbox_gui.label_inbox"), 38, 14, -12829636, false);
|
||||
guiGraphics.drawString(this.font, Component.translatable("gui.nims_random_bullshit.mailbox_gui.label_outbox"), 101, 14, -12829636, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
super.init();
|
||||
button_send = Button.builder(Component.translatable("gui.nims_random_bullshit.mailbox_gui.button_send"), e -> {
|
||||
if (true) {
|
||||
NimsRandomBullshitMod.PACKET_HANDLER.sendToServer(new MailboxGUIButtonMessage(0, x, y, z));
|
||||
MailboxGUIButtonMessage.handleButtonAction(entity, 0, x, y, z);
|
||||
}
|
||||
}).bounds(this.leftPos + 169, this.topPos + 55, 46, 20).build();
|
||||
guistate.put("button:button_send", button_send);
|
||||
this.addRenderableWidget(button_send);
|
||||
}
|
||||
}
|
||||
@@ -1,101 +0,0 @@
|
||||
package net.mcreator.nimsrandombullshit.client.gui;
|
||||
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.player.Inventory;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
|
||||
import net.minecraft.client.gui.components.EditBox;
|
||||
import net.minecraft.client.gui.components.Button;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
import net.mcreator.nimsrandombullshit.world.inventory.MailboxNameEntryGUIMenu;
|
||||
import net.mcreator.nimsrandombullshit.network.MailboxNameEntryGUIButtonMessage;
|
||||
import net.mcreator.nimsrandombullshit.NimsRandomBullshitMod;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.mojang.blaze3d.systems.RenderSystem;
|
||||
|
||||
public class MailboxNameEntryGUIScreen extends AbstractContainerScreen<MailboxNameEntryGUIMenu> {
|
||||
private final static HashMap<String, Object> guistate = MailboxNameEntryGUIMenu.guistate;
|
||||
private final Level world;
|
||||
private final int x, y, z;
|
||||
private final Player entity;
|
||||
EditBox mailbox_name_field;
|
||||
Button button_done;
|
||||
|
||||
public MailboxNameEntryGUIScreen(MailboxNameEntryGUIMenu container, Inventory inventory, Component text) {
|
||||
super(container, inventory, text);
|
||||
this.world = container.world;
|
||||
this.x = container.x;
|
||||
this.y = container.y;
|
||||
this.z = container.z;
|
||||
this.entity = container.entity;
|
||||
this.imageWidth = 176;
|
||||
this.imageHeight = 166;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) {
|
||||
this.renderBackground(guiGraphics);
|
||||
super.render(guiGraphics, mouseX, mouseY, partialTicks);
|
||||
mailbox_name_field.render(guiGraphics, mouseX, mouseY, partialTicks);
|
||||
this.renderTooltip(guiGraphics, mouseX, mouseY);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderBg(GuiGraphics guiGraphics, float partialTicks, int gx, int gy) {
|
||||
RenderSystem.setShaderColor(1, 1, 1, 1);
|
||||
RenderSystem.enableBlend();
|
||||
RenderSystem.defaultBlendFunc();
|
||||
RenderSystem.disableBlend();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean keyPressed(int key, int b, int c) {
|
||||
if (key == 256) {
|
||||
this.minecraft.player.closeContainer();
|
||||
return true;
|
||||
}
|
||||
if (mailbox_name_field.isFocused())
|
||||
return mailbox_name_field.keyPressed(key, b, c);
|
||||
return super.keyPressed(key, b, c);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void containerTick() {
|
||||
super.containerTick();
|
||||
mailbox_name_field.tick();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resize(Minecraft minecraft, int width, int height) {
|
||||
String mailbox_name_fieldValue = mailbox_name_field.getValue();
|
||||
super.resize(minecraft, width, height);
|
||||
mailbox_name_field.setValue(mailbox_name_fieldValue);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void renderLabels(GuiGraphics guiGraphics, int mouseX, int mouseY) {
|
||||
guiGraphics.drawString(this.font, Component.translatable("gui.nims_random_bullshit.mailbox_name_entry_gui.label_mailbox_name"), 51, 48, -16724839, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() {
|
||||
super.init();
|
||||
mailbox_name_field = new EditBox(this.font, this.leftPos + 30, this.topPos + 62, 118, 18, Component.translatable("gui.nims_random_bullshit.mailbox_name_entry_gui.mailbox_name_field"));
|
||||
mailbox_name_field.setMaxLength(32767);
|
||||
guistate.put("text:mailbox_name_field", mailbox_name_field);
|
||||
this.addWidget(this.mailbox_name_field);
|
||||
button_done = Button.builder(Component.translatable("gui.nims_random_bullshit.mailbox_name_entry_gui.button_done"), e -> {
|
||||
if (true) {
|
||||
NimsRandomBullshitMod.PACKET_HANDLER.sendToServer(new MailboxNameEntryGUIButtonMessage(0, x, y, z));
|
||||
MailboxNameEntryGUIButtonMessage.handleButtonAction(entity, 0, x, y, z);
|
||||
}
|
||||
}).bounds(this.leftPos + 65, this.topPos + 93, 46, 20).build();
|
||||
guistate.put("button:button_done", button_done);
|
||||
this.addRenderableWidget(button_done);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
|
||||
package net.mcreator.nimsrandombullshit.command;
|
||||
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.event.RegisterCommandsEvent;
|
||||
import net.minecraftforge.common.util.FakePlayerFactory;
|
||||
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.commands.arguments.EntityArgument;
|
||||
import net.minecraft.commands.Commands;
|
||||
|
||||
import net.mcreator.nimsrandombullshit.procedures.GiftCommandLogicProcedure;
|
||||
|
||||
@Mod.EventBusSubscriber
|
||||
public class GiftCommandCommand {
|
||||
@SubscribeEvent
|
||||
public static void registerCommand(RegisterCommandsEvent event) {
|
||||
if (event.getCommandSelection() == Commands.CommandSelection.DEDICATED)
|
||||
event.getDispatcher().register(Commands.literal("gift")
|
||||
|
||||
.then(Commands.argument("player", EntityArgument.player()).executes(arguments -> {
|
||||
Level world = arguments.getSource().getUnsidedLevel();
|
||||
double x = arguments.getSource().getPosition().x();
|
||||
double y = arguments.getSource().getPosition().y();
|
||||
double z = arguments.getSource().getPosition().z();
|
||||
Entity entity = arguments.getSource().getEntity();
|
||||
if (entity == null && world instanceof ServerLevel _servLevel)
|
||||
entity = FakePlayerFactory.getMinecraft(_servLevel);
|
||||
Direction direction = Direction.DOWN;
|
||||
if (entity != null)
|
||||
direction = entity.getDirection();
|
||||
|
||||
GiftCommandLogicProcedure.execute(world, arguments, entity);
|
||||
return 0;
|
||||
})));
|
||||
}
|
||||
}
|
||||
@@ -12,16 +12,12 @@ import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
|
||||
import net.mcreator.nimsrandombullshit.block.entity.OreMinerBlockEntity;
|
||||
import net.mcreator.nimsrandombullshit.block.entity.MailboxBlockEntity;
|
||||
import net.mcreator.nimsrandombullshit.block.entity.LabelCopyMachineBlockEntity;
|
||||
import net.mcreator.nimsrandombullshit.block.entity.BedrockifierBlockEntity;
|
||||
import net.mcreator.nimsrandombullshit.NimsRandomBullshitMod;
|
||||
|
||||
public class NimsRandomBullshitModBlockEntities {
|
||||
public static final DeferredRegister<BlockEntityType<?>> REGISTRY = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITY_TYPES, NimsRandomBullshitMod.MODID);
|
||||
public static final RegistryObject<BlockEntityType<?>> ORE_MINER = register("ore_miner", NimsRandomBullshitModBlocks.ORE_MINER, OreMinerBlockEntity::new);
|
||||
public static final RegistryObject<BlockEntityType<?>> MAILBOX = register("mailbox", NimsRandomBullshitModBlocks.MAILBOX, MailboxBlockEntity::new);
|
||||
public static final RegistryObject<BlockEntityType<?>> LABEL_COPY_MACHINE = register("label_copy_machine", NimsRandomBullshitModBlocks.LABEL_COPY_MACHINE, LabelCopyMachineBlockEntity::new);
|
||||
public static final RegistryObject<BlockEntityType<?>> BEDROCKIFIER = register("bedrockifier", NimsRandomBullshitModBlocks.BEDROCKIFIER, BedrockifierBlockEntity::new);
|
||||
|
||||
// Start of user code block custom block entities
|
||||
|
||||
@@ -18,14 +18,12 @@ import net.mcreator.nimsrandombullshit.block.QuadraCondensedNetherrackBlock;
|
||||
import net.mcreator.nimsrandombullshit.block.PentaCondensedNetherrackBlock;
|
||||
import net.mcreator.nimsrandombullshit.block.OreMinerBlock;
|
||||
import net.mcreator.nimsrandombullshit.block.NetherrackJuiceBlock;
|
||||
import net.mcreator.nimsrandombullshit.block.MailboxBlock;
|
||||
import net.mcreator.nimsrandombullshit.block.MagmaBricksBlock;
|
||||
import net.mcreator.nimsrandombullshit.block.MagmaBrickWallsBlock;
|
||||
import net.mcreator.nimsrandombullshit.block.MagmaBrickStairsBlock;
|
||||
import net.mcreator.nimsrandombullshit.block.MagmaBrickSlabsBlock;
|
||||
import net.mcreator.nimsrandombullshit.block.MagmaBrickPressurePlateBlock;
|
||||
import net.mcreator.nimsrandombullshit.block.MagmaBrickButtonBlock;
|
||||
import net.mcreator.nimsrandombullshit.block.LabelCopyMachineBlock;
|
||||
import net.mcreator.nimsrandombullshit.block.HexaCondensedNetherrackBlock;
|
||||
import net.mcreator.nimsrandombullshit.block.CondensedNetherrackBlock;
|
||||
import net.mcreator.nimsrandombullshit.block.CondensedCondensedNetherrackBlock;
|
||||
@@ -45,8 +43,6 @@ public class NimsRandomBullshitModBlocks {
|
||||
public static final RegistryObject<Block> HEXA_CONDENSED_NETHERRACK = REGISTRY.register("hexa_condensed_netherrack", () -> new HexaCondensedNetherrackBlock());
|
||||
public static final RegistryObject<Block> ORE_MINER = REGISTRY.register("ore_miner", () -> new OreMinerBlock());
|
||||
public static final RegistryObject<Block> NETHERRACK_JUICE = REGISTRY.register("netherrack_juice", () -> new NetherrackJuiceBlock());
|
||||
public static final RegistryObject<Block> MAILBOX = REGISTRY.register("mailbox", () -> new MailboxBlock());
|
||||
public static final RegistryObject<Block> LABEL_COPY_MACHINE = REGISTRY.register("label_copy_machine", () -> new LabelCopyMachineBlock());
|
||||
public static final RegistryObject<Block> REDSTONE_BRICKS = REGISTRY.register("redstone_bricks", () -> new RedstoneBricksBlock());
|
||||
public static final RegistryObject<Block> REDSTONE_BRICK_STAIRS = REGISTRY.register("redstone_brick_stairs", () -> new RedstoneBrickStairsBlock());
|
||||
public static final RegistryObject<Block> REDSTONE_BRICK_SLABS = REGISTRY.register("redstone_brick_slabs", () -> new RedstoneBrickSlabsBlock());
|
||||
|
||||
@@ -18,7 +18,6 @@ import net.mcreator.nimsrandombullshit.item.StarWandItem;
|
||||
import net.mcreator.nimsrandombullshit.item.StarItem;
|
||||
import net.mcreator.nimsrandombullshit.item.SnowGolemQuestionMarkItem;
|
||||
import net.mcreator.nimsrandombullshit.item.ShitItem;
|
||||
import net.mcreator.nimsrandombullshit.item.ShippingLabelItem;
|
||||
import net.mcreator.nimsrandombullshit.item.SandDustItem;
|
||||
import net.mcreator.nimsrandombullshit.item.NetherrackitePickaxeItem;
|
||||
import net.mcreator.nimsrandombullshit.item.NetherrackiteItem;
|
||||
@@ -62,10 +61,7 @@ public class NimsRandomBullshitModItems {
|
||||
public static final RegistryObject<Item> STAR = REGISTRY.register("star", () -> new StarItem());
|
||||
public static final RegistryObject<Item> STAR_WAND = REGISTRY.register("star_wand", () -> new StarWandItem());
|
||||
public static final RegistryObject<Item> NETHERRACK_JUICE_BUCKET = REGISTRY.register("netherrack_juice_bucket", () -> new NetherrackJuiceItem());
|
||||
public static final RegistryObject<Item> MAILBOX = block(NimsRandomBullshitModBlocks.MAILBOX);
|
||||
public static final RegistryObject<Item> SHIPPING_LABEL = REGISTRY.register("shipping_label", () -> new ShippingLabelItem());
|
||||
public static final RegistryObject<Item> TUX_SPAWN_EGG = REGISTRY.register("tux_spawn_egg", () -> new ForgeSpawnEggItem(NimsRandomBullshitModEntities.TUX, -16777216, -1, new Item.Properties()));
|
||||
public static final RegistryObject<Item> LABEL_COPY_MACHINE = block(NimsRandomBullshitModBlocks.LABEL_COPY_MACHINE);
|
||||
public static final RegistryObject<Item> REDSTONE_BRICKS = block(NimsRandomBullshitModBlocks.REDSTONE_BRICKS);
|
||||
public static final RegistryObject<Item> REDSTONE_BRICK_STAIRS = block(NimsRandomBullshitModBlocks.REDSTONE_BRICK_STAIRS);
|
||||
public static final RegistryObject<Item> REDSTONE_BRICK_SLABS = block(NimsRandomBullshitModBlocks.REDSTONE_BRICK_SLABS);
|
||||
|
||||
@@ -13,9 +13,6 @@ import net.minecraft.world.inventory.MenuType;
|
||||
|
||||
import net.mcreator.nimsrandombullshit.world.inventory.ShitGUIMenu;
|
||||
import net.mcreator.nimsrandombullshit.world.inventory.OreMinerGUIMenu;
|
||||
import net.mcreator.nimsrandombullshit.world.inventory.MailboxNameEntryGUIMenu;
|
||||
import net.mcreator.nimsrandombullshit.world.inventory.MailboxGUIMenu;
|
||||
import net.mcreator.nimsrandombullshit.world.inventory.LabelCopyMachineGUIMenu;
|
||||
import net.mcreator.nimsrandombullshit.world.inventory.BedrockifierGUIMenu;
|
||||
import net.mcreator.nimsrandombullshit.NimsRandomBullshitMod;
|
||||
|
||||
@@ -23,8 +20,5 @@ public class NimsRandomBullshitModMenus {
|
||||
public static final DeferredRegister<MenuType<?>> REGISTRY = DeferredRegister.create(ForgeRegistries.MENU_TYPES, NimsRandomBullshitMod.MODID);
|
||||
public static final RegistryObject<MenuType<ShitGUIMenu>> SHIT_GUI = REGISTRY.register("shit_gui", () -> IForgeMenuType.create(ShitGUIMenu::new));
|
||||
public static final RegistryObject<MenuType<OreMinerGUIMenu>> ORE_MINER_GUI = REGISTRY.register("ore_miner_gui", () -> IForgeMenuType.create(OreMinerGUIMenu::new));
|
||||
public static final RegistryObject<MenuType<MailboxGUIMenu>> MAILBOX_GUI = REGISTRY.register("mailbox_gui", () -> IForgeMenuType.create(MailboxGUIMenu::new));
|
||||
public static final RegistryObject<MenuType<MailboxNameEntryGUIMenu>> MAILBOX_NAME_ENTRY_GUI = REGISTRY.register("mailbox_name_entry_gui", () -> IForgeMenuType.create(MailboxNameEntryGUIMenu::new));
|
||||
public static final RegistryObject<MenuType<LabelCopyMachineGUIMenu>> LABEL_COPY_MACHINE_GUI = REGISTRY.register("label_copy_machine_gui", () -> IForgeMenuType.create(LabelCopyMachineGUIMenu::new));
|
||||
public static final RegistryObject<MenuType<BedrockifierGUIMenu>> BEDROCKIFIER_GUI = REGISTRY.register("bedrockifier_gui", () -> IForgeMenuType.create(BedrockifierGUIMenu::new));
|
||||
}
|
||||
|
||||
@@ -13,9 +13,6 @@ import net.minecraft.client.gui.screens.MenuScreens;
|
||||
|
||||
import net.mcreator.nimsrandombullshit.client.gui.ShitGUIScreen;
|
||||
import net.mcreator.nimsrandombullshit.client.gui.OreMinerGUIScreen;
|
||||
import net.mcreator.nimsrandombullshit.client.gui.MailboxNameEntryGUIScreen;
|
||||
import net.mcreator.nimsrandombullshit.client.gui.MailboxGUIScreen;
|
||||
import net.mcreator.nimsrandombullshit.client.gui.LabelCopyMachineGUIScreen;
|
||||
import net.mcreator.nimsrandombullshit.client.gui.BedrockifierGUIScreen;
|
||||
|
||||
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
|
||||
@@ -25,9 +22,6 @@ public class NimsRandomBullshitModScreens {
|
||||
event.enqueueWork(() -> {
|
||||
MenuScreens.register(NimsRandomBullshitModMenus.SHIT_GUI.get(), ShitGUIScreen::new);
|
||||
MenuScreens.register(NimsRandomBullshitModMenus.ORE_MINER_GUI.get(), OreMinerGUIScreen::new);
|
||||
MenuScreens.register(NimsRandomBullshitModMenus.MAILBOX_GUI.get(), MailboxGUIScreen::new);
|
||||
MenuScreens.register(NimsRandomBullshitModMenus.MAILBOX_NAME_ENTRY_GUI.get(), MailboxNameEntryGUIScreen::new);
|
||||
MenuScreens.register(NimsRandomBullshitModMenus.LABEL_COPY_MACHINE_GUI.get(), LabelCopyMachineGUIScreen::new);
|
||||
MenuScreens.register(NimsRandomBullshitModMenus.BEDROCKIFIER_GUI.get(), BedrockifierGUIScreen::new);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -40,7 +40,6 @@ public class NimsRandomBullshitModTabs {
|
||||
tabData.accept(NimsRandomBullshitModItems.GRAVEDIGGER.get());
|
||||
tabData.accept(NimsRandomBullshitModItems.STAR_WAND.get());
|
||||
tabData.accept(NimsRandomBullshitModItems.NETHERRACK_JUICE_BUCKET.get());
|
||||
tabData.accept(NimsRandomBullshitModItems.SHIPPING_LABEL.get());
|
||||
tabData.accept(NimsRandomBullshitModItems.BEDROCK_PICKAXE.get());
|
||||
tabData.accept(NimsRandomBullshitModItems.BEDROCK_SWORD.get());
|
||||
} else if (tabData.getTabKey() == CreativeModeTabs.INGREDIENTS) {
|
||||
@@ -61,8 +60,6 @@ public class NimsRandomBullshitModTabs {
|
||||
tabData.accept(NimsRandomBullshitModItems.CHEESE.get());
|
||||
} else if (tabData.getTabKey() == CreativeModeTabs.FUNCTIONAL_BLOCKS) {
|
||||
tabData.accept(NimsRandomBullshitModBlocks.ORE_MINER.get().asItem());
|
||||
tabData.accept(NimsRandomBullshitModBlocks.MAILBOX.get().asItem());
|
||||
tabData.accept(NimsRandomBullshitModBlocks.LABEL_COPY_MACHINE.get().asItem());
|
||||
tabData.accept(NimsRandomBullshitModBlocks.BEDROCKIFIER.get().asItem());
|
||||
} else if (tabData.getTabKey() == CreativeModeTabs.SPAWN_EGGS) {
|
||||
tabData.accept(NimsRandomBullshitModItems.GHOUL_SPAWN_EGG.get());
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
|
||||
/*
|
||||
* MCreator note: This file will be REGENERATED on each build.
|
||||
*/
|
||||
package net.mcreator.nimsrandombullshit.init;
|
||||
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.event.village.VillagerTradesEvent;
|
||||
import net.minecraftforge.common.BasicItemListing;
|
||||
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.FORGE)
|
||||
public class NimsRandomBullshitModTrades {
|
||||
@SubscribeEvent
|
||||
public static void registerTrades(VillagerTradesEvent event) {
|
||||
if (event.getType() == NimsRandomBullshitModVillagerProfessions.MAILMAN_PROFESSION.get()) {
|
||||
event.getTrades().get(1).add(new BasicItemListing(new ItemStack(Items.EMERALD),
|
||||
|
||||
new ItemStack(NimsRandomBullshitModItems.SHIPPING_LABEL.get(), 12), 100, 5, 0.05f));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
|
||||
/*
|
||||
* MCreator note: This file will be REGENERATED on each build.
|
||||
*/
|
||||
package net.mcreator.nimsrandombullshit.init;
|
||||
|
||||
import net.minecraftforge.registries.RegistryObject;
|
||||
import net.minecraftforge.registries.RegisterEvent;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import net.minecraftforge.registries.DeferredRegister;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.entity.npc.VillagerProfession;
|
||||
import net.minecraft.world.entity.ai.village.poi.PoiTypes;
|
||||
import net.minecraft.world.entity.ai.village.poi.PoiType;
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.core.Holder;
|
||||
|
||||
import net.mcreator.nimsrandombullshit.NimsRandomBullshitMod;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.Optional;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD)
|
||||
public class NimsRandomBullshitModVillagerProfessions {
|
||||
private static final Map<String, ProfessionPoiType> POI_TYPES = new HashMap<>();
|
||||
public static final DeferredRegister<VillagerProfession> PROFESSIONS = DeferredRegister.create(ForgeRegistries.VILLAGER_PROFESSIONS, NimsRandomBullshitMod.MODID);
|
||||
public static final RegistryObject<VillagerProfession> MAILMAN_PROFESSION = registerProfession("mailman_profession", () -> NimsRandomBullshitModBlocks.MAILBOX.get(),
|
||||
() -> ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("item.book.page_turn")));
|
||||
|
||||
private static RegistryObject<VillagerProfession> registerProfession(String name, Supplier<Block> block, Supplier<SoundEvent> soundEvent) {
|
||||
POI_TYPES.put(name, new ProfessionPoiType(block, null));
|
||||
return PROFESSIONS.register(name, () -> {
|
||||
Predicate<Holder<PoiType>> poiPredicate = poiTypeHolder -> (POI_TYPES.get(name).poiType != null) && (poiTypeHolder.get() == POI_TYPES.get(name).poiType.get());
|
||||
return new VillagerProfession(NimsRandomBullshitMod.MODID + ":" + name, poiPredicate, poiPredicate, ImmutableSet.of(), ImmutableSet.of(), soundEvent.get());
|
||||
});
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void registerProfessionPointsOfInterest(RegisterEvent event) {
|
||||
event.register(ForgeRegistries.Keys.POI_TYPES, registerHelper -> {
|
||||
for (Map.Entry<String, ProfessionPoiType> entry : POI_TYPES.entrySet()) {
|
||||
Block block = entry.getValue().block.get();
|
||||
String name = entry.getKey();
|
||||
Optional<Holder<PoiType>> existingCheck = PoiTypes.forState(block.defaultBlockState());
|
||||
if (existingCheck.isPresent()) {
|
||||
NimsRandomBullshitMod.LOGGER.error("Skipping villager profession " + name + " that uses POI block " + block + " that is already in use by " + existingCheck);
|
||||
continue;
|
||||
}
|
||||
PoiType poiType = new PoiType(ImmutableSet.copyOf(block.getStateDefinition().getPossibleStates()), 1, 1);
|
||||
registerHelper.register(name, poiType);
|
||||
entry.getValue().poiType = ForgeRegistries.POI_TYPES.getHolder(poiType).get();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static class ProfessionPoiType {
|
||||
final Supplier<Block> block;
|
||||
Holder<PoiType> poiType;
|
||||
|
||||
ProfessionPoiType(Supplier<Block> block, Holder<PoiType> poiType) {
|
||||
this.block = block;
|
||||
this.poiType = poiType;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
|
||||
package net.mcreator.nimsrandombullshit.item;
|
||||
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.item.context.UseOnContext;
|
||||
import net.minecraft.world.item.TooltipFlag;
|
||||
import net.minecraft.world.item.Rarity;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.network.chat.Component;
|
||||
|
||||
import net.mcreator.nimsrandombullshit.procedures.ShippingLabelSpecialInformationProcedure;
|
||||
import net.mcreator.nimsrandombullshit.procedures.ShippingLabelRightclickedOnBlockProcedure;
|
||||
import net.mcreator.nimsrandombullshit.procedures.ShippingLabelHasItemGlowingEffectProcedure;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ShippingLabelItem extends Item {
|
||||
public ShippingLabelItem() {
|
||||
super(new Item.Properties().stacksTo(64).rarity(Rarity.COMMON));
|
||||
}
|
||||
|
||||
@Override
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public boolean isFoil(ItemStack itemstack) {
|
||||
return ShippingLabelHasItemGlowingEffectProcedure.execute(itemstack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void appendHoverText(ItemStack itemstack, Level level, List<Component> list, TooltipFlag flag) {
|
||||
super.appendHoverText(itemstack, level, list, flag);
|
||||
Entity entity = itemstack.getEntityRepresentation();
|
||||
String hoverText = ShippingLabelSpecialInformationProcedure.execute(itemstack);
|
||||
if (hoverText != null) {
|
||||
for (String line : hoverText.split("\n")) {
|
||||
list.add(Component.literal(line));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public InteractionResult useOn(UseOnContext context) {
|
||||
super.useOn(context);
|
||||
ShippingLabelRightclickedOnBlockProcedure.execute(context.getLevel(), context.getClickedPos().getX(), context.getClickedPos().getY(), context.getClickedPos().getZ(), context.getLevel().getBlockState(context.getClickedPos()),
|
||||
context.getPlayer(), context.getItemInHand());
|
||||
return InteractionResult.SUCCESS;
|
||||
}
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
|
||||
package net.mcreator.nimsrandombullshit.network;
|
||||
|
||||
import net.minecraftforge.network.NetworkEvent;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.nimsrandombullshit.world.inventory.LabelCopyMachineGUIMenu;
|
||||
import net.mcreator.nimsrandombullshit.procedures.LabelCopyMachineCopyButtonPressedProcedure;
|
||||
import net.mcreator.nimsrandombullshit.NimsRandomBullshitMod;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
import java.util.HashMap;
|
||||
|
||||
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD)
|
||||
public class LabelCopyMachineGUIButtonMessage {
|
||||
private final int buttonID, x, y, z;
|
||||
|
||||
public LabelCopyMachineGUIButtonMessage(FriendlyByteBuf buffer) {
|
||||
this.buttonID = buffer.readInt();
|
||||
this.x = buffer.readInt();
|
||||
this.y = buffer.readInt();
|
||||
this.z = buffer.readInt();
|
||||
}
|
||||
|
||||
public LabelCopyMachineGUIButtonMessage(int buttonID, int x, int y, int z) {
|
||||
this.buttonID = buttonID;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
public static void buffer(LabelCopyMachineGUIButtonMessage message, FriendlyByteBuf buffer) {
|
||||
buffer.writeInt(message.buttonID);
|
||||
buffer.writeInt(message.x);
|
||||
buffer.writeInt(message.y);
|
||||
buffer.writeInt(message.z);
|
||||
}
|
||||
|
||||
public static void handler(LabelCopyMachineGUIButtonMessage message, Supplier<NetworkEvent.Context> contextSupplier) {
|
||||
NetworkEvent.Context context = contextSupplier.get();
|
||||
context.enqueueWork(() -> {
|
||||
Player entity = context.getSender();
|
||||
int buttonID = message.buttonID;
|
||||
int x = message.x;
|
||||
int y = message.y;
|
||||
int z = message.z;
|
||||
handleButtonAction(entity, buttonID, x, y, z);
|
||||
});
|
||||
context.setPacketHandled(true);
|
||||
}
|
||||
|
||||
public static void handleButtonAction(Player entity, int buttonID, int x, int y, int z) {
|
||||
Level world = entity.level();
|
||||
HashMap guistate = LabelCopyMachineGUIMenu.guistate;
|
||||
// security measure to prevent arbitrary chunk generation
|
||||
if (!world.hasChunkAt(new BlockPos(x, y, z)))
|
||||
return;
|
||||
if (buttonID == 0) {
|
||||
|
||||
LabelCopyMachineCopyButtonPressedProcedure.execute(world, entity);
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void registerMessage(FMLCommonSetupEvent event) {
|
||||
NimsRandomBullshitMod.addNetworkMessage(LabelCopyMachineGUIButtonMessage.class, LabelCopyMachineGUIButtonMessage::buffer, LabelCopyMachineGUIButtonMessage::new, LabelCopyMachineGUIButtonMessage::handler);
|
||||
}
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
|
||||
package net.mcreator.nimsrandombullshit.network;
|
||||
|
||||
import net.minecraftforge.network.NetworkEvent;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.nimsrandombullshit.world.inventory.MailboxGUIMenu;
|
||||
import net.mcreator.nimsrandombullshit.procedures.MailboxSmartSendLogicProcedure;
|
||||
import net.mcreator.nimsrandombullshit.NimsRandomBullshitMod;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
import java.util.HashMap;
|
||||
|
||||
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD)
|
||||
public class MailboxGUIButtonMessage {
|
||||
private final int buttonID, x, y, z;
|
||||
|
||||
public MailboxGUIButtonMessage(FriendlyByteBuf buffer) {
|
||||
this.buttonID = buffer.readInt();
|
||||
this.x = buffer.readInt();
|
||||
this.y = buffer.readInt();
|
||||
this.z = buffer.readInt();
|
||||
}
|
||||
|
||||
public MailboxGUIButtonMessage(int buttonID, int x, int y, int z) {
|
||||
this.buttonID = buttonID;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
public static void buffer(MailboxGUIButtonMessage message, FriendlyByteBuf buffer) {
|
||||
buffer.writeInt(message.buttonID);
|
||||
buffer.writeInt(message.x);
|
||||
buffer.writeInt(message.y);
|
||||
buffer.writeInt(message.z);
|
||||
}
|
||||
|
||||
public static void handler(MailboxGUIButtonMessage message, Supplier<NetworkEvent.Context> contextSupplier) {
|
||||
NetworkEvent.Context context = contextSupplier.get();
|
||||
context.enqueueWork(() -> {
|
||||
Player entity = context.getSender();
|
||||
int buttonID = message.buttonID;
|
||||
int x = message.x;
|
||||
int y = message.y;
|
||||
int z = message.z;
|
||||
handleButtonAction(entity, buttonID, x, y, z);
|
||||
});
|
||||
context.setPacketHandled(true);
|
||||
}
|
||||
|
||||
public static void handleButtonAction(Player entity, int buttonID, int x, int y, int z) {
|
||||
Level world = entity.level();
|
||||
HashMap guistate = MailboxGUIMenu.guistate;
|
||||
// security measure to prevent arbitrary chunk generation
|
||||
if (!world.hasChunkAt(new BlockPos(x, y, z)))
|
||||
return;
|
||||
if (buttonID == 0) {
|
||||
|
||||
MailboxSmartSendLogicProcedure.execute(world, x, y, z, entity);
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void registerMessage(FMLCommonSetupEvent event) {
|
||||
NimsRandomBullshitMod.addNetworkMessage(MailboxGUIButtonMessage.class, MailboxGUIButtonMessage::buffer, MailboxGUIButtonMessage::new, MailboxGUIButtonMessage::handler);
|
||||
}
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
|
||||
package net.mcreator.nimsrandombullshit.network;
|
||||
|
||||
import net.minecraftforge.network.NetworkEvent;
|
||||
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.nimsrandombullshit.world.inventory.MailboxNameEntryGUIMenu;
|
||||
import net.mcreator.nimsrandombullshit.procedures.MailboxNameEntryButtonPressedProcedure;
|
||||
import net.mcreator.nimsrandombullshit.NimsRandomBullshitMod;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
import java.util.HashMap;
|
||||
|
||||
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD)
|
||||
public class MailboxNameEntryGUIButtonMessage {
|
||||
private final int buttonID, x, y, z;
|
||||
|
||||
public MailboxNameEntryGUIButtonMessage(FriendlyByteBuf buffer) {
|
||||
this.buttonID = buffer.readInt();
|
||||
this.x = buffer.readInt();
|
||||
this.y = buffer.readInt();
|
||||
this.z = buffer.readInt();
|
||||
}
|
||||
|
||||
public MailboxNameEntryGUIButtonMessage(int buttonID, int x, int y, int z) {
|
||||
this.buttonID = buttonID;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
}
|
||||
|
||||
public static void buffer(MailboxNameEntryGUIButtonMessage message, FriendlyByteBuf buffer) {
|
||||
buffer.writeInt(message.buttonID);
|
||||
buffer.writeInt(message.x);
|
||||
buffer.writeInt(message.y);
|
||||
buffer.writeInt(message.z);
|
||||
}
|
||||
|
||||
public static void handler(MailboxNameEntryGUIButtonMessage message, Supplier<NetworkEvent.Context> contextSupplier) {
|
||||
NetworkEvent.Context context = contextSupplier.get();
|
||||
context.enqueueWork(() -> {
|
||||
Player entity = context.getSender();
|
||||
int buttonID = message.buttonID;
|
||||
int x = message.x;
|
||||
int y = message.y;
|
||||
int z = message.z;
|
||||
handleButtonAction(entity, buttonID, x, y, z);
|
||||
});
|
||||
context.setPacketHandled(true);
|
||||
}
|
||||
|
||||
public static void handleButtonAction(Player entity, int buttonID, int x, int y, int z) {
|
||||
Level world = entity.level();
|
||||
HashMap guistate = MailboxNameEntryGUIMenu.guistate;
|
||||
// security measure to prevent arbitrary chunk generation
|
||||
if (!world.hasChunkAt(new BlockPos(x, y, z)))
|
||||
return;
|
||||
if (buttonID == 0) {
|
||||
|
||||
MailboxNameEntryButtonPressedProcedure.execute(world, x, y, z, entity, guistate);
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public static void registerMessage(FMLCommonSetupEvent event) {
|
||||
NimsRandomBullshitMod.addNetworkMessage(MailboxNameEntryGUIButtonMessage.class, MailboxNameEntryGUIButtonMessage::buffer, MailboxNameEntryGUIButtonMessage::new, MailboxNameEntryGUIButtonMessage::handler);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package net.mcreator.nimsrandombullshit.procedures;
|
||||
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.LevelAccessor;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.item.ItemEntity;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.commands.arguments.EntityArgument;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
|
||||
import com.mojang.brigadier.exceptions.CommandSyntaxException;
|
||||
import com.mojang.brigadier.context.CommandContext;
|
||||
|
||||
public class GiftCommandLogicProcedure {
|
||||
public static void execute(LevelAccessor world, CommandContext<CommandSourceStack> arguments, Entity entity) {
|
||||
if (entity == null)
|
||||
return;
|
||||
Entity PlayerEntity = null;
|
||||
ItemStack GiftBox = ItemStack.EMPTY;
|
||||
if (!world.isClientSide()) {
|
||||
if ((new Object() {
|
||||
public Entity getEntity() {
|
||||
try {
|
||||
return EntityArgument.getEntity(arguments, "player");
|
||||
} catch (CommandSyntaxException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}.getEntity()) instanceof Player) {
|
||||
PlayerEntity = new Object() {
|
||||
public Entity getEntity() {
|
||||
try {
|
||||
return EntityArgument.getEntity(arguments, "player");
|
||||
} catch (CommandSyntaxException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}.getEntity();
|
||||
if (world instanceof ServerLevel _level) {
|
||||
ItemEntity entityToSpawn = new ItemEntity(_level, (PlayerEntity.getX()), (PlayerEntity.getY()), (PlayerEntity.getZ()), (entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY));
|
||||
entityToSpawn.setPickUpDelay(4);
|
||||
entityToSpawn.setUnlimitedLifetime();
|
||||
_level.addFreshEntity(entityToSpawn);
|
||||
}
|
||||
if (entity instanceof Player _player && !_player.level().isClientSide())
|
||||
_player.displayClientMessage(Component.literal(("You gifted " + ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getCount()) + " "
|
||||
+ ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getDisplayName().getString()) + " to " + PlayerEntity.getDisplayName().getString())), false);
|
||||
if (PlayerEntity instanceof Player _player && !_player.level().isClientSide())
|
||||
_player.displayClientMessage(Component.literal((entity.getDisplayName().getString() + " has gifted you " + ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getCount()) + " "
|
||||
+ ((entity instanceof LivingEntity _livEnt ? _livEnt.getMainHandItem() : ItemStack.EMPTY).getDisplayName().getString()))), false);
|
||||
if (entity instanceof LivingEntity _entity) {
|
||||
ItemStack _setstack = new ItemStack(Blocks.AIR).copy();
|
||||
_setstack.setCount(1);
|
||||
_entity.setItemInHand(InteractionHand.MAIN_HAND, _setstack);
|
||||
if (_entity instanceof Player _player)
|
||||
_player.getInventory().setChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
package net.mcreator.nimsrandombullshit.procedures;
|
||||
|
||||
import net.minecraft.world.level.LevelAccessor;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.inventory.Slot;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
|
||||
import net.mcreator.nimsrandombullshit.init.NimsRandomBullshitModItems;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
import java.util.Map;
|
||||
|
||||
public class LabelCopyMachineCopyButtonPressedProcedure {
|
||||
public static void execute(LevelAccessor world, Entity entity) {
|
||||
if (entity == null)
|
||||
return;
|
||||
if (!world.isClientSide()) {
|
||||
if ((entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt ? ((Slot) _slt.get(0)).getItem() : ItemStack.EMPTY)
|
||||
.getItem() == NimsRandomBullshitModItems.SHIPPING_LABEL.get() && new Object() {
|
||||
public int getAmount(int sltid) {
|
||||
if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) {
|
||||
ItemStack stack = ((Slot) _slots.get(sltid)).getItem();
|
||||
if (stack != null)
|
||||
return stack.getCount();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}.getAmount(1) > 0 && new Object() {
|
||||
public int getAmount(int sltid) {
|
||||
if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) {
|
||||
ItemStack stack = ((Slot) _slots.get(sltid)).getItem();
|
||||
if (stack != null)
|
||||
return stack.getCount();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}.getAmount(2) > 0) {
|
||||
if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) {
|
||||
ItemStack _setstack = (entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt ? ((Slot) _slt.get(1)).getItem() : ItemStack.EMPTY).copy();
|
||||
_setstack.setCount((int) (new Object() {
|
||||
public int getAmount(int sltid) {
|
||||
if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) {
|
||||
ItemStack stack = ((Slot) _slots.get(sltid)).getItem();
|
||||
if (stack != null)
|
||||
return stack.getCount();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}.getAmount(1) - 1));
|
||||
((Slot) _slots.get(1)).set(_setstack);
|
||||
_player.containerMenu.broadcastChanges();
|
||||
}
|
||||
if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) {
|
||||
ItemStack _setstack = (entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt ? ((Slot) _slt.get(2)).getItem() : ItemStack.EMPTY).copy();
|
||||
_setstack.setCount((int) (new Object() {
|
||||
public int getAmount(int sltid) {
|
||||
if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) {
|
||||
ItemStack stack = ((Slot) _slots.get(sltid)).getItem();
|
||||
if (stack != null)
|
||||
return stack.getCount();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}.getAmount(2) - 1));
|
||||
((Slot) _slots.get(2)).set(_setstack);
|
||||
_player.containerMenu.broadcastChanges();
|
||||
}
|
||||
if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) {
|
||||
ItemStack _setstack = (entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt ? ((Slot) _slt.get(0)).getItem() : ItemStack.EMPTY).copy();
|
||||
_setstack.setCount((int) (new Object() {
|
||||
public int getAmount(int sltid) {
|
||||
if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) {
|
||||
ItemStack stack = ((Slot) _slots.get(sltid)).getItem();
|
||||
if (stack != null)
|
||||
return stack.getCount();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}.getAmount(3) + 1));
|
||||
((Slot) _slots.get(3)).set(_setstack);
|
||||
_player.containerMenu.broadcastChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package net.mcreator.nimsrandombullshit.procedures;
|
||||
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.inventory.Slot;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
import java.util.Map;
|
||||
|
||||
public class LabelCopyMachineGUISlot0TooltipConditionProcedure {
|
||||
public static boolean execute(Entity entity) {
|
||||
if (entity == null)
|
||||
return false;
|
||||
if (new Object() {
|
||||
public int getAmount(int sltid) {
|
||||
if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) {
|
||||
ItemStack stack = ((Slot) _slots.get(sltid)).getItem();
|
||||
if (stack != null)
|
||||
return stack.getCount();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}.getAmount(0) > 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package net.mcreator.nimsrandombullshit.procedures;
|
||||
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.inventory.Slot;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
import java.util.Map;
|
||||
|
||||
public class LabelCopyMachineGUISlot1TooltipConditionProcedure {
|
||||
public static boolean execute(Entity entity) {
|
||||
if (entity == null)
|
||||
return false;
|
||||
if (new Object() {
|
||||
public int getAmount(int sltid) {
|
||||
if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) {
|
||||
ItemStack stack = ((Slot) _slots.get(sltid)).getItem();
|
||||
if (stack != null)
|
||||
return stack.getCount();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}.getAmount(1) > 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package net.mcreator.nimsrandombullshit.procedures;
|
||||
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.inventory.Slot;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
import java.util.Map;
|
||||
|
||||
public class LabelCopyMachineGUISlot2TooltipConditionProcedure {
|
||||
public static boolean execute(Entity entity) {
|
||||
if (entity == null)
|
||||
return false;
|
||||
if (new Object() {
|
||||
public int getAmount(int sltid) {
|
||||
if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) {
|
||||
ItemStack stack = ((Slot) _slots.get(sltid)).getItem();
|
||||
if (stack != null)
|
||||
return stack.getCount();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}.getAmount(2) > 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package net.mcreator.nimsrandombullshit.procedures;
|
||||
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.inventory.Slot;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
import java.util.Map;
|
||||
|
||||
public class LabelCopyMachineGUISlot3TooltipConditionProcedure {
|
||||
public static boolean execute(Entity entity) {
|
||||
if (entity == null)
|
||||
return false;
|
||||
if (new Object() {
|
||||
public int getAmount(int sltid) {
|
||||
if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) {
|
||||
ItemStack stack = ((Slot) _slots.get(sltid)).getItem();
|
||||
if (stack != null)
|
||||
return stack.getCount();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}.getAmount(3) > 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
package net.mcreator.nimsrandombullshit.procedures;
|
||||
|
||||
import net.minecraftforge.network.NetworkHooks;
|
||||
|
||||
import net.minecraft.world.level.LevelAccessor;
|
||||
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.player.Inventory;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.MenuProvider;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.nimsrandombullshit.world.inventory.MailboxNameEntryGUIMenu;
|
||||
|
||||
import io.netty.buffer.Unpooled;
|
||||
|
||||
public class MailboxBlockIsPlacedByProcedure {
|
||||
public static void execute(LevelAccessor world, double x, double y, double z, Entity entity) {
|
||||
if (entity == null)
|
||||
return;
|
||||
if (!world.isClientSide()) {
|
||||
if (entity instanceof ServerPlayer _ent) {
|
||||
BlockPos _bpos = BlockPos.containing(x, y, z);
|
||||
NetworkHooks.openScreen((ServerPlayer) _ent, new MenuProvider() {
|
||||
@Override
|
||||
public Component getDisplayName() {
|
||||
return Component.literal("MailboxNameEntryGUI");
|
||||
}
|
||||
|
||||
@Override
|
||||
public AbstractContainerMenu createMenu(int id, Inventory inventory, Player player) {
|
||||
return new MailboxNameEntryGUIMenu(id, inventory, new FriendlyByteBuf(Unpooled.buffer()).writeBlockPos(_bpos));
|
||||
}
|
||||
}, _bpos);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package net.mcreator.nimsrandombullshit.procedures;
|
||||
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.LevelAccessor;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.client.gui.components.EditBox;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public class MailboxNameEntryButtonPressedProcedure {
|
||||
public static void execute(LevelAccessor world, double x, double y, double z, Entity entity, HashMap guistate) {
|
||||
if (entity == null || guistate == null)
|
||||
return;
|
||||
if (!world.isClientSide()) {
|
||||
if (!world.isClientSide()) {
|
||||
BlockPos _bp = BlockPos.containing(x, y, z);
|
||||
BlockEntity _blockEntity = world.getBlockEntity(_bp);
|
||||
BlockState _bs = world.getBlockState(_bp);
|
||||
if (_blockEntity != null)
|
||||
_blockEntity.getPersistentData().putString("mailbox_name", (guistate.containsKey("text:mailbox_name_field") ? ((EditBox) guistate.get("text:mailbox_name_field")).getValue() : ""));
|
||||
if (world instanceof Level _level)
|
||||
_level.sendBlockUpdated(_bp, _bs, _bs, 3);
|
||||
}
|
||||
if (entity instanceof Player _player)
|
||||
_player.closeContainer();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
package net.mcreator.nimsrandombullshit.procedures;
|
||||
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.LevelAccessor;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.client.gui.components.EditBox;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
public class MailboxNameEntryGUIThisGUIIsClosedProcedure {
|
||||
public static void execute(LevelAccessor world, double x, double y, double z, HashMap guistate) {
|
||||
if (guistate == null)
|
||||
return;
|
||||
if (!world.isClientSide()) {
|
||||
if ((guistate.containsKey("text:mailbox_name_field") ? ((EditBox) guistate.get("text:mailbox_name_field")).getValue() : "").equals("")) {
|
||||
if (!world.isClientSide()) {
|
||||
BlockPos _bp = BlockPos.containing(x, y, z);
|
||||
BlockEntity _blockEntity = world.getBlockEntity(_bp);
|
||||
BlockState _bs = world.getBlockState(_bp);
|
||||
if (_blockEntity != null)
|
||||
_blockEntity.getPersistentData().putString("mailbox_name", "Unnamed");
|
||||
if (world instanceof Level _level)
|
||||
_level.sendBlockUpdated(_bp, _bs, _bs, 3);
|
||||
}
|
||||
} else {
|
||||
if (!world.isClientSide()) {
|
||||
BlockPos _bp = BlockPos.containing(x, y, z);
|
||||
BlockEntity _blockEntity = world.getBlockEntity(_bp);
|
||||
BlockState _bs = world.getBlockState(_bp);
|
||||
if (_blockEntity != null)
|
||||
_blockEntity.getPersistentData().putString("mailbox_name", (guistate.containsKey("text:mailbox_name_field") ? ((EditBox) guistate.get("text:mailbox_name_field")).getValue() : ""));
|
||||
if (world instanceof Level _level)
|
||||
_level.sendBlockUpdated(_bp, _bs, _bs, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package net.mcreator.nimsrandombullshit.procedures;
|
||||
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
import net.mcreator.nimsrandombullshit.init.NimsRandomBullshitModItems;
|
||||
|
||||
public class MailboxSlot99ShippingLabelInsertionConditionProcedure {
|
||||
public static boolean execute(ItemStack itemstack) {
|
||||
if (itemstack.getItem() == NimsRandomBullshitModItems.SHIPPING_LABEL.get() && itemstack.getOrCreateTag().getBoolean("connected")) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,434 +0,0 @@
|
||||
package net.mcreator.nimsrandombullshit.procedures;
|
||||
|
||||
import net.minecraftforge.items.IItemHandlerModifiable;
|
||||
import net.minecraftforge.common.capabilities.ForgeCapabilities;
|
||||
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.LevelAccessor;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.inventory.Slot;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.nimsrandombullshit.init.NimsRandomBullshitModItems;
|
||||
import net.mcreator.nimsrandombullshit.init.NimsRandomBullshitModBlocks;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.Map;
|
||||
|
||||
public class MailboxSmartSendLogicProcedure {
|
||||
public static void execute(LevelAccessor world, double x, double y, double z, Entity entity) {
|
||||
if (entity == null)
|
||||
return;
|
||||
double currInboxSlot = 0;
|
||||
double currOutboxSlot = 0;
|
||||
double currInboxSlotRoom = 0;
|
||||
double currRemainder = 0;
|
||||
double currInboxSlot2 = 0;
|
||||
double currInboxItemCount = 0;
|
||||
double currInboxItemCount2 = 0;
|
||||
ItemStack currInboxItem = ItemStack.EMPTY;
|
||||
ItemStack shippingLabel = ItemStack.EMPTY;
|
||||
if (!world.isClientSide()) {
|
||||
shippingLabel = (entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt ? ((Slot) _slt.get(99)).getItem() : ItemStack.EMPTY).copy();
|
||||
if (shippingLabel.getItem() == NimsRandomBullshitModItems.SHIPPING_LABEL.get() && shippingLabel.getOrCreateTag().getBoolean("connected")) {
|
||||
if (!world.isClientSide()) {
|
||||
BlockPos _bp = BlockPos.containing(x, y, z);
|
||||
BlockEntity _blockEntity = world.getBlockEntity(_bp);
|
||||
BlockState _bs = world.getBlockState(_bp);
|
||||
if (_blockEntity != null)
|
||||
_blockEntity.getPersistentData().putDouble("target_mailbox_x", (shippingLabel.getOrCreateTag().getDouble("connected_mailbox_x")));
|
||||
if (world instanceof Level _level)
|
||||
_level.sendBlockUpdated(_bp, _bs, _bs, 3);
|
||||
}
|
||||
if (!world.isClientSide()) {
|
||||
BlockPos _bp = BlockPos.containing(x, y, z);
|
||||
BlockEntity _blockEntity = world.getBlockEntity(_bp);
|
||||
BlockState _bs = world.getBlockState(_bp);
|
||||
if (_blockEntity != null)
|
||||
_blockEntity.getPersistentData().putDouble("target_mailbox_y", (shippingLabel.getOrCreateTag().getDouble("connected_mailbox_y")));
|
||||
if (world instanceof Level _level)
|
||||
_level.sendBlockUpdated(_bp, _bs, _bs, 3);
|
||||
}
|
||||
if (!world.isClientSide()) {
|
||||
BlockPos _bp = BlockPos.containing(x, y, z);
|
||||
BlockEntity _blockEntity = world.getBlockEntity(_bp);
|
||||
BlockState _bs = world.getBlockState(_bp);
|
||||
if (_blockEntity != null)
|
||||
_blockEntity.getPersistentData().putDouble("target_mailbox_z", (shippingLabel.getOrCreateTag().getDouble("connected_mailbox_z")));
|
||||
if (world instanceof Level _level)
|
||||
_level.sendBlockUpdated(_bp, _bs, _bs, 3);
|
||||
}
|
||||
if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) {
|
||||
ItemStack _setstack = shippingLabel.copy();
|
||||
_setstack.setCount((int) (new Object() {
|
||||
public int getAmount(int sltid) {
|
||||
if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) {
|
||||
ItemStack stack = ((Slot) _slots.get(sltid)).getItem();
|
||||
if (stack != null)
|
||||
return stack.getCount();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}.getAmount(99) - 1));
|
||||
((Slot) _slots.get(99)).set(_setstack);
|
||||
_player.containerMenu.broadcastChanges();
|
||||
}
|
||||
if ((world.getBlockState(BlockPos.containing(new Object() {
|
||||
public double getValue(LevelAccessor world, BlockPos pos, String tag) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity != null)
|
||||
return blockEntity.getPersistentData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(world, BlockPos.containing(x, y, z), "target_mailbox_x"), new Object() {
|
||||
public double getValue(LevelAccessor world, BlockPos pos, String tag) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity != null)
|
||||
return blockEntity.getPersistentData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(world, BlockPos.containing(x, y, z), "target_mailbox_y"), new Object() {
|
||||
public double getValue(LevelAccessor world, BlockPos pos, String tag) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity != null)
|
||||
return blockEntity.getPersistentData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(world, BlockPos.containing(x, y, z), "target_mailbox_z")))).getBlock() == NimsRandomBullshitModBlocks.MAILBOX.get()) {
|
||||
currInboxSlot = 0;
|
||||
currOutboxSlot = 9;
|
||||
while (currInboxSlot <= 8) {
|
||||
currInboxItem = (new Object() {
|
||||
public ItemStack getItemStack(LevelAccessor world, BlockPos pos, int slotid) {
|
||||
AtomicReference<ItemStack> _retval = new AtomicReference<>(ItemStack.EMPTY);
|
||||
BlockEntity _ent = world.getBlockEntity(pos);
|
||||
if (_ent != null)
|
||||
_ent.getCapability(ForgeCapabilities.ITEM_HANDLER, null).ifPresent(capability -> _retval.set(capability.getStackInSlot(slotid).copy()));
|
||||
return _retval.get();
|
||||
}
|
||||
}.getItemStack(world, BlockPos.containing(new Object() {
|
||||
public double getValue(LevelAccessor world, BlockPos pos, String tag) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity != null)
|
||||
return blockEntity.getPersistentData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(world, BlockPos.containing(x, y, z), "target_mailbox_x"), new Object() {
|
||||
public double getValue(LevelAccessor world, BlockPos pos, String tag) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity != null)
|
||||
return blockEntity.getPersistentData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(world, BlockPos.containing(x, y, z), "target_mailbox_y"), new Object() {
|
||||
public double getValue(LevelAccessor world, BlockPos pos, String tag) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity != null)
|
||||
return blockEntity.getPersistentData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(world, BlockPos.containing(x, y, z), "target_mailbox_z")), (int) currInboxSlot)).copy();
|
||||
currInboxItemCount = new Object() {
|
||||
public int getAmount(LevelAccessor world, BlockPos pos, int slotid) {
|
||||
AtomicInteger _retval = new AtomicInteger(0);
|
||||
BlockEntity _ent = world.getBlockEntity(pos);
|
||||
if (_ent != null)
|
||||
_ent.getCapability(ForgeCapabilities.ITEM_HANDLER, null).ifPresent(capability -> _retval.set(capability.getStackInSlot(slotid).getCount()));
|
||||
return _retval.get();
|
||||
}
|
||||
}.getAmount(world, BlockPos.containing(new Object() {
|
||||
public double getValue(LevelAccessor world, BlockPos pos, String tag) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity != null)
|
||||
return blockEntity.getPersistentData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(world, BlockPos.containing(x, y, z), "target_mailbox_x"), new Object() {
|
||||
public double getValue(LevelAccessor world, BlockPos pos, String tag) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity != null)
|
||||
return blockEntity.getPersistentData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(world, BlockPos.containing(x, y, z), "target_mailbox_y"), new Object() {
|
||||
public double getValue(LevelAccessor world, BlockPos pos, String tag) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity != null)
|
||||
return blockEntity.getPersistentData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(world, BlockPos.containing(x, y, z), "target_mailbox_z")), (int) currInboxSlot);
|
||||
if (currInboxItem.getItem() == ItemStack.EMPTY.getItem()
|
||||
&& !((entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt ? ((Slot) _slt.get((int) currOutboxSlot)).getItem() : ItemStack.EMPTY)
|
||||
.getItem() == ItemStack.EMPTY.getItem())) {
|
||||
{
|
||||
BlockEntity _ent = world.getBlockEntity(BlockPos.containing(new Object() {
|
||||
public double getValue(LevelAccessor world, BlockPos pos, String tag) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity != null)
|
||||
return blockEntity.getPersistentData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(world, BlockPos.containing(x, y, z), "target_mailbox_x"), new Object() {
|
||||
public double getValue(LevelAccessor world, BlockPos pos, String tag) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity != null)
|
||||
return blockEntity.getPersistentData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(world, BlockPos.containing(x, y, z), "target_mailbox_y"), new Object() {
|
||||
public double getValue(LevelAccessor world, BlockPos pos, String tag) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity != null)
|
||||
return blockEntity.getPersistentData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(world, BlockPos.containing(x, y, z), "target_mailbox_z")));
|
||||
if (_ent != null) {
|
||||
final int _slotid = (int) currInboxSlot;
|
||||
final ItemStack _setstack = (entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt
|
||||
? ((Slot) _slt.get((int) currOutboxSlot)).getItem()
|
||||
: ItemStack.EMPTY).copy();
|
||||
_setstack.setCount(new Object() {
|
||||
public int getAmount(int sltid) {
|
||||
if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) {
|
||||
ItemStack stack = ((Slot) _slots.get(sltid)).getItem();
|
||||
if (stack != null)
|
||||
return stack.getCount();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}.getAmount((int) currOutboxSlot));
|
||||
_ent.getCapability(ForgeCapabilities.ITEM_HANDLER, null).ifPresent(capability -> {
|
||||
if (capability instanceof IItemHandlerModifiable)
|
||||
((IItemHandlerModifiable) capability).setStackInSlot(_slotid, _setstack);
|
||||
});
|
||||
}
|
||||
}
|
||||
if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) {
|
||||
((Slot) _slots.get((int) currOutboxSlot)).set(ItemStack.EMPTY);
|
||||
_player.containerMenu.broadcastChanges();
|
||||
}
|
||||
} else {
|
||||
if (currInboxItem
|
||||
.getItem() == (entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt ? ((Slot) _slt.get((int) currOutboxSlot)).getItem() : ItemStack.EMPTY)
|
||||
.getItem()
|
||||
&& currInboxItemCount < currInboxItem.getMaxStackSize()) {
|
||||
currInboxSlotRoom = currInboxItem.getMaxStackSize() - currInboxItemCount;
|
||||
if (new Object() {
|
||||
public int getAmount(int sltid) {
|
||||
if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) {
|
||||
ItemStack stack = ((Slot) _slots.get(sltid)).getItem();
|
||||
if (stack != null)
|
||||
return stack.getCount();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}.getAmount((int) currOutboxSlot) <= currInboxSlotRoom) {
|
||||
{
|
||||
BlockEntity _ent = world.getBlockEntity(BlockPos.containing(new Object() {
|
||||
public double getValue(LevelAccessor world, BlockPos pos, String tag) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity != null)
|
||||
return blockEntity.getPersistentData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(world, BlockPos.containing(x, y, z), "target_mailbox_x"), new Object() {
|
||||
public double getValue(LevelAccessor world, BlockPos pos, String tag) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity != null)
|
||||
return blockEntity.getPersistentData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(world, BlockPos.containing(x, y, z), "target_mailbox_y"), new Object() {
|
||||
public double getValue(LevelAccessor world, BlockPos pos, String tag) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity != null)
|
||||
return blockEntity.getPersistentData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(world, BlockPos.containing(x, y, z), "target_mailbox_z")));
|
||||
if (_ent != null) {
|
||||
final int _slotid = (int) currInboxSlot;
|
||||
final ItemStack _setstack = currInboxItem.copy();
|
||||
_setstack.setCount((int) (currInboxItemCount + new Object() {
|
||||
public int getAmount(int sltid) {
|
||||
if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) {
|
||||
ItemStack stack = ((Slot) _slots.get(sltid)).getItem();
|
||||
if (stack != null)
|
||||
return stack.getCount();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}.getAmount((int) currOutboxSlot)));
|
||||
_ent.getCapability(ForgeCapabilities.ITEM_HANDLER, null).ifPresent(capability -> {
|
||||
if (capability instanceof IItemHandlerModifiable)
|
||||
((IItemHandlerModifiable) capability).setStackInSlot(_slotid, _setstack);
|
||||
});
|
||||
}
|
||||
}
|
||||
if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) {
|
||||
((Slot) _slots.get((int) currOutboxSlot)).set(ItemStack.EMPTY);
|
||||
_player.containerMenu.broadcastChanges();
|
||||
}
|
||||
} else {
|
||||
{
|
||||
BlockEntity _ent = world.getBlockEntity(BlockPos.containing(new Object() {
|
||||
public double getValue(LevelAccessor world, BlockPos pos, String tag) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity != null)
|
||||
return blockEntity.getPersistentData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(world, BlockPos.containing(x, y, z), "target_mailbox_x"), new Object() {
|
||||
public double getValue(LevelAccessor world, BlockPos pos, String tag) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity != null)
|
||||
return blockEntity.getPersistentData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(world, BlockPos.containing(x, y, z), "target_mailbox_y"), new Object() {
|
||||
public double getValue(LevelAccessor world, BlockPos pos, String tag) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity != null)
|
||||
return blockEntity.getPersistentData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(world, BlockPos.containing(x, y, z), "target_mailbox_z")));
|
||||
if (_ent != null) {
|
||||
final int _slotid = (int) currInboxSlot;
|
||||
final ItemStack _setstack = currInboxItem.copy();
|
||||
_setstack.setCount(currInboxItem.getMaxStackSize());
|
||||
_ent.getCapability(ForgeCapabilities.ITEM_HANDLER, null).ifPresent(capability -> {
|
||||
if (capability instanceof IItemHandlerModifiable)
|
||||
((IItemHandlerModifiable) capability).setStackInSlot(_slotid, _setstack);
|
||||
});
|
||||
}
|
||||
}
|
||||
currRemainder = new Object() {
|
||||
public int getAmount(int sltid) {
|
||||
if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) {
|
||||
ItemStack stack = ((Slot) _slots.get(sltid)).getItem();
|
||||
if (stack != null)
|
||||
return stack.getCount();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}.getAmount((int) currOutboxSlot) - currInboxSlotRoom;
|
||||
currInboxSlot2 = 0;
|
||||
while (currInboxSlot2 <= 8) {
|
||||
currInboxItemCount2 = new Object() {
|
||||
public int getAmount(LevelAccessor world, BlockPos pos, int slotid) {
|
||||
AtomicInteger _retval = new AtomicInteger(0);
|
||||
BlockEntity _ent = world.getBlockEntity(pos);
|
||||
if (_ent != null)
|
||||
_ent.getCapability(ForgeCapabilities.ITEM_HANDLER, null).ifPresent(capability -> _retval.set(capability.getStackInSlot(slotid).getCount()));
|
||||
return _retval.get();
|
||||
}
|
||||
}.getAmount(world, BlockPos.containing(new Object() {
|
||||
public double getValue(LevelAccessor world, BlockPos pos, String tag) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity != null)
|
||||
return blockEntity.getPersistentData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(world, BlockPos.containing(x, y, z), "target_mailbox_x"), new Object() {
|
||||
public double getValue(LevelAccessor world, BlockPos pos, String tag) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity != null)
|
||||
return blockEntity.getPersistentData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(world, BlockPos.containing(x, y, z), "target_mailbox_y"), new Object() {
|
||||
public double getValue(LevelAccessor world, BlockPos pos, String tag) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity != null)
|
||||
return blockEntity.getPersistentData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(world, BlockPos.containing(x, y, z), "target_mailbox_z")), (int) currInboxSlot2);
|
||||
if (currInboxItemCount2 == 0) {
|
||||
{
|
||||
BlockEntity _ent = world.getBlockEntity(BlockPos.containing(new Object() {
|
||||
public double getValue(LevelAccessor world, BlockPos pos, String tag) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity != null)
|
||||
return blockEntity.getPersistentData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(world, BlockPos.containing(x, y, z), "target_mailbox_x"), new Object() {
|
||||
public double getValue(LevelAccessor world, BlockPos pos, String tag) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity != null)
|
||||
return blockEntity.getPersistentData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(world, BlockPos.containing(x, y, z), "target_mailbox_y"), new Object() {
|
||||
public double getValue(LevelAccessor world, BlockPos pos, String tag) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity != null)
|
||||
return blockEntity.getPersistentData().getDouble(tag);
|
||||
return -1;
|
||||
}
|
||||
}.getValue(world, BlockPos.containing(x, y, z), "target_mailbox_z")));
|
||||
if (_ent != null) {
|
||||
final int _slotid = (int) currInboxSlot2;
|
||||
final ItemStack _setstack = currInboxItem.copy();
|
||||
_setstack.setCount((int) currRemainder);
|
||||
_ent.getCapability(ForgeCapabilities.ITEM_HANDLER, null).ifPresent(capability -> {
|
||||
if (capability instanceof IItemHandlerModifiable)
|
||||
((IItemHandlerModifiable) capability).setStackInSlot(_slotid, _setstack);
|
||||
});
|
||||
}
|
||||
}
|
||||
if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) {
|
||||
((Slot) _slots.get((int) currOutboxSlot)).set(ItemStack.EMPTY);
|
||||
_player.containerMenu.broadcastChanges();
|
||||
}
|
||||
currRemainder = 0;
|
||||
break;
|
||||
}
|
||||
currInboxSlot2 = currInboxSlot2 + 1;
|
||||
}
|
||||
if (currRemainder > 0) {
|
||||
if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) {
|
||||
ItemStack _setstack = currInboxItem.copy();
|
||||
_setstack.setCount((int) currRemainder);
|
||||
((Slot) _slots.get((int) currOutboxSlot)).set(_setstack);
|
||||
_player.containerMenu.broadcastChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (new Object() {
|
||||
public int getAmount(int sltid) {
|
||||
if (entity instanceof Player _player && _player.containerMenu instanceof Supplier _current && _current.get() instanceof Map _slots) {
|
||||
ItemStack stack = ((Slot) _slots.get(sltid)).getItem();
|
||||
if (stack != null)
|
||||
return stack.getCount();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}.getAmount((int) currOutboxSlot) == 0) {
|
||||
currOutboxSlot = currOutboxSlot + 1;
|
||||
if (currInboxItemCount == currInboxItem.getMaxStackSize()) {
|
||||
currInboxSlot = currInboxSlot + 1;
|
||||
}
|
||||
} else if (currInboxItemCount == 0) {
|
||||
currOutboxSlot = currOutboxSlot + 1;
|
||||
} else {
|
||||
currInboxSlot = currInboxSlot + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,8 +25,8 @@ public class OreMinerMineButtonPressedProcedure {
|
||||
return;
|
||||
double oreMinerRoll = 0;
|
||||
if (!world.isClientSide()) {
|
||||
if ((entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt ? ((Slot) _slt.get(0)).getItem() : ItemStack.EMPTY).getItem() == Items.DIAMOND_PICKAXE
|
||||
&& !(entity instanceof Player _plrCldCheck4 && _plrCldCheck4.getCooldowns()
|
||||
if (!((entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt ? ((Slot) _slt.get(0)).getItem() : ItemStack.EMPTY).getItem() == ItemStack.EMPTY.getItem())
|
||||
&& !(entity instanceof Player _plrCldCheck5 && _plrCldCheck5.getCooldowns()
|
||||
.isOnCooldown((entity instanceof Player _plrSlotItem && _plrSlotItem.containerMenu instanceof Supplier _splr && _splr.get() instanceof Map _slt ? ((Slot) _slt.get(0)).getItem() : ItemStack.EMPTY).getItem()))) {
|
||||
if (world instanceof Level _level) {
|
||||
if (!_level.isClientSide()) {
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
package net.mcreator.nimsrandombullshit.procedures;
|
||||
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
public class ShippingLabelHasItemGlowingEffectProcedure {
|
||||
public static boolean execute(ItemStack itemstack) {
|
||||
if (itemstack.getOrCreateTag().getBoolean("connected")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
package net.mcreator.nimsrandombullshit.procedures;
|
||||
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.LevelAccessor;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.nimsrandombullshit.init.NimsRandomBullshitModBlocks;
|
||||
|
||||
public class ShippingLabelRightclickedOnBlockProcedure {
|
||||
public static void execute(LevelAccessor world, double x, double y, double z, BlockState blockstate, Entity entity, ItemStack itemstack) {
|
||||
if (entity == null)
|
||||
return;
|
||||
if (!world.isClientSide()) {
|
||||
if (blockstate.getBlock() == NimsRandomBullshitModBlocks.MAILBOX.get() && entity.isShiftKeyDown()) {
|
||||
itemstack.getOrCreateTag().putDouble("connected_mailbox_x", x);
|
||||
itemstack.getOrCreateTag().putDouble("connected_mailbox_y", y);
|
||||
itemstack.getOrCreateTag().putDouble("connected_mailbox_z", z);
|
||||
itemstack.getOrCreateTag().putBoolean("connected", true);
|
||||
itemstack.setHoverName(Component.literal(((new Object() {
|
||||
public String getValue(LevelAccessor world, BlockPos pos, String tag) {
|
||||
BlockEntity blockEntity = world.getBlockEntity(pos);
|
||||
if (blockEntity != null)
|
||||
return blockEntity.getPersistentData().getString(tag);
|
||||
return "";
|
||||
}
|
||||
}.getValue(world, BlockPos.containing(x, y, z), "mailbox_name")) + "'s Mailbox")));
|
||||
if (world instanceof Level _level) {
|
||||
if (!_level.isClientSide()) {
|
||||
_level.playSound(null, BlockPos.containing(x, y, z), ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("entity.player.levelup")), SoundSource.PLAYERS, (float) 0.75,
|
||||
(float) Mth.nextDouble(RandomSource.create(), 0.95, 1.05));
|
||||
} else {
|
||||
_level.playLocalSound(x, y, z, ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("entity.player.levelup")), SoundSource.PLAYERS, (float) 0.75, (float) Mth.nextDouble(RandomSource.create(), 0.95, 1.05), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package net.mcreator.nimsrandombullshit.procedures;
|
||||
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
public class ShippingLabelSpecialInformationProcedure {
|
||||
public static String execute(ItemStack itemstack) {
|
||||
if (itemstack.getOrCreateTag().getBoolean("connected")) {
|
||||
return ("Dest. Mailbox X:" + itemstack.getOrCreateTag().getDouble("connected_mailbox_x") + "\n") + "" + ("Dest. Mailbox Y:" + itemstack.getOrCreateTag().getDouble("connected_mailbox_y") + "\n")
|
||||
+ ("Dest. Mailbox Z:" + itemstack.getOrCreateTag().getDouble("connected_mailbox_z") + "\n");
|
||||
}
|
||||
return "No assigned destination.";
|
||||
}
|
||||
}
|
||||
@@ -1,285 +0,0 @@
|
||||
|
||||
package net.mcreator.nimsrandombullshit.world.inventory;
|
||||
|
||||
import net.minecraftforge.items.SlotItemHandler;
|
||||
import net.minecraftforge.items.ItemStackHandler;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.common.capabilities.ForgeCapabilities;
|
||||
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.inventory.Slot;
|
||||
import net.minecraft.world.inventory.ContainerLevelAccess;
|
||||
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.player.Inventory;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.nimsrandombullshit.init.NimsRandomBullshitModMenus;
|
||||
import net.mcreator.nimsrandombullshit.init.NimsRandomBullshitModItems;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class LabelCopyMachineGUIMenu extends AbstractContainerMenu implements Supplier<Map<Integer, Slot>> {
|
||||
public final static HashMap<String, Object> guistate = new HashMap<>();
|
||||
public final Level world;
|
||||
public final Player entity;
|
||||
public int x, y, z;
|
||||
private ContainerLevelAccess access = ContainerLevelAccess.NULL;
|
||||
private IItemHandler internal;
|
||||
private final Map<Integer, Slot> customSlots = new HashMap<>();
|
||||
private boolean bound = false;
|
||||
private Supplier<Boolean> boundItemMatcher = null;
|
||||
private Entity boundEntity = null;
|
||||
private BlockEntity boundBlockEntity = null;
|
||||
|
||||
public LabelCopyMachineGUIMenu(int id, Inventory inv, FriendlyByteBuf extraData) {
|
||||
super(NimsRandomBullshitModMenus.LABEL_COPY_MACHINE_GUI.get(), id);
|
||||
this.entity = inv.player;
|
||||
this.world = inv.player.level();
|
||||
this.internal = new ItemStackHandler(4);
|
||||
BlockPos pos = null;
|
||||
if (extraData != null) {
|
||||
pos = extraData.readBlockPos();
|
||||
this.x = pos.getX();
|
||||
this.y = pos.getY();
|
||||
this.z = pos.getZ();
|
||||
access = ContainerLevelAccess.create(world, pos);
|
||||
}
|
||||
if (pos != null) {
|
||||
if (extraData.readableBytes() == 1) { // bound to item
|
||||
byte hand = extraData.readByte();
|
||||
ItemStack itemstack = hand == 0 ? this.entity.getMainHandItem() : this.entity.getOffhandItem();
|
||||
this.boundItemMatcher = () -> itemstack == (hand == 0 ? this.entity.getMainHandItem() : this.entity.getOffhandItem());
|
||||
itemstack.getCapability(ForgeCapabilities.ITEM_HANDLER, null).ifPresent(capability -> {
|
||||
this.internal = capability;
|
||||
this.bound = true;
|
||||
});
|
||||
} else if (extraData.readableBytes() > 1) { // bound to entity
|
||||
extraData.readByte(); // drop padding
|
||||
boundEntity = world.getEntity(extraData.readVarInt());
|
||||
if (boundEntity != null)
|
||||
boundEntity.getCapability(ForgeCapabilities.ITEM_HANDLER, null).ifPresent(capability -> {
|
||||
this.internal = capability;
|
||||
this.bound = true;
|
||||
});
|
||||
} else { // might be bound to block
|
||||
boundBlockEntity = this.world.getBlockEntity(pos);
|
||||
if (boundBlockEntity != null)
|
||||
boundBlockEntity.getCapability(ForgeCapabilities.ITEM_HANDLER, null).ifPresent(capability -> {
|
||||
this.internal = capability;
|
||||
this.bound = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
this.customSlots.put(0, this.addSlot(new SlotItemHandler(internal, 0, 21, 51) {
|
||||
private final int slot = 0;
|
||||
private int x = LabelCopyMachineGUIMenu.this.x;
|
||||
private int y = LabelCopyMachineGUIMenu.this.y;
|
||||
|
||||
@Override
|
||||
public boolean mayPlace(ItemStack stack) {
|
||||
return NimsRandomBullshitModItems.SHIPPING_LABEL.get() == stack.getItem();
|
||||
}
|
||||
}));
|
||||
this.customSlots.put(1, this.addSlot(new SlotItemHandler(internal, 1, 57, 24) {
|
||||
private final int slot = 1;
|
||||
private int x = LabelCopyMachineGUIMenu.this.x;
|
||||
private int y = LabelCopyMachineGUIMenu.this.y;
|
||||
|
||||
@Override
|
||||
public boolean mayPlace(ItemStack stack) {
|
||||
return Items.PAPER == stack.getItem();
|
||||
}
|
||||
}));
|
||||
this.customSlots.put(2, this.addSlot(new SlotItemHandler(internal, 2, 97, 24) {
|
||||
private final int slot = 2;
|
||||
private int x = LabelCopyMachineGUIMenu.this.x;
|
||||
private int y = LabelCopyMachineGUIMenu.this.y;
|
||||
|
||||
@Override
|
||||
public boolean mayPlace(ItemStack stack) {
|
||||
return Items.INK_SAC == stack.getItem();
|
||||
}
|
||||
}));
|
||||
this.customSlots.put(3, this.addSlot(new SlotItemHandler(internal, 3, 133, 51) {
|
||||
private final int slot = 3;
|
||||
private int x = LabelCopyMachineGUIMenu.this.x;
|
||||
private int y = LabelCopyMachineGUIMenu.this.y;
|
||||
|
||||
@Override
|
||||
public boolean mayPlace(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
}));
|
||||
for (int si = 0; si < 3; ++si)
|
||||
for (int sj = 0; sj < 9; ++sj)
|
||||
this.addSlot(new Slot(inv, sj + (si + 1) * 9, 0 + 8 + sj * 18, 11 + 84 + si * 18));
|
||||
for (int si = 0; si < 9; ++si)
|
||||
this.addSlot(new Slot(inv, si, 0 + 8 + si * 18, 11 + 142));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean stillValid(Player player) {
|
||||
if (this.bound) {
|
||||
if (this.boundItemMatcher != null)
|
||||
return this.boundItemMatcher.get();
|
||||
else if (this.boundBlockEntity != null)
|
||||
return AbstractContainerMenu.stillValid(this.access, player, this.boundBlockEntity.getBlockState().getBlock());
|
||||
else if (this.boundEntity != null)
|
||||
return this.boundEntity.isAlive();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack quickMoveStack(Player playerIn, int index) {
|
||||
ItemStack itemstack = ItemStack.EMPTY;
|
||||
Slot slot = (Slot) this.slots.get(index);
|
||||
if (slot != null && slot.hasItem()) {
|
||||
ItemStack itemstack1 = slot.getItem();
|
||||
itemstack = itemstack1.copy();
|
||||
if (index < 4) {
|
||||
if (!this.moveItemStackTo(itemstack1, 4, this.slots.size(), true))
|
||||
return ItemStack.EMPTY;
|
||||
slot.onQuickCraft(itemstack1, itemstack);
|
||||
} else if (!this.moveItemStackTo(itemstack1, 0, 4, false)) {
|
||||
if (index < 4 + 27) {
|
||||
if (!this.moveItemStackTo(itemstack1, 4 + 27, this.slots.size(), true))
|
||||
return ItemStack.EMPTY;
|
||||
} else {
|
||||
if (!this.moveItemStackTo(itemstack1, 4, 4 + 27, false))
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
if (itemstack1.getCount() == 0)
|
||||
slot.set(ItemStack.EMPTY);
|
||||
else
|
||||
slot.setChanged();
|
||||
if (itemstack1.getCount() == itemstack.getCount())
|
||||
return ItemStack.EMPTY;
|
||||
slot.onTake(playerIn, itemstack1);
|
||||
}
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean moveItemStackTo(ItemStack p_38904_, int p_38905_, int p_38906_, boolean p_38907_) {
|
||||
boolean flag = false;
|
||||
int i = p_38905_;
|
||||
if (p_38907_) {
|
||||
i = p_38906_ - 1;
|
||||
}
|
||||
if (p_38904_.isStackable()) {
|
||||
while (!p_38904_.isEmpty()) {
|
||||
if (p_38907_) {
|
||||
if (i < p_38905_) {
|
||||
break;
|
||||
}
|
||||
} else if (i >= p_38906_) {
|
||||
break;
|
||||
}
|
||||
Slot slot = this.slots.get(i);
|
||||
ItemStack itemstack = slot.getItem();
|
||||
if (slot.mayPlace(itemstack) && !itemstack.isEmpty() && ItemStack.isSameItemSameTags(p_38904_, itemstack)) {
|
||||
int j = itemstack.getCount() + p_38904_.getCount();
|
||||
int maxSize = Math.min(slot.getMaxStackSize(), p_38904_.getMaxStackSize());
|
||||
if (j <= maxSize) {
|
||||
p_38904_.setCount(0);
|
||||
itemstack.setCount(j);
|
||||
slot.set(itemstack);
|
||||
flag = true;
|
||||
} else if (itemstack.getCount() < maxSize) {
|
||||
p_38904_.shrink(maxSize - itemstack.getCount());
|
||||
itemstack.setCount(maxSize);
|
||||
slot.set(itemstack);
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
if (p_38907_) {
|
||||
--i;
|
||||
} else {
|
||||
++i;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!p_38904_.isEmpty()) {
|
||||
if (p_38907_) {
|
||||
i = p_38906_ - 1;
|
||||
} else {
|
||||
i = p_38905_;
|
||||
}
|
||||
while (true) {
|
||||
if (p_38907_) {
|
||||
if (i < p_38905_) {
|
||||
break;
|
||||
}
|
||||
} else if (i >= p_38906_) {
|
||||
break;
|
||||
}
|
||||
Slot slot1 = this.slots.get(i);
|
||||
ItemStack itemstack1 = slot1.getItem();
|
||||
if (itemstack1.isEmpty() && slot1.mayPlace(p_38904_)) {
|
||||
if (p_38904_.getCount() > slot1.getMaxStackSize()) {
|
||||
slot1.setByPlayer(p_38904_.split(slot1.getMaxStackSize()));
|
||||
} else {
|
||||
slot1.setByPlayer(p_38904_.split(p_38904_.getCount()));
|
||||
}
|
||||
slot1.setChanged();
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
if (p_38907_) {
|
||||
--i;
|
||||
} else {
|
||||
++i;
|
||||
}
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removed(Player playerIn) {
|
||||
super.removed(playerIn);
|
||||
if (!bound && playerIn instanceof ServerPlayer serverPlayer) {
|
||||
if (!serverPlayer.isAlive() || serverPlayer.hasDisconnected()) {
|
||||
for (int j = 0; j < internal.getSlots(); ++j) {
|
||||
if (j == 0)
|
||||
continue;
|
||||
if (j == 1)
|
||||
continue;
|
||||
if (j == 2)
|
||||
continue;
|
||||
if (j == 3)
|
||||
continue;
|
||||
playerIn.drop(internal.extractItem(j, internal.getStackInSlot(j).getCount(), false), false);
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < internal.getSlots(); ++i) {
|
||||
if (i == 0)
|
||||
continue;
|
||||
if (i == 1)
|
||||
continue;
|
||||
if (i == 2)
|
||||
continue;
|
||||
if (i == 3)
|
||||
continue;
|
||||
playerIn.getInventory().placeItemBackInInventory(internal.extractItem(i, internal.getStackInSlot(i).getCount(), false));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Map<Integer, Slot> get() {
|
||||
return customSlots;
|
||||
}
|
||||
}
|
||||
@@ -1,417 +0,0 @@
|
||||
|
||||
package net.mcreator.nimsrandombullshit.world.inventory;
|
||||
|
||||
import net.minecraftforge.items.SlotItemHandler;
|
||||
import net.minecraftforge.items.ItemStackHandler;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import net.minecraftforge.common.capabilities.ForgeCapabilities;
|
||||
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.inventory.Slot;
|
||||
import net.minecraft.world.inventory.ContainerLevelAccess;
|
||||
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.player.Inventory;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.nimsrandombullshit.procedures.MailboxSlot99ShippingLabelInsertionConditionProcedure;
|
||||
import net.mcreator.nimsrandombullshit.init.NimsRandomBullshitModMenus;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class MailboxGUIMenu extends AbstractContainerMenu implements Supplier<Map<Integer, Slot>> {
|
||||
public final static HashMap<String, Object> guistate = new HashMap<>();
|
||||
public final Level world;
|
||||
public final Player entity;
|
||||
public int x, y, z;
|
||||
private ContainerLevelAccess access = ContainerLevelAccess.NULL;
|
||||
private IItemHandler internal;
|
||||
private final Map<Integer, Slot> customSlots = new HashMap<>();
|
||||
private boolean bound = false;
|
||||
private Supplier<Boolean> boundItemMatcher = null;
|
||||
private Entity boundEntity = null;
|
||||
private BlockEntity boundBlockEntity = null;
|
||||
|
||||
public MailboxGUIMenu(int id, Inventory inv, FriendlyByteBuf extraData) {
|
||||
super(NimsRandomBullshitModMenus.MAILBOX_GUI.get(), id);
|
||||
this.entity = inv.player;
|
||||
this.world = inv.player.level();
|
||||
this.internal = new ItemStackHandler(100);
|
||||
BlockPos pos = null;
|
||||
if (extraData != null) {
|
||||
pos = extraData.readBlockPos();
|
||||
this.x = pos.getX();
|
||||
this.y = pos.getY();
|
||||
this.z = pos.getZ();
|
||||
access = ContainerLevelAccess.create(world, pos);
|
||||
}
|
||||
if (pos != null) {
|
||||
if (extraData.readableBytes() == 1) { // bound to item
|
||||
byte hand = extraData.readByte();
|
||||
ItemStack itemstack = hand == 0 ? this.entity.getMainHandItem() : this.entity.getOffhandItem();
|
||||
this.boundItemMatcher = () -> itemstack == (hand == 0 ? this.entity.getMainHandItem() : this.entity.getOffhandItem());
|
||||
itemstack.getCapability(ForgeCapabilities.ITEM_HANDLER, null).ifPresent(capability -> {
|
||||
this.internal = capability;
|
||||
this.bound = true;
|
||||
});
|
||||
} else if (extraData.readableBytes() > 1) { // bound to entity
|
||||
extraData.readByte(); // drop padding
|
||||
boundEntity = world.getEntity(extraData.readVarInt());
|
||||
if (boundEntity != null)
|
||||
boundEntity.getCapability(ForgeCapabilities.ITEM_HANDLER, null).ifPresent(capability -> {
|
||||
this.internal = capability;
|
||||
this.bound = true;
|
||||
});
|
||||
} else { // might be bound to block
|
||||
boundBlockEntity = this.world.getBlockEntity(pos);
|
||||
if (boundBlockEntity != null)
|
||||
boundBlockEntity.getCapability(ForgeCapabilities.ITEM_HANDLER, null).ifPresent(capability -> {
|
||||
this.internal = capability;
|
||||
this.bound = true;
|
||||
});
|
||||
}
|
||||
}
|
||||
this.customSlots.put(0, this.addSlot(new SlotItemHandler(internal, 0, 39, 29) {
|
||||
private final int slot = 0;
|
||||
private int x = MailboxGUIMenu.this.x;
|
||||
private int y = MailboxGUIMenu.this.y;
|
||||
|
||||
@Override
|
||||
public boolean mayPlace(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
}));
|
||||
this.customSlots.put(1, this.addSlot(new SlotItemHandler(internal, 1, 57, 29) {
|
||||
private final int slot = 1;
|
||||
private int x = MailboxGUIMenu.this.x;
|
||||
private int y = MailboxGUIMenu.this.y;
|
||||
|
||||
@Override
|
||||
public boolean mayPlace(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
}));
|
||||
this.customSlots.put(2, this.addSlot(new SlotItemHandler(internal, 2, 75, 29) {
|
||||
private final int slot = 2;
|
||||
private int x = MailboxGUIMenu.this.x;
|
||||
private int y = MailboxGUIMenu.this.y;
|
||||
|
||||
@Override
|
||||
public boolean mayPlace(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
}));
|
||||
this.customSlots.put(3, this.addSlot(new SlotItemHandler(internal, 3, 39, 47) {
|
||||
private final int slot = 3;
|
||||
private int x = MailboxGUIMenu.this.x;
|
||||
private int y = MailboxGUIMenu.this.y;
|
||||
|
||||
@Override
|
||||
public boolean mayPlace(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
}));
|
||||
this.customSlots.put(4, this.addSlot(new SlotItemHandler(internal, 4, 57, 47) {
|
||||
private final int slot = 4;
|
||||
private int x = MailboxGUIMenu.this.x;
|
||||
private int y = MailboxGUIMenu.this.y;
|
||||
|
||||
@Override
|
||||
public boolean mayPlace(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
}));
|
||||
this.customSlots.put(5, this.addSlot(new SlotItemHandler(internal, 5, 75, 47) {
|
||||
private final int slot = 5;
|
||||
private int x = MailboxGUIMenu.this.x;
|
||||
private int y = MailboxGUIMenu.this.y;
|
||||
|
||||
@Override
|
||||
public boolean mayPlace(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
}));
|
||||
this.customSlots.put(6, this.addSlot(new SlotItemHandler(internal, 6, 39, 65) {
|
||||
private final int slot = 6;
|
||||
private int x = MailboxGUIMenu.this.x;
|
||||
private int y = MailboxGUIMenu.this.y;
|
||||
|
||||
@Override
|
||||
public boolean mayPlace(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
}));
|
||||
this.customSlots.put(7, this.addSlot(new SlotItemHandler(internal, 7, 57, 65) {
|
||||
private final int slot = 7;
|
||||
private int x = MailboxGUIMenu.this.x;
|
||||
private int y = MailboxGUIMenu.this.y;
|
||||
|
||||
@Override
|
||||
public boolean mayPlace(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
}));
|
||||
this.customSlots.put(8, this.addSlot(new SlotItemHandler(internal, 8, 75, 65) {
|
||||
private final int slot = 8;
|
||||
private int x = MailboxGUIMenu.this.x;
|
||||
private int y = MailboxGUIMenu.this.y;
|
||||
|
||||
@Override
|
||||
public boolean mayPlace(ItemStack stack) {
|
||||
return false;
|
||||
}
|
||||
}));
|
||||
this.customSlots.put(9, this.addSlot(new SlotItemHandler(internal, 9, 102, 29) {
|
||||
private final int slot = 9;
|
||||
private int x = MailboxGUIMenu.this.x;
|
||||
private int y = MailboxGUIMenu.this.y;
|
||||
}));
|
||||
this.customSlots.put(10, this.addSlot(new SlotItemHandler(internal, 10, 120, 29) {
|
||||
private final int slot = 10;
|
||||
private int x = MailboxGUIMenu.this.x;
|
||||
private int y = MailboxGUIMenu.this.y;
|
||||
}));
|
||||
this.customSlots.put(11, this.addSlot(new SlotItemHandler(internal, 11, 138, 29) {
|
||||
private final int slot = 11;
|
||||
private int x = MailboxGUIMenu.this.x;
|
||||
private int y = MailboxGUIMenu.this.y;
|
||||
}));
|
||||
this.customSlots.put(12, this.addSlot(new SlotItemHandler(internal, 12, 102, 47) {
|
||||
private final int slot = 12;
|
||||
private int x = MailboxGUIMenu.this.x;
|
||||
private int y = MailboxGUIMenu.this.y;
|
||||
}));
|
||||
this.customSlots.put(13, this.addSlot(new SlotItemHandler(internal, 13, 120, 47) {
|
||||
private final int slot = 13;
|
||||
private int x = MailboxGUIMenu.this.x;
|
||||
private int y = MailboxGUIMenu.this.y;
|
||||
}));
|
||||
this.customSlots.put(14, this.addSlot(new SlotItemHandler(internal, 14, 138, 47) {
|
||||
private final int slot = 14;
|
||||
private int x = MailboxGUIMenu.this.x;
|
||||
private int y = MailboxGUIMenu.this.y;
|
||||
}));
|
||||
this.customSlots.put(15, this.addSlot(new SlotItemHandler(internal, 15, 102, 65) {
|
||||
private final int slot = 15;
|
||||
private int x = MailboxGUIMenu.this.x;
|
||||
private int y = MailboxGUIMenu.this.y;
|
||||
}));
|
||||
this.customSlots.put(16, this.addSlot(new SlotItemHandler(internal, 16, 120, 65) {
|
||||
private final int slot = 16;
|
||||
private int x = MailboxGUIMenu.this.x;
|
||||
private int y = MailboxGUIMenu.this.y;
|
||||
}));
|
||||
this.customSlots.put(17, this.addSlot(new SlotItemHandler(internal, 17, 138, 65) {
|
||||
private final int slot = 17;
|
||||
private int x = MailboxGUIMenu.this.x;
|
||||
private int y = MailboxGUIMenu.this.y;
|
||||
}));
|
||||
this.customSlots.put(99, this.addSlot(new SlotItemHandler(internal, 99, 183, 29) {
|
||||
private final int slot = 99;
|
||||
private int x = MailboxGUIMenu.this.x;
|
||||
private int y = MailboxGUIMenu.this.y;
|
||||
|
||||
@Override
|
||||
public boolean mayPlace(ItemStack itemstack) {
|
||||
return !MailboxSlot99ShippingLabelInsertionConditionProcedure.execute(itemstack);
|
||||
}
|
||||
}));
|
||||
for (int si = 0; si < 3; ++si)
|
||||
for (int sj = 0; sj < 9; ++sj)
|
||||
this.addSlot(new Slot(inv, sj + (si + 1) * 9, 32 + 8 + sj * 18, 7 + 84 + si * 18));
|
||||
for (int si = 0; si < 9; ++si)
|
||||
this.addSlot(new Slot(inv, si, 32 + 8 + si * 18, 7 + 142));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean stillValid(Player player) {
|
||||
if (this.bound) {
|
||||
if (this.boundItemMatcher != null)
|
||||
return this.boundItemMatcher.get();
|
||||
else if (this.boundBlockEntity != null)
|
||||
return AbstractContainerMenu.stillValid(this.access, player, this.boundBlockEntity.getBlockState().getBlock());
|
||||
else if (this.boundEntity != null)
|
||||
return this.boundEntity.isAlive();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack quickMoveStack(Player playerIn, int index) {
|
||||
ItemStack itemstack = ItemStack.EMPTY;
|
||||
Slot slot = (Slot) this.slots.get(index);
|
||||
if (slot != null && slot.hasItem()) {
|
||||
ItemStack itemstack1 = slot.getItem();
|
||||
itemstack = itemstack1.copy();
|
||||
if (index < 19) {
|
||||
if (!this.moveItemStackTo(itemstack1, 19, this.slots.size(), true))
|
||||
return ItemStack.EMPTY;
|
||||
slot.onQuickCraft(itemstack1, itemstack);
|
||||
} else if (!this.moveItemStackTo(itemstack1, 0, 19, false)) {
|
||||
if (index < 19 + 27) {
|
||||
if (!this.moveItemStackTo(itemstack1, 19 + 27, this.slots.size(), true))
|
||||
return ItemStack.EMPTY;
|
||||
} else {
|
||||
if (!this.moveItemStackTo(itemstack1, 19, 19 + 27, false))
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
if (itemstack1.getCount() == 0)
|
||||
slot.set(ItemStack.EMPTY);
|
||||
else
|
||||
slot.setChanged();
|
||||
if (itemstack1.getCount() == itemstack.getCount())
|
||||
return ItemStack.EMPTY;
|
||||
slot.onTake(playerIn, itemstack1);
|
||||
}
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean moveItemStackTo(ItemStack p_38904_, int p_38905_, int p_38906_, boolean p_38907_) {
|
||||
boolean flag = false;
|
||||
int i = p_38905_;
|
||||
if (p_38907_) {
|
||||
i = p_38906_ - 1;
|
||||
}
|
||||
if (p_38904_.isStackable()) {
|
||||
while (!p_38904_.isEmpty()) {
|
||||
if (p_38907_) {
|
||||
if (i < p_38905_) {
|
||||
break;
|
||||
}
|
||||
} else if (i >= p_38906_) {
|
||||
break;
|
||||
}
|
||||
Slot slot = this.slots.get(i);
|
||||
ItemStack itemstack = slot.getItem();
|
||||
if (slot.mayPlace(itemstack) && !itemstack.isEmpty() && ItemStack.isSameItemSameTags(p_38904_, itemstack)) {
|
||||
int j = itemstack.getCount() + p_38904_.getCount();
|
||||
int maxSize = Math.min(slot.getMaxStackSize(), p_38904_.getMaxStackSize());
|
||||
if (j <= maxSize) {
|
||||
p_38904_.setCount(0);
|
||||
itemstack.setCount(j);
|
||||
slot.set(itemstack);
|
||||
flag = true;
|
||||
} else if (itemstack.getCount() < maxSize) {
|
||||
p_38904_.shrink(maxSize - itemstack.getCount());
|
||||
itemstack.setCount(maxSize);
|
||||
slot.set(itemstack);
|
||||
flag = true;
|
||||
}
|
||||
}
|
||||
if (p_38907_) {
|
||||
--i;
|
||||
} else {
|
||||
++i;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!p_38904_.isEmpty()) {
|
||||
if (p_38907_) {
|
||||
i = p_38906_ - 1;
|
||||
} else {
|
||||
i = p_38905_;
|
||||
}
|
||||
while (true) {
|
||||
if (p_38907_) {
|
||||
if (i < p_38905_) {
|
||||
break;
|
||||
}
|
||||
} else if (i >= p_38906_) {
|
||||
break;
|
||||
}
|
||||
Slot slot1 = this.slots.get(i);
|
||||
ItemStack itemstack1 = slot1.getItem();
|
||||
if (itemstack1.isEmpty() && slot1.mayPlace(p_38904_)) {
|
||||
if (p_38904_.getCount() > slot1.getMaxStackSize()) {
|
||||
slot1.setByPlayer(p_38904_.split(slot1.getMaxStackSize()));
|
||||
} else {
|
||||
slot1.setByPlayer(p_38904_.split(p_38904_.getCount()));
|
||||
}
|
||||
slot1.setChanged();
|
||||
flag = true;
|
||||
break;
|
||||
}
|
||||
if (p_38907_) {
|
||||
--i;
|
||||
} else {
|
||||
++i;
|
||||
}
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removed(Player playerIn) {
|
||||
super.removed(playerIn);
|
||||
if (!bound && playerIn instanceof ServerPlayer serverPlayer) {
|
||||
if (!serverPlayer.isAlive() || serverPlayer.hasDisconnected()) {
|
||||
for (int j = 0; j < internal.getSlots(); ++j) {
|
||||
if (j == 0)
|
||||
continue;
|
||||
if (j == 1)
|
||||
continue;
|
||||
if (j == 2)
|
||||
continue;
|
||||
if (j == 3)
|
||||
continue;
|
||||
if (j == 4)
|
||||
continue;
|
||||
if (j == 5)
|
||||
continue;
|
||||
if (j == 6)
|
||||
continue;
|
||||
if (j == 7)
|
||||
continue;
|
||||
if (j == 8)
|
||||
continue;
|
||||
if (j == 9)
|
||||
continue;
|
||||
if (j == 99)
|
||||
continue;
|
||||
playerIn.drop(internal.extractItem(j, internal.getStackInSlot(j).getCount(), false), false);
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < internal.getSlots(); ++i) {
|
||||
if (i == 0)
|
||||
continue;
|
||||
if (i == 1)
|
||||
continue;
|
||||
if (i == 2)
|
||||
continue;
|
||||
if (i == 3)
|
||||
continue;
|
||||
if (i == 4)
|
||||
continue;
|
||||
if (i == 5)
|
||||
continue;
|
||||
if (i == 6)
|
||||
continue;
|
||||
if (i == 7)
|
||||
continue;
|
||||
if (i == 8)
|
||||
continue;
|
||||
if (i == 9)
|
||||
continue;
|
||||
if (i == 99)
|
||||
continue;
|
||||
playerIn.getInventory().placeItemBackInInventory(internal.extractItem(i, internal.getStackInSlot(i).getCount(), false));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Map<Integer, Slot> get() {
|
||||
return customSlots;
|
||||
}
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
|
||||
package net.mcreator.nimsrandombullshit.world.inventory;
|
||||
|
||||
import net.minecraftforge.items.ItemStackHandler;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.inventory.Slot;
|
||||
import net.minecraft.world.inventory.ContainerLevelAccess;
|
||||
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.player.Inventory;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
import net.mcreator.nimsrandombullshit.procedures.MailboxNameEntryGUIThisGUIIsClosedProcedure;
|
||||
import net.mcreator.nimsrandombullshit.init.NimsRandomBullshitModMenus;
|
||||
|
||||
import java.util.function.Supplier;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class MailboxNameEntryGUIMenu extends AbstractContainerMenu implements Supplier<Map<Integer, Slot>> {
|
||||
public final static HashMap<String, Object> guistate = new HashMap<>();
|
||||
public final Level world;
|
||||
public final Player entity;
|
||||
public int x, y, z;
|
||||
private ContainerLevelAccess access = ContainerLevelAccess.NULL;
|
||||
private IItemHandler internal;
|
||||
private final Map<Integer, Slot> customSlots = new HashMap<>();
|
||||
private boolean bound = false;
|
||||
private Supplier<Boolean> boundItemMatcher = null;
|
||||
private Entity boundEntity = null;
|
||||
private BlockEntity boundBlockEntity = null;
|
||||
|
||||
public MailboxNameEntryGUIMenu(int id, Inventory inv, FriendlyByteBuf extraData) {
|
||||
super(NimsRandomBullshitModMenus.MAILBOX_NAME_ENTRY_GUI.get(), id);
|
||||
this.entity = inv.player;
|
||||
this.world = inv.player.level();
|
||||
this.internal = new ItemStackHandler(0);
|
||||
BlockPos pos = null;
|
||||
if (extraData != null) {
|
||||
pos = extraData.readBlockPos();
|
||||
this.x = pos.getX();
|
||||
this.y = pos.getY();
|
||||
this.z = pos.getZ();
|
||||
access = ContainerLevelAccess.create(world, pos);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean stillValid(Player player) {
|
||||
if (this.bound) {
|
||||
if (this.boundItemMatcher != null)
|
||||
return this.boundItemMatcher.get();
|
||||
else if (this.boundBlockEntity != null)
|
||||
return AbstractContainerMenu.stillValid(this.access, player, this.boundBlockEntity.getBlockState().getBlock());
|
||||
else if (this.boundEntity != null)
|
||||
return this.boundEntity.isAlive();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack quickMoveStack(Player playerIn, int index) {
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removed(Player playerIn) {
|
||||
super.removed(playerIn);
|
||||
MailboxNameEntryGUIThisGUIIsClosedProcedure.execute(world, x, y, z, guistate);
|
||||
}
|
||||
|
||||
public Map<Integer, Slot> get() {
|
||||
return customSlots;
|
||||
}
|
||||
}
|
||||
@@ -8,7 +8,6 @@ import net.minecraftforge.common.capabilities.ForgeCapabilities;
|
||||
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.inventory.Slot;
|
||||
import net.minecraft.world.inventory.ContainerLevelAccess;
|
||||
@@ -16,7 +15,9 @@ import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.player.Inventory;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.tags.ItemTags;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.network.FriendlyByteBuf;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
||||
@@ -85,7 +86,7 @@ public class OreMinerGUIMenu extends AbstractContainerMenu implements Supplier<M
|
||||
|
||||
@Override
|
||||
public boolean mayPlace(ItemStack stack) {
|
||||
return Items.DIAMOND_PICKAXE == stack.getItem();
|
||||
return stack.is(ItemTags.create(new ResourceLocation("nims_random_bullshit:ore_miner_acceptable_inputs")));
|
||||
}
|
||||
}));
|
||||
this.customSlots.put(1, this.addSlot(new SlotItemHandler(internal, 1, 79, 17) {
|
||||
|
||||
@@ -4,7 +4,7 @@ license="Academic Free License v3.0"
|
||||
|
||||
[[mods]]
|
||||
modId="nims_random_bullshit"
|
||||
version="1.6.1"
|
||||
version="1.6.2"
|
||||
displayName="Nim's Random Bullshit"
|
||||
displayURL="https://mcreator.net"
|
||||
credits="Created using mod maker MCreator - https://mcreator.net/about"
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=north": {
|
||||
"model": "nims_random_bullshit:block/label_copy_machine"
|
||||
},
|
||||
"facing=east": {
|
||||
"model": "nims_random_bullshit:block/label_copy_machine",
|
||||
"y": 90
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "nims_random_bullshit:block/label_copy_machine",
|
||||
"y": 180
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "nims_random_bullshit:block/label_copy_machine",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
"variants": {
|
||||
"facing=north": {
|
||||
"model": "nims_random_bullshit:block/mailbox"
|
||||
},
|
||||
"facing=east": {
|
||||
"model": "nims_random_bullshit:block/mailbox",
|
||||
"y": 90
|
||||
},
|
||||
"facing=south": {
|
||||
"model": "nims_random_bullshit:block/mailbox",
|
||||
"y": 180
|
||||
},
|
||||
"facing=west": {
|
||||
"model": "nims_random_bullshit:block/mailbox",
|
||||
"y": 270
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +1,20 @@
|
||||
{
|
||||
"item.nims_random_bullshit.star_wand": "Star Wand",
|
||||
"gui.nims_random_bullshit.mailbox_name_entry_gui.button_done": "Done",
|
||||
"gui.nims_random_bullshit.ore_miner_gui.button_mine": "Mine",
|
||||
"block.nims_random_bullshit.penta_condensed_netherrack": "Penta-condensed Netherrack",
|
||||
"item.nims_random_bullshit.magic_dust": "Magic Dust",
|
||||
"block.nims_random_bullshit.magma_brick_button": "Magma Brick Button",
|
||||
"painting.nims_random_bullshit.shit_painting.title": "Shit Painting",
|
||||
"enchantment.nims_random_bullshit.passive_income_enchantment": "Passive Income",
|
||||
"gui.nims_random_bullshit.label_copy_machine_gui.button_copy": "Copy",
|
||||
"painting.nims_random_bullshit.shit_painting.author": "nim",
|
||||
"gui.nims_random_bullshit.mailbox_gui.outbox_x_coord": "0",
|
||||
"block.nims_random_bullshit.broken_glass": "Broken Glass",
|
||||
"block.nims_random_bullshit.redstone_brick_walls": "Redstone Brick Wall",
|
||||
"block.nims_random_bullshit.rubber_fence": "Rubber Fence",
|
||||
"block.nims_random_bullshit.label_copy_machine": "Label Copy Machine",
|
||||
"item.nims_random_bullshit.bean": "Bean",
|
||||
"effect.nims_random_bullshit.summoned_entity_effect": "Summoned Entity",
|
||||
"block.nims_random_bullshit.rubber_slab": "Rubber Slab",
|
||||
"gui.nims_random_bullshit.mailbox_name_entry_gui.mailbox_name_field": "",
|
||||
"item.nims_random_bullshit.bedrock_upgrade_template": "Bedrock Upgrade Template",
|
||||
"item.nims_random_bullshit.shipping_label": "Shipping Label",
|
||||
"item.nims_random_bullshit.ghoul_spawn_egg": "Ghoul Spawn Egg",
|
||||
"block.nims_random_bullshit.magma_brick_walls": "Magma Brick Wall",
|
||||
"gui.nims_random_bullshit.mailbox_gui.label_y": "Y:",
|
||||
@@ -28,20 +23,14 @@
|
||||
"item.nims_random_bullshit.iron_golem_question_mark": "Iron Golem...?",
|
||||
"item.nims_random_bullshit.tux_spawn_egg": "Tux Spawn Egg",
|
||||
"gui.nims_random_bullshit.mailbox_gui.label_x": "X:",
|
||||
"gui.nims_random_bullshit.label_copy_machine_gui.label_label_copy_machine": "Label Copy Machine",
|
||||
"item.nims_random_bullshit.lapis_lazuli_nugget": "Lapis Lazuli Nugget",
|
||||
"item.nims_random_bullshit.gravedigger.description_1": "We must dig!",
|
||||
"item.nims_random_bullshit.gravedigger.description_0": "Right-Click on soul sand or soul soil to use them, summoning a ghoul that attacks hostile mobs.",
|
||||
"block.nims_random_bullshit.rubber_fence_gate": "Rubber Fence Gate",
|
||||
"gui.nims_random_bullshit.label_copy_machine_gui.tooltip_ink_sac_slot": "Ink Sac Slot",
|
||||
"gui.nims_random_bullshit.label_copy_machine_gui.tooltip_paper_slot": "Paper Slot",
|
||||
"item.nims_random_bullshit.snow_golem_question_mark": "Snow Golem...?",
|
||||
"item.nims_random_bullshit.bedrock_sword": "Bedrock Sword",
|
||||
"block.nims_random_bullshit.mailbox": "Mailbox",
|
||||
"gui.nims_random_bullshit.mailbox_gui.button_send": "Send",
|
||||
"block.nims_random_bullshit.redstone_brick_stairs": "Redstone Brick Stairs",
|
||||
"gui.nims_random_bullshit.mailbox_gui.outbox_y_coord": "0",
|
||||
"gui.nims_random_bullshit.mailbox_gui.label_inbox": "Inbox",
|
||||
"item.nims_random_bullshit.wither_question_mark": "Wither...?",
|
||||
"block.nims_random_bullshit.magma_brick_pressure_plate": "Magma Brick Pressure Plate",
|
||||
"item.nims_random_bullshit.cheese": "Cheese",
|
||||
@@ -51,14 +40,12 @@
|
||||
"fluid.nims_random_bullshit.netherrack_juice": "Netherrack Juice",
|
||||
"block.nims_random_bullshit.quadra_condensed_netherrack": "Quadra-condensed Netherrack",
|
||||
"gui.nims_random_bullshit.mailbox_gui.outbox_z_coord": "0",
|
||||
"gui.nims_random_bullshit.label_copy_machine_gui.tooltip_output_copy_of_shipping_label": "Output (copy of shipping label)",
|
||||
"item.nims_random_bullshit.netherrackite_pickaxe.description_0": "Non-condensed netherracks broken by this pickaxe drop themselves an additional time.",
|
||||
"gui.nims_random_bullshit.bedrockifier_gui.button_empty": "-\u003e",
|
||||
"item.nims_random_bullshit.netherrackite_pickaxe": "Netherrackite Pickaxe",
|
||||
"effect.nims_random_bullshit.stinky_effect": "Stinky",
|
||||
"block.nims_random_bullshit.hexa_condensed_netherrack": "Hexa-condensed Netherrack",
|
||||
"block.nims_random_bullshit.ore_miner": "Ore Miner",
|
||||
"gui.nims_random_bullshit.mailbox_gui.label_outbox": "Outbox",
|
||||
"block.nims_random_bullshit.rubber_stairs": "Rubber Stairs",
|
||||
"block.nims_random_bullshit.netherrack_juice": "Netherrack Juice",
|
||||
"block.nims_random_bullshit.rubber_button": "Rubber Button",
|
||||
@@ -75,7 +62,6 @@
|
||||
"item.nims_random_bullshit.star": "Star",
|
||||
"gui.nims_random_bullshit.shit_gui.label_uh_ohh_stinky": "UH OHH!!! STINKY!!! UH OHH!!! STINKY!!! UH OHH!!! STINKY!!! UH OHH!!! STINKY!!! ",
|
||||
"block.nims_random_bullshit.magma_bricks": "Magma Bricks",
|
||||
"entity.minecraft.villager.nims_random_bullshit.mailman_profession": "Mailman Profession",
|
||||
"gui.nims_random_bullshit.bedrockifier_gui.label_bedrockifier": "Bedrockifier",
|
||||
"block.nims_random_bullshit.rubber_pressure_plate": "Rubber Pressure Plate",
|
||||
"item.nims_random_bullshit.shit": "Shit",
|
||||
@@ -83,7 +69,5 @@
|
||||
"item.nims_random_bullshit.bedrock_pickaxe": "Bedrock Pickaxe",
|
||||
"block.nims_random_bullshit.magma_brick_stairs": "Magma Brick Stairs",
|
||||
"block.nims_random_bullshit.magma_brick_slabs": "Magma Brick Slab",
|
||||
"gui.nims_random_bullshit.label_copy_machine_gui.tooltip_shipping_label_slot": "Shipping Label Slot",
|
||||
"block.nims_random_bullshit.redstone_brick_slabs": "Redstone Brick Slab",
|
||||
"gui.nims_random_bullshit.mailbox_name_entry_gui.label_mailbox_name": "Mailbox Name:"
|
||||
"block.nims_random_bullshit.redstone_brick_slabs": "Redstone Brick Slab"
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"parent": "nims_random_bullshit:custom/label_copy_machine",
|
||||
"textures": {
|
||||
"all": "nims_random_bullshit:block/label_copy_machine_buttons",
|
||||
"particle": "nims_random_bullshit:block/label_copy_machine_buttons",
|
||||
"0": "nims_random_bullshit:block/mailbox_base",
|
||||
"1": "nims_random_bullshit:block/label_copy_machine_buttons",
|
||||
"2": "nims_random_bullshit:block/label_copy_machine_line"
|
||||
},
|
||||
"render_type": "solid"
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"parent": "nims_random_bullshit:custom/mailbox",
|
||||
"textures": {
|
||||
"all": "nims_random_bullshit:block/mailbox_base",
|
||||
"particle": "nims_random_bullshit:block/mailbox_base",
|
||||
"0": "nims_random_bullshit:block/mailbox_rod",
|
||||
"1": "nims_random_bullshit:block/mailbox_flag",
|
||||
"2": "nims_random_bullshit:block/mailbox_base"
|
||||
},
|
||||
"render_type": "solid"
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 120 B |
Binary file not shown.
|
After Width: | Height: | Size: 448 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"nims_random_bullshit:mailman_profession"
|
||||
]
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"random_sequence": "nims_random_bullshit:blocks/label_copy_machine",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "nims_random_bullshit:label_copy_machine"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"type": "minecraft:block",
|
||||
"random_sequence": "nims_random_bullshit:blocks/mailbox",
|
||||
"pools": [
|
||||
{
|
||||
"rolls": 1.0,
|
||||
"conditions": [
|
||||
{
|
||||
"condition": "minecraft:survives_explosion"
|
||||
}
|
||||
],
|
||||
"entries": [
|
||||
{
|
||||
"type": "minecraft:item",
|
||||
"name": "nims_random_bullshit:mailbox"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shapeless",
|
||||
"category": "misc",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "nims_random_bullshit:shit"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"item": "minecraft:brown_dye",
|
||||
"count": 2
|
||||
}
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "misc",
|
||||
"pattern": [
|
||||
"aab",
|
||||
"bbb"
|
||||
],
|
||||
"key": {
|
||||
"a": {
|
||||
"item": "minecraft:dispenser"
|
||||
},
|
||||
"b": {
|
||||
"item": "minecraft:iron_block"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "nims_random_bullshit:label_copy_machine",
|
||||
"count": 1
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "misc",
|
||||
"pattern": [
|
||||
"ab",
|
||||
"c "
|
||||
],
|
||||
"key": {
|
||||
"a": {
|
||||
"item": "minecraft:iron_block"
|
||||
},
|
||||
"b": {
|
||||
"item": "minecraft:lever"
|
||||
},
|
||||
"c": {
|
||||
"item": "minecraft:stick"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "nims_random_bullshit:mailbox",
|
||||
"count": 1
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
{
|
||||
"type": "minecraft:crafting_shapeless",
|
||||
"category": "misc",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "minecraft:paper"
|
||||
},
|
||||
{
|
||||
"item": "minecraft:ink_sac"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"item": "nims_random_bullshit:shipping_label",
|
||||
"count": 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"nims_random_bullshit:bedrock_pickaxe",
|
||||
"minecraft:diamond_pickaxe"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user