develop-turtleGame #6
Reference in New Issue
Block a user
No description provided.
Delete Branch "develop-turtleGame"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@@ -0,0 +51,4 @@
this.generatePlatform();
}
private void generatePlatform() {
eigne methode ist hier irgendwie unnötig...
@@ -0,0 +117,4 @@
protected void eat(Player p, Entity snack) {
p.playSound(Sound.sound(SoundEvent.ENTITY_GENERIC_EAT, Sound.Source.MASTER, 1f, 1f), snack.getPosition());
Material snackMaterial = this.snackBlock.registry().material();
if(snackMaterial == null) snackMaterial = Material.DIRT;
ändern zu Objects.requireNotNull() und den fallback zu Material.DIRT weg
@@ -0,0 +184,4 @@
private void generateNewSnack() {
Entity snack = new Entity(EntityType.FALLING_BLOCK);
FallingBlockMeta meta = (FallingBlockMeta) snack.getEntityMeta();
meta.setBlock(this.snackBlock.withProperty("half", "upper"));
property doppelt sich?
@@ -0,0 +185,4 @@
Entity snack = new Entity(EntityType.FALLING_BLOCK);
FallingBlockMeta meta = (FallingBlockMeta) snack.getEntityMeta();
meta.setBlock(this.snackBlock.withProperty("half", "upper"));
meta.setCustomName(Component.text("Snack").color(NamedTextColor.WHITE));
default color ist nicht weiß?
@@ -0,0 +193,4 @@
snack.remove();
return;
}
snack.teleport(spawnPosition);
statt teleport direkt bei setInstance als zweiter Parameter die Position übergeben
@@ -0,0 +215,4 @@
bomb.remove();
return;
}
bomb.teleport(spawnPosition);
nochmal
@@ -0,0 +219,4 @@
this.bombs.add(bomb);
}
@Nullable
@Nullable gehört vor die Rückgabe parameter
private @Nullable Pos newSpawnPosition(
@@ -0,0 +224,4 @@
return this.newSpawnPosition(entity, true);
}
@Nullable
nochmal
@@ -0,0 +230,4 @@
int counter = 0;
boolean isInRadius, collides;
do {
if(counter > 200) {
mMn. curly braces weg
@@ -0,0 +31,4 @@
public void spawnTurtle() {
this.setInstance(this.player.getInstance());
this.teleport(this.player.getPosition());
statt teleport bei setInstance übergeben
@@ -0,0 +45,4 @@
public void destroy() {
this.removePassenger(this.player);
this.remove();
this.kill();
kill nach remove? macht das überhaupt irgendwas?
nein
@@ -0,0 +76,4 @@
return;
}
this.boostChargeLevel = Math.max(0f, this.boostChargeLevel - 0.025f);
System.out.println(this.boostChargeLevel);
raus