Commit graph

150 commits

Author SHA1 Message Date
CraftBukkit/Spigot
b15c3451a2 Fix weird test import in EnderDragonPhaseTest
By: md_5 <git@md-5.net>
2019-04-23 21:28:41 +10:00
CraftBukkit/Spigot
09673c1a03 Apply import ordering rules to CraftBukkit classes
By: md_5 <git@md-5.net>
2019-04-23 14:54:36 +10:00
CraftBukkit/Spigot
7afe4d02f8 Begin implementation of CheckStyle style checking
By: md_5 <git@md-5.net>
2019-04-23 14:00:30 +10:00
CraftBukkit/Spigot
a0f2b74c8d Update to Minecraft 1.14-pre5
By: md_5 <git@md-5.net>
2019-04-23 12:00:00 +10:00
CraftBukkit/Spigot
3d88c2acc0 Remove the Damage tag from items when it is 0.
CraftBukkit (and Minecraft as well in some cases, such as when getting
an item from the creative inventory menu) will omit the Damage tag when
it is zero. However, minecraft will add the tag in some situations
nevertheless, such as when loading the ItemStack, or when explictly
setting the item undamaged.

These items (with and without the Damage tag for undamaged items) will
be considered as different by minecraft and CraftBukkit in various
situations, even though they should not. In CraftBukkit these items will
actually only be considered unsimilar if the items' metadata is not
'empty' (if it contains other additional metadata, such as enchantments,
etc.).

If the item's tag is empty after removing the Damage tag, it gets
completely removed. The setRepairCost function was adapted to behave in
the same way (removal of the tag if it becomes empty).

By: blablubbabc <lukas@wirsindwir.de>
2019-04-18 11:56:42 +02:00
CraftBukkit/Spigot
dcc541a4a0 Mappings Update
By: md_5 <git@md-5.net>
2019-03-17 11:48:53 +11:00
CraftBukkit/Spigot
6846b3d2d9 SPIGOT-4646: Test + fix InventoryWrapper.getContents
By: md_5 <git@md-5.net>
2019-03-05 16:59:40 +11:00
CraftBukkit/Spigot
a6ec0de609 Fix EntityPickupItemEvent getRemaining / PlayerInventory#canHold
Without this change the calculation of fitting items was incorrect, so event.getRemaining() did return 0 when it should not be 0.

