updates woo
- gave the buds/cluster proper bounding boxes - added inert budding amethyst (for screenshots)
This commit is contained in:
parent
ba84ca3c62
commit
627cdbda97
39 changed files with 1274 additions and 379 deletions
|
@ -10,7 +10,7 @@
|
||||||
"textureBack": "",
|
"textureBack": "",
|
||||||
"renderType": 12,
|
"renderType": 12,
|
||||||
"customModelName": "Cross model",
|
"customModelName": "Cross model",
|
||||||
"rotationMode": 2,
|
"rotationMode": 5,
|
||||||
"enablePitch": false,
|
"enablePitch": false,
|
||||||
"emissiveRendering": false,
|
"emissiveRendering": false,
|
||||||
"displayFluidOverlay": false,
|
"displayFluidOverlay": false,
|
||||||
|
@ -18,18 +18,18 @@
|
||||||
"particleTexture": "",
|
"particleTexture": "",
|
||||||
"tintType": "No tint",
|
"tintType": "No tint",
|
||||||
"isItemTinted": false,
|
"isItemTinted": false,
|
||||||
"hasTransparency": false,
|
"hasTransparency": true,
|
||||||
"connectedSides": false,
|
"connectedSides": false,
|
||||||
"transparencyType": "CUTOUT",
|
"transparencyType": "CUTOUT",
|
||||||
"disableOffset": false,
|
"disableOffset": false,
|
||||||
"boundingBoxes": [
|
"boundingBoxes": [
|
||||||
{
|
{
|
||||||
"mx": 0.0,
|
"mx": 0.7,
|
||||||
"my": 0.0,
|
"my": 0.0,
|
||||||
"mz": 0.0,
|
"mz": 0.7,
|
||||||
"Mx": 16.0,
|
"Mx": 15.3,
|
||||||
"My": 16.0,
|
"My": 15.0,
|
||||||
"Mz": 16.0,
|
"Mz": 15.3,
|
||||||
"subtract": false
|
"subtract": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
142
elements/InertBuddingAmethyst.mod.json
Normal file
142
elements/InertBuddingAmethyst.mod.json
Normal file
|
@ -0,0 +1,142 @@
|
||||||
|
{
|
||||||
|
"_fv": 47,
|
||||||
|
"_type": "block",
|
||||||
|
"definition": {
|
||||||
|
"texture": "inertamethyst",
|
||||||
|
"textureTop": "inertamethyst",
|
||||||
|
"textureLeft": "inertamethyst",
|
||||||
|
"textureFront": "inertamethyst",
|
||||||
|
"textureRight": "inertamethyst",
|
||||||
|
"textureBack": "inertamethyst",
|
||||||
|
"renderType": 10,
|
||||||
|
"customModelName": "Normal",
|
||||||
|
"rotationMode": 0,
|
||||||
|
"enablePitch": false,
|
||||||
|
"emissiveRendering": false,
|
||||||
|
"displayFluidOverlay": false,
|
||||||
|
"itemTexture": "",
|
||||||
|
"particleTexture": "",
|
||||||
|
"tintType": "No tint",
|
||||||
|
"isItemTinted": false,
|
||||||
|
"hasTransparency": false,
|
||||||
|
"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
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "Inert Budding Amethyst",
|
||||||
|
"specialInfo": [],
|
||||||
|
"hardness": 1.0,
|
||||||
|
"resistance": 10.0,
|
||||||
|
"hasGravity": false,
|
||||||
|
"isWaterloggable": false,
|
||||||
|
"creativeTab": {
|
||||||
|
"value": "CUSTOM:HeartGeodes"
|
||||||
|
},
|
||||||
|
"destroyTool": "pickaxe",
|
||||||
|
"customDrop": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"dropAmount": 1,
|
||||||
|
"useLootTableForDrops": false,
|
||||||
|
"requiresCorrectTool": true,
|
||||||
|
"enchantPowerBonus": 0.0,
|
||||||
|
"plantsGrowOn": false,
|
||||||
|
"canRedstoneConnect": false,
|
||||||
|
"lightOpacity": 15,
|
||||||
|
"material": {
|
||||||
|
"value": "AMETHYST"
|
||||||
|
},
|
||||||
|
"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": "AMETHYST_BLOCK"
|
||||||
|
},
|
||||||
|
"breakSound": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"fallSound": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"hitSound": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"placeSound": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"stepSound": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"luminance": 0,
|
||||||
|
"unbreakable": false,
|
||||||
|
"breakHarvestLevel": 1,
|
||||||
|
"isBonemealable": false,
|
||||||
|
"hasInventory": false,
|
||||||
|
"guiBoundTo": "<NONE>",
|
||||||
|
"openGUIOnRightClick": false,
|
||||||
|
"inventorySize": 9,
|
||||||
|
"inventoryStackSize": 64,
|
||||||
|
"inventoryDropWhenDestroyed": true,
|
||||||
|
"inventoryComparatorPower": true,
|
||||||
|
"inventoryOutSlotIDs": [],
|
||||||
|
"inventoryInSlotIDs": [],
|
||||||
|
"hasEnergyStorage": false,
|
||||||
|
"energyInitial": 0,
|
||||||
|
"energyCapacity": 400000,
|
||||||
|
"energyMaxReceive": 200,
|
||||||
|
"energyMaxExtract": 200,
|
||||||
|
"isFluidTank": false,
|
||||||
|
"fluidCapacity": 8000,
|
||||||
|
"fluidRestrictions": [],
|
||||||
|
"spawnWorldTypes": [],
|
||||||
|
"restrictionBiomes": [],
|
||||||
|
"blocksToReplace": [
|
||||||
|
{
|
||||||
|
"value": "Blocks.STONE#0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "Blocks.STONE#1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "Blocks.STONE#3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "Blocks.STONE#5"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"generationShape": "UNIFORM",
|
||||||
|
"frequencyPerChunks": 10,
|
||||||
|
"frequencyOnChunk": 16,
|
||||||
|
"minGenerateHeight": 0,
|
||||||
|
"maxGenerateHeight": 64
|
||||||
|
}
|
||||||
|
}
|
|
@ -10,7 +10,7 @@
|
||||||
"textureBack": "",
|
"textureBack": "",
|
||||||
"renderType": 12,
|
"renderType": 12,
|
||||||
"customModelName": "Cross model",
|
"customModelName": "Cross model",
|
||||||
"rotationMode": 2,
|
"rotationMode": 5,
|
||||||
"enablePitch": false,
|
"enablePitch": false,
|
||||||
"emissiveRendering": false,
|
"emissiveRendering": false,
|
||||||
"displayFluidOverlay": false,
|
"displayFluidOverlay": false,
|
||||||
|
@ -24,12 +24,12 @@
|
||||||
"disableOffset": false,
|
"disableOffset": false,
|
||||||
"boundingBoxes": [
|
"boundingBoxes": [
|
||||||
{
|
{
|
||||||
"mx": 0.125,
|
"mx": 2.6,
|
||||||
"my": 0.125,
|
"my": 0.0,
|
||||||
"mz": 0.0,
|
"mz": 2.6,
|
||||||
"Mx": 0.875,
|
"Mx": 13.4,
|
||||||
"My": 0.875,
|
"My": 10.0,
|
||||||
"Mz": 1.0,
|
"Mz": 13.4,
|
||||||
"subtract": false
|
"subtract": false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
"hardness": 1.0,
|
"hardness": 1.0,
|
||||||
"resistance": 10.0,
|
"resistance": 10.0,
|
||||||
"hasGravity": false,
|
"hasGravity": false,
|
||||||
"isWaterloggable": false,
|
"isWaterloggable": true,
|
||||||
"creativeTab": {
|
"creativeTab": {
|
||||||
"value": "No creative tab entry"
|
"value": "No creative tab entry"
|
||||||
},
|
},
|
||||||
|
|
129
elements/MediumHeartBud.mod.json
Normal file
129
elements/MediumHeartBud.mod.json
Normal file
|
@ -0,0 +1,129 @@
|
||||||
|
{
|
||||||
|
"_fv": 47,
|
||||||
|
"_type": "block",
|
||||||
|
"definition": {
|
||||||
|
"texture": "mediumheartbud",
|
||||||
|
"textureTop": "",
|
||||||
|
"textureLeft": "",
|
||||||
|
"textureFront": "",
|
||||||
|
"textureRight": "",
|
||||||
|
"textureBack": "",
|
||||||
|
"renderType": 12,
|
||||||
|
"customModelName": "Cross model",
|
||||||
|
"rotationMode": 5,
|
||||||
|
"enablePitch": false,
|
||||||
|
"emissiveRendering": false,
|
||||||
|
"displayFluidOverlay": false,
|
||||||
|
"itemTexture": "mediumheartbud",
|
||||||
|
"particleTexture": "",
|
||||||
|
"tintType": "No tint",
|
||||||
|
"isItemTinted": false,
|
||||||
|
"hasTransparency": true,
|
||||||
|
"connectedSides": false,
|
||||||
|
"transparencyType": "CUTOUT",
|
||||||
|
"disableOffset": false,
|
||||||
|
"boundingBoxes": [
|
||||||
|
{
|
||||||
|
"mx": 3.5,
|
||||||
|
"my": 0.0,
|
||||||
|
"mz": 3.5,
|
||||||
|
"Mx": 12.5,
|
||||||
|
"My": 7.0,
|
||||||
|
"Mz": 12.5,
|
||||||
|
"subtract": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "Medium Heart Bud",
|
||||||
|
"specialInfo": [],
|
||||||
|
"hardness": 1.0,
|
||||||
|
"resistance": 10.0,
|
||||||
|
"hasGravity": false,
|
||||||
|
"isWaterloggable": true,
|
||||||
|
"creativeTab": {
|
||||||
|
"value": "No creative tab entry"
|
||||||
|
},
|
||||||
|
"destroyTool": "pickaxe",
|
||||||
|
"customDrop": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"dropAmount": 0,
|
||||||
|
"useLootTableForDrops": false,
|
||||||
|
"requiresCorrectTool": true,
|
||||||
|
"enchantPowerBonus": 0.0,
|
||||||
|
"plantsGrowOn": false,
|
||||||
|
"canRedstoneConnect": false,
|
||||||
|
"lightOpacity": 0,
|
||||||
|
"material": {
|
||||||
|
"value": "GLASS"
|
||||||
|
},
|
||||||
|
"tickRate": 20,
|
||||||
|
"tickRandomly": false,
|
||||||
|
"isReplaceable": false,
|
||||||
|
"canProvidePower": false,
|
||||||
|
"emittedRedstonePower": {
|
||||||
|
"fixedValue": 15.0
|
||||||
|
},
|
||||||
|
"colorOnMap": "RED_TERRACOTTA",
|
||||||
|
"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": "AMETHYST_CLUSTER"
|
||||||
|
},
|
||||||
|
"breakSound": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"fallSound": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"hitSound": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"placeSound": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"stepSound": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"luminance": 0,
|
||||||
|
"unbreakable": false,
|
||||||
|
"breakHarvestLevel": 1,
|
||||||
|
"isBonemealable": false,
|
||||||
|
"hasInventory": true,
|
||||||
|
"guiBoundTo": "<NONE>",
|
||||||
|
"openGUIOnRightClick": false,
|
||||||
|
"inventorySize": 0,
|
||||||
|
"inventoryStackSize": 64,
|
||||||
|
"inventoryDropWhenDestroyed": false,
|
||||||
|
"inventoryComparatorPower": false,
|
||||||
|
"inventoryOutSlotIDs": [],
|
||||||
|
"inventoryInSlotIDs": [],
|
||||||
|
"hasEnergyStorage": false,
|
||||||
|
"energyInitial": 0,
|
||||||
|
"energyCapacity": 400000,
|
||||||
|
"energyMaxReceive": 200,
|
||||||
|
"energyMaxExtract": 200,
|
||||||
|
"isFluidTank": false,
|
||||||
|
"fluidCapacity": 8000,
|
||||||
|
"fluidRestrictions": [],
|
||||||
|
"spawnWorldTypes": [],
|
||||||
|
"restrictionBiomes": [],
|
||||||
|
"blocksToReplace": [],
|
||||||
|
"generationShape": "UNIFORM",
|
||||||
|
"frequencyPerChunks": 10,
|
||||||
|
"frequencyOnChunk": 16,
|
||||||
|
"minGenerateHeight": 0,
|
||||||
|
"maxGenerateHeight": 64
|
||||||
|
}
|
||||||
|
}
|
129
elements/SmallHeartBud.mod.json
Normal file
129
elements/SmallHeartBud.mod.json
Normal file
|
@ -0,0 +1,129 @@
|
||||||
|
{
|
||||||
|
"_fv": 47,
|
||||||
|
"_type": "block",
|
||||||
|
"definition": {
|
||||||
|
"texture": "smallheartbud",
|
||||||
|
"textureTop": "",
|
||||||
|
"textureLeft": "",
|
||||||
|
"textureFront": "",
|
||||||
|
"textureRight": "",
|
||||||
|
"textureBack": "",
|
||||||
|
"renderType": 12,
|
||||||
|
"customModelName": "Cross model",
|
||||||
|
"rotationMode": 5,
|
||||||
|
"enablePitch": false,
|
||||||
|
"emissiveRendering": false,
|
||||||
|
"displayFluidOverlay": false,
|
||||||
|
"itemTexture": "smallheartbud",
|
||||||
|
"particleTexture": "",
|
||||||
|
"tintType": "No tint",
|
||||||
|
"isItemTinted": false,
|
||||||
|
"hasTransparency": true,
|
||||||
|
"connectedSides": false,
|
||||||
|
"transparencyType": "CUTOUT",
|
||||||
|
"disableOffset": false,
|
||||||
|
"boundingBoxes": [
|
||||||
|
{
|
||||||
|
"mx": 3.5,
|
||||||
|
"my": 0.0,
|
||||||
|
"mz": 3.5,
|
||||||
|
"Mx": 12.5,
|
||||||
|
"My": 5.0,
|
||||||
|
"Mz": 12.5,
|
||||||
|
"subtract": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"name": "Small Heart Bud",
|
||||||
|
"specialInfo": [],
|
||||||
|
"hardness": 1.0,
|
||||||
|
"resistance": 10.0,
|
||||||
|
"hasGravity": false,
|
||||||
|
"isWaterloggable": true,
|
||||||
|
"creativeTab": {
|
||||||
|
"value": "No creative tab entry"
|
||||||
|
},
|
||||||
|
"destroyTool": "pickaxe",
|
||||||
|
"customDrop": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"dropAmount": 0,
|
||||||
|
"useLootTableForDrops": false,
|
||||||
|
"requiresCorrectTool": true,
|
||||||
|
"enchantPowerBonus": 0.0,
|
||||||
|
"plantsGrowOn": false,
|
||||||
|
"canRedstoneConnect": false,
|
||||||
|
"lightOpacity": 0,
|
||||||
|
"material": {
|
||||||
|
"value": "GLASS"
|
||||||
|
},
|
||||||
|
"tickRate": 20,
|
||||||
|
"tickRandomly": false,
|
||||||
|
"isReplaceable": false,
|
||||||
|
"canProvidePower": false,
|
||||||
|
"emittedRedstonePower": {
|
||||||
|
"fixedValue": 15.0
|
||||||
|
},
|
||||||
|
"colorOnMap": "RED_TERRACOTTA",
|
||||||
|
"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": "AMETHYST_CLUSTER"
|
||||||
|
},
|
||||||
|
"breakSound": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"fallSound": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"hitSound": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"placeSound": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"stepSound": {
|
||||||
|
"value": ""
|
||||||
|
},
|
||||||
|
"luminance": 0,
|
||||||
|
"unbreakable": false,
|
||||||
|
"breakHarvestLevel": 1,
|
||||||
|
"isBonemealable": false,
|
||||||
|
"hasInventory": true,
|
||||||
|
"guiBoundTo": "<NONE>",
|
||||||
|
"openGUIOnRightClick": false,
|
||||||
|
"inventorySize": 0,
|
||||||
|
"inventoryStackSize": 64,
|
||||||
|
"inventoryDropWhenDestroyed": false,
|
||||||
|
"inventoryComparatorPower": false,
|
||||||
|
"inventoryOutSlotIDs": [],
|
||||||
|
"inventoryInSlotIDs": [],
|
||||||
|
"hasEnergyStorage": false,
|
||||||
|
"energyInitial": 0,
|
||||||
|
"energyCapacity": 400000,
|
||||||
|
"energyMaxReceive": 200,
|
||||||
|
"energyMaxExtract": 200,
|
||||||
|
"isFluidTank": false,
|
||||||
|
"fluidCapacity": 8000,
|
||||||
|
"fluidRestrictions": [],
|
||||||
|
"spawnWorldTypes": [],
|
||||||
|
"restrictionBiomes": [],
|
||||||
|
"blocksToReplace": [],
|
||||||
|
"generationShape": "UNIFORM",
|
||||||
|
"frequencyPerChunks": 10,
|
||||||
|
"frequencyOnChunk": 16,
|
||||||
|
"minGenerateHeight": 0,
|
||||||
|
"maxGenerateHeight": 64
|
||||||
|
}
|
||||||
|
}
|
|
@ -61,23 +61,6 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "LargeHeartBud",
|
|
||||||
"type": "block",
|
|
||||||
"sortid": 5,
|
|
||||||
"compiles": true,
|
|
||||||
"locked_code": false,
|
|
||||||
"registry_name": "large_heart_bud",
|
|
||||||
"metadata": {
|
|
||||||
"files": [
|
|
||||||
"src/main/resources/assets/heartgeodes/blockstates/large_heart_bud.json",
|
|
||||||
"src/main/resources/assets/heartgeodes/models/block/large_heart_bud.json",
|
|
||||||
"src/main/java/net/seaswimmerthefsh/heartgeodes/block/entity/LargeHeartBudBlockEntity.java",
|
|
||||||
"src/main/resources/assets/heartgeodes/models/item/large_heart_bud.json",
|
|
||||||
"src/main/java/net/seaswimmerthefsh/heartgeodes/block/LargeHeartBudBlock.java"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "TestRules",
|
"name": "TestRules",
|
||||||
"type": "command",
|
"type": "command",
|
||||||
|
@ -117,6 +100,73 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "LargeHeartBud",
|
||||||
|
"type": "block",
|
||||||
|
"sortid": 8,
|
||||||
|
"compiles": true,
|
||||||
|
"locked_code": false,
|
||||||
|
"registry_name": "large_heart_bud",
|
||||||
|
"metadata": {
|
||||||
|
"files": [
|
||||||
|
"src/main/resources/assets/heartgeodes/blockstates/large_heart_bud.json",
|
||||||
|
"src/main/resources/assets/heartgeodes/models/block/large_heart_bud.json",
|
||||||
|
"src/main/java/net/seaswimmerthefsh/heartgeodes/block/entity/LargeHeartBudBlockEntity.java",
|
||||||
|
"src/main/resources/assets/heartgeodes/models/item/large_heart_bud.json",
|
||||||
|
"src/main/java/net/seaswimmerthefsh/heartgeodes/block/LargeHeartBudBlock.java"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "MediumHeartBud",
|
||||||
|
"type": "block",
|
||||||
|
"sortid": 10,
|
||||||
|
"compiles": true,
|
||||||
|
"locked_code": false,
|
||||||
|
"registry_name": "medium_heart_bud",
|
||||||
|
"metadata": {
|
||||||
|
"files": [
|
||||||
|
"src/main/resources/assets/heartgeodes/blockstates/medium_heart_bud.json",
|
||||||
|
"src/main/java/net/seaswimmerthefsh/heartgeodes/block/entity/MediumHeartBudBlockEntity.java",
|
||||||
|
"src/main/resources/assets/heartgeodes/models/item/medium_heart_bud.json",
|
||||||
|
"src/main/java/net/seaswimmerthefsh/heartgeodes/block/MediumHeartBudBlock.java",
|
||||||
|
"src/main/resources/assets/heartgeodes/models/block/medium_heart_bud.json"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SmallHeartBud",
|
||||||
|
"type": "block",
|
||||||
|
"sortid": 11,
|
||||||
|
"compiles": true,
|
||||||
|
"locked_code": false,
|
||||||
|
"registry_name": "small_heart_bud",
|
||||||
|
"metadata": {
|
||||||
|
"files": [
|
||||||
|
"src/main/resources/assets/heartgeodes/blockstates/small_heart_bud.json",
|
||||||
|
"src/main/java/net/seaswimmerthefsh/heartgeodes/block/entity/SmallHeartBudBlockEntity.java",
|
||||||
|
"src/main/resources/assets/heartgeodes/models/block/small_heart_bud.json",
|
||||||
|
"src/main/java/net/seaswimmerthefsh/heartgeodes/block/SmallHeartBudBlock.java",
|
||||||
|
"src/main/resources/assets/heartgeodes/models/item/small_heart_bud.json"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "InertBuddingAmethyst",
|
||||||
|
"type": "block",
|
||||||
|
"sortid": 12,
|
||||||
|
"compiles": true,
|
||||||
|
"locked_code": false,
|
||||||
|
"registry_name": "inert_budding_amethyst",
|
||||||
|
"metadata": {
|
||||||
|
"files": [
|
||||||
|
"src/main/java/net/seaswimmerthefsh/heartgeodes/block/InertBuddingAmethystBlock.java",
|
||||||
|
"src/main/resources/assets/heartgeodes/models/block/inert_budding_amethyst.json",
|
||||||
|
"src/main/resources/assets/heartgeodes/blockstates/inert_budding_amethyst.json",
|
||||||
|
"src/main/resources/assets/heartgeodes/models/item/inert_budding_amethyst.json"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"variable_elements": [],
|
"variable_elements": [],
|
||||||
|
@ -124,10 +174,13 @@
|
||||||
"language_map": {
|
"language_map": {
|
||||||
"en_us": {
|
"en_us": {
|
||||||
"block.heartgeodes.budding_heart_block": "Budding Heart Block",
|
"block.heartgeodes.budding_heart_block": "Budding Heart Block",
|
||||||
|
"block.heartgeodes.inert_budding_amethyst": "Inert Budding Amethyst",
|
||||||
|
"block.heartgeodes.small_heart_bud": "Small Heart Bud",
|
||||||
"block.heartgeodes.heart_cluster": "Heart Cluster",
|
"block.heartgeodes.heart_cluster": "Heart Cluster",
|
||||||
"block.heartgeodes.heart_block": "Heart Block",
|
"block.heartgeodes.heart_block": "Heart Block",
|
||||||
"item_group.heartgeodes.heart_geodes": "Heart Geodes",
|
"item_group.heartgeodes.heart_geodes": "Heart Geodes",
|
||||||
"block.heartgeodes.large_heart_bud": "Large Heart Bud"
|
"block.heartgeodes.large_heart_bud": "Large Heart Bud",
|
||||||
|
"block.heartgeodes.medium_heart_bud": "Medium Heart Bud"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"foldersRoot": {
|
"foldersRoot": {
|
||||||
|
|
|
@ -1,60 +0,0 @@
|
||||||
{
|
|
||||||
"textures": {
|
|
||||||
"particle": "Desktop/ice_crystal_3",
|
|
||||||
"crystal": "Desktop/ice_crystal_3"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"gui": {
|
|
||||||
"rotation": [ 30, 225, 0 ],
|
|
||||||
"translation": [ 0, 0, 0],
|
|
||||||
"scale":[ 0.625, 0.625, 0.625 ]
|
|
||||||
},
|
|
||||||
"ground": {
|
|
||||||
"rotation": [ 0, 0, 0 ],
|
|
||||||
"translation": [ 0, 3, 0],
|
|
||||||
"scale":[ 0.25, 0.25, 0.25 ]
|
|
||||||
},
|
|
||||||
"fixed": {
|
|
||||||
"rotation": [ 0, 0, 0 ],
|
|
||||||
"translation": [ 0, 0, 0],
|
|
||||||
"scale":[ 0.5, 0.5, 0.5 ]
|
|
||||||
},
|
|
||||||
"thirdperson_righthand": {
|
|
||||||
"rotation": [ 75, 45, 0 ],
|
|
||||||
"translation": [ 0, 2.5, 0],
|
|
||||||
"scale": [ 0.375, 0.375, 0.375 ]
|
|
||||||
},
|
|
||||||
"firstperson_righthand": {
|
|
||||||
"rotation": [ 0, 45, 0 ],
|
|
||||||
"translation": [ 0, 0, 0 ],
|
|
||||||
"scale": [ 0.40, 0.40, 0.40 ]
|
|
||||||
},
|
|
||||||
"firstperson_lefthand": {
|
|
||||||
"rotation": [ 0, 225, 0 ],
|
|
||||||
"translation": [ 0, 0, 0 ],
|
|
||||||
"scale": [ 0.40, 0.40, 0.40 ]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"name": "crystal1",
|
|
||||||
"from": [8, 0, 0],
|
|
||||||
"to": [8, 16, 16],
|
|
||||||
"rotation": {"angle": 45, "axis": "z", "origin": [8, 8, 8]},
|
|
||||||
"faces": {
|
|
||||||
"east": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#crystal"},
|
|
||||||
"west": {"uv": [0, 16, 16, 0], "rotation": 270, "texture": "#crystal"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "crystal2",
|
|
||||||
"from": [8, 0, 0],
|
|
||||||
"to": [8, 16, 16],
|
|
||||||
"rotation": {"angle": -45, "axis": "z", "origin": [8, 8, 8]},
|
|
||||||
"faces": {
|
|
||||||
"east": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#crystal"},
|
|
||||||
"west": {"uv": [0, 16, 16, 0], "rotation": 270, "texture": "#crystal"}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
{
|
|
||||||
"mappings": {
|
|
||||||
"default": {
|
|
||||||
"map": {
|
|
||||||
"crystal": "smallheartbud"
|
|
||||||
},
|
|
||||||
"name": "default"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,60 +0,0 @@
|
||||||
{
|
|
||||||
"textures": {
|
|
||||||
"particle": "Desktop/ice_crystal_3",
|
|
||||||
"crystal": "Desktop/ice_crystal_3"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"gui": {
|
|
||||||
"rotation": [ 30, 225, 0 ],
|
|
||||||
"translation": [ 0, 0, 0],
|
|
||||||
"scale":[ 0.625, 0.625, 0.625 ]
|
|
||||||
},
|
|
||||||
"ground": {
|
|
||||||
"rotation": [ 0, 0, 0 ],
|
|
||||||
"translation": [ 0, 3, 0],
|
|
||||||
"scale":[ 0.25, 0.25, 0.25 ]
|
|
||||||
},
|
|
||||||
"fixed": {
|
|
||||||
"rotation": [ 0, 0, 0 ],
|
|
||||||
"translation": [ 0, 0, 0],
|
|
||||||
"scale":[ 0.5, 0.5, 0.5 ]
|
|
||||||
},
|
|
||||||
"thirdperson_righthand": {
|
|
||||||
"rotation": [ 75, 45, 0 ],
|
|
||||||
"translation": [ 0, 2.5, 0],
|
|
||||||
"scale": [ 0.375, 0.375, 0.375 ]
|
|
||||||
},
|
|
||||||
"firstperson_righthand": {
|
|
||||||
"rotation": [ 0, 45, 0 ],
|
|
||||||
"translation": [ 0, 0, 0 ],
|
|
||||||
"scale": [ 0.40, 0.40, 0.40 ]
|
|
||||||
},
|
|
||||||
"firstperson_lefthand": {
|
|
||||||
"rotation": [ 0, 225, 0 ],
|
|
||||||
"translation": [ 0, 0, 0 ],
|
|
||||||
"scale": [ 0.40, 0.40, 0.40 ]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"name": "crystal1",
|
|
||||||
"from": [8, 0, 0],
|
|
||||||
"to": [8, 16, 16],
|
|
||||||
"rotation": {"angle": 45, "axis": "z", "origin": [8, 8, 8]},
|
|
||||||
"faces": {
|
|
||||||
"east": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#crystal"},
|
|
||||||
"west": {"uv": [0, 16, 16, 0], "rotation": 270, "texture": "#crystal"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "crystal2",
|
|
||||||
"from": [8, 0, 0],
|
|
||||||
"to": [8, 16, 16],
|
|
||||||
"rotation": {"angle": -45, "axis": "z", "origin": [8, 8, 8]},
|
|
||||||
"faces": {
|
|
||||||
"east": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#crystal"},
|
|
||||||
"west": {"uv": [0, 16, 16, 0], "rotation": 270, "texture": "#crystal"}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
{
|
|
||||||
"mappings": {
|
|
||||||
"default": {
|
|
||||||
"map": {
|
|
||||||
"crystal": "mediumheartbud"
|
|
||||||
},
|
|
||||||
"name": "default"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,60 +0,0 @@
|
||||||
{
|
|
||||||
"textures": {
|
|
||||||
"particle": "Desktop/ice_crystal_3",
|
|
||||||
"crystal": "Desktop/ice_crystal_3"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"gui": {
|
|
||||||
"rotation": [ 30, 225, 0 ],
|
|
||||||
"translation": [ 0, 0, 0],
|
|
||||||
"scale":[ 0.625, 0.625, 0.625 ]
|
|
||||||
},
|
|
||||||
"ground": {
|
|
||||||
"rotation": [ 0, 0, 0 ],
|
|
||||||
"translation": [ 0, 3, 0],
|
|
||||||
"scale":[ 0.25, 0.25, 0.25 ]
|
|
||||||
},
|
|
||||||
"fixed": {
|
|
||||||
"rotation": [ 0, 0, 0 ],
|
|
||||||
"translation": [ 0, 0, 0],
|
|
||||||
"scale":[ 0.5, 0.5, 0.5 ]
|
|
||||||
},
|
|
||||||
"thirdperson_righthand": {
|
|
||||||
"rotation": [ 75, 45, 0 ],
|
|
||||||
"translation": [ 0, 2.5, 0],
|
|
||||||
"scale": [ 0.375, 0.375, 0.375 ]
|
|
||||||
},
|
|
||||||
"firstperson_righthand": {
|
|
||||||
"rotation": [ 0, 45, 0 ],
|
|
||||||
"translation": [ 0, 0, 0 ],
|
|
||||||
"scale": [ 0.40, 0.40, 0.40 ]
|
|
||||||
},
|
|
||||||
"firstperson_lefthand": {
|
|
||||||
"rotation": [ 0, 225, 0 ],
|
|
||||||
"translation": [ 0, 0, 0 ],
|
|
||||||
"scale": [ 0.40, 0.40, 0.40 ]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"name": "crystal1",
|
|
||||||
"from": [8, 0, 0],
|
|
||||||
"to": [8, 16, 16],
|
|
||||||
"rotation": {"angle": 45, "axis": "z", "origin": [8, 8, 8]},
|
|
||||||
"faces": {
|
|
||||||
"east": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#crystal"},
|
|
||||||
"west": {"uv": [0, 16, 16, 0], "rotation": 270, "texture": "#crystal"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "crystal2",
|
|
||||||
"from": [8, 0, 0],
|
|
||||||
"to": [8, 16, 16],
|
|
||||||
"rotation": {"angle": -45, "axis": "z", "origin": [8, 8, 8]},
|
|
||||||
"faces": {
|
|
||||||
"east": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#crystal"},
|
|
||||||
"west": {"uv": [0, 16, 16, 0], "rotation": 270, "texture": "#crystal"}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
{
|
|
||||||
"mappings": {
|
|
||||||
"default": {
|
|
||||||
"map": {
|
|
||||||
"crystal": "largeheartbud"
|
|
||||||
},
|
|
||||||
"name": "default"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,60 +0,0 @@
|
||||||
{
|
|
||||||
"textures": {
|
|
||||||
"particle": "Desktop/ice_crystal_3",
|
|
||||||
"crystal": "Desktop/ice_crystal_3"
|
|
||||||
},
|
|
||||||
"display": {
|
|
||||||
"gui": {
|
|
||||||
"rotation": [ 30, 225, 0 ],
|
|
||||||
"translation": [ 0, 0, 0],
|
|
||||||
"scale":[ 0.625, 0.625, 0.625 ]
|
|
||||||
},
|
|
||||||
"ground": {
|
|
||||||
"rotation": [ 0, 0, 0 ],
|
|
||||||
"translation": [ 0, 3, 0],
|
|
||||||
"scale":[ 0.25, 0.25, 0.25 ]
|
|
||||||
},
|
|
||||||
"fixed": {
|
|
||||||
"rotation": [ 0, 0, 0 ],
|
|
||||||
"translation": [ 0, 0, 0],
|
|
||||||
"scale":[ 0.5, 0.5, 0.5 ]
|
|
||||||
},
|
|
||||||
"thirdperson_righthand": {
|
|
||||||
"rotation": [ 75, 45, 0 ],
|
|
||||||
"translation": [ 0, 2.5, 0],
|
|
||||||
"scale": [ 0.375, 0.375, 0.375 ]
|
|
||||||
},
|
|
||||||
"firstperson_righthand": {
|
|
||||||
"rotation": [ 0, 45, 0 ],
|
|
||||||
"translation": [ 0, 0, 0 ],
|
|
||||||
"scale": [ 0.40, 0.40, 0.40 ]
|
|
||||||
},
|
|
||||||
"firstperson_lefthand": {
|
|
||||||
"rotation": [ 0, 225, 0 ],
|
|
||||||
"translation": [ 0, 0, 0 ],
|
|
||||||
"scale": [ 0.40, 0.40, 0.40 ]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"elements": [
|
|
||||||
{
|
|
||||||
"name": "crystal1",
|
|
||||||
"from": [8, 0, 0],
|
|
||||||
"to": [8, 16, 16],
|
|
||||||
"rotation": {"angle": 45, "axis": "z", "origin": [8, 8, 8]},
|
|
||||||
"faces": {
|
|
||||||
"east": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#crystal"},
|
|
||||||
"west": {"uv": [0, 16, 16, 0], "rotation": 270, "texture": "#crystal"}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "crystal2",
|
|
||||||
"from": [8, 0, 0],
|
|
||||||
"to": [8, 16, 16],
|
|
||||||
"rotation": {"angle": -45, "axis": "z", "origin": [8, 8, 8]},
|
|
||||||
"faces": {
|
|
||||||
"east": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#crystal"},
|
|
||||||
"west": {"uv": [0, 16, 16, 0], "rotation": 270, "texture": "#crystal"}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
{
|
|
||||||
"mappings": {
|
|
||||||
"default": {
|
|
||||||
"map": {
|
|
||||||
"crystal": "heartcluster"
|
|
||||||
},
|
|
||||||
"name": "default"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -3,12 +3,15 @@ package net.seaswimmerthefsh.heartgeodes.block;
|
||||||
|
|
||||||
import net.seaswimmerthefsh.heartgeodes.block.entity.HeartClusterBlockEntity;
|
import net.seaswimmerthefsh.heartgeodes.block.entity.HeartClusterBlockEntity;
|
||||||
|
|
||||||
|
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.level.storage.loot.LootParams;
|
import net.minecraft.world.level.storage.loot.LootParams;
|
||||||
import net.minecraft.world.level.material.MapColor;
|
import net.minecraft.world.level.material.MapColor;
|
||||||
import net.minecraft.world.level.material.Fluids;
|
import net.minecraft.world.level.material.Fluids;
|
||||||
import net.minecraft.world.level.material.FluidState;
|
import net.minecraft.world.level.material.FluidState;
|
||||||
import net.minecraft.world.level.block.state.properties.NoteBlockInstrument;
|
import net.minecraft.world.level.block.state.properties.NoteBlockInstrument;
|
||||||
import net.minecraft.world.level.block.state.properties.DirectionProperty;
|
import net.minecraft.world.level.block.state.properties.EnumProperty;
|
||||||
import net.minecraft.world.level.block.state.properties.BooleanProperty;
|
import net.minecraft.world.level.block.state.properties.BooleanProperty;
|
||||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||||
import net.minecraft.world.level.block.state.StateDefinition;
|
import net.minecraft.world.level.block.state.StateDefinition;
|
||||||
|
@ -18,9 +21,7 @@ import net.minecraft.world.level.block.entity.BlockEntity;
|
||||||
import net.minecraft.world.level.block.SoundType;
|
import net.minecraft.world.level.block.SoundType;
|
||||||
import net.minecraft.world.level.block.SimpleWaterloggedBlock;
|
import net.minecraft.world.level.block.SimpleWaterloggedBlock;
|
||||||
import net.minecraft.world.level.block.Rotation;
|
import net.minecraft.world.level.block.Rotation;
|
||||||
import net.minecraft.world.level.block.Mirror;
|
|
||||||
import net.minecraft.world.level.block.EntityBlock;
|
import net.minecraft.world.level.block.EntityBlock;
|
||||||
import net.minecraft.world.level.block.DirectionalBlock;
|
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
import net.minecraft.world.level.LevelAccessor;
|
import net.minecraft.world.level.LevelAccessor;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
|
@ -37,12 +38,13 @@ import java.util.List;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
public class HeartClusterBlock extends Block implements SimpleWaterloggedBlock, EntityBlock {
|
public class HeartClusterBlock extends Block implements SimpleWaterloggedBlock, EntityBlock {
|
||||||
public static final DirectionProperty FACING = DirectionalBlock.FACING;
|
public static final EnumProperty<Direction.Axis> AXIS = BlockStateProperties.AXIS;
|
||||||
public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED;
|
public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED;
|
||||||
|
|
||||||
public HeartClusterBlock() {
|
public HeartClusterBlock() {
|
||||||
super(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.HAT).mapColor(MapColor.TERRACOTTA_RED).sound(SoundType.AMETHYST_CLUSTER).strength(1f, 10f).requiresCorrectToolForDrops());
|
super(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.HAT).mapColor(MapColor.TERRACOTTA_RED).sound(SoundType.AMETHYST_CLUSTER).strength(1f, 10f).requiresCorrectToolForDrops().noOcclusion()
|
||||||
this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(WATERLOGGED, false));
|
.isRedstoneConductor((bs, br, bp) -> false));
|
||||||
|
this.registerDefaultState(this.stateDefinition.any().setValue(AXIS, Direction.Axis.Y).setValue(WATERLOGGED, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -55,23 +57,41 @@ public class HeartClusterBlock extends Block implements SimpleWaterloggedBlock,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VoxelShape getVisualShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) {
|
||||||
|
return Shapes.empty();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) {
|
||||||
|
return switch (state.getValue(AXIS)) {
|
||||||
|
case X -> box(0, 0.7, 0.7, 15, 15.3, 15.3);
|
||||||
|
case Y -> box(0.7, 0, 0.7, 15.3, 15, 15.3);
|
||||||
|
case Z -> box(0.7, 0.7, 1, 15.3, 15.3, 16);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
|
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
|
||||||
builder.add(FACING, WATERLOGGED);
|
builder.add(AXIS, WATERLOGGED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BlockState getStateForPlacement(BlockPlaceContext context) {
|
public BlockState getStateForPlacement(BlockPlaceContext context) {
|
||||||
boolean flag = context.getLevel().getFluidState(context.getClickedPos()).getType() == Fluids.WATER;
|
boolean flag = context.getLevel().getFluidState(context.getClickedPos()).getType() == Fluids.WATER;
|
||||||
return this.defaultBlockState().setValue(FACING, context.getNearestLookingDirection().getOpposite()).setValue(WATERLOGGED, flag);
|
return this.defaultBlockState().setValue(AXIS, context.getClickedFace().getAxis()).setValue(WATERLOGGED, flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public BlockState rotate(BlockState state, Rotation rot) {
|
public BlockState rotate(BlockState state, Rotation rot) {
|
||||||
return state.setValue(FACING, rot.rotate(state.getValue(FACING)));
|
if (rot == Rotation.CLOCKWISE_90 || rot == Rotation.COUNTERCLOCKWISE_90) {
|
||||||
|
if (state.getValue(AXIS) == Direction.Axis.X) {
|
||||||
|
return state.setValue(AXIS, Direction.Axis.Z);
|
||||||
|
} else if (state.getValue(AXIS) == Direction.Axis.Z) {
|
||||||
|
return state.setValue(AXIS, Direction.Axis.X);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
public BlockState mirror(BlockState state, Mirror mirrorIn) {
|
return state;
|
||||||
return state.rotate(mirrorIn.getRotation(state.getValue(FACING)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
|
||||||
|
package net.seaswimmerthefsh.heartgeodes.block;
|
||||||
|
|
||||||
|
import net.minecraft.world.level.storage.loot.LootParams;
|
||||||
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||||
|
import net.minecraft.world.level.block.SoundType;
|
||||||
|
import net.minecraft.world.level.block.Block;
|
||||||
|
import net.minecraft.world.level.BlockGetter;
|
||||||
|
import net.minecraft.world.item.PickaxeItem;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Collections;
|
||||||
|
|
||||||
|
public class InertBuddingAmethystBlock extends Block {
|
||||||
|
public InertBuddingAmethystBlock() {
|
||||||
|
super(BlockBehaviour.Properties.of().sound(SoundType.AMETHYST).strength(1f, 10f).requiresCorrectToolForDrops());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getLightBlock(BlockState state, BlockGetter worldIn, BlockPos pos) {
|
||||||
|
return 15;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canHarvestBlock(BlockState state, BlockGetter world, BlockPos pos, Player player) {
|
||||||
|
if (player.getInventory().getSelected().getItem() instanceof PickaxeItem tieredItem)
|
||||||
|
return tieredItem.getTier().getLevel() >= 1;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ItemStack> getDrops(BlockState state, LootParams.Builder builder) {
|
||||||
|
List<ItemStack> dropsOriginal = super.getDrops(state, builder);
|
||||||
|
if (!dropsOriginal.isEmpty())
|
||||||
|
return dropsOriginal;
|
||||||
|
return Collections.singletonList(new ItemStack(this, 1));
|
||||||
|
}
|
||||||
|
}
|
|
@ -7,18 +7,22 @@ import net.minecraft.world.phys.shapes.VoxelShape;
|
||||||
import net.minecraft.world.phys.shapes.Shapes;
|
import net.minecraft.world.phys.shapes.Shapes;
|
||||||
import net.minecraft.world.phys.shapes.CollisionContext;
|
import net.minecraft.world.phys.shapes.CollisionContext;
|
||||||
import net.minecraft.world.level.material.MapColor;
|
import net.minecraft.world.level.material.MapColor;
|
||||||
|
import net.minecraft.world.level.material.Fluids;
|
||||||
|
import net.minecraft.world.level.material.FluidState;
|
||||||
import net.minecraft.world.level.block.state.properties.NoteBlockInstrument;
|
import net.minecraft.world.level.block.state.properties.NoteBlockInstrument;
|
||||||
import net.minecraft.world.level.block.state.properties.DirectionProperty;
|
import net.minecraft.world.level.block.state.properties.EnumProperty;
|
||||||
|
import net.minecraft.world.level.block.state.properties.BooleanProperty;
|
||||||
|
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||||
import net.minecraft.world.level.block.state.StateDefinition;
|
import net.minecraft.world.level.block.state.StateDefinition;
|
||||||
import net.minecraft.world.level.block.state.BlockState;
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||||
import net.minecraft.world.level.block.SoundType;
|
import net.minecraft.world.level.block.SoundType;
|
||||||
|
import net.minecraft.world.level.block.SimpleWaterloggedBlock;
|
||||||
import net.minecraft.world.level.block.Rotation;
|
import net.minecraft.world.level.block.Rotation;
|
||||||
import net.minecraft.world.level.block.Mirror;
|
|
||||||
import net.minecraft.world.level.block.EntityBlock;
|
import net.minecraft.world.level.block.EntityBlock;
|
||||||
import net.minecraft.world.level.block.DirectionalBlock;
|
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
|
import net.minecraft.world.level.LevelAccessor;
|
||||||
import net.minecraft.world.level.Level;
|
import net.minecraft.world.level.Level;
|
||||||
import net.minecraft.world.level.BlockGetter;
|
import net.minecraft.world.level.BlockGetter;
|
||||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||||
|
@ -28,18 +32,19 @@ import net.minecraft.world.MenuProvider;
|
||||||
import net.minecraft.core.Direction;
|
import net.minecraft.core.Direction;
|
||||||
import net.minecraft.core.BlockPos;
|
import net.minecraft.core.BlockPos;
|
||||||
|
|
||||||
public class LargeHeartBudBlock extends Block implements EntityBlock {
|
public class LargeHeartBudBlock extends Block implements SimpleWaterloggedBlock, EntityBlock {
|
||||||
public static final DirectionProperty FACING = DirectionalBlock.FACING;
|
public static final EnumProperty<Direction.Axis> AXIS = BlockStateProperties.AXIS;
|
||||||
|
public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED;
|
||||||
|
|
||||||
public LargeHeartBudBlock() {
|
public LargeHeartBudBlock() {
|
||||||
super(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.HAT).mapColor(MapColor.TERRACOTTA_RED).sound(SoundType.AMETHYST_CLUSTER).strength(1f, 10f).requiresCorrectToolForDrops().noOcclusion()
|
super(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.HAT).mapColor(MapColor.TERRACOTTA_RED).sound(SoundType.AMETHYST_CLUSTER).strength(1f, 10f).requiresCorrectToolForDrops().noOcclusion()
|
||||||
.isRedstoneConductor((bs, br, bp) -> false).noLootTable());
|
.isRedstoneConductor((bs, br, bp) -> false).noLootTable());
|
||||||
this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH));
|
this.registerDefaultState(this.stateDefinition.any().setValue(AXIS, Direction.Axis.Y).setValue(WATERLOGGED, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean propagatesSkylightDown(BlockState state, BlockGetter reader, BlockPos pos) {
|
public boolean propagatesSkylightDown(BlockState state, BlockGetter reader, BlockPos pos) {
|
||||||
return true;
|
return state.getFluidState().isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -54,32 +59,47 @@ public class LargeHeartBudBlock extends Block implements EntityBlock {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) {
|
public VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) {
|
||||||
return switch (state.getValue(FACING)) {
|
return switch (state.getValue(AXIS)) {
|
||||||
default -> box(15.125, 0.125, 15, 15.875, 0.875, 16);
|
case X -> box(0, 2.6, 2.6, 10, 13.4, 13.4);
|
||||||
case NORTH -> box(0.125, 0.125, 0, 0.875, 0.875, 1);
|
case Y -> box(2.6, 0, 2.6, 13.4, 10, 13.4);
|
||||||
case EAST -> box(15, 0.125, 0.125, 16, 0.875, 0.875);
|
case Z -> box(2.6, 2.6, 6, 13.4, 13.4, 16);
|
||||||
case WEST -> box(0, 0.125, 15.125, 1, 0.875, 15.875);
|
|
||||||
case UP -> box(0.125, 15, 0.125, 0.875, 16, 0.875);
|
|
||||||
case DOWN -> box(0.125, 0, 15.125, 0.875, 1, 15.875);
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
|
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
|
||||||
builder.add(FACING);
|
builder.add(AXIS, WATERLOGGED);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BlockState getStateForPlacement(BlockPlaceContext context) {
|
public BlockState getStateForPlacement(BlockPlaceContext context) {
|
||||||
return this.defaultBlockState().setValue(FACING, context.getNearestLookingDirection().getOpposite());
|
boolean flag = context.getLevel().getFluidState(context.getClickedPos()).getType() == Fluids.WATER;
|
||||||
|
return this.defaultBlockState().setValue(AXIS, context.getClickedFace().getAxis()).setValue(WATERLOGGED, flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public BlockState rotate(BlockState state, Rotation rot) {
|
public BlockState rotate(BlockState state, Rotation rot) {
|
||||||
return state.setValue(FACING, rot.rotate(state.getValue(FACING)));
|
if (rot == Rotation.CLOCKWISE_90 || rot == Rotation.COUNTERCLOCKWISE_90) {
|
||||||
|
if (state.getValue(AXIS) == Direction.Axis.X) {
|
||||||
|
return state.setValue(AXIS, Direction.Axis.Z);
|
||||||
|
} else if (state.getValue(AXIS) == Direction.Axis.Z) {
|
||||||
|
return state.setValue(AXIS, Direction.Axis.X);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockState mirror(BlockState state, Mirror mirrorIn) {
|
@Override
|
||||||
return state.rotate(mirrorIn.getRotation(state.getValue(FACING)));
|
public FluidState getFluidState(BlockState state) {
|
||||||
|
return state.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockState updateShape(BlockState state, Direction facing, BlockState facingState, LevelAccessor world, BlockPos currentPos, BlockPos facingPos) {
|
||||||
|
if (state.getValue(WATERLOGGED)) {
|
||||||
|
world.scheduleTick(currentPos, Fluids.WATER, Fluids.WATER.getTickDelay(world));
|
||||||
|
}
|
||||||
|
return super.updateShape(state, facing, facingState, world, currentPos, facingPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -0,0 +1,129 @@
|
||||||
|
|
||||||
|
package net.seaswimmerthefsh.heartgeodes.block;
|
||||||
|
|
||||||
|
import net.seaswimmerthefsh.heartgeodes.block.entity.MediumHeartBudBlockEntity;
|
||||||
|
|
||||||
|
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.level.material.MapColor;
|
||||||
|
import net.minecraft.world.level.material.Fluids;
|
||||||
|
import net.minecraft.world.level.material.FluidState;
|
||||||
|
import net.minecraft.world.level.block.state.properties.NoteBlockInstrument;
|
||||||
|
import net.minecraft.world.level.block.state.properties.EnumProperty;
|
||||||
|
import net.minecraft.world.level.block.state.properties.BooleanProperty;
|
||||||
|
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||||
|
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.SimpleWaterloggedBlock;
|
||||||
|
import net.minecraft.world.level.block.Rotation;
|
||||||
|
import net.minecraft.world.level.block.EntityBlock;
|
||||||
|
import net.minecraft.world.level.block.Block;
|
||||||
|
import net.minecraft.world.level.LevelAccessor;
|
||||||
|
import net.minecraft.world.level.Level;
|
||||||
|
import net.minecraft.world.level.BlockGetter;
|
||||||
|
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||||
|
import net.minecraft.world.item.PickaxeItem;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.MenuProvider;
|
||||||
|
import net.minecraft.core.Direction;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
|
||||||
|
public class MediumHeartBudBlock extends Block implements SimpleWaterloggedBlock, EntityBlock {
|
||||||
|
public static final EnumProperty<Direction.Axis> AXIS = BlockStateProperties.AXIS;
|
||||||
|
public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED;
|
||||||
|
|
||||||
|
public MediumHeartBudBlock() {
|
||||||
|
super(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.HAT).mapColor(MapColor.TERRACOTTA_RED).sound(SoundType.AMETHYST_CLUSTER).strength(1f, 10f).requiresCorrectToolForDrops().noOcclusion()
|
||||||
|
.isRedstoneConductor((bs, br, bp) -> false).noLootTable());
|
||||||
|
this.registerDefaultState(this.stateDefinition.any().setValue(AXIS, Direction.Axis.Y).setValue(WATERLOGGED, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean propagatesSkylightDown(BlockState state, BlockGetter reader, BlockPos pos) {
|
||||||
|
return state.getFluidState().isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
@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
|
||||||
|
public VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) {
|
||||||
|
return switch (state.getValue(AXIS)) {
|
||||||
|
case X -> box(0, 3.5, 3.5, 7, 12.5, 12.5);
|
||||||
|
case Y -> box(3.5, 0, 3.5, 12.5, 7, 12.5);
|
||||||
|
case Z -> box(3.5, 3.5, 9, 12.5, 12.5, 16);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
|
||||||
|
builder.add(AXIS, WATERLOGGED);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockState getStateForPlacement(BlockPlaceContext context) {
|
||||||
|
boolean flag = context.getLevel().getFluidState(context.getClickedPos()).getType() == Fluids.WATER;
|
||||||
|
return this.defaultBlockState().setValue(AXIS, context.getClickedFace().getAxis()).setValue(WATERLOGGED, flag);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockState rotate(BlockState state, Rotation rot) {
|
||||||
|
if (rot == Rotation.CLOCKWISE_90 || rot == Rotation.COUNTERCLOCKWISE_90) {
|
||||||
|
if (state.getValue(AXIS) == Direction.Axis.X) {
|
||||||
|
return state.setValue(AXIS, Direction.Axis.Z);
|
||||||
|
} else if (state.getValue(AXIS) == Direction.Axis.Z) {
|
||||||
|
return state.setValue(AXIS, Direction.Axis.X);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FluidState getFluidState(BlockState state) {
|
||||||
|
return state.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockState updateShape(BlockState state, Direction facing, BlockState facingState, LevelAccessor world, BlockPos currentPos, BlockPos facingPos) {
|
||||||
|
if (state.getValue(WATERLOGGED)) {
|
||||||
|
world.scheduleTick(currentPos, Fluids.WATER, Fluids.WATER.getTickDelay(world));
|
||||||
|
}
|
||||||
|
return super.updateShape(state, facing, facingState, world, currentPos, facingPos);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canHarvestBlock(BlockState state, BlockGetter world, BlockPos pos, Player player) {
|
||||||
|
if (player.getInventory().getSelected().getItem() instanceof PickaxeItem tieredItem)
|
||||||
|
return tieredItem.getTier().getLevel() >= 1;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@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 MediumHeartBudBlockEntity(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);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,129 @@
|
||||||
|
|
||||||
|
package net.seaswimmerthefsh.heartgeodes.block;
|
||||||
|
|
||||||
|
import net.seaswimmerthefsh.heartgeodes.block.entity.SmallHeartBudBlockEntity;
|
||||||
|
|
||||||
|
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.level.material.MapColor;
|
||||||
|
import net.minecraft.world.level.material.Fluids;
|
||||||
|
import net.minecraft.world.level.material.FluidState;
|
||||||
|
import net.minecraft.world.level.block.state.properties.NoteBlockInstrument;
|
||||||
|
import net.minecraft.world.level.block.state.properties.EnumProperty;
|
||||||
|
import net.minecraft.world.level.block.state.properties.BooleanProperty;
|
||||||
|
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||||
|
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.SimpleWaterloggedBlock;
|
||||||
|
import net.minecraft.world.level.block.Rotation;
|
||||||
|
import net.minecraft.world.level.block.EntityBlock;
|
||||||
|
import net.minecraft.world.level.block.Block;
|
||||||
|
import net.minecraft.world.level.LevelAccessor;
|
||||||
|
import net.minecraft.world.level.Level;
|
||||||
|
import net.minecraft.world.level.BlockGetter;
|
||||||
|
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||||
|
import net.minecraft.world.item.PickaxeItem;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.MenuProvider;
|
||||||
|
import net.minecraft.core.Direction;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
|
||||||
|
public class SmallHeartBudBlock extends Block implements SimpleWaterloggedBlock, EntityBlock {
|
||||||
|
public static final EnumProperty<Direction.Axis> AXIS = BlockStateProperties.AXIS;
|
||||||
|
public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED;
|
||||||
|
|
||||||
|
public SmallHeartBudBlock() {
|
||||||
|
super(BlockBehaviour.Properties.of().instrument(NoteBlockInstrument.HAT).mapColor(MapColor.TERRACOTTA_RED).sound(SoundType.AMETHYST_CLUSTER).strength(1f, 10f).requiresCorrectToolForDrops().noOcclusion()
|
||||||
|
.isRedstoneConductor((bs, br, bp) -> false).noLootTable());
|
||||||
|
this.registerDefaultState(this.stateDefinition.any().setValue(AXIS, Direction.Axis.Y).setValue(WATERLOGGED, false));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean propagatesSkylightDown(BlockState state, BlockGetter reader, BlockPos pos) {
|
||||||
|
return state.getFluidState().isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
@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
|
||||||
|
public VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) {
|
||||||
|
return switch (state.getValue(AXIS)) {
|
||||||
|
case X -> box(0, 3.5, 3.5, 5, 12.5, 12.5);
|
||||||
|
case Y -> box(3.5, 0, 3.5, 12.5, 5, 12.5);
|
||||||
|
case Z -> box(3.5, 3.5, 11, 12.5, 12.5, 16);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
|
||||||
|
builder.add(AXIS, WATERLOGGED);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockState getStateForPlacement(BlockPlaceContext context) {
|
||||||
|
boolean flag = context.getLevel().getFluidState(context.getClickedPos()).getType() == Fluids.WATER;
|
||||||
|
return this.defaultBlockState().setValue(AXIS, context.getClickedFace().getAxis()).setValue(WATERLOGGED, flag);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockState rotate(BlockState state, Rotation rot) {
|
||||||
|
if (rot == Rotation.CLOCKWISE_90 || rot == Rotation.COUNTERCLOCKWISE_90) {
|
||||||
|
if (state.getValue(AXIS) == Direction.Axis.X) {
|
||||||
|
return state.setValue(AXIS, Direction.Axis.Z);
|
||||||
|
} else if (state.getValue(AXIS) == Direction.Axis.Z) {
|
||||||
|
return state.setValue(AXIS, Direction.Axis.X);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FluidState getFluidState(BlockState state) {
|
||||||
|
return state.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public BlockState updateShape(BlockState state, Direction facing, BlockState facingState, LevelAccessor world, BlockPos currentPos, BlockPos facingPos) {
|
||||||
|
if (state.getValue(WATERLOGGED)) {
|
||||||
|
world.scheduleTick(currentPos, Fluids.WATER, Fluids.WATER.getTickDelay(world));
|
||||||
|
}
|
||||||
|
return super.updateShape(state, facing, facingState, world, currentPos, facingPos);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canHarvestBlock(BlockState state, BlockGetter world, BlockPos pos, Player player) {
|
||||||
|
if (player.getInventory().getSelected().getItem() instanceof PickaxeItem tieredItem)
|
||||||
|
return tieredItem.getTier().getLevel() >= 1;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@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 SmallHeartBudBlockEntity(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);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,140 @@
|
||||||
|
package net.seaswimmerthefsh.heartgeodes.block.entity;
|
||||||
|
|
||||||
|
import net.seaswimmerthefsh.heartgeodes.init.HeartgeodesModBlockEntities;
|
||||||
|
|
||||||
|
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.ChestMenu;
|
||||||
|
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.nbt.CompoundTag;
|
||||||
|
import net.minecraft.core.NonNullList;
|
||||||
|
import net.minecraft.core.Direction;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
import java.util.stream.IntStream;
|
||||||
|
|
||||||
|
public class MediumHeartBudBlockEntity extends RandomizableContainerBlockEntity implements WorldlyContainer {
|
||||||
|
private NonNullList<ItemStack> stacks = NonNullList.<ItemStack>withSize(0, ItemStack.EMPTY);
|
||||||
|
private final LazyOptional<? extends IItemHandler>[] handlers = SidedInvWrapper.create(this, Direction.values());
|
||||||
|
|
||||||
|
public MediumHeartBudBlockEntity(BlockPos position, BlockState state) {
|
||||||
|
super(HeartgeodesModBlockEntities.MEDIUM_HEART_BUD.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("medium_heart_bud");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getMaxStackSize() {
|
||||||
|
return 64;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AbstractContainerMenu createMenu(int id, Inventory inventory) {
|
||||||
|
return ChestMenu.threeRows(id, inventory);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Component getDisplayName() {
|
||||||
|
return Component.literal("Medium Heart Bud");
|
||||||
|
}
|
||||||
|
|
||||||
|
@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();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,140 @@
|
||||||
|
package net.seaswimmerthefsh.heartgeodes.block.entity;
|
||||||
|
|
||||||
|
import net.seaswimmerthefsh.heartgeodes.init.HeartgeodesModBlockEntities;
|
||||||
|
|
||||||
|
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.ChestMenu;
|
||||||
|
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.nbt.CompoundTag;
|
||||||
|
import net.minecraft.core.NonNullList;
|
||||||
|
import net.minecraft.core.Direction;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
|
import java.util.stream.IntStream;
|
||||||
|
|
||||||
|
public class SmallHeartBudBlockEntity extends RandomizableContainerBlockEntity implements WorldlyContainer {
|
||||||
|
private NonNullList<ItemStack> stacks = NonNullList.<ItemStack>withSize(0, ItemStack.EMPTY);
|
||||||
|
private final LazyOptional<? extends IItemHandler>[] handlers = SidedInvWrapper.create(this, Direction.values());
|
||||||
|
|
||||||
|
public SmallHeartBudBlockEntity(BlockPos position, BlockState state) {
|
||||||
|
super(HeartgeodesModBlockEntities.SMALL_HEART_BUD.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("small_heart_bud");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getMaxStackSize() {
|
||||||
|
return 64;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AbstractContainerMenu createMenu(int id, Inventory inventory) {
|
||||||
|
return ChestMenu.threeRows(id, inventory);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Component getDisplayName() {
|
||||||
|
return Component.literal("Small Heart Bud");
|
||||||
|
}
|
||||||
|
|
||||||
|
@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();
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,6 +4,8 @@
|
||||||
*/
|
*/
|
||||||
package net.seaswimmerthefsh.heartgeodes.init;
|
package net.seaswimmerthefsh.heartgeodes.init;
|
||||||
|
|
||||||
|
import net.seaswimmerthefsh.heartgeodes.block.entity.SmallHeartBudBlockEntity;
|
||||||
|
import net.seaswimmerthefsh.heartgeodes.block.entity.MediumHeartBudBlockEntity;
|
||||||
import net.seaswimmerthefsh.heartgeodes.block.entity.LargeHeartBudBlockEntity;
|
import net.seaswimmerthefsh.heartgeodes.block.entity.LargeHeartBudBlockEntity;
|
||||||
import net.seaswimmerthefsh.heartgeodes.block.entity.HeartClusterBlockEntity;
|
import net.seaswimmerthefsh.heartgeodes.block.entity.HeartClusterBlockEntity;
|
||||||
import net.seaswimmerthefsh.heartgeodes.block.entity.BuddingHeartBlockBlockEntity;
|
import net.seaswimmerthefsh.heartgeodes.block.entity.BuddingHeartBlockBlockEntity;
|
||||||
|
@ -21,6 +23,8 @@ public class HeartgeodesModBlockEntities {
|
||||||
public static final RegistryObject<BlockEntityType<?>> BUDDING_HEART_BLOCK = register("budding_heart_block", HeartgeodesModBlocks.BUDDING_HEART_BLOCK, BuddingHeartBlockBlockEntity::new);
|
public static final RegistryObject<BlockEntityType<?>> BUDDING_HEART_BLOCK = register("budding_heart_block", HeartgeodesModBlocks.BUDDING_HEART_BLOCK, BuddingHeartBlockBlockEntity::new);
|
||||||
public static final RegistryObject<BlockEntityType<?>> HEART_CLUSTER = register("heart_cluster", HeartgeodesModBlocks.HEART_CLUSTER, HeartClusterBlockEntity::new);
|
public static final RegistryObject<BlockEntityType<?>> HEART_CLUSTER = register("heart_cluster", HeartgeodesModBlocks.HEART_CLUSTER, HeartClusterBlockEntity::new);
|
||||||
public static final RegistryObject<BlockEntityType<?>> LARGE_HEART_BUD = register("large_heart_bud", HeartgeodesModBlocks.LARGE_HEART_BUD, LargeHeartBudBlockEntity::new);
|
public static final RegistryObject<BlockEntityType<?>> LARGE_HEART_BUD = register("large_heart_bud", HeartgeodesModBlocks.LARGE_HEART_BUD, LargeHeartBudBlockEntity::new);
|
||||||
|
public static final RegistryObject<BlockEntityType<?>> MEDIUM_HEART_BUD = register("medium_heart_bud", HeartgeodesModBlocks.MEDIUM_HEART_BUD, MediumHeartBudBlockEntity::new);
|
||||||
|
public static final RegistryObject<BlockEntityType<?>> SMALL_HEART_BUD = register("small_heart_bud", HeartgeodesModBlocks.SMALL_HEART_BUD, SmallHeartBudBlockEntity::new);
|
||||||
|
|
||||||
private static RegistryObject<BlockEntityType<?>> register(String registryname, RegistryObject<Block> block, BlockEntityType.BlockEntitySupplier<?> supplier) {
|
private static RegistryObject<BlockEntityType<?>> register(String registryname, RegistryObject<Block> block, BlockEntityType.BlockEntitySupplier<?> supplier) {
|
||||||
return REGISTRY.register(registryname, () -> BlockEntityType.Builder.of(supplier, block.get()).build(null));
|
return REGISTRY.register(registryname, () -> BlockEntityType.Builder.of(supplier, block.get()).build(null));
|
||||||
|
|
|
@ -4,7 +4,10 @@
|
||||||
*/
|
*/
|
||||||
package net.seaswimmerthefsh.heartgeodes.init;
|
package net.seaswimmerthefsh.heartgeodes.init;
|
||||||
|
|
||||||
|
import net.seaswimmerthefsh.heartgeodes.block.SmallHeartBudBlock;
|
||||||
|
import net.seaswimmerthefsh.heartgeodes.block.MediumHeartBudBlock;
|
||||||
import net.seaswimmerthefsh.heartgeodes.block.LargeHeartBudBlock;
|
import net.seaswimmerthefsh.heartgeodes.block.LargeHeartBudBlock;
|
||||||
|
import net.seaswimmerthefsh.heartgeodes.block.InertBuddingAmethystBlock;
|
||||||
import net.seaswimmerthefsh.heartgeodes.block.HeartClusterBlock;
|
import net.seaswimmerthefsh.heartgeodes.block.HeartClusterBlock;
|
||||||
import net.seaswimmerthefsh.heartgeodes.block.HeartBlockBlock;
|
import net.seaswimmerthefsh.heartgeodes.block.HeartBlockBlock;
|
||||||
import net.seaswimmerthefsh.heartgeodes.block.BuddingHeartBlockBlock;
|
import net.seaswimmerthefsh.heartgeodes.block.BuddingHeartBlockBlock;
|
||||||
|
@ -22,4 +25,7 @@ public class HeartgeodesModBlocks {
|
||||||
public static final RegistryObject<Block> BUDDING_HEART_BLOCK = REGISTRY.register("budding_heart_block", () -> new BuddingHeartBlockBlock());
|
public static final RegistryObject<Block> BUDDING_HEART_BLOCK = REGISTRY.register("budding_heart_block", () -> new BuddingHeartBlockBlock());
|
||||||
public static final RegistryObject<Block> HEART_CLUSTER = REGISTRY.register("heart_cluster", () -> new HeartClusterBlock());
|
public static final RegistryObject<Block> HEART_CLUSTER = REGISTRY.register("heart_cluster", () -> new HeartClusterBlock());
|
||||||
public static final RegistryObject<Block> LARGE_HEART_BUD = REGISTRY.register("large_heart_bud", () -> new LargeHeartBudBlock());
|
public static final RegistryObject<Block> LARGE_HEART_BUD = REGISTRY.register("large_heart_bud", () -> new LargeHeartBudBlock());
|
||||||
|
public static final RegistryObject<Block> MEDIUM_HEART_BUD = REGISTRY.register("medium_heart_bud", () -> new MediumHeartBudBlock());
|
||||||
|
public static final RegistryObject<Block> SMALL_HEART_BUD = REGISTRY.register("small_heart_bud", () -> new SmallHeartBudBlock());
|
||||||
|
public static final RegistryObject<Block> INERT_BUDDING_AMETHYST = REGISTRY.register("inert_budding_amethyst", () -> new InertBuddingAmethystBlock());
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,9 @@ public class HeartgeodesModItems {
|
||||||
public static final RegistryObject<Item> BUDDING_HEART_BLOCK = block(HeartgeodesModBlocks.BUDDING_HEART_BLOCK);
|
public static final RegistryObject<Item> BUDDING_HEART_BLOCK = block(HeartgeodesModBlocks.BUDDING_HEART_BLOCK);
|
||||||
public static final RegistryObject<Item> HEART_CLUSTER = block(HeartgeodesModBlocks.HEART_CLUSTER);
|
public static final RegistryObject<Item> HEART_CLUSTER = block(HeartgeodesModBlocks.HEART_CLUSTER);
|
||||||
public static final RegistryObject<Item> LARGE_HEART_BUD = block(HeartgeodesModBlocks.LARGE_HEART_BUD);
|
public static final RegistryObject<Item> LARGE_HEART_BUD = block(HeartgeodesModBlocks.LARGE_HEART_BUD);
|
||||||
|
public static final RegistryObject<Item> MEDIUM_HEART_BUD = block(HeartgeodesModBlocks.MEDIUM_HEART_BUD);
|
||||||
|
public static final RegistryObject<Item> SMALL_HEART_BUD = block(HeartgeodesModBlocks.SMALL_HEART_BUD);
|
||||||
|
public static final RegistryObject<Item> INERT_BUDDING_AMETHYST = block(HeartgeodesModBlocks.INERT_BUDDING_AMETHYST);
|
||||||
|
|
||||||
private static RegistryObject<Item> block(RegistryObject<Block> block) {
|
private static RegistryObject<Item> block(RegistryObject<Block> block) {
|
||||||
return REGISTRY.register(block.getId().getPath(), () -> new BlockItem(block.get(), new Item.Properties()));
|
return REGISTRY.register(block.getId().getPath(), () -> new BlockItem(block.get(), new Item.Properties()));
|
||||||
|
|
|
@ -20,6 +20,7 @@ public class HeartgeodesModTabs {
|
||||||
() -> CreativeModeTab.builder().title(Component.translatable("item_group.heartgeodes.heart_geodes")).icon(() -> new ItemStack(HeartgeodesModBlocks.HEART_CLUSTER.get())).displayItems((parameters, tabData) -> {
|
() -> CreativeModeTab.builder().title(Component.translatable("item_group.heartgeodes.heart_geodes")).icon(() -> new ItemStack(HeartgeodesModBlocks.HEART_CLUSTER.get())).displayItems((parameters, tabData) -> {
|
||||||
tabData.accept(HeartgeodesModBlocks.HEART_BLOCK.get().asItem());
|
tabData.accept(HeartgeodesModBlocks.HEART_BLOCK.get().asItem());
|
||||||
tabData.accept(HeartgeodesModBlocks.BUDDING_HEART_BLOCK.get().asItem());
|
tabData.accept(HeartgeodesModBlocks.BUDDING_HEART_BLOCK.get().asItem());
|
||||||
|
tabData.accept(HeartgeodesModBlocks.INERT_BUDDING_AMETHYST.get().asItem());
|
||||||
})
|
})
|
||||||
|
|
||||||
.build());
|
.build());
|
||||||
|
|
|
@ -1,25 +1,14 @@
|
||||||
{
|
{
|
||||||
"variants": {
|
"variants": {
|
||||||
"facing=north": {
|
"axis=x": {
|
||||||
"model": "heartgeodes:block/heart_cluster"
|
|
||||||
},
|
|
||||||
"facing=east": {
|
|
||||||
"model": "heartgeodes:block/heart_cluster",
|
"model": "heartgeodes:block/heart_cluster",
|
||||||
|
"x": 90,
|
||||||
"y": 90
|
"y": 90
|
||||||
},
|
},
|
||||||
"facing=south": {
|
"axis=y": {
|
||||||
"model": "heartgeodes:block/heart_cluster",
|
"model": "heartgeodes:block/heart_cluster"
|
||||||
"y": 180
|
|
||||||
},
|
},
|
||||||
"facing=west": {
|
"axis=z": {
|
||||||
"model": "heartgeodes:block/heart_cluster",
|
|
||||||
"y": 270
|
|
||||||
},
|
|
||||||
"facing=up": {
|
|
||||||
"model": "heartgeodes:block/heart_cluster",
|
|
||||||
"x": 270
|
|
||||||
},
|
|
||||||
"facing=down": {
|
|
||||||
"model": "heartgeodes:block/heart_cluster",
|
"model": "heartgeodes:block/heart_cluster",
|
||||||
"x": 90
|
"x": 90
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"": {
|
||||||
|
"model": "heartgeodes:block/inert_budding_amethyst"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,25 +1,14 @@
|
||||||
{
|
{
|
||||||
"variants": {
|
"variants": {
|
||||||
"facing=north": {
|
"axis=x": {
|
||||||
"model": "heartgeodes:block/large_heart_bud"
|
|
||||||
},
|
|
||||||
"facing=east": {
|
|
||||||
"model": "heartgeodes:block/large_heart_bud",
|
"model": "heartgeodes:block/large_heart_bud",
|
||||||
|
"x": 90,
|
||||||
"y": 90
|
"y": 90
|
||||||
},
|
},
|
||||||
"facing=south": {
|
"axis=y": {
|
||||||
"model": "heartgeodes:block/large_heart_bud",
|
"model": "heartgeodes:block/large_heart_bud"
|
||||||
"y": 180
|
|
||||||
},
|
},
|
||||||
"facing=west": {
|
"axis=z": {
|
||||||
"model": "heartgeodes:block/large_heart_bud",
|
|
||||||
"y": 270
|
|
||||||
},
|
|
||||||
"facing=up": {
|
|
||||||
"model": "heartgeodes:block/large_heart_bud",
|
|
||||||
"x": 270
|
|
||||||
},
|
|
||||||
"facing=down": {
|
|
||||||
"model": "heartgeodes:block/large_heart_bud",
|
"model": "heartgeodes:block/large_heart_bud",
|
||||||
"x": 90
|
"x": 90
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"axis=x": {
|
||||||
|
"model": "heartgeodes:block/medium_heart_bud",
|
||||||
|
"x": 90,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis=y": {
|
||||||
|
"model": "heartgeodes:block/medium_heart_bud"
|
||||||
|
},
|
||||||
|
"axis=z": {
|
||||||
|
"model": "heartgeodes:block/medium_heart_bud",
|
||||||
|
"x": 90
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"axis=x": {
|
||||||
|
"model": "heartgeodes:block/small_heart_bud",
|
||||||
|
"x": 90,
|
||||||
|
"y": 90
|
||||||
|
},
|
||||||
|
"axis=y": {
|
||||||
|
"model": "heartgeodes:block/small_heart_bud"
|
||||||
|
},
|
||||||
|
"axis=z": {
|
||||||
|
"model": "heartgeodes:block/small_heart_bud",
|
||||||
|
"x": 90
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,7 +1,10 @@
|
||||||
{
|
{
|
||||||
"block.heartgeodes.budding_heart_block": "Budding Heart Block",
|
"block.heartgeodes.budding_heart_block": "Budding Heart Block",
|
||||||
|
"block.heartgeodes.inert_budding_amethyst": "Inert Budding Amethyst",
|
||||||
|
"block.heartgeodes.small_heart_bud": "Small Heart Bud",
|
||||||
"block.heartgeodes.heart_cluster": "Heart Cluster",
|
"block.heartgeodes.heart_cluster": "Heart Cluster",
|
||||||
"block.heartgeodes.heart_block": "Heart Block",
|
"block.heartgeodes.heart_block": "Heart Block",
|
||||||
"item_group.heartgeodes.heart_geodes": "Heart Geodes",
|
"item_group.heartgeodes.heart_geodes": "Heart Geodes",
|
||||||
"block.heartgeodes.large_heart_bud": "Large Heart Bud"
|
"block.heartgeodes.large_heart_bud": "Large Heart Bud",
|
||||||
|
"block.heartgeodes.medium_heart_bud": "Medium Heart Bud"
|
||||||
}
|
}
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"parent": "block/cube",
|
||||||
|
"textures": {
|
||||||
|
"down": "heartgeodes:block/inertamethyst",
|
||||||
|
"up": "heartgeodes:block/inertamethyst",
|
||||||
|
"north": "heartgeodes:block/inertamethyst",
|
||||||
|
"east": "heartgeodes:block/inertamethyst",
|
||||||
|
"south": "heartgeodes:block/inertamethyst",
|
||||||
|
"west": "heartgeodes:block/inertamethyst",
|
||||||
|
"particle": "heartgeodes:block/inertamethyst"
|
||||||
|
},
|
||||||
|
"render_type": "solid"
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"parent": "block/cross",
|
||||||
|
"textures": {
|
||||||
|
"cross": "heartgeodes:block/mediumheartbud",
|
||||||
|
"particle": "heartgeodes:block/mediumheartbud"
|
||||||
|
},
|
||||||
|
"render_type": "cutout"
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"parent": "block/cross",
|
||||||
|
"textures": {
|
||||||
|
"cross": "heartgeodes:block/smallheartbud",
|
||||||
|
"particle": "heartgeodes:block/smallheartbud"
|
||||||
|
},
|
||||||
|
"render_type": "cutout"
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"parent": "heartgeodes:block/inert_budding_amethyst",
|
||||||
|
"display": {
|
||||||
|
"thirdperson": {
|
||||||
|
"rotation": [
|
||||||
|
10,
|
||||||
|
-45,
|
||||||
|
170
|
||||||
|
],
|
||||||
|
"translation": [
|
||||||
|
0,
|
||||||
|
1.5,
|
||||||
|
-2.75
|
||||||
|
],
|
||||||
|
"scale": [
|
||||||
|
0.375,
|
||||||
|
0.375,
|
||||||
|
0.375
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "heartgeodes:item/mediumheartbud"
|
||||||
|
},
|
||||||
|
"render_type": "translucent"
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "heartgeodes:item/smallheartbud"
|
||||||
|
},
|
||||||
|
"render_type": "translucent"
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 325 B |
|
@ -4,6 +4,9 @@
|
||||||
"heartgeodes:heart_block",
|
"heartgeodes:heart_block",
|
||||||
"heartgeodes:budding_heart_block",
|
"heartgeodes:budding_heart_block",
|
||||||
"heartgeodes:heart_cluster",
|
"heartgeodes:heart_cluster",
|
||||||
"heartgeodes:large_heart_bud"
|
"heartgeodes:large_heart_bud",
|
||||||
|
"heartgeodes:medium_heart_bud",
|
||||||
|
"heartgeodes:small_heart_bud",
|
||||||
|
"heartgeodes:inert_budding_amethyst"
|
||||||
]
|
]
|
||||||
}
|
}
|
Loading…
Reference in a new issue