Commit Graph

7222 Commits

Author SHA1 Message Date
313b224bec Updated Composer dependency names and repo URLs 2018-03-17 12:19:14 +00:00
d12b1d3e07 Updated RakLib dependency 2018-03-17 11:27:56 +00:00
eeeef8df51 Fixed concrete powder not falling 2018-03-16 16:43:47 +00:00
9c786089f8 Level: don't create objects which aren't going to be used 2018-03-16 13:00:16 +00:00
e3cae7364f Level: don't send empty block update batches 2018-03-16 12:58:46 +00:00
d542bbc736 Level: Fixed race condition between direct and batched block updating
This happened when a block was set into the world with a direct update, when an entry for that block was already present in the changedBlocks map. This fixes the bug by removing the entry from the changedBlocks map to avoid sending outdated block updates in batches.
2018-03-16 11:44:57 +00:00
e88541b269 TeleportCommand: add /teleport alias 2018-03-16 10:49:57 +00:00
fdad965db8 Player: if command has aliases, add command name as alias if not found
closes #2106

For some strange reason, using aliases overwrites the original command name instead of coexisting with it. This is rather astonishing behaviour, and probably a bug in the client. However, this workaround is the same thing vanilla does (see /tp in vanilla).
2018-03-16 10:41:00 +00:00
dd844f7ad3 Position: call parent constructor 2018-03-15 10:29:21 +00:00
596c8a7b4f Tile: Removed cyclic dependence on Chunks
Chunks were used by tiles for a couple of things:
- 1. for coordinates - which can be gotten using bitshifts
- 2. setChanged() - which is unnecessary as seen in the previous commit

Removing this circular dependency was actually remarkably easy to do.
2018-03-15 10:21:42 +00:00
9c598d1345 Spawnable: don't mark chunk as changed onChanged()
this is unnecessary because a chunk is considered "changed" if it has tiles on it anyway.
2018-03-15 09:48:28 +00:00
a2af838b1d Level: fixed autosave not kicking in when entities are updated in a chunk (e.g. moving, dying, spawning) 2018-03-15 09:46:04 +00:00
bf97eab98f Block: remove redundant local variable from collidesWithBB() 2018-03-15 09:38:14 +00:00
a9a55e9558 GlowingRedstoneOre: fixed infinite recursion and crash on block update
closes #2104