By: Brokkonaut <hannos17@gmx.de>
2019-02-12 04:49:24 +01:00
CraftBukkit/Spigot
1f4d52d582 SPIGOT-4577: Fix loss of int/double custom tags when serialized to yaml
By: Bjarne Koll <LynxPlay101@gmail.com>
2019-01-13 16:25:17 +01:00
CraftBukkit/Spigot
42831b84cd Add BlockData#getAsString(boolean) to hide unspecified states
By: Parker Hawke <hawkeboyz2@hotmail.com>
2018-12-16 18:21:29 -05:00
CraftBukkit/Spigot
83baf22bde Mappings Update
By: md_5 <git@md-5.net>
2018-12-13 11:00:00 +11:00
CraftBukkit/Spigot
b69f1de549 SPIGOT-4347: Add API to allow storing arbitrary values on ItemStacks
By: Bjarne Koll <LynxPlay101@gmail.com>
2018-12-01 20:26:23 +11:00
CraftBukkit/Spigot
699739c7f0 SPIGOT-4489: NOTE_BLOCK incorrectly has BlockStateMeta
By: md_5 <git@md-5.net>
2018-11-16 15:18:28 +11:00
CraftBukkit/Spigot
43b017f431 SPIGOT-4455: ChunkData.getType returns legacy material
By: md_5 <git@md-5.net>
2018-10-29 07:17:59 +11:00
CraftBukkit/Spigot
a194267323 Update to Minecraft 1.13.2
By: md_5 <git@md-5.net>
2018-10-23 06:00:00 +11:00
CraftBukkit/Spigot
0de14a04dd SPIGOT-4399: Add attribute modifier equality test
By: Nathan Wolf <nathan@elmakers.com>
2018-09-26 17:21:53 -07:00
CraftBukkit/Spigot
ded48a6734 Add API to locate structures.
By: Senmori <thesenmori@gmail.com>
2018-09-21 08:49:54 -04:00
CraftBukkit/Spigot
2eeecfdb92 Fix some tests randomly failing
By: md_5 <git@md-5.net>
2018-08-26 20:44:50 +10:00
CraftBukkit/Spigot
9fb6b929e8 Add additional tests for CraftBlockData
By: Senmori <thesenmori@gmail.com>
2018-08-25 01:35:40 -04:00
CraftBukkit/Spigot
f578d94680 Update to Minecraft 1.13.1
By: md_5 <git@md-5.net>
2018-08-26 12:00:00 +10:00
CraftBukkit/Spigot
39c4334d76 SPIGOT-1936: LootTable API
By: Senmori <thesenmori@gmail.com>
2018-08-12 18:39:51 +10:00
CraftBukkit/Spigot
422f1f548e Expand GameRule API
By: Senmori <thesenmori@gmail.com>
2018-08-11 11:24:33 +10:00
CraftBukkit/Spigot
a41e9fe8a5 Add Unit Tests for geHardness and getBlastResistance
By: Christos Miniotis <chrismin1302@gmail.com>
2018-08-08 04:06:36 +03:00
CraftBukkit/Spigot
a24a2c26ae Add merging and matching of parsed BlockData
By: md_5 <git@md-5.net>
2018-08-06 14:40:06 +10:00
CraftBukkit/Spigot
b4349f5a60 SPIGOT-3936: Add isInteractable to Material
By: Christos Miniotis <chrismin1302@gmail.com>
2018-08-02 15:26:02 +03:00
CraftBukkit/Spigot
e9fc2452ed SPIGOT-4214: Catch attempts to create BlockData for items
By: md_5 <git@md-5.net>
2018-08-02 20:24:56 +10:00
CraftBukkit/Spigot
1e014acb80 Update to Minecraft 1.13
By: md_5 <git@md-5.net>
2018-07-22 12:00:00 +10:00
CraftBukkit/Spigot
6826aaee8f SPIGOT-4074: Fix createBlockData succeeding on garbage
By: md_5 <git@md-5.net>
2018-07-20 10:20:15 +10:00
CraftBukkit/Spigot
39de92187e Revert "SPIGOT-4035: Enforce case-sensitivity for chat format code matching."
Minecraft allows uppercase colour codes.

This reverts commit 844204b345.

By: md_5 <git@md-5.net>
2018-07-19 10:07:04 +10:00
CraftBukkit/Spigot
199b4654cd Amend previous unit test to use JSON rather than toString for validation
By: md_5 <git@md-5.net>
2018-07-18 09:40:51 +10:00
CraftBukkit/Spigot
844204b345 SPIGOT-4035: Enforce case-sensitivity for chat format code matching.
This maintains case-insensitivity for URL matching, and adds a unit test to verify correct conversion via CraftChatMessage.

