Honey and Beehives #2911

Merged
cora merged 14 commits from honey into master 2022-11-17 03:28:13 +01:00
First-time contributor

Honey and Beehives

image
Adds honey, honeycomb, honey and honeycomb blocks, beehives, and bee nests.

To-Do

  • Honey

  • Honeycomb

  • Beehive

  • Make Beehive work

  • Add damage from mining in certain conditions

  • Allow campfire use

  • Add waxing copper

  • Related Advancements

  • Allow bee nests to naturally generate in trees

  • Make Honey Blocks Sticky

# Honey and Beehives ![image](/attachments/36c5e757-886f-4e05-beba-6f15063ad0cc) Adds honey, honeycomb, honey and honeycomb blocks, beehives, and bee nests. ## To-Do - [x] Honey - [x] Honeycomb - [x] Beehive - [x] Make Beehive work - [x] Add damage from mining in certain conditions - [x] Allow campfire use - [x] Add waxing copper - [x] Related Advancements - [x] Allow bee nests to naturally generate in trees - [x] Make Honey Blocks Sticky
386 KiB
Ghost changed title from Honey and Beehives to WIP: Honey and Beehives 2022-11-05 04:02:04 +01:00
AFCMS added the
nodes
items
labels 2022-11-05 14:25:14 +01:00
Ghost force-pushed honey from 39933ee9fb to 0d0d183cc4 2022-11-06 17:15:55 +01:00 Compare
Ghost force-pushed honey from 4d15bc3bb8 to 6b0bd157bf 2022-11-11 23:14:07 +01:00 Compare
Member

Pretty neat so far!

Can you fix the honey_block definition to be transparent per the wiki: https://minecraft.fandom.com/wiki/Honey_Block#Usage

Fixed:

