This repository has been archived by the owner on Jun 1, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
4,391 additions
and
3 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
base/src/main/java/me/gamercoder215/mobchip/ai/behavior/BreezeBehavior.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package me.gamercoder215.mobchip.ai.behavior; | ||
|
||
import me.gamercoder215.mobchip.ai.memories.EntityMemory; | ||
import me.gamercoder215.mobchip.ai.schedule.Updatable; | ||
|
||
/** | ||
* Represents Behavior for a Breeze | ||
*/ | ||
public interface BreezeBehavior extends CreatureBehavior, Updatable { | ||
|
||
/** | ||
* Performs a Breeze Long Jump. | ||
* <p>This behavior requires {@link EntityMemory#ATTACK_TARGET} to be present in the brain.</p> | ||
*/ | ||
void longJump(); | ||
|
||
/** | ||
* Performs a Breeze Shooting Attack. | ||
* <p>This behavior requires {@link EntityMemory#ATTACK_TARGET} to be present in the brain.</p> | ||
*/ | ||
void shoot(); | ||
|
||
/** | ||
* Performs a Breeze Slide. | ||
* <p>This behavior requires {@link EntityMemory#ATTACK_TARGET} to be present in the brain.</p> | ||
*/ | ||
void slide(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import io.github.patrick.gradle.remapper.RemapTask | ||
|
||
plugins { | ||
id("io.github.patrick.remapper") version "1.4.0" | ||
} | ||
|
||
val mcVersion = "1.20.3" | ||
|
||
dependencies { | ||
api(project(":mobchip-base")) | ||
api(project(":mobchip-abstraction")) | ||
api(project(":mobchip-1_14_R1")) | ||
|
||
compileOnly("org.spigotmc:spigot:$mcVersion-R0.1-SNAPSHOT:remapped-mojang") | ||
testImplementation("org.spigotmc:spigot:$mcVersion-R0.1-SNAPSHOT:remapped-mojang") | ||
} | ||
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_17 | ||
targetCompatibility = JavaVersion.VERSION_17 | ||
} | ||
|
||
tasks { | ||
assemble { | ||
dependsOn("remap") | ||
} | ||
|
||
remap { | ||
dependsOn("shadowJar") | ||
|
||
version.set(mcVersion) | ||
action.set(RemapTask.Action.MOJANG_TO_SPIGOT) | ||
archiveName.set("${project.name}-${project.version}.jar") | ||
} | ||
} |
56 changes: 56 additions & 0 deletions
56
...1_20_R3/src/main/java/me/gamercoder215/mobchip/abstraction/v1_20_R3/Attribute1_20_R3.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
package me.gamercoder215.mobchip.abstraction.v1_20_R3; | ||
|
||
import me.gamercoder215.mobchip.ai.attribute.Attribute; | ||
import net.minecraft.core.registries.BuiltInRegistries; | ||
import net.minecraft.world.entity.ai.attributes.RangedAttribute; | ||
import org.bukkit.NamespacedKey; | ||
import org.bukkit.craftbukkit.v1_20_R3.util.CraftNamespacedKey; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
final class Attribute1_20_R3 extends RangedAttribute implements Attribute { | ||
|
||
private final NamespacedKey key; | ||
private final double defaultV; | ||
private final double min; | ||
private final double max; | ||
|
||
public Attribute1_20_R3(RangedAttribute a) { | ||
super(a.getDescriptionId(), a.getDefaultValue(), a.getMinValue(), a.getMaxValue()); | ||
this.key = BuiltInRegistries.ATTRIBUTE.getKey(a) == null ? NamespacedKey.minecraft(a.getDescriptionId()) : CraftNamespacedKey.fromMinecraft(BuiltInRegistries.ATTRIBUTE.getKey(a)); | ||
this.defaultV = a.getDefaultValue(); | ||
this.min = a.getMinValue(); | ||
this.max = a.getMaxValue(); | ||
} | ||
|
||
public Attribute1_20_R3(NamespacedKey key, double defaultV, double min, double max, boolean clientSide) { | ||
super("attribute.name." + key.getKey().toLowerCase(), defaultV, min, max); | ||
this.key = key; | ||
this.min = min; | ||
this.defaultV = defaultV; | ||
this.max = max; | ||
this.setSyncable(clientSide); | ||
} | ||
|
||
public double getMinValue() { | ||
return this.min; | ||
} | ||
|
||
public double getDefaultValue() { | ||
return this.defaultV; | ||
} | ||
|
||
public double getMaxValue() { | ||
return this.max; | ||
} | ||
|
||
@Override | ||
public boolean isClientSide() { | ||
return isClientSyncable(); | ||
} | ||
|
||
@NotNull | ||
@Override | ||
public NamespacedKey getKey() { | ||
return this.key; | ||
} | ||
} |
Oops, something went wrong.