By: Hex <hex@hex.lc>
2018-07-17 16:42:30 -06:00
CraftBukkit/Spigot
be907fd21b SPIGOT-4030: Improve CraftItemStack.hasItemMeta
By: md_5 <git@md-5.net>
2018-07-17 17:13:55 +10:00
CraftBukkit/Spigot
7e0a66fdd5 Update to Minecraft 1.13-pre7
By: md_5 <git@md-5.net>
2018-07-15 10:00:00 +10:00
CraftBukkit/Spigot
c3bf431172 Fix incorrect unit test name
By: md_5 <git@md-5.net>
2018-02-16 10:33:36 +11:00
CraftBukkit/Spigot
4cb801b840 Unit tests for Material.isItem
By: md_5 <git@md-5.net>
2018-01-16 09:57:47 +11:00
CraftBukkit/Spigot
dfa7c9eedb SPIGOT-2892: Fix some clone implementations and add unit test
By: md_5 <git@md-5.net>
2017-12-16 10:18:34 +11:00
CraftBukkit/Spigot
9a2cfd9957 Add ChunkDataTest from PR #157
By: Antony Riley <antony@cyberiantiger.org>
2017-12-08 19:37:15 +11:00
CraftBukkit/Spigot
57f7c8fb18 Add color API for Teams
By: md_5 <git@md-5.net>
2017-05-28 11:00:02 +10:00
CraftBukkit/Spigot
40c8954e17 Update to Minecraft 1.12-pre2
By: md_5 <git@md-5.net>
2017-05-14 12:00:00 +10:00
CraftBukkit/Spigot
1c486f86db Add Material.isFuel to check if a material is a furnace fuel.
By: Phoenix616 <mail@moep.tv>
2017-03-23 23:18:32 +01:00
CraftBukkit/Spigot
dd89db67a5 SPIGOT-1592: Implement ItemMeta for Spawn Eggs
The Minecraft implementation of spawn eggs is able to construct an entity using all data that is present in the save format, however since the Bukkit API has no such way to construct an entity unattached to a world, and it appears creating such a way is a very challenging task, the decision was instead made to add this API now that 1.11 has entities which may not be represented by data values.
In the future it may be possible to implement a more expanded API cognate with this one.

By: Matthew <stteg@hotmail.com>
2016-12-06 21:15:10 +11:00
CraftBukkit/Spigot
a00951dd57 SPIGOT-2871: Improve BlockStates + BlockStateMeta
By: md_5 <git@md-5.net>
2016-12-02 09:29:33 +11:00
CraftBukkit/Spigot
38fb5c2469 Add stopSound for specific sound category & unit test for SoundCategory
By: md_5 <git@md-5.net>
2016-11-19 14:27:18 +11:00
CraftBukkit/Spigot
7e4dfe78e5 SPIGOT-2787: Keep performing getter null conversion at call sites
By: md_5 <git@md-5.net>
2016-11-18 11:07:02 +11:00
CraftBukkit/Spigot
a75c80e93d Remove unit test based on now incorrect assumptions
By: md_5 <git@md-5.net>
2016-11-18 09:11:17 +11:00
CraftBukkit/Spigot
4e412ab4e3 Update to Minecraft 1.11
By: md_5 <git@md-5.net>
2016-11-17 12:41:03 +11:00
CraftBukkit/Spigot
b46eb8a572 SPIGOT-2481: Implement EnchantmentTarget.BREAKABLE
By: md_5 <git@md-5.net>
2016-07-08 12:51:32 +10:00
CraftBukkit/Spigot
f155cbbaf2 BUILDTOOLS-251: Make much of Bukkit locale independent
By: md_5 <git@md-5.net>
2016-06-26 19:32:05 +10:00
CraftBukkit/Spigot
a39b7e5f3a Update to Minecraft 1.10
By: md_5 <git@md-5.net>
2016-06-09 11:43:49 +10:00
CraftBukkit/Spigot
15f22a7986 SPIGOT-1934: Expand EnderDragon API - implement dragon phases
By: Matthew <stteg@hotmail.com>
2016-03-15 23:32:37 -04:00
CraftBukkit/Spigot
104519f08f SPIGOT-1638 / SPIGOT-1673: Rework Potions API
By: t00thpick1 <t00thpick1dirko@gmail.com>
2016-03-02 20:43:58 -05:00
CraftBukkit/Spigot
84d08ed896 Ignore FROSTED_ICE in meta unit tests.
By: md_5 <git@md-5.net>
2016-03-01 13:30:26 +11:00
CraftBukkit/Spigot
47dc73969e Run Biome test with AbstractTestingBase
By: md_5 <git@md-5.net>
2016-03-01 09:49:29 +11:00
CraftBukkit/Spigot
21d4bf5d1f Update to Minecraft 1.9
By: md_5 <git@md-5.net>
2016-03-01 08:32:46 +11:00
CraftBukkit/Spigot
38b1bb1aef Update to 1.8.4
By: Thinkofdeath <thinkofdeath@spigotmc.org>
2015-05-05 21:43:47 +01:00
CraftBukkit/Spigot
02c89ee898 Update the rename markers
By: Thinkofdeath <thinkofdeath@spigotmc.org>
2015-03-19 21:29:12 +00:00
CraftBukkit/Spigot
d5926b189e SPIGOT-370: Remove LOCKED_CHEST
It doesn't exist anymore and has been deprecated for a year

