214 posts
Location
/home/marcus/
Posted 11 April 2015 - 05:11 PM
CCWE
This is just a Worldedit-looking thingy written for CC.Video: https://youtu.be/OthNkEeS7wACommands:Spoiler
$p1 / $p2: Same as //pos1 / pos2 in WE
$set: Almost the same as in WE, the format is $set <blockid> [data]
$pos: Prints out the selection
$cl: //desel
Debug functions:
$ray: Debugs raytracing used in $p# h
Requirements:Pastebin:
pastebin get AWumPJuQ worldedit
pastebin get RkVehDwj vector
Edited on 17 April 2015 - 02:32 PM
82 posts
Location
Pork roll land
Posted 12 April 2015 - 09:17 PM
Great minds think alike?Why do you use the chat box? The adventure map interface has the "chat_message" event already in it.
If you want to look at anything in my program, most of the important stuff is in the core program.
Given the development I've done so far, I have some tips if you want to keep making this (Hey, maybe you'll do this better than I did!):
- Re-implement set so that it uses a table of coordinates instead of a for loop. This will let you support ellipsoid and polygonal selections later. (You can look at the function makeCuboidSelection() for how I did it)
- Put in a blacklist of blocks for $p1 h, because most modpacks have invisible blocks in them, like residual heat from Railcraft or light blocks from thaumcraft's arcane lamp.
- Implement a sleep every X thousand blocks, because you may get too long without yielding.
- Write a string.split() equivalent, because if you implement the complex block syntax set uses in actual worldedit, you'll need it. (string.split() in mine)
- use peripheral.find(), hardcoding the side it's on is silly.
- If you want to make it work with block names like WorldEdit does, just use my names table. It's a lot of typing out block names manually otherwise. (BlockNames in my program)
- If you don't know what a "Normalized Direction Vector" is, like I didn't when I was working on this, look at my getDirection() function. Then you can implement a couple of things.
- Don't try to do ANYTHING with NBT. It has not worked properly since CC 1.58. Maybe a later update will fix this, but for now, it simply does not work as far as I could tell.
- Finally, feel free to PM me if you need help. Immibis's adventure map interface is kind of difficult to work with sometimes.
Edited on 12 April 2015 - 07:35 PM