Search found 35 matches

by owlondrugs
Sun Jul 24, 2022 11:45
Forum: Modding Discussion
Topic: minetest.hud_replace_builtin doesnt work
Replies: 4
Views: 417

Re: minetest.hud_replace_builtin doesnt work

rubenwardy wrote:
Sat Jul 23, 2022 17:02
This happens when you're missing item, it should be set to the same as number

This is a bug in 5.5.0 and will be fixed in 5.6.0. voxelgarden had the same issue
Can you give an example?
by owlondrugs
Sat Jul 23, 2022 15:48
Forum: Modding Discussion
Topic: minetest.hud_replace_builtin doesnt work
Replies: 4
Views: 417

minetest.hud_replace_builtin doesnt work

Help.
My code:

Code: Select all

minetest.hud_replace_builtin("health", {
 hud_elem_type = "statbar", 
 positon =..., 
 offset =..., 
 number = 20,
 direction = 0,
 text ="...", 
 scale =... 
} ) 
Error nominal a nil value
by owlondrugs
Fri Jul 15, 2022 09:46
Forum: Modding Discussion
Topic: Crafting and mobs systems.
Replies: 0
Views: 291

Crafting and mobs systems.

Is there an example of creating your own crafting system, for example 4 by 4 and another?

How do modifications to create mobs work?
by owlondrugs
Thu Jul 14, 2022 13:22
Forum: Modding Discussion
Topic: [SOLVED] Deteached inventory
Replies: 2
Views: 418

Re: Deteached inventory

Ohhhh, ty.
Best answer!!
by owlondrugs
Wed Jul 13, 2022 18:15
Forum: Modding Discussion
Topic: [SOLVED] Deteached inventory
Replies: 2
Views: 418

[SOLVED] Deteached inventory

How to make a deteached inventory with items, which opens with formspec when clicking on an item?
I create that with
minetest.create_detached_inventory...
And?
by owlondrugs
Wed Mar 02, 2022 20:49
Forum: Modding Discussion
Topic: Getting the texture of a registered node, entity edit
Replies: 0
Views: 985

Getting the texture of a registered node, entity edit

How can I get all the node textures? For example, I make an event when rightclick a certain craftitem on the node, I get textures that the node stores. How to work with entity? Is it possible to set the initial values of textures and other things when creating it. Is it possible to change entity dur...
by owlondrugs
Fri Feb 25, 2022 21:07
Forum: Modding Discussion
Topic: itemstack clear help
Replies: 5
Views: 703

Re: itemstack clear help(SOLVED)

joe7575 wrote:
Fri Feb 25, 2022 20:48
You must add inv:set_stack("main", placer:get_wield_index(), stack) to write back the data
Thanks
by owlondrugs
Fri Feb 25, 2022 20:42
Forum: Modding Discussion
Topic: itemstack clear help
Replies: 5
Views: 703

Re: itemstack clear help

ItemStacks are copies, not references. You need to return itemstack Please read: https://rubenwardy.com/minetest_modding_book/en/quality/common_mistakes.html#set-itemstacks-after-changing-them minetest.register_craftitem("test:new_item",{ description = "New item", inventory_imag...
by owlondrugs
Fri Feb 25, 2022 19:33
Forum: Modding Discussion
Topic: itemstack clear help
Replies: 5
Views: 703

itemstack clear help

