New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Projectiles #614

Merged
merged 165 commits into from Jan 29, 2018

Conversation

@Pr0methean
Contributor

Pr0methean commented Dec 17, 2017

Also implements arrow consumption for ItemBow, updates the entity IDs for projectiles, and stubs out and registers missing projectile classes.

momothereal and others added some commits Oct 16, 2016

GlowProjectile, GlowEgg and GlowSnowball entities, ItemProjectile, fi…
…x ItemTimedUsage, handle UseItemMessage
First-pass partial implementation of sendMap
Will send blank maps until GlowMapRenderer.render() is implemented.
Implement GlowMapRenderer.render() (#1)
This implementation is basic -- it only considers the material value of the highest block at each pixel -- but it implements the limited vision range and is configurable in YAML. Someone may still need to implement persistence for the GlowMapCanvas.
Stub out missing projectile entities
Also renames GlowEntity.getDirection() to getCardinalFacing() to resolve
a name collision
@Pr0methean

This comment has been minimized.

Contributor

Pr0methean commented Dec 17, 2017

This is a partial fix of #505

Pr0methean added some commits Dec 17, 2017

import org.bukkit.entity.Zombie;
import org.bukkit.entity.ZombieHorse;
import org.bukkit.entity.ZombieVillager;
import org.bukkit.entity.*;

This comment has been minimized.

@hibo98

hibo98 Dec 17, 2017

Member

Please remove the wildcard import
See Code Style

Pr0methean added some commits Dec 17, 2017

Arrow bug fixes
Dispenser arrows only deal 1 damage, and they can be picked up
@mastercoms

This comment has been minimized.

Member

mastercoms commented Dec 18, 2017

FYI, we'll be waiting to merge this after January 1st, due to the current soft feature freeze.

@Pr0methean

This comment has been minimized.

Contributor

Pr0methean commented Dec 18, 2017

Thanks for the warning. I'll check again for merge conflicts shortly after Christmas.

Pr0methean added some commits Dec 18, 2017

Copy PotionMeta data to TippedArrow
Copies Color, PotionData and List<PotionEffect>.

@mastercoms mastercoms changed the title from Merge the old projectiles branch to Projectiles Dec 18, 2017

Pr0methean added some commits Jan 26, 2018

@Cadiducho Cadiducho referenced this pull request Jan 27, 2018

Open

Fishing isn't implemented #567

0 of 3 tasks complete
@@ -49,15 +52,16 @@ private EventFactory() {
* @return the called event
*/
public static <T extends Event> T callEvent(T event) {
GlowServer server = (GlowServer) Bukkit.getServer();
Server server = Bukkit.getServer();

This comment has been minimized.

@momothereal

momothereal Jan 27, 2018

Member

Why was this change necessary? Bukkit.getServer() is guaranteed to be a GlowServer instance. The only difference I see here are the additional imports.

Or was this done because it broke tests somehow?

This comment has been minimized.

@Pr0methean

Pr0methean Jan 28, 2018

Contributor

Yes it did (ServerShim doesn't extend GlowServer).

try {
entity.setParticle(Particle.valueOf(particle));
} catch (IllegalArgumentException e) {
Bukkit.getServer().getLogger().warning(String.format(

This comment has been minimized.

@mastercoms

mastercoms Jan 29, 2018

Member

Could you use log(Level.WARNING, ...)

This comment has been minimized.

@Pr0methean

Pr0methean Jan 29, 2018

Contributor

Done in aaadd0e.

public class FireballStore<T extends GlowFireball> extends ProjectileStore<T> {
public static final String IS_INCENDIARY = "X-Glowstone-IsIncendiary";

This comment has been minimized.

@mastercoms

mastercoms Jan 29, 2018

Member

Could you make these private like the other ones? Also, I feel like glowstone:IsIncendiary or if that's not valid, glowstoneIsIncendiary would be better.

This comment has been minimized.

@Pr0methean

Pr0methean Jan 29, 2018

Contributor

Made private and changed to "glowstone:IsIncendiary" and "glowstone:ExplosionPowerFloat" in aaadd0e.

@momothereal

This comment has been minimized.

You can use GlowServer.logger.log(...) instead.

This comment has been minimized.

Member

mastercoms replied Jan 29, 2018

Also, I meant use the log with a supplier (like () -> String.format(...)), sorry that I was not clear on that.

This comment has been minimized.

Contributor

Pr0methean replied Jan 29, 2018

Done both in 3404fa2.

// Not in creative mode and have no arrow
break;
default:
player.getServer().getLogger()

This comment has been minimized.

@mastercoms

mastercoms Jan 29, 2018

Member

GlowServer.logger (or is this for testing) and log(Level, Supplier)

This comment has been minimized.

@Pr0methean

Pr0methean Jan 29, 2018

Contributor

Done in f656da2 (also migrated to the Supplier<String> logging function).

package net.glowstone.io.entity;
import java.util.UUID;
import java.util.logging.Level;

This comment has been minimized.

@mastercoms

mastercoms Jan 29, 2018

Member

unused import

This comment has been minimized.

@Pr0methean

Pr0methean Jan 29, 2018

Contributor

Fixed in b599a16

import net.glowstone.entity.GlowAreaEffectCloud;
import net.glowstone.inventory.GlowMetaPotion;
import net.glowstone.util.nbt.CompoundTag;
import org.bukkit.Bukkit;

This comment has been minimized.

@mastercoms

mastercoms Jan 29, 2018

Member

unused import

This comment has been minimized.

@Pr0methean

Pr0methean Jan 29, 2018

Contributor

Fixed in b599a16

@mastercoms mastercoms merged commit 29106ba into GlowstoneMC:dev Jan 29, 2018

2 checks passed

ci/circleci: build Your tests passed on CircleCI!
Details
license/cla Contributor License Agreement is signed.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment