#World Transmutation

1 messages · Page 1 of 1 (latest)

round sphinx
#

I'm basicly creating a tool to change blocks into other blocks when clicked in the world.
Is there a good and reliable way to define what block should turn into what block? There's going to be a good bit of different blocks, but I don't feel like using a mass else if tree here..

eager river
#

Inline ifs ig

#

so like

#

do stuff if condition would work wouldn't it?

round sphinx
#

Yeah, I believe so.

sinful linden
#

Can you explain more in depth what you’re trying to do or nah? It’s possible we can use lists but more info needed

#

If you’re doing what I’m thinking you’re doing, make parallel lists.
List 1 = your reference list, list 2 = your changed list

So list 1 can be dirt, stone, gravel

List 2 can be mud, cobblestone, and sand

When you’re doing your transformation or something, if the block exists in list 1, take note of its index in that list. After it’s found, check the same index in the 2nd list to get the value it’s supposed to change into.

round sphinx
sinful linden
#

hopefully that pieces it together

round sphinx
#

Remmeber my stones I made.?

sinful linden
#

no

#

who are u

round sphinx
#

ohno

sinful linden
#

🤣

round sphinx
#

i-

#

I thought we where friends

sinful linden
#

IM KIDDING

#

yesi remember the stones

round sphinx
#

I'm remaking the red stone (Reality) from 0, adding tons of more functions to it

#

Watch this:

#
Red Stone of Arcanum (Reality)
Feature: Area of Effect (stated as "range").
Can be changed by chatting an integer up to 5.
1. Alteration: Can interact with various blocks in the world, using range around a clicked block.
- Dirt will be tilled to farmland
- Leaves wil be sheared
2. Building: You can set a first and second position to form a cubic region. Holding a toold in your offhand will change the type of block to use. Chatting "set" will fill the entire region with the block your holding, removing 1 from the user's inventory per block placed.
Chatting "clear" will attempt to clear out the region. Will void (does not drop blocks) all blocks up to obsidian level.
The region can be any size (cubic/rectangle) as long as it does not exceed 64 blocks in volume per operation.

3. Transmutation: Can change various blocks into other blocks.
- Any colorable blocks [wool, terra, stained] into another color variant.
- Any flower to other flowers
- Any wood [logs, stairs, planks, slabs, fence] into another wood variant.
- Water to Ice [and reverse]
- Lava to Obsidian [and reverse]
- Grass to Dirt [reverse]
- Mycelium to Podzol [reverse]
- Stone to Andestie, to Diorite, to granite, to stone.
- Deepslate to Tuff

4. Entity Alteration.
- Zombie to Villager
- Witch to Villager
- Husk To zombie
- Stray to skeleton
- Zombie pigman to piglin
#
Left click: Instantly void the clicked block up to obsidian
Sneak left click: Save a region location (cycles between 1 and 2 each click)
Right click: Transmute a block into others using range
Sneak Right Click: Cause alteration-interactions within range.

Chat: 1-5: set range amount.
Chat: "set": Place blocks in region
Chat: "clear": Clear blocks in region
round sphinx
#

These are a lot of changes so i might need a huge list

sinful linden
#

it will definitely need some working, I dont have THAT much experience but you will want to basically

loop all blocks within x and y
if {list1::%raw loop-block%} is set:
somehow get the index of this, like is it the 4th one over, the 9th, etc
set block at loop-block to {list2::%{_indexthatyoufoundfrom1stlist}%}

round sphinx
#

I see..