By: Thinkofdeath <thinkofdeath@spigotmc.org>
2015-03-11 17:49:10 +00:00
CraftBukkit/Spigot
e6c5eefd78 Add a unit test for map colors
By: Thinkofdeath <thinkofdeath@spigotmc.org>
2015-03-07 12:57:59 +00:00
CraftBukkit/Spigot
85be409b13 Update to Minecraft 1.8.3
By: Thinkofdeath <thinkofdeath@spigotmc.org>
2015-02-26 22:41:06 +00:00
CraftBukkit/Spigot
e37df9a195 Fix PerMaterialTest skipping useful tests for certain blocks
By: Thinkofdeath <thinkofdeath@spigotmc.org>
2015-01-25 11:59:37 +00:00
CraftBukkit/Spigot
4335c4162c Remove DEBUG_ALL_BLOCK_STATES due to it being broken
By: Thinkofdeath <thinkofdeath@spigotmc.org>
2014-12-28 16:56:54 +00:00
CraftBukkit/Spigot
7d1aaec723 Rewrite book handling, Fixes SPIGOT-182 and part of SPIGOT-164
By: Thinkofdeath <thinkofdeath@spigotmc.org>
2014-12-11 19:38:09 +00:00
CraftBukkit/Spigot
6ee362dcff Add CraftMetaTileEntity, fixes the previously broken tests
By: Thinkofdeath <thinkofdeath@spigotmc.org>
2014-12-07 13:22:56 +00:00
CraftBukkit/Spigot
1c82ce69db Disable some tests whilst issues with them are looked into
By: Thinkofdeath <thinkofdeath@spigotmc.org>
2014-12-07 11:50:45 +00:00
CraftBukkit/Spigot
a419776f3c Update to Minecraft 1.8
For more information please see http://www.spigotmc.org/

By: Thinkofdeath <thinkofdeath@spigotmc.org>
2014-11-26 08:32:16 +11:00
CraftBukkit/Spigot
79e5718f39 Update CraftBukkit to Minecraft 1.7.10
By: Travis Watkins <amaranth@ubuntu.com>
2014-06-26 13:05:08 -05:00
CraftBukkit/Spigot
42f39726c3 Handle profiles in SkullMeta, they don't store a string anymore.
By: Travis Watkins <amaranth@ubuntu.com>
2014-04-17 14:04:12 -05:00
CraftBukkit/Spigot
e6de9aaa17 Update CraftBukkit to Minecraft 1.7.5
By: Nate Mortensen <nate.richard.mortensen@gmail.com>
2014-03-20 22:26:30 -06:00
CraftBukkit/Spigot
f87c5cd9dd [Bleeding] Fix Achievements and Statistics API. Fixes BUKKIT-5305
By: t00thpick1 <t00thpick1dirko@gmail.com>
2014-01-14 23:42:40 -05:00
CraftBukkit/Spigot
75d5bdc98c Add failing unit test for ItemMeta-repairability
By: Wesley Wolfe <weswolf@aol.com>
2014-01-14 17:56:49 -06:00
CraftBukkit/Spigot
5783df9d13 Update CraftBukkit to Minecraft 1.7.2
By: mbax <matt@phozop.net>
2013-11-04 07:07:38 -06:00
CraftBukkit/Spigot
2436b7abb8 Make ItemFactoryTest.java platform agnostic. Fixes BUKKIT-4695
Maven paths that include spaces (and possible other characters) get
improperly translated when using a file handle from a URL. This changes
the unit test to open a stream directly from the URL, providing proper
file resolution on multiple platforms.