The code that should remove the item from the inventory. minetest.register_craftitem("test:new_item",{ description = "New_item", inventory_image = "new_item.png", stack_max = 1, on_place = function(itemstack, placer, pointed_thing) local pos = pointed_thing.under local ...
by owlondrugs
Fri Feb 25, 2022 19:28
Forum: Modding Discussion
Topic: Textures and tiles (SOLVED)
Replies: 4
Views: 602

Re: Textures and tiles

wsor4035 wrote:
Fri Feb 25, 2022 01:25
hmm, anyways remove the drawtype line and the code should work (defaults to normal drawtype)
Thanks!!!
by owlondrugs
Thu Feb 24, 2022 15:30
Forum: Modding Discussion
Topic: Textures and tiles (SOLVED)
Replies: 4
Views: 602

Textures and tiles (SOLVED)

minetest.register_node("engineering:battery",{ description = "Battery", drawtype = "allfaces", tiles = {"battery_counter.png", "battery_top.png", "battery_top.png", "battery_side.png", "battery_top.png", "battery_s...
by owlondrugs
Wed Dec 01, 2021 19:26
Forum: Modding Discussion
Topic: Aliase replace
Replies: 3
Views: 514

Aliase replace

I can't replace the dirt with another block. I also can't replace a block with grass with any other. Help
by owlondrugs
Mon Oct 26, 2020 18:56
Forum: Modding Discussion
Topic: register decoration not work!!!Help please
Replies: 6
Views: 1247

Re: register decoration not work!!!Help please

Nathan.S wrote:
Mon Oct 26, 2020 18:19
Stupid question, but is the mod even loading?
You can run the /mods command in game to see all the loaded mods.
Image
Yeap...
by owlondrugs
Mon Oct 26, 2020 11:56
Forum: Modding Discussion
Topic: register decoration not work!!!Help please
Replies: 6
Views: 1247

Re: register decoration not work!!!Help please

The only possible issue I'm seeing here is you have a fill_ratio of ten, I think a ratio of 1 is highest you can go. A ratio of 1 would be every node get's the decoration placed, I think. I know, but no matter how I change the values, it doesn't work. That's why I set 10. I don't know how to solve ...
by owlondrugs
Mon Oct 26, 2020 11:07
Forum: Modding Discussion
Topic: register decoration not work!!!Help please
Replies: 6
Views: 1247

register decoration not work!!!Help please

minetest.register_node("test:test_node",{ tiles = {"default_dirt.png^[brighten^default_grass_side.png"}, description = "Test node", drawtype = "normal", pointable = true, diggable = true, groups = {cracky = 3}, }) minetest.register_decoration({ deco_type = &q...
by owlondrugs
Sun May 03, 2020 17:47
Forum: Modding Discussion
Topic: stack take_item() SOLVED
Replies: 9
Views: 804

Re: stack take_item()

The error says that you are passing the wrong type of data to set_stack, it's looking for a number, but your passing playerdata. Double checking the code I provided it looks like I have a mistake, I shouldn't have been making a local of count. I think I meant to do local count = inv:get_count here'...
by owlondrugs
Sun May 03, 2020 15:33
Forum: Modding Discussion
Topic: stack take_item() SOLVED
Replies: 9
Views: 804

Re: stack take_item()

The error says that you are passing the wrong type of data to set_stack, it's looking for a number, but your passing playerdata. Double checking the code I provided it looks like I have a mistake, I shouldn't have been making a local of count. I think I meant to do local count = inv:get_count here'...
by owlondrugs
Sun May 03, 2020 00:31
Forum: Modding Discussion
Topic: stack take_item() SOLVED
Replies: 9
Views: 804

Re: stack take_item()

Maybe try using inv:set_stack('main' , 1 '') That will set the stack to nothing, if you want to remove just a single stone you'd need to get the count of the stack and set the stack to one less, or use local count = inv:take_item inv:set_stack('main, 1, 'count') Error screen -- I don't know why, bu...
by owlondrugs
Sat May 02, 2020 16:28
Forum: Modding Discussion
Topic: stack take_item() SOLVED
Replies: 9
Views: 804

Re: stack take_item()

Maybe find a mod that does something close to what you are trying to do and see how the code is done there. You didn't really explain what you are trying to do, so I'm not sure what to suggest. Look. I need to make sure that if I put an object in the formspec and it was a stone it was taken away ev...
by owlondrugs
Sat May 02, 2020 12:32
Forum: Modding Discussion
Topic: stack take_item() SOLVED
Replies: 9
Views: 804

Re: stack take_item()

What in the world are you trying to do? Why are you setting a formspec in on_metadata_inventory_put, furthermore on_receive_fields will never run because there is no button or input in the formspec that could trigger it. no, I create a formspec in the on_consruct method, change it in another one. B...
by owlondrugs
Fri May 01, 2020 15:04
Forum: Modding Discussion
Topic: stack take_item() SOLVED
Replies: 9
Views: 804

stack take_item() SOLVED

test = {} minetest.register_node(minetest.get_current_modname()..":test_block", { description = "Test block", tiles = {"^[colorize:#802BB1"}, diggable = true, groups = {snappy = 3}, is_ground_content = true, on_construct = function ( pos ) local meta = minetest.get_met...
by owlondrugs
Thu Apr 09, 2020 17:58
Forum: Modding Discussion
Topic: Mods don't work completely
Replies: 3
Views: 401

Re: Mods don't work completely

Wuzzy wrote:I don't know if that's the reason but:

Code: Select all

list[context;squizzer;3.5,1;1,1;]
Is deprecated syntax.
Where can I find the correct api?
How do I do formspec correctly?
by owlondrugs
Mon Apr 06, 2020 12:43
Forum: Modding Discussion
Topic: Mods don't work completely
Replies: 3
Views: 401

Mods don't work completely

whatever mod I installed. It doesn't work correctly or completely. The node inventory cannot be obtained or updated, and so on. I don't know what to do... Help me. I can't interact with itemstack. --- minetest.register_node("magic_juice:squizzer", { description = "Manual squizzer"...
by owlondrugs
Sat Apr 04, 2020 19:24
Forum: Modding Discussion
Topic: How do I change the drop object lying on the ground?
Replies: 1
Views: 345

Re: How do I change the drop object lying on the ground?

minetest.register_craftitem("magic_juice:berry", { description = "Yellow berry", inventory_image = "berry.png", on_use = function(itemstack, user, pointed_thing) if (pointed_thing.type == "nothing") then minetest.chat_send_all("its works!") elseif (...
by owlondrugs
Fri Apr 03, 2020 20:19
Forum: Modding Discussion
Topic: How do I change the drop object lying on the ground?
Replies: 1
Views: 345

How do I change the drop object lying on the ground?

How do I change the drop object lying on the ground?
Change his wielded item? Or how to interact with it?
For example, if this drop is clicked with a certain item, it changes.