3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-10 05:20:04 +01:00
Commit graph

943 Commits

Autor SHA1 Nachricht Datum
zml2008
deea1f7655 Moved PermissionsResolverServerListener into PermissionsResolverManager and got rid of some unnecessary methods. 2011-12-04 19:06:41 -08:00
TomyLobo
cd2f56918d Renamed WEPIFRutimeException to WEPIFRuntimeException and gave it a serialVersionUID. 2011-12-05 03:41:24 +01:00
TomyLobo
09589e2a79 Fixed switch treating continue like break. 2011-12-05 03:23:22 +01:00
zml2008
daf1dde701 Moved WEPIF to the com.sk89q.wepif package and made PermissionsResolverManager a singleton
Added OfflinePlayer permissions fetching methods to WEPIF
2011-12-04 17:42:46 -08:00
TomyLobo
04a08e7e0c Improved Switch's optimizer. 2011-12-04 21:00:03 +01:00
TomyLobo
d55376e8a6 Added an optimizer and license/element comments for Switch. 2011-12-04 20:26:14 +01:00
TomyLobo
7a429e9932 Made Node.getPosition final and fixed some whitespace in LocalWorld. 2011-12-04 20:06:23 +01:00
TomyLobo
a8e64fd8bc Added switch/case to the expression parser.
Also added a test case.
2011-12-04 09:25:56 +01:00
TomyLobo
61b2ea4007 Added "switch" and "case" to the list of keywords so they can't be used as variable names. 2011-12-04 06:40:09 +01:00
TomyLobo
4753574bae Basically rewrote the tree remover tool to use breadth-first search to get rid of deep recursions.
Also changed a message to be more precise.
2011-12-03 02:11:10 +01:00
TomyLobo
771d068826 Reduced indentation on a piece of code. 2011-12-01 20:20:49 +01:00
TomyLobo
af9e2da6d3 Simplified the statement parser, fixed a few quirks and adjusted a test case. 2011-11-30 09:18:53 +01:00
TomyLobo
9cdac001e3 Added a megabuf function to the expression parser, which works like gmegabuf, except that there is one buffer per Expression instance. 2011-11-30 05:27:11 +01:00
TomyLobo
c6518a9243 Added a way to retrieve the current expression instance. 2011-11-30 05:20:16 +01:00
TomyLobo
662e597f1a Moved temporary variable creation from Parser to Expression. 2011-11-30 04:45:48 +01:00
sk89q
11245014c8 Added @Override annotations. 2011-11-29 20:17:50 +01:00
TomyLobo
36e4b99ade Added particle effects to area and recursive pickaxe. 2011-11-29 09:15:41 +01:00
TomyLobo
6be514cdf9 Added LocalWorld.queueBlockBreakEffect. 2011-11-29 09:15:29 +01:00
TomyLobo
a4ccadacdc Added ServerInterface.schedule(delay, period, task). 2011-11-29 09:09:04 +01:00
TomyLobo
cc0e39b493 Added particle and sound effects to the single super pickaxe. 2011-11-28 07:36:42 +01:00
TomyLobo
36fbfa409f Added LocalWorld.playEffect and an implementation for Bukkit. 2011-11-28 07:13:19 +01:00
TomyLobo
a6f0a48f84 Added a swap function to the expression parser. 2011-11-28 00:30:52 +01:00
zml2008
255e342353 Added enchantment support 2011-11-27 15:29:51 -08:00
zml2008
51dd7a0c9c Improved handling of valid blocks not in BlockType and added dragon egg to BlockType 2011-11-27 15:29:26 -08:00
TomyLobo
5d59dd764e Changed getSafe*File to accept varargs instead of arrays. 2011-11-27 05:29:49 +01:00
TomyLobo
c8180e641f Reverting part of a cleanup that made java cry for some obscure reason. 2011-11-25 06:34:10 +01:00
TomyLobo
6aec096709 Fixed a comment. 2011-11-24 21:20:44 +01:00
TomyLobo
77bd86a203 Whitespace police 2011-11-24 21:07:14 +01:00
TomyLobo
5ec6276674 Made ExpressionTest invoke the optimizer every time it evaluates an expression.
This way that thing at least gets SOME coverage.
2011-11-24 21:00:09 +01:00
TomyLobo
c1e151ac19 Improved the expression parser's optimizer.
Added optimizers for Conditional, For, SimpleFor and While.
Improved the Sequence optimizer.
Removed the optimizer TODOs from Break and Return.
2011-11-24 21:00:09 +01:00
TomyLobo
05b427316d Changed signature of the optimize() method to return an RValue. 2011-11-24 20:50:07 +01:00
TomyLobo
7cbb7da80b Added the ternary operator. 2011-11-24 20:04:42 +01:00
TomyLobo
9456c9e58f Expression parser improvements
- Fixed calling nullary functions.
- Improved error reporting for missing functions
- Added random() and randint(max)
- Improved Sequence.optimize() to eliminate statements with no effect
- Adjusted a comment
2011-11-24 11:05:41 +01:00
TomyLobo
adf326e2bf Renamed some variables and adjusted some comments in ArbitraryShape. 2011-11-24 11:01:24 +01:00
TomyLobo
d69b04caf5 Added some element comments to ArbitraryShape. 2011-11-24 04:06:14 +01:00
TomyLobo
dfb729d5f1 Added license blocks and element comments to all expression parser classes.
Also updated some terminology
2011-11-24 03:55:06 +01:00
TomyLobo
71287299b5 Added a simple for loop to the expression parser.
Syntax: for (counter = first, last) { body }
Also added a test case.
2011-11-24 02:35:19 +01:00
TomyLobo
7e13b60a51 Cleanup 2011-11-23 04:48:40 +01:00
TomyLobo
1a57f6e95d Added return, break and continue. 2011-11-22 18:51:19 +01:00
TomyLobo
efc2209c0f Prevented overwriting built-in constants. 2011-11-22 17:47:44 +01:00
TomyLobo
5ef9df7feb Made it possible to leave parts of a for statement empty. 2011-11-22 16:56:41 +01:00
TomyLobo
e6e31d0b93 Moved some code around 2011-11-22 16:35:56 +01:00
TomyLobo
effbf9f79c Added for loops to the expression parser, java style.
Also:
- Added a test case for for
- Fixed Identifiable.id() for the runtime Nodes and added missing elements to the list in Identifiable.java.
- Factored keyword and character consumption into a common function.
2011-11-22 16:08:15 +01:00
TomyLobo
f217be0bdf Added while loops to the expression parser.
Also added a test case.
Iterations are currently limited to 256 maximum.
2011-11-22 06:16:23 +01:00
TomyLobo
aa43975e34 Added support for if/else to the expression parser. Basically same syntax as Java.
Also added a test case.
2011-11-22 05:12:32 +01:00
TomyLobo
5071885d10 Expression parser: Extended the index range of the megabuf function and renamed it to gmegabuf 2011-11-22 02:33:01 +01:00
TomyLobo
c6fee413dc Changed BukkitWorld.killMobs, so it compiles with the latest RB again.
Also increased forward compatibility as a side-effect.
2011-11-21 06:21:21 +01:00
Wizjany
19194ccb88 Made //butcher apply to enderdragons 2011-11-20 19:31:13 -05:00
TomyLobo
0c9c213e4e Added support for assignable function results.
Also:
- Added megabuf(index) as a first, temporary example
- Introduced a new Node class at the top of the hierarchy for the runtime.
- RValue and LValue are now interfaces
- Narrowed down some exception declarations
- Optimized the optimizer for functions
2011-11-20 17:41:38 +01:00
TomyLobo
7812d8f5f8 Cleanup and refactorings 2011-11-20 06:02:54 +01:00
TomyLobo
feee529095 Improved error reporting for number format errors. 2011-11-20 05:31:18 +01:00
TomyLobo
cf30a63018 Further cleanup of input handlers.
Slight deviation from previous behaviour:
Wand and navigation wand can no longer be used as ordinary tool binds.
However, these are already blocked elsewhere anyway, so it is unimportant.
2011-11-20 02:00:12 +01:00
TomyLobo
71d302c893 Removed fix for issue #376, since the problem appears to have been fixed on the CraftBukkit side now.
Also cleaned up the input handlers a bit.
2011-11-20 01:45:25 +01:00
TomyLobo
1194f4448e Fixed the unused Polygonal2DSelection(List, int, int) constructor. 2011-11-19 15:09:28 +01:00
TomyLobo
13f36757c2 Fixed compass teleporting twice on cliff edges 2011-11-16 16:54:05 +01:00
zml2008
927cab001e Fixed a few bugs with permissions resolver loading. 2011-11-15 20:38:23 -08:00
TomyLobo
86dfa3dce8 Cleaned up WorldEditPlayerListener.onPlayerInteract. 2011-11-13 15:17:08 +01:00
TomyLobo
a3946dc8c4 Typo fix.
Thanks, Moo0
2011-11-13 15:00:41 +01:00
zml2008
c29856f5a8 Added a registration method that returns information about successfully registered commands 2011-11-11 15:47:50 -08:00
zml2008
256897f473 Added seperate permissions for jumpto/thru commands and tools 2011-11-11 15:39:42 -08:00
zml2008
0a4cbd435f The permissions resolver needs to be loaded! 2011-11-10 19:36:57 -08:00
TomyLobo
ae3adae8a8 Disabled fast lighting until the issues are resolved. 2011-11-09 02:49:24 +01:00
TomyLobo
04b7f40f46 Renamed some local variables in WorldEdit.getblock.
Also added a note about a potential concurrency problem i stumbled upon.
2011-11-05 18:09:50 +01:00
TomyLobo
af1c600fc9 Non-leaf blocks should no longer show up as leaves in the inventory when using block bags. 2011-11-05 17:58:51 +01:00
TomyLobo
e72f84f08f Leaves can now be stored in a block bag. 2011-11-04 19:39:05 +01:00
TomyLobo
3ed5841863 The block bag fetch/place mapping is now taken from BlockType.getBlockBagItem. 2011-11-04 16:56:53 +01:00
TomyLobo
7beac92232 Added a deprecated delegate for storeDroppedBlock. 2011-11-04 16:39:56 +01:00
TomyLobo
2d0880e38d Piston extension and moving piece now put nothing into the blockbag. 2011-11-04 13:53:21 +01:00
TomyLobo
8e368ceef1 Employed a set of consistent rules for getDroppedBlock(type, data) and renamed it to getBlockBagItem. 2011-11-04 13:27:51 +01:00
TomyLobo
d9b8285a35 Made ItemType.usesDamageValue a bit more sane. 2011-11-03 18:34:20 +01:00
TomyLobo
ff39121fc8 Begun adding support for data/damage values to the blockbag. 2011-11-03 15:51:23 +01:00
TomyLobo
429bfe9faa Added BlockType.getDroppedBlock(int type, int data)
It currently still ignores the data value, but there's a framework in place to add data values.
2011-11-03 15:51:22 +01:00
zml2008
04803de8b1 Fixed some NPE's for block types not in BlockType. 2011-11-02 22:51:48 -07:00
TomyLobo
4c05050d73 Improved /we version output for dev builds. 2011-11-02 17:23:45 +01:00
TomyLobo
a51bc28756 Added true and false constants to the expression parser. 2011-11-02 15:29:55 +01:00
TomyLobo
c2cd587a9b Added support for functions that take LValues and added rotate(x&,y&,angle) 2011-11-02 03:41:35 +01:00
TomyLobo
ff03d03fd7 Cleanup 2011-11-02 03:41:22 +01:00
TomyLobo
187896c5ed Made //deform round the results before lookup and fixed some potential issues. 2011-11-02 03:39:02 +01:00
TomyLobo
2edf3559d8 EditSession: Split off a queueFinal, which contains only blocks that can be attached to other attached blocks.
This a speed improvement, since the recursive attachment checker turned out to be quite slow.
2011-11-01 21:58:50 +01:00
TomyLobo
2ee36f7484 //generate and //deform no longer behave oddly with selections that are only one block thick in either direction. 2011-11-01 16:32:56 +01:00
TomyLobo
4f1196ce2d Added a //deform command, which deforms a region given an expression that operates on the x/y/z variables. 2011-11-01 15:27:13 +01:00
TomyLobo
a5e5880064 Moved shape generation to EditSession.
Also refactored it to get rid of the 3 different anonymous classes.
2011-11-01 15:27:12 +01:00
TomyLobo
c5c68f481b Moved all command-implementing methods to the bottom of the file. 2011-11-01 14:54:32 +01:00
TomyLobo
478d6f6e54 Added support for type/data to //generate. 2011-11-01 14:31:33 +01:00
TomyLobo
8a83f7f70e Added support for custom materials to ArbitraryShape and adjusted //generate accordingly. 2011-11-01 14:28:03 +01:00
TomyLobo
02a70cca4a Added Pattern.next(int, int, int).
This method can be used to avoid creating short-lived vectors in tight loops.
2011-11-01 14:25:41 +01:00
TomyLobo
6b0f237a46 Removed extra fastLighting flag.
Fast lighting is now used when available.
2011-10-31 03:28:05 +01:00
TomyLobo
d3822ee345 Fixed postfix operator evaluation order. 2011-10-31 00:42:57 +01:00
zml2008
d5328e34ba This might fix problems people have been having with dinnerperms. 2011-10-30 15:16:00 -07:00
TomyLobo
8e0539adf1 Parser improvements
- After a closing brace or a semicolon, a new expression starts. This fixes "{}-1" and ";-1" returning an error.
- Empty statements and empty block statements are now fully supported
- Renamed PrefixOperator to UnaryOperator
- Added postincrement(x++), postdecrement(x--) and factorial(x!) operators
2011-10-30 06:04:49 +01:00
TomyLobo
77d1317964 Added support for temporary variables 2011-10-29 21:07:31 +02:00
Wizjany
2719308ada Made //fast display a different message if the argument matches the current mode 2011-10-29 13:32:51 -04:00
Wizjany
2b9f0be8df Updated to 1.9 2011-10-29 13:32:51 -04:00
Wizjany
699807665d Cleanup 2011-10-29 11:57:45 -04:00
TomyLobo
8797d8ac3c Added element comments to all classes of the expression parser.
Also fixed some id() implementations.
2011-10-29 17:24:11 +02:00
TomyLobo
e70446e82e Renamed RValue.invoke() to getValue. 2011-10-29 16:03:55 +02:00
TomyLobo
93f073f264 Renamed Assignable to LValue and Invokable to RValue 2011-10-29 16:01:55 +02:00
TomyLobo
0ba3da2641 Reverted to old manual lighting system that doesn't call notch's block lighting functions directly. 2011-10-29 05:27:17 +02:00
TomyLobo
8ce3f4d77a Moved some code around in ParserProcessors.java 2011-10-29 04:20:13 +02:00
TomyLobo
f28401aecc Moved the sub-processors into a new class, ParserProcessors. 2011-10-28 20:34:48 +02:00
TomyLobo
58be9d9be4 Added support for stretched cylinders and brought their profile in line with that of the central layer of a sphere of the same x/z radius. 2011-10-28 20:34:08 +02:00
TomyLobo
318e81886c Removed -q flag from //[h]sphere and the code to back it.
The speed difference between the "flexible" and the "quick" variant is so minor that it doesn't justify the aditional code complexity.
2011-10-28 15:10:14 +02:00
TomyLobo
d9b86025d3 Parser refactorings
- Made all sub-processors static
- Made statement (combined) assignment parsing right-associative
- Added a stub for the ternary operator
- Fixed position value on Sequences
2011-10-28 00:37:18 +02:00
TomyLobo
f6f08da620 Cleanup 2011-10-27 19:29:02 +02:00
TomyLobo
ee79abff67 The expression parser can now parse more than a simple expression
- Added sequencing (; and {}).
- Added =, +=, -=, *=, /=, %=, ^= to the expression parser. (left-associative for now, will change later)
- Added pre-increment(++) and pre-decrement(--) operators.
- Adjusted/added tests.
2011-10-27 19:16:46 +02:00
TomyLobo
9c070c323f Added ternary versions of min and max. 2011-10-27 19:06:27 +02:00
TomyLobo
ef5fba0f05 Improved accuracy of Function.getPosition() after optimization. 2011-10-27 19:06:26 +02:00
TomyLobo
0ca66ce350 Moved check for fastLightingAvailable from BukkitWorld.fixAfterFastMode to fixLighting and adjusted the description for //generate. 2011-10-26 23:24:23 +02:00
Wizjany
dbc3053195 Fixed & updated BlockType.usesDamageValue 2011-10-26 16:50:46 -04:00
TomyLobo
906b6dd832 Forgot to save... 2011-10-25 23:26:25 +02:00
TomyLobo
9fa5c4030b Added a //g[en[erate]] command, which generates a shape according to a mathematical formula.
(result > 0) = true = inside
(result <= 0) = false = outside.
2011-10-25 18:46:14 +02:00
TomyLobo
d4c2832437 Added an ArbitraryShape class which can be used to generate hollow and solid shapes based on an in/out condition. 2011-10-25 18:46:12 +02:00
TomyLobo
c2191f4fc7 Generalized the Lexer a bit more and renamed a function in the parser. 2011-10-25 18:45:52 +02:00
TomyLobo
7dfc2a34e5 Improved fast mode.
BukkitWorld's fast lighting mode now also does what the old fast mode did.
In addition, both fast lighting mode and the fallback resend all modified chunks when done.
This should prevent display issues.
2011-10-25 18:41:07 +02:00
TomyLobo
3ed867ed53 Added left, right, back and forward directions to all directional commands. 2011-10-25 01:07:08 +02:00
TomyLobo
2d654b59c5 Reduced code duplication in the WorldEdit.get*Direction methods. 2011-10-25 01:06:18 +02:00
TomyLobo
3962e6c9d8 Added LocalPlayer.getCardinalDirection(int yawOffset) 2011-10-25 01:02:50 +02:00
TomyLobo
a1fb1fd4e4 Using Notch's block lighting functions now.
Also removed some debug messages
2011-10-24 23:42:04 +02:00
TomyLobo
a0461aeb2c BukkitWorld.fixLighting now also fixes block light. 2011-10-24 20:49:17 +02:00
TomyLobo
b31d77536a Added some new functions to BlockType.
- emitsLight which returns whether the given block type emits light
- isTranslucent, which returns whether the block lets any light pass
2011-10-24 20:49:17 +02:00
TomyLobo
4f7e1a6b31 Improved speed greatly by deferring lighting until after all blocks are in place.
This needs CraftBukkit to work.
2011-10-24 13:44:22 +02:00
TomyLobo
e8dcee1acf Added LocalWorld.fixLighting(Set<BlockVector2D>)
This method redos lighting in the given chunks.
BukkitWorld's current implementation introduces some slight errors and doesn't redo torch light, but it's better than nothing.
2011-10-24 13:35:48 +02:00
TomyLobo
ef88c04550 Gave //fast an on|off parameter and adjusted its message to reflect a future change. 2011-10-24 04:33:19 +02:00
TomyLobo
542aed6ffd Fixed warnings. 2011-10-24 04:32:02 +02:00
TomyLobo
ffe5f89afc EditSession.flushQueue(): queueLast is now ordered with attachments in mind. 2011-10-24 04:31:34 +02:00
zml2008
bd5c78bb40 Fixed bug in PermissionsEx resolver when PermissionsEx is not found. 2011-10-23 09:19:29 -07:00
zml2008
52982c7c0f Moved YAML classes from RegionBook from WorldGuard into WorldEdit and made everything use those. 2011-10-22 23:48:15 -07:00
zml2008
a928349b1a Fixed bug in NijiPermissionsResolver.isFakePerms() 2011-10-22 08:07:02 -07:00
zml2008
0e6597fb86 Added configurable detection order of permissions resolvers, restored old default order, and updated configurations to the new Configuration 2011-10-22 01:34:24 -07:00
TomyLobo
d93d85cd37 Added an expression parser. 2011-10-18 01:04:04 +02:00
Wizjany
467cc4dd14 Fixed infinite loop. Just because it's unused in worldedit doesn't mean you should break it -.- 2011-10-12 17:47:26 -04:00
zml2008
050eef8dc7 Fixed checkLoadedChunk 2011-10-10 02:01:50 -04:00
Wizjany
b89ede09a6 Bugfix for jumpto 2011-10-09 20:43:21 -04:00
Wizjany
440f3baed1 Changed order of perms resolvers loading so that dinnerperms and ignore-niji-bridges settings were not ignored. 2011-10-09 20:43:21 -04:00
sk89q
09447c5f6c Fixed CommandContext.matches() always returning true. 2011-10-09 10:31:15 -07:00
Wizjany
68fe0d3438 Cleanup. Cycler uses BaseBlock instead of BlockData directly. Fixed a few BlockType method inaccuracies. 2011-10-04 17:16:20 -04:00
zml2008
9e877740aa Added negated node support for DinnerPerms lookup. 2011-10-03 22:09:44 -07:00
ZachBora
bb609a47c2 Negative angles will return negative number of rotations thus never looping the rotation. 2011-10-02 22:26:44 -03:00
zml2008
24056df78a Fixed config generation for Windows users 2011-10-02 01:27:52 -07:00
Meaglin
b17fb7eaa3 Adding /snapshot sel [index] to select a snapshot by list index. 2011-10-02 00:10:27 -04:00
TomyLobo
e2c71e4269 Added cactus to getAttachment. 2011-09-30 08:56:09 +02:00
TomyLobo
7fec065d4a Apparently the wiki has wrong data values for the stone button.
Also added top attachment for vines.
2011-09-29 21:11:51 +02:00
TomyLobo
69367e7762 Added BlockType.getAttachment.
See javadoc for details.
2011-09-29 15:54:28 +02:00
TomyLobo
f354ab392f Refactored BlockData test case to reduce code duplication. 2011-09-29 08:19:02 +02:00
zml2008
ccfabd94b9 Should fix broken config generation some people have been getting 2011-09-28 19:05:47 -07:00
TomyLobo
cbc331da7d Added some constants com.sk89q.worldedit.blocks.ClothColor.ID.X = ClothColor.X.getID() 2011-09-28 10:57:30 +02:00
TomyLobo
21c6ab894c Moved BlockData to the blocks package and left a stub with deprecated delegates behind. 2011-09-28 10:45:32 +02:00
TomyLobo
accd841b51 Fixed a few warnings 2011-09-28 08:05:50 +02:00
Wizjany
2d7c462477 Cleanup formatting. 2011-09-27 03:32:46 -04:00
t3hk0d3
4f80e78a7e WEPIF Improvement: code clean out, hardcoding removal and refactoring. Added Service discovery to PluginPermissionsResolver 2011-09-26 21:20:02 -07:00