By: Wesley Wolfe <weswolf@aol.com>
2013-08-14 02:31:18 -05:00
CraftBukkit/Spigot
a5280f8caa Fix javac workaround in ItemStackTest
By: Wesley Wolfe <weswolf@aol.com>
2013-08-06 20:09:42 -05:00
CraftBukkit/Spigot
cb196c424a Add BukkitObjectIOStream tests on top of ItemMeta tests
By: Wesley Wolfe <weswolf@aol.com>
2013-05-19 01:17:32 -05:00
CraftBukkit/Spigot
59bb6e9030 Store item attributes. Addresses BUKKIT-4523
By: Wesley Wolfe <weswolf@aol.com>
2013-07-23 23:25:04 -05:00
CraftBukkit/Spigot
a578800a63 Update CraftBukkit to 1.6.1
By: Nate Mortensen <nate.richard.mortensen@gmail.com>
2013-07-01 06:03:00 -05:00
CraftBukkit/Spigot
afa8771324 Add methods to check conflicting enchantments. Adds BUKKIT-3830
By: GJ <gjmcferrin@gmail.com>
2013-03-20 01:35:22 -04:00
CraftBukkit/Spigot
a553ddbb0b Implement unit test for hasGravity(). Adds BUKKIT-3832
By: nitnelave <nitnelave1@gmail.com>
2013-02-15 02:38:34 +01:00
CraftBukkit/Spigot
18164ee949 Update CraftBukkit to Minecraft 1.5
By: Travis Watkins <amaranth@ubuntu.com>
2013-03-13 17:33:27 -05:00
CraftBukkit/Spigot
5948863935 Improve the item meta deserialization code-style
Fixed the ItemMetaFireworkTest

Add set power unit tests for FireworkMeta

By: Wesley Wolfe <weswolf@aol.com>
2013-01-18 02:21:38 -06:00
CraftBukkit/Spigot
58a6642ca7 Add ItemStackMapTest
This test was missing from c056293b38cb9a1296937d91746b175252be044a

By: Wesley Wolfe <weswolf@aol.com>
2013-01-15 01:22:53 -06:00
CraftBukkit/Spigot
58090423c0 Update unit test to reflect firework color fix. Fixes BUKKIT-3382
The ItemDye color-int array uses dye data values, not wool.

By: Wesley Wolfe <weswolf@aol.com>
2013-01-05 17:00:25 -06:00
CraftBukkit/Spigot
e9c52a3ffc Update calls to DyeColor getData and getByData. Addresses BUKKIT-2786
These two methods are now deprecated and replaced by the strictly
equivalent calls using wool data.

By: Wesley Wolfe <weswolf@aol.com>
2013-01-05 16:45:34 -06:00
CraftBukkit/Spigot
5d61bfd5fa Implement 1.4.6 ItemMeta. Adds BUKKIT-3236, BUKKIT-3237
Some meta functionality is refactored into common methods.

CraftItemStack uses the ItemMetaKey identifiers for enchantments.

Refactored unit test to include extra functionality; initially only
checking the presence of the DelegateDeserialization annotation.

By: Wesley Wolfe <weswolf@aol.com>
2012-12-21 07:37:53 -06:00
CraftBukkit/Spigot
1d39ac678a Implement ItemFactory and ItemMeta values. Adds BUKKIT-15
By: Wesley Wolfe <weswolf@aol.com>
2012-12-17 01:31:41 -06:00
CraftBukkit/Spigot
30e0f5be63 Add isRecord and new material method tests.
Cleaned up all of the CraftBukkit tests, including moving some tests
from MaterialTest to PerMaterialTest.

