mirror of
https://github.com/xtreme8000/CavEX.git
synced 2025-01-22 17:23:20 -05:00
Trigger crafting screen on workbench right-click
This commit is contained in:
parent
bfe190ed67
commit
99a280a7b1
63 changed files with 158 additions and 49 deletions
|
@ -93,6 +93,7 @@ struct block block_bed = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_bed,
|
.renderBlock = render_block_bed,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -52,6 +52,7 @@ struct block block_bedrock = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -56,6 +56,7 @@ struct block block_bookshelf = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -47,6 +47,7 @@ struct block block_bricks = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -62,6 +62,7 @@ struct block block_brown_mushroom = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_cross,
|
.renderBlock = render_block_cross,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -120,6 +120,7 @@ struct block block_cactus = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = onRandomTick,
|
.onRandomTick = onRandomTick,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_cactus,
|
.renderBlock = render_block_cactus,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -72,6 +72,7 @@ struct block block_cake = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_cake,
|
.renderBlock = render_block_cake,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -59,6 +59,7 @@ struct block block_iron = {
|
||||||
.getTextureIndex = getTextureIndex1,
|
.getTextureIndex = getTextureIndex1,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
@ -91,6 +92,7 @@ struct block block_gold = {
|
||||||
.getTextureIndex = getTextureIndex2,
|
.getTextureIndex = getTextureIndex2,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
@ -123,6 +125,7 @@ struct block block_diamond = {
|
||||||
.getTextureIndex = getTextureIndex3,
|
.getTextureIndex = getTextureIndex3,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
@ -155,6 +158,7 @@ struct block block_lapis = {
|
||||||
.getTextureIndex = getTextureIndex4,
|
.getTextureIndex = getTextureIndex4,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -114,6 +114,7 @@ struct block block_chest = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
@ -148,6 +149,7 @@ struct block block_locked_chest = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -58,6 +58,7 @@ struct block block_clay = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -50,6 +50,7 @@ struct block block_cobblestone = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
@ -82,6 +83,7 @@ struct block block_mossstone = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -58,6 +58,7 @@ struct block block_cobweb = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_cross,
|
.renderBlock = render_block_cross,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -77,6 +77,7 @@ struct block block_crops = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_crops,
|
.renderBlock = render_block_crops,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -47,6 +47,7 @@ struct block block_dirt = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -93,6 +93,7 @@ struct block block_dispenser = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -88,6 +88,7 @@ struct block block_wooden_door = {
|
||||||
.getTextureIndex = getTextureIndex1,
|
.getTextureIndex = getTextureIndex1,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_door,
|
.renderBlock = render_block_door,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
@ -120,6 +121,7 @@ struct block block_iron_door = {
|
||||||
.getTextureIndex = getTextureIndex2,
|
.getTextureIndex = getTextureIndex2,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_door,
|
.renderBlock = render_block_door,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -72,6 +72,7 @@ struct block block_double_slab = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -68,6 +68,7 @@ struct block block_farmland = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_farmland,
|
.renderBlock = render_block_farmland,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -56,6 +56,7 @@ struct block block_fence = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_fence,
|
.renderBlock = render_block_fence,
|
||||||
.renderBlockAlways = render_block_fence_always,
|
.renderBlockAlways = render_block_fence_always,
|
||||||
|
|
|
@ -50,6 +50,7 @@ struct block block_fire = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = true,
|
.transparent = true,
|
||||||
.renderBlock = render_block_fire,
|
.renderBlock = render_block_fire,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -62,6 +62,7 @@ struct block block_flower = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_cross,
|
.renderBlock = render_block_cross,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -119,6 +119,7 @@ struct block block_furnaceoff = {
|
||||||
.getTextureIndex = getTextureIndex1,
|
.getTextureIndex = getTextureIndex1,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
@ -153,6 +154,7 @@ struct block block_furnaceon = {
|
||||||
.getTextureIndex = getTextureIndex2,
|
.getTextureIndex = getTextureIndex2,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -53,6 +53,7 @@ struct block block_glass = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -58,6 +58,7 @@ struct block block_glowstone = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -111,6 +111,7 @@ struct block block_grass = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = onRandomTick,
|
.onRandomTick = onRandomTick,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -58,6 +58,7 @@ struct block block_gravel = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -53,6 +53,7 @@ struct block block_ice = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = true,
|
.transparent = true,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -50,6 +50,7 @@ struct block block_jukebox = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -93,6 +93,7 @@ struct block block_ladder = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_ladder,
|
.renderBlock = render_block_ladder,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -60,6 +60,7 @@ struct block block_lava = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = true,
|
.transparent = true,
|
||||||
.renderBlock = render_block_fluid,
|
.renderBlock = render_block_fluid,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -97,6 +97,7 @@ struct block block_leaves = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = onRandomTick,
|
.onRandomTick = onRandomTick,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -66,6 +66,7 @@ struct block block_log = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -47,6 +47,7 @@ struct block block_netherrack = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -47,6 +47,7 @@ struct block block_noteblock = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -47,6 +47,7 @@ struct block block_obsidian = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -105,6 +105,7 @@ struct block block_coalore = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = drop_coal,
|
.getDroppedItem = drop_coal,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
@ -137,6 +138,7 @@ struct block block_ironore = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
@ -169,6 +171,7 @@ struct block block_goldore = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
@ -201,6 +204,7 @@ struct block block_diamondore = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = drop_diamond,
|
.getDroppedItem = drop_diamond,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
@ -233,6 +237,7 @@ struct block block_redstoneore = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = drop_redstone,
|
.getDroppedItem = drop_redstone,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
@ -265,6 +270,7 @@ struct block block_redstoneore_lit = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = drop_redstone,
|
.getDroppedItem = drop_redstone,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
@ -297,6 +303,7 @@ struct block block_lapisore = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = drop_lapis,
|
.getDroppedItem = drop_lapis,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -47,6 +47,7 @@ struct block block_planks = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -50,6 +50,7 @@ struct block block_portal = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = true,
|
.transparent = true,
|
||||||
.renderBlock = render_block_portal,
|
.renderBlock = render_block_portal,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -75,6 +75,7 @@ struct block block_stone_pressure_plate = {
|
||||||
.getTextureIndex = getTextureIndex1,
|
.getTextureIndex = getTextureIndex1,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_pressure_plate,
|
.renderBlock = render_block_pressure_plate,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
@ -108,6 +109,7 @@ struct block block_wooden_pressure_plate = {
|
||||||
.getTextureIndex = getTextureIndex2,
|
.getTextureIndex = getTextureIndex2,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_pressure_plate,
|
.renderBlock = render_block_pressure_plate,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -119,6 +119,7 @@ struct block block_pumpkin = {
|
||||||
.getTextureIndex = getTextureIndex1,
|
.getTextureIndex = getTextureIndex1,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
@ -155,6 +156,7 @@ struct block block_pumpkin_lit = {
|
||||||
.getTextureIndex = getTextureIndex2,
|
.getTextureIndex = getTextureIndex2,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -78,6 +78,7 @@ struct block block_rail = {
|
||||||
.getTextureIndex = getTextureIndex1,
|
.getTextureIndex = getTextureIndex1,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_rail,
|
.renderBlock = render_block_rail,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
@ -111,6 +112,7 @@ struct block block_powered_rail = {
|
||||||
.getTextureIndex = getTextureIndex2,
|
.getTextureIndex = getTextureIndex2,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_rail,
|
.renderBlock = render_block_rail,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
@ -144,6 +146,7 @@ struct block block_detector_rail = {
|
||||||
.getTextureIndex = getTextureIndex3,
|
.getTextureIndex = getTextureIndex3,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_rail,
|
.renderBlock = render_block_rail,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -62,6 +62,7 @@ struct block block_red_mushroom = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_cross,
|
.renderBlock = render_block_cross,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -105,6 +105,7 @@ struct block block_reed = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = onRandomTick,
|
.onRandomTick = onRandomTick,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_cross,
|
.renderBlock = render_block_cross,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -62,6 +62,7 @@ struct block block_rose = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_cross,
|
.renderBlock = render_block_cross,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -51,6 +51,7 @@ struct block block_sand = {
|
||||||
.getTextureIndex = getTextureIndex1,
|
.getTextureIndex = getTextureIndex1,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
@ -83,6 +84,7 @@ struct block block_soulsand = {
|
||||||
.getTextureIndex = getTextureIndex2,
|
.getTextureIndex = getTextureIndex2,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -51,6 +51,7 @@ struct block block_sandstone = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -78,6 +78,7 @@ struct block block_sapling = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_cross,
|
.renderBlock = render_block_cross,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -104,6 +104,7 @@ struct block block_slab = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_slab,
|
.renderBlock = render_block_slab,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -100,6 +100,7 @@ struct block block_snow = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = drop_snow,
|
.getDroppedItem = drop_snow,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_layer,
|
.renderBlock = render_block_layer,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
@ -133,6 +134,7 @@ struct block block_snow_block = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = drop_snow_block,
|
.getDroppedItem = drop_snow_block,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -52,6 +52,7 @@ struct block block_spawner = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -47,6 +47,7 @@ struct block block_sponge = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -192,6 +192,7 @@ struct block block_wooden_stairs = {
|
||||||
.getTextureIndex = getTextureIndex1,
|
.getTextureIndex = getTextureIndex1,
|
||||||
.getDroppedItem = drop_wood,
|
.getDroppedItem = drop_wood,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_stairs,
|
.renderBlock = render_block_stairs,
|
||||||
.renderBlockAlways = render_block_stairs_always,
|
.renderBlockAlways = render_block_stairs_always,
|
||||||
|
@ -227,6 +228,7 @@ struct block block_stone_stairs = {
|
||||||
.getTextureIndex = getTextureIndex2,
|
.getTextureIndex = getTextureIndex2,
|
||||||
.getDroppedItem = drop_cobblestone,
|
.getDroppedItem = drop_cobblestone,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_stairs,
|
.renderBlock = render_block_stairs,
|
||||||
.renderBlockAlways = render_block_stairs_always,
|
.renderBlockAlways = render_block_stairs_always,
|
||||||
|
|
|
@ -58,6 +58,7 @@ struct block block_stone = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -102,6 +102,7 @@ struct block block_tallgrass = {
|
||||||
.getTextureIndex = getTextureIndex1,
|
.getTextureIndex = getTextureIndex1,
|
||||||
.getDroppedItem = drop_seed,
|
.getDroppedItem = drop_seed,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_cross,
|
.renderBlock = render_block_cross,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
@ -135,6 +136,7 @@ struct block block_deadbush = {
|
||||||
.getTextureIndex = getTextureIndex2,
|
.getTextureIndex = getTextureIndex2,
|
||||||
.getDroppedItem = drop_nothing,
|
.getDroppedItem = drop_nothing,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_cross,
|
.renderBlock = render_block_cross,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -51,6 +51,7 @@ struct block block_tnt = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -103,6 +103,7 @@ struct block block_torch = {
|
||||||
.getTextureIndex = getTextureIndex1,
|
.getTextureIndex = getTextureIndex1,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_torch,
|
.renderBlock = render_block_torch,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
@ -135,6 +136,7 @@ struct block block_redstone_torch = {
|
||||||
.getTextureIndex = getTextureIndex2,
|
.getTextureIndex = getTextureIndex2,
|
||||||
.getDroppedItem = drop_redstone_torch,
|
.getDroppedItem = drop_redstone_torch,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_torch,
|
.renderBlock = render_block_torch,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
@ -167,6 +169,7 @@ struct block block_redstone_torch_lit = {
|
||||||
.getTextureIndex = getTextureIndex3,
|
.getTextureIndex = getTextureIndex3,
|
||||||
.getDroppedItem = drop_redstone_torch,
|
.getDroppedItem = drop_redstone_torch,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_torch,
|
.renderBlock = render_block_torch,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -110,6 +110,7 @@ struct block block_trapdoor = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_trapdoor,
|
.renderBlock = render_block_trapdoor,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -64,6 +64,7 @@ struct block block_water_still = {
|
||||||
.getTextureIndex = getTextureIndex1,
|
.getTextureIndex = getTextureIndex1,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = true,
|
.transparent = true,
|
||||||
.renderBlock = render_block_fluid,
|
.renderBlock = render_block_fluid,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
@ -96,6 +97,7 @@ struct block block_water_flowing = {
|
||||||
.getTextureIndex = getTextureIndex2,
|
.getTextureIndex = getTextureIndex2,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = true,
|
.transparent = true,
|
||||||
.renderBlock = render_block_fluid,
|
.renderBlock = render_block_fluid,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -75,6 +75,7 @@ struct block block_wool = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = getDroppedItem,
|
.getDroppedItem = getDroppedItem,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = NULL,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -17,6 +17,9 @@
|
||||||
along with CavEX. If not, see <http://www.gnu.org/licenses/>.
|
along with CavEX. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../network/client_interface.h"
|
||||||
|
#include "../network/inventory_logic.h"
|
||||||
|
#include "../network/server_local.h"
|
||||||
#include "blocks.h"
|
#include "blocks.h"
|
||||||
|
|
||||||
static enum block_material getMaterial(struct block_info* this) {
|
static enum block_material getMaterial(struct block_info* this) {
|
||||||
|
@ -47,6 +50,23 @@ static uint8_t getTextureIndex(struct block_info* this, enum side side) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void onRightClick(struct server_local* s, struct item_data* it,
|
||||||
|
struct block_info* where, struct block_info* on,
|
||||||
|
enum side on_side) {
|
||||||
|
if(s->player.active_inventory == &s->player.inventory) {
|
||||||
|
clin_rpc_send(&(struct client_rpc) {
|
||||||
|
.type = CRPC_OPEN_WINDOW,
|
||||||
|
.payload.window_open.window = WINDOWC_CRAFTING,
|
||||||
|
.payload.window_open.type = WINDOW_TYPE_WORKBENCH,
|
||||||
|
.payload.window_open.slot_count = CRAFTING_SIZE,
|
||||||
|
});
|
||||||
|
|
||||||
|
struct inventory* inv = malloc(sizeof(struct inventory));
|
||||||
|
inventory_create(inv, &inventory_logic_crafting, s, CRAFTING_SIZE);
|
||||||
|
s->player.active_inventory = inv;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
struct block block_workbench = {
|
struct block block_workbench = {
|
||||||
.name = "Workbench",
|
.name = "Workbench",
|
||||||
.getSideMask = getSideMask,
|
.getSideMask = getSideMask,
|
||||||
|
@ -55,6 +75,7 @@ struct block block_workbench = {
|
||||||
.getTextureIndex = getTextureIndex,
|
.getTextureIndex = getTextureIndex,
|
||||||
.getDroppedItem = block_drop_default,
|
.getDroppedItem = block_drop_default,
|
||||||
.onRandomTick = NULL,
|
.onRandomTick = NULL,
|
||||||
|
.onRightClick = onRightClick,
|
||||||
.transparent = false,
|
.transparent = false,
|
||||||
.renderBlock = render_block_full,
|
.renderBlock = render_block_full,
|
||||||
.renderBlockAlways = NULL,
|
.renderBlockAlways = NULL,
|
||||||
|
|
|
@ -46,6 +46,8 @@ struct block {
|
||||||
size_t (*getDroppedItem)(struct block_info*, struct item_data*,
|
size_t (*getDroppedItem)(struct block_info*, struct item_data*,
|
||||||
struct random_gen*);
|
struct random_gen*);
|
||||||
void (*onRandomTick)(struct server_local*, struct block_info*);
|
void (*onRandomTick)(struct server_local*, struct block_info*);
|
||||||
|
void (*onRightClick)(struct server_local*, struct item_data*,
|
||||||
|
struct block_info*, struct block_info*, enum side);
|
||||||
bool transparent;
|
bool transparent;
|
||||||
uint8_t luminance : 4;
|
uint8_t luminance : 4;
|
||||||
uint8_t opacity : 4;
|
uint8_t opacity : 4;
|
||||||
|
|
|
@ -140,9 +140,6 @@ void screen_ingame_render3D(struct screen* s, mat4 view) {
|
||||||
static void screen_ingame_update(struct screen* s, float dt) {
|
static void screen_ingame_update(struct screen* s, float dt) {
|
||||||
if(gstate.camera_hit.hit && input_pressed(IB_ACTION2)
|
if(gstate.camera_hit.hit && input_pressed(IB_ACTION2)
|
||||||
&& !gstate.digging.active) {
|
&& !gstate.digging.active) {
|
||||||
struct item_data item;
|
|
||||||
if(inventory_get_hotbar_item(
|
|
||||||
windowc_get_latest(gstate.windows[WINDOWC_INVENTORY]), &item)) {
|
|
||||||
svin_rpc_send(&(struct server_rpc) {
|
svin_rpc_send(&(struct server_rpc) {
|
||||||
.type = SRPC_BLOCK_PLACE,
|
.type = SRPC_BLOCK_PLACE,
|
||||||
.payload.block_place.x = gstate.camera_hit.x,
|
.payload.block_place.x = gstate.camera_hit.x,
|
||||||
|
@ -151,6 +148,8 @@ static void screen_ingame_update(struct screen* s, float dt) {
|
||||||
.payload.block_place.side = gstate.camera_hit.side,
|
.payload.block_place.side = gstate.camera_hit.side,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if(inventory_get_hotbar_item(
|
||||||
|
windowc_get_latest(gstate.windows[WINDOWC_INVENTORY]), NULL)) {
|
||||||
gstate.held_item_animation.punch.start = time_get();
|
gstate.held_item_animation.punch.start = time_get();
|
||||||
gstate.held_item_animation.punch.place = true;
|
gstate.held_item_animation.punch.place = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -213,11 +213,6 @@ static void server_local_process(struct server_rpc* call, void* user) {
|
||||||
int x, y, z;
|
int x, y, z;
|
||||||
blocks_side_offset(call->payload.block_place.side, &x, &y, &z);
|
blocks_side_offset(call->payload.block_place.side, &x, &y, &z);
|
||||||
|
|
||||||
struct item_data it_data;
|
|
||||||
inventory_get_hotbar_item(&s->player.inventory, &it_data);
|
|
||||||
struct item* it = item_get(&it_data);
|
|
||||||
|
|
||||||
if(it && it->onItemPlace) {
|
|
||||||
struct block_data blk_where, blk_on;
|
struct block_data blk_where, blk_on;
|
||||||
if(server_world_get_block(
|
if(server_world_get_block(
|
||||||
&s->world, call->payload.block_place.x + x,
|
&s->world, call->payload.block_place.x + x,
|
||||||
|
@ -225,8 +220,8 @@ static void server_local_process(struct server_rpc* call, void* user) {
|
||||||
call->payload.block_place.z + z, &blk_where)
|
call->payload.block_place.z + z, &blk_where)
|
||||||
&& server_world_get_block(
|
&& server_world_get_block(
|
||||||
&s->world, call->payload.block_place.x,
|
&s->world, call->payload.block_place.x,
|
||||||
call->payload.block_place.y,
|
call->payload.block_place.y, call->payload.block_place.z,
|
||||||
call->payload.block_place.z, &blk_on)) {
|
&blk_on)) {
|
||||||
struct block_info where = (struct block_info) {
|
struct block_info where = (struct block_info) {
|
||||||
.block = &blk_where,
|
.block = &blk_where,
|
||||||
.neighbours = NULL,
|
.neighbours = NULL,
|
||||||
|
@ -243,9 +238,20 @@ static void server_local_process(struct server_rpc* call, void* user) {
|
||||||
.z = call->payload.block_place.z,
|
.z = call->payload.block_place.z,
|
||||||
};
|
};
|
||||||
|
|
||||||
if((!blocks[blk_where.type]
|
struct item_data it_data;
|
||||||
|
inventory_get_hotbar_item(&s->player.inventory, &it_data);
|
||||||
|
struct item* it = item_get(&it_data);
|
||||||
|
|
||||||
|
if(blocks[blk_on.type]
|
||||||
|
&& blocks[blk_on.type]->onRightClick) {
|
||||||
|
blocks[blk_on.type]->onRightClick(
|
||||||
|
s, &it_data, &where, &on,
|
||||||
|
call->payload.block_place.side);
|
||||||
|
} else if((!blocks[blk_where.type]
|
||||||
|| blocks[blk_where.type]->place_ignore)
|
|| blocks[blk_where.type]->place_ignore)
|
||||||
&& it->onItemPlace(s, &it_data, &where, &on,
|
&& it && it->onItemPlace
|
||||||
|
&& it->onItemPlace(
|
||||||
|
s, &it_data, &where, &on,
|
||||||
call->payload.block_place.side)) {
|
call->payload.block_place.side)) {
|
||||||
size_t slot
|
size_t slot
|
||||||
= inventory_get_hotbar(&s->player.inventory);
|
= inventory_get_hotbar(&s->player.inventory);
|
||||||
|
@ -254,8 +260,7 @@ static void server_local_process(struct server_rpc* call, void* user) {
|
||||||
|
|
||||||
clin_rpc_send(&(struct client_rpc) {
|
clin_rpc_send(&(struct client_rpc) {
|
||||||
.type = CRPC_INVENTORY_SLOT,
|
.type = CRPC_INVENTORY_SLOT,
|
||||||
.payload.inventory_slot.window
|
.payload.inventory_slot.window = WINDOWC_INVENTORY,
|
||||||
= WINDOWC_INVENTORY,
|
|
||||||
.payload.inventory_slot.slot
|
.payload.inventory_slot.slot
|
||||||
= slot + INVENTORY_SLOT_HOTBAR,
|
= slot + INVENTORY_SLOT_HOTBAR,
|
||||||
.payload.inventory_slot.item
|
.payload.inventory_slot.item
|
||||||
|
@ -265,7 +270,6 @@ static void server_local_process(struct server_rpc* call, void* user) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case SRPC_UNLOAD_WORLD:
|
case SRPC_UNLOAD_WORLD:
|
||||||
// save chunks here, then destroy all
|
// save chunks here, then destroy all
|
||||||
|
|
Loading…
Reference in a new issue