The inheritance of GlowingRedstoneOre from RedstoneOre maybe should be reconsidered. They only share properties in reality.
2018-03-15 09:24:48 +00:00
95fb1d1602 AxisAlignedBB: added epsilon for floating-point comparison (#2101)
This fixes bugs where, for example, one cannot place a block below oneself at y=7.0.
2018-03-14 16:52:05 +00:00
fa644edef3 Entity: removed redundant return values for move() 2018-03-14 13:39:23 +00:00
ddc9dca8b4 Player: fixed being able to eat cake in creative
closes #2070
2018-03-13 18:32:08 +00:00
86eee429bb Block: Split onUpdate() into several functions, removed Level::BLOCK_UPDATE_* constants
This allows the removal of lots of ugly code, and also exposes lots of similarities with how this update type was handled. This can be further improved in the future to more generically handle cases.

I realized in the process of changing this, that it might actually be simpler to treat to treat scheduled updates and neighbour updates as one and the same. They use the same mechanism for being saved on chunks (TileTicks),
and doing that would make updating only require one queue instead of two.

RedstoneOre: use onActivate() to trigger glowing
this is not technically correct behaviour, but this preserves the current behaviour.
2018-03-13 17:29:46 +00:00
4f20a504e3 Level: remove dead function
this is handled by a queue now instead of ondemand, to avoid recursion bugs.
2018-03-13 11:46:23 +00:00
6a1f8640f6 Cactus: fix bugs in local block updating 2018-03-13 11:40:45 +00:00
8a0414f306 Server: Changed logic of isLevelGenerated() to prevent astonishing behaviour
Previously to this, a level would be considered "not generated" if no level providers registered as valid for that directory. This caused astonishing behaviour when the user's world has, for example, a mixture of .mca and .mcr region files - the world would instead get _re-generated_ according to the default level format, which might or might not load the existing regions depending on the format used for generation. This behaviour is utterly absurd.

This changes the behaviour of the generated check to check for a non-empty directory in the given path. Non-empty directories without recognized world files in them are now considered to have an unknown format.
2018-03-12 10:24:59 +00:00
d478661961 Minor cleanup to LevelDB constructor 2018-03-11 18:15:20 +00:00
b8064aa45c LevelDB: fixed more usages of CompoundTag ArrayAccess API 2018-03-11 17:55:35 +00:00
00f596c4f8 Level: typehint hashing methods 2018-03-11 16:42:57 +00:00
3f7b14bf59 Level: Remove dead generator leftovers
This is all handled by the population mechanism now. Nothing uses these things anymore since years.
2018-03-11 13:56:41 +00:00
ba0a256834 SplashPotion: fix max stack size 2018-03-11 13:43:45 +00:00
f2f8c235e7 Explosion: add exception throws for bad arguments 2018-03-11 13:06:29 +00:00
69b3bb183d Explosion: typehints and docs 2018-03-11 13:02:46 +00:00
cd35bd6872 git diff-tree --check $(git hash-object -t tree /dev/null) HEAD 2018-03-11 10:31:25 +00:00
40b995a435 Level: Fixed botch-job PR #2089
@zKoz210 Do not contribute to this repository again without first testing your changes.
2018-03-10 19:08:30 +00:00
590826b9bd Player: Disallow modifying NBT of tiles inside spawn protection 2018-03-10 18:19:17 +00:00
a5e87484d9 Player: removed superfluous null-check from setMotion()
this is already checked by broadcastMotion().
2018-03-10 17:08:00 +00:00
8a86e0825b Entity: Moved PrimedTNT and FallingSand to object\PrimedTNT and object\FallingBlock 2018-03-10 16:25:07 +00:00
b39bbffdc5 Entity: Moved and renamed entity\Item to entity\object\ItemEntity 2018-03-10 12:36:46 +00:00
bd3d2451bc Level: Added getRandomTickedBlocks() function (#2089) 2018-03-10 11:32:01 +00:00
606407933e ProjectileItem: fixed error when projectile entity is null 2018-03-10 10:59:22 +00:00
ad09e8c8d0 Implemented Bottle o' Enchanting 2018-03-10 10:53:03 +00:00
486edf0e55 Projectile: remove redundant parent onHit() calls 2018-03-10 10:31:24 +00:00
2ee01eb195 Projectile: fix stupidity with collided block IDs 2018-03-09 21:50:27 +00:00
9098502199 Item: added some foods, cleaned up Fish abomination
@PEMapModder GET A CLIENT ALREADY
2018-03-09 19:54:42 +00:00
b130374e46 EnderPearl: fixed max stack size 2018-03-09 19:19:21 +00:00
31106bc227 ItemFactory: Register Dragon's Breath item
this is only used for brewing, it doesn't need anything special.
2018-03-09 19:13:30 +00:00
cc1a3d695f Implemented basic Ender Pearls
this doesn't have full functionality yet (like spawning endermites) because some things aren't implemented yet.
2018-03-09 19:05:14 +00:00
8020780fc5 LevelEventPacket: added enderman teleport particle cloud constant 2018-03-09 17:20:35 +00:00
2f266a5922 Player: added a server-side forced cooldown mechanism
This is necessary because the stupid client constantly spams right-click actions if you carry on trying to eat/throw/whatever the item when cooldown is in effect. Therefore ender pearls would be fired like machine guns without these checks server side.
2018-03-09 14:45:01 +00:00
3827892e48 ArmorInventory: fixed debug spam when sending contents to the player itself 2018-03-09 13:23:51 +00:00
e06b78b0ee Implemented armor durability 2018-03-09 13:21:05 +00:00
74cff89df3 Instant Damage splash potions now deal knockback 2018-03-09 12:52:09 +00:00
a9957c3db3 Water bottles extinguish fires when hitting a block 2018-03-09 12:25:34 +00:00
2e9bf7e93b Implemented Splash Potions 2018-03-09 12:25:02 +00:00