| Cheshire Cat Computing http://www.steveshipway.org/forum/ |
|
| ISSUEin2.6: Placing command blocks http://www.steveshipway.org/forum/viewtopic.php?f=44&t=9415 |
Page 1 of 1 |
| Author: | howlington [ Thu Oct 01, 2015 11:27 am ] |
| Post subject: | ISSUEin2.6: Placing command blocks |
Hi, this will be peculiar. When you copy a plan which contains command blocks and those commands place blocks relatively to the command block position with tilde ~ those relative coordinates are not rotated. I have included an example. (There is a button missing on one of the cobblestones on ground level to activate the command chain). When you place the example facing positive Z everything is fine. When you place it facing any other direction it messes up. Thanks for your hard work. File comment: Command chain Downloaded 918 times |
|
| Author: | stevesh [ Fri Oct 02, 2015 11:41 am ] |
| Post subject: | Re: ISSUEin2.6: Placing command blocks |
Ouch. This would be very awkward to handle. Yes, currently very little of the metadata in a Tile Entity is modified by rotation. In v2.7, the rotation of Mobs (including minecarts and armour stands) is preserved and rotated, as is any entity with a 'Pos' and 'Rotation' attribute. There is also a new provision (initially made for Carpenters Blocks addin) that allows you to (in the config file) specify a tile entity type, and a corresponding attribute and its rotation states. This is intended to handle custom blocks that hold their rotation in their tile entity. A separate rule allows you to define rotation states for custom blocks that hold their rotation state in their DV as with normal blocks. The problem here is that command blocks have just a large text Command attribute, which would need to be parsed, any relative coordinates identified and modified and then a new command string generated. This would not be a simple procedure. This is made even more complex by rotations -- so "~3 0 ~" would rotate a quarter-turn to become "~ 0 ~-3" and it would be even more complex if you had something like "~2 0 0", not to mention for commands with multiple coordinate sets. Commands to be affected would include blockdata, execute, fill, clone, particle, setitem, setblock, spawn, spawnpoint, stats, summon, testforblock, testforblocks, tp; I can see how many of these would be in common usage in many adventure structures and would need to rotate properly I can see a way to eventually achieve it, but I hate writing string parsing in Java - I've been spolit by the easy functions in Perl... |
|
| Author: | stevesh [ Sat Oct 03, 2015 6:40 pm ] |
| Post subject: | Re: ISSUEin2.6: Placing command blocks |
I have a very rough piece of code that manages to do this, but only for certain commands. In particular, it doesnt work for CLONE, TESTFORBLOCKS, some EXECUTE and custom commands. It also fails in odd cases where the X coordinate is relative and the Z is absolute... However, it does work for the example cfg you posted above. I have this in the 2.7 beta for MC1.8 at the moment. I'd let you have a copy but I think you use MC1.7.10, am I right? |
|
| Author: | stevesh [ Sat Oct 03, 2015 10:53 pm ] |
| Post subject: | Re: ISSUEin2.6: Placing command blocks |
Please test this beta: http://minecraft.curseforge.com/project ... ers-helper Compiled for 1.7.10 and for 1.8 Java 1.8 only |
|
| Author: | howlington [ Mon Oct 05, 2015 11:27 am ] |
| Post subject: | Re: ISSUEin2.6: Placing command blocks |
I use 1.7.10 and also 1.8 (MultiMC). Tested in 1.8 and works flawlessly for the gate (which is the only use of command blocks with the "fill" command at the moment). If I get around to use the command blocks for something else I'll report back. Thanks for your hard work. |
|
| Page 1 of 1 | All times are UTC + 12 hours [ DST ] |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|