minetest.register_node("mcl_honey:honey_block", {
	description = S("Honey Block"),
	_doc_items_longdesc = S("Honey Block. Used as a decoration and in redstone. Is sticky on some sides."),
	tiles = {"mcl_honey_block_side.png"},
	use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true,
	groups = { handy = 1, deco_block = 1 },
	paramtype = "light",
	drawtype = "nodebox",
	node_box = {
		type = "fixed",
		fixed = {
			{-0.4, -0.4, -0.4, 0.4, 0.4, 0.4},
			{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
		}
	},
	selection_box = {
		type = "regular",
	},
	_mcl_blast_resistance = 0,
	_mcl_hardness = 0,
	mvps_sticky = function(pos, node, piston_pos)
		local connected = {}
		for n, v in ipairs(alldirs) do
			local neighbor_pos = vector.add(pos, v)
			local neighbor_node = minetest.get_node(neighbor_pos)
			if neighbor_node then
				if neighbor_node.name == "ignore" then
					minetest.get_voxel_manip():read_from_map(neighbor_pos, neighbor_pos)
					neighbor_node = minetest.get_node(neighbor_pos)
				end
				local name = neighbor_node.name
				if name ~= "air" and name ~= "ignore" and not mesecon.mvps_unsticky[name] then
					local piston, piston_side, piston_up, piston_down = false, false, false, false
					if name == "mesecons_pistons:piston_sticky_off" or name == "mesecons_pistons:piston_normal_off" then
						piston, piston_side = true, true
					elseif name == "mesecons_pistons:piston_up_sticky_off" or name == "mesecons_pistons:piston_up_normal_off" then
						piston, piston_up = true, true
					elseif name == "mesecons_pistons:piston_down_sticky_off" or name == "mesecons_pistons:piston_down_normal_off" then
						piston, piston_down = true, true
					end
					if not(   (piston_side and (n-1==neighbor_node.param2))  or  (piston_up and (n==5))  or  (piston_down and (n==6))   ) then
						if piston and piston_pos then
							if piston_pos.x == neighbor_pos.x and piston_pos.y == neighbor_pos.y and piston_pos.z == neighbor_pos.z then
								-- Loopback to the same piston! Preventing unwanted behavior:
								return {}, true
							end
						end
						table.insert(connected, neighbor_pos)
					end
				end
			end
		end
		return connected, false
	end,
})


And, "mvps_sticky" is okay for now. But, this change incorrectly causes mobs to also be launched with the honey_block.

Can you add the following check, specifically for slimeblocks; in 'mesecons_mvps':
https://git.minetest.land/MineClone2/MineClone2/src/branch/honey/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua#L367

if minetest.registered_nodes[adjnode.name] and minetest.registered_nodes[adjnode.name].mvps_sticky and adjnode.name == "mcl_core:slimeblock" then
Pretty neat so far! Can you fix the honey_block definition to be transparent per the wiki: https://minecraft.fandom.com/wiki/Honey_Block#Usage Fixed: ``` minetest.register_node("mcl_honey:honey_block", { description = S("Honey Block"), _doc_items_longdesc = S("Honey Block. Used as a decoration and in redstone. Is sticky on some sides."), tiles = {"mcl_honey_block_side.png"}, use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true, groups = { handy = 1, deco_block = 1 }, paramtype = "light", drawtype = "nodebox", node_box = { type = "fixed", fixed = { {-0.4, -0.4, -0.4, 0.4, 0.4, 0.4}, {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, } }, selection_box = { type = "regular", }, _mcl_blast_resistance = 0, _mcl_hardness = 0, mvps_sticky = function(pos, node, piston_pos) local connected = {} for n, v in ipairs(alldirs) do local neighbor_pos = vector.add(pos, v) local neighbor_node = minetest.get_node(neighbor_pos) if neighbor_node then if neighbor_node.name == "ignore" then minetest.get_voxel_manip():read_from_map(neighbor_pos, neighbor_pos) neighbor_node = minetest.get_node(neighbor_pos) end local name = neighbor_node.name if name ~= "air" and name ~= "ignore" and not mesecon.mvps_unsticky[name] then local piston, piston_side, piston_up, piston_down = false, false, false, false if name == "mesecons_pistons:piston_sticky_off" or name == "mesecons_pistons:piston_normal_off" then piston, piston_side = true, true elseif name == "mesecons_pistons:piston_up_sticky_off" or name == "mesecons_pistons:piston_up_normal_off" then piston, piston_up = true, true elseif name == "mesecons_pistons:piston_down_sticky_off" or name == "mesecons_pistons:piston_down_normal_off" then piston, piston_down = true, true end if not( (piston_side and (n-1==neighbor_node.param2)) or (piston_up and (n==5)) or (piston_down and (n==6)) ) then if piston and piston_pos then if piston_pos.x == neighbor_pos.x and piston_pos.y == neighbor_pos.y and piston_pos.z == neighbor_pos.z then -- Loopback to the same piston! Preventing unwanted behavior: return {}, true end end table.insert(connected, neighbor_pos) end end end end return connected, false end, }) ``` --- And, "mvps_sticky" is okay for now. But, this change incorrectly causes mobs to also be launched with the honey_block. Can you add the following check, specifically for slimeblocks; in 'mesecons_mvps': https://git.minetest.land/MineClone2/MineClone2/src/branch/honey/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua#L367 ``` if minetest.registered_nodes[adjnode.name] and minetest.registered_nodes[adjnode.name].mvps_sticky and adjnode.name == "mcl_core:slimeblock" then ```
Ghost force-pushed honey from 7b82741d7c to 833e429a05 2022-11-16 00:21:37 +01:00 Compare
Ghost changed title from WIP: Honey and Beehives to Honey and Beehives 2022-11-16 04:48:55 +01:00
MysticTempest approved these changes 2022-11-16 22:19:44 +01:00
Member

Awesome work! And, thanks for patching the section I asked about.

Been testing this, and it all seems to work nicely.
Beehive harvesting mechanics involving shears, bottles, and campfires all seem to work.
Digging with silk touch vs not; is there.
Copper block waxing and scraping; and achievements, all good.

Thanks!

Awesome work! And, thanks for patching the section I asked about. Been testing this, and it all seems to work nicely. Beehive harvesting mechanics involving shears, bottles, and campfires all seem to work. Digging with silk touch vs not; is there. Copper block waxing and scraping; and achievements, all good. Thanks!
cora reviewed 2022-11-17 03:13:06 +01:00
@ -410,0 +406,4 @@
_doc_items_longdesc = S("Use it to craft the Glow Item Frame."),
_doc_items_usagehelp = S("Use the Glow Ink Sac and the normal Item Frame to craft the Glow Item Frame."),
inventory_image = "extra_mobs_glow_ink_sac.png",
groups = { craftitem = 1 },
Contributor

changing unrelated files is deprecated now just so you know ^^

changing unrelated files is deprecated now just so you know ^^
Author
First-time contributor

Sorry, fix from when the original plan from talking with you was to put honey and honeycomb in that mod.

Sorry, fix from when the original plan from talking with you was to put honey and honeycomb in that mod.
cora force-pushed honey from ddc962f2a9 to 89a342a34f 2022-11-17 03:17:23 +01:00 Compare
cora approved these changes 2022-11-17 03:27:06 +01:00
cora left a comment
Contributor

very nice, good work

very nice, good work
cora merged commit f397ff83ff into master 2022-11-17 03:28:13 +01:00
cora deleted branch honey 2022-11-17 03:28:18 +01:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: VoxeLibre/VoxeLibre#2911
No description provided.