By: Wesley Wolfe <weswolf@aol.com>
2012-12-14 02:02:02 -06:00
CraftBukkit/Spigot
7aea414399 Add isSolid() tests for each material
By: Wesley Wolfe <weswolf@aol.com>
2012-12-09 15:13:38 -06:00
CraftBukkit/Spigot
ac64db58aa Improved the potion test to detect missing PotionType values.
By: Wesley Wolfe <weswolf@aol.com>
2012-11-01 03:38:25 -05:00
CraftBukkit/Spigot
6577736185 Add CraftArt mappings for Wither. Fixes BUKKIT-2667.
The static assertions are not normally evaluated in the JVM, and failed
to fail when the enums went from size 25 to size 26. This meant missing
values would not be detected at runtime and instead return null,
compounding problems later. The switches should never evaluate to null
so will instead throw runtime assertion errors.

Additional unit tests were added to detect new paintings and assure they
have proper, unique mappings. The test checks both that a mapping
exists, is not null, and does not duplicate another mapping.

By: Wesley Wolfe <weswolf@aol.com>
2012-11-01 03:06:47 -05:00
CraftBukkit/Spigot
1177b02708 Update CraftBukkit to Minecraft 1.4(.2).
By: Travis Watkins <amaranth@ubuntu.com>
2012-10-24 22:53:23 -05:00
CraftBukkit/Spigot
f57bc0f77f Map org.bukkit.Sound to String values for sending to client.
This change was done to remove the internal sound names from the API.
Along with moving the internal names into CraftBukkit, a unit test was
added for any new sounds added in the API to assure they have a non-null
mapping.

By: Wesley Wolfe <weswolf@aol.com>
2012-09-26 16:34:06 -05:00
CraftBukkit/Spigot
2a57bac117 Bulk pending cleanup.
By: Wesley Wolfe <weswolf@aol.com>
2012-09-09 23:19:28 -05:00
CraftBukkit/Spigot
fdfc871461 Add test for WorldType's
By: feildmaster <admin@feildmaster.com>
2012-08-02 09:10:15 -05:00
CraftBukkit/Spigot
34c3b6022a Disabled BukkitDLUpdaterServiceTests. Nice to have, but should not be run on every compile as it relies on DLB being up. Addresses BUKKIT-1140
By: EvilSeph <evilseph@gmail.com>
2012-03-15 05:46:27 -04:00
CraftBukkit/Spigot
7d4747f9f3 Fixed AchievementTest.java
By: feildmaster <admin@feildmaster.com>
2012-02-29 21:44:11 -06:00
CraftBukkit/Spigot
6ea3041bf5 Added a built-in update checker. See http://wiki.bukkit.org/Bukkit.yml#auto-updater for new bukkit.yml options.
By: Nathan Adams <dinnerbone@dinnerbone.com>
2012-02-16 22:31:40 +00:00
CraftBukkit/Spigot
1f1bdfaf98 [Bleeding] Added Potions API. Fixes BUKKIT-389
By: fullwall <fullwall@optusnet.com>
2012-01-09 15:51:32 +08:00
CraftBukkit/Spigot
ef756d8eba Add some testing
By: Erik Broes <erikbroes@grum.nl>
2012-01-29 11:22:11 +01:00
CraftBukkit/Spigot
b0ac365f5e Test cloning of CraftItemStacks created with null nms ItemStacks
By: Andrew Ardill <andrew.ardill@gmail.com>
2011-12-29 22:42:47 +11:00
CraftBukkit/Spigot
0b7a5891c5 Test cloning enchanted CraftItemStacks
By: Andrew Ardill <andrew.ardill@gmail.com>
2011-12-20 00:25:15 +11:00