Skip to content

Commit

Permalink
Bump version (0.5), update version.json and CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mchorse committed Mar 31, 2023
1 parent e506aae commit 3886dd9
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 18 deletions.
44 changes: 43 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,46 @@
## Verson 0.4
## Version 0.5

This is another HUGE update developed by OtakuGamer and TorayLife! This update features lots of new scripting API methods, global triggers, scripting logs panel and a conditional model block!

**IMPORTANT**: `IScriptEntity.shootBBGunProjectile()` to shoot the projectile with the whole data of the bb-gun settings (e.g. damage, etc.).

**Compatible** with McLib **2.4.1**, Aperture **1.8.1**, Blockbuster **2.6** and Metamorph **1.3.1**. It doesn't mean that future versions of McLib, Blockbuster and Metamorph would be incompatible, but older versions are most likely incompatible.

* Added new global triggers:
* By TorayLife: `Entity: attacked` and `Player: open container`
* By OtakuGamer: `Projectile: impact`, `Living: equipment change`, `Mappet: state changed`, and `Living: knockback`
* Added **logs** panel, which will display script error logs, or records entered by scripts (TorayLife)
* Added **Condition model block**, which will display different morphs depends on given conditions (TorayLife)
* Added **Check entities** option to region block (TorayLife)
* Added **onTick** trigger to region block (TorayLife)
* Added `/mp script engines` command, which returns list of installed script engines (TorayLife)
* Added **Look at player** option's range now depends on path finding distance
* Added more scripting API:
* Added `IScriptEvent.scheduleScript(int, Consumer<IScriptEvent>)` overload with Consumer argument, so it works in different engines, such as Kotlin or Python (TorayLife)
* Added `IScriptEntity.setName()`, `IScriptEntity.setInvisible()`, `IScriptEntity.moveTo()`, `IScriptEntity.executeCommand()`, `IScriptEntity.executeScript()`, `IScriptEntity.getFactions()`, `IScriptEntity.lockPosition()`, `IScriptEntity.unlockPosition()`, `IScriptEntity.isPositionLocked()`, `IScriptEntity.lockRotation()`, `IScriptEntity.unlockRotation()`, and `IScriptEntity.isRotationLocked()` (OtakuGamer)
* Added `IScriptEntity.getMount()` method (TorayLife)
* Added `IScriptFactory.getLogger()` method, which returns a `MappetLogger` which can be used to log messages (TorayLife)
* Added `IScriptFactory.isPointInBounds()` and `IScriptFactory.toNBT()` (OtakuGamer)
* Added `info()`, `debug()`, `warning()`, `error()` methods to MappetLogger (TorayLife)
* Added `IScriptWorld.getBlockStackWithTile()`, `IScriptWorld.shootBBGunProjectile()` (OtakuGamer)
* Added `IScriptServer.entityExists()` and `IScriptServer.executeScript()` (OtakuGamer)
* Added `IScriptNBTCompound.addCompound()` and `IScriptNBTCompound.dumpJSON()` (OtakuGamer)
* Added AI methods `IScriptEntity.observe()`, `IScriptEntity.addEntityPatrol()`, `IScriptEntity.clearEntityPatrols()`, `IScriptEntity.setRotationsAI()`, `IScriptEntity.clearRotationsAI()`, `IScriptEntity.executeRepeatingCommand()`, `IScriptEntity.removeRepeatingCommand()`, and `IScriptEntity.clearAllRepeatingCommands()` (OtakuGamer)
* Added `IScriptFancyWorld` and moved some `IScriptWorld` methods to it (OtakuGamer)
* Added `getFancyWorld()` to `IScriptEvent`, `IScriptServer` and `IScriptEntity` (just like `getWorld()`) (OtakuGamer)
* Added `IScriptFancyWorld.explode()`, `IScriptFancyWorld.tpExplode()`, `IScriptFancyWorld.setBlock()`, `IScriptFancyWorld.fill()`, `IScriptFancyWorld.setTileEntity()`, `IScriptFancyWorld.fillTileEntities()`, `IScriptFancyWorld.clone()`, `IScriptFancyWorld.loadSchematic()`, and `IScriptFancyWorld.spawnNpc()` (OtakuGamer)
* Added `IScriptPlayer.getDisplayedHUDs()`, `IScriptPlayer.playScene()`, and `IScriptPlayer.stopScene()` (OtakuGamer)
* Fixed `IScriptFactory.convertToNBT()` method (TorayLife)
* Fixed `IScriptItemStack.setLore()` method that doesn't add lore if item has no lore (TorayLife)
* Fixed python errors in console (TorayLife)
* Fixed python doesn't print unicode characters (TorayLife)
* Fixed Kotlin libraries issue (OtakuGamer)
* Improved HUD morphs to persist upon player's relogging (OtakuGamer)
* Improved `/mp hud *` commands' tab completion (OtakuGamer)
* Improved interaction events to support Little Tiles mod's doors (OtakuGamer)
* Updated NPC tool texture, added holiday textures (by TorayLife, textures by 3DMmc)

## Version 0.4

This is a HUGE scripting API update by OtakuGamer with some minor contributions by TorayLife.

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=0.4
version=0.5
blockbuster=2.6
metamorph=1.3.1
mclib=2.4.1
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/mchorse/mappet/EventHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@ public void onLivingEquipmentChange(LivingEquipmentChangeEvent event)
}

Trigger trigger = Mappet.settings.onLivingEquipmentChange;

if (!trigger.isEmpty())
{
DataContext context = new DataContext(event.getEntity());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,15 +437,15 @@ public boolean isPointInBounds(Object point, Object bound1, Object bound2)
{
if (point instanceof Vector2d)
{
return isPointInBounds2D((Vector2d) point, (Vector2d) bound1, (Vector2d) bound2);
return this.isPointInBounds2D((Vector2d) point, (Vector2d) bound1, (Vector2d) bound2);
}
else if (point instanceof Vector3d)
{
return isPointInBounds3D((Vector3d) point, (Vector3d) bound1, (Vector3d) bound2);
return this.isPointInBounds3D((Vector3d) point, (Vector3d) bound1, (Vector3d) bound2);
}
else if (point instanceof Vector4d)
{
return isPointInBounds4D((Vector4d) point, (Vector4d) bound1, (Vector4d) bound2);
return this.isPointInBounds4D((Vector4d) point, (Vector4d) bound1, (Vector4d) bound2);
}
else
{
Expand Down Expand Up @@ -482,7 +482,7 @@ public INBTCompound toNBT(Object object)
return (INBTCompound) object;
}

if (object instanceof NBTBase)
if (object instanceof NBTTagCompound)
{
return new ScriptNBTCompound((NBTTagCompound) object);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,7 @@ public IScriptEntity shootBBGunProjectile(String gunPropsNBT)
e.printStackTrace();
}
}

return null;
}

Expand All @@ -1046,15 +1047,15 @@ private IScriptEntity shootBBGunProjectileMethod(String gunPropsNBT) throws NBTE
GunProps gunProps = new GunProps(gunPropsNBTCompound.getCompoundTag("Projectile"));
gunProps.fromNBT(gunPropsNBTCompound);
EntityGunProjectile projectile = new EntityGunProjectile(entityLivingBase.world, gunProps, gunProps.projectileMorph);

projectile.setPosition(entityLivingBase.posX, (entityLivingBase.posY + 1.8), entityLivingBase.posZ);
projectile.shoot(entityLivingBase, entityLivingBase.rotationPitch, entityLivingBase.getRotationYawHead(), 0, gunProps.speed, 0);
projectile.setInitialMotion();
entityLivingBase.world.spawnEntity(projectile);

IScriptEntity spawnedEntity = ScriptEntity.create(projectile);
return spawnedEntity;

return ScriptEntity.create(projectile);
}

return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1174,9 +1174,9 @@ public default void displayMorph(AbstractMorph morph, int expiration, double x,
public boolean isRotationLocked();

/**
* Moves the entity to the specified position (<b>x, y, z</b>)
* <p>Moves the entity to the specified position (<b>x, y, z</b>)
* with the given <b>interpolation type</b> and <b>duration</b>.
* The following interpolation types are supported:
* The following interpolation types are supported:</p>
* <ul>
* §7<li>linear</li>§r
* §7<li>quad_in</li>§r
Expand Down Expand Up @@ -1208,9 +1208,9 @@ public default void displayMorph(AbstractMorph morph, int expiration, double x,
* </ul>
*
* <pre>{@code
* var s = c.getSubject();
* var pos = s.getPosition();
* s.moveTo("quad_out", 30, pos.x, pos.y+2, pos.z);
* var s = c.getSubject();
* var pos = s.getPosition();
* s.moveTo("quad_out", 30, pos.x, pos.y+2, pos.z);
* }</pre>
*
* @param interpolation The interpolation type used for the movement.
Expand All @@ -1222,12 +1222,14 @@ public default void displayMorph(AbstractMorph morph, int expiration, double x,
public void moveTo(String interpolation, int durationTicks, double x, double y, double z, boolean disableAI);

/* Entity AI */

/**
* Makes the entity observe the given entity.
*
* <pre>{@code
* c.getSubject().observe(null); //to stop observing
* c.getSubject().observe(null); //to stop observing
* }</pre>
*
* @param entity The entity to observe
*/
public void observe(IScriptEntity entity);
Expand All @@ -1240,6 +1242,7 @@ public default void displayMorph(AbstractMorph morph, int expiration, double x,
* s.addEntityPatrol(440, 117, 640, 1, true, "particle heart ~ ~1 ~ 0.2 0.2 0.2 1")
* s.addEntityPatrol(444, 117, 640, 1, true, "particle angryVillager ~ ~1 ~ 0.2 0.2 0.2 1")
* }</pre>
*
* @param x x coordinate
* @param y y coordinate
* @param z z coordinate
Expand Down Expand Up @@ -1289,6 +1292,7 @@ public default void displayMorph(AbstractMorph morph, int expiration, double x,
*
* <pre>{@code
* c.getSubject().removeRepeatingCommand("/tp @s ~ ~2 ~");
* }</pre>
*/
public void removeRepeatingCommand(String command);

Expand All @@ -1297,6 +1301,7 @@ public default void displayMorph(AbstractMorph morph, int expiration, double x,
*
* <pre>{@code
* c.getSubject().clearAllRepeatingCommands();
* }</pre>
*/
public void clearAllRepeatingCommands();
}
5 changes: 3 additions & 2 deletions version.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"homepage": "https://www.curseforge.com/minecraft/mc-mods/mappet",
"1.12.2": {
"0.5": "This is another HUGE update developed by OtakuGamer and TorayLife! This update features lots of new scripting API methods, global triggers, scripting logs panel and a conditional model block!",
"0.4": "This is a HUGE scripting API update by OtakuGamer with some minor contributions by TorayLife.",
"0.3.1": "This patch hot fix fixes global triggers and scripts (TorayLife).",
"0.3": "This update features rewrite of scripting system to support multiple scripting engines (like Kotlin scripts) and folder support in Mappet panels.",
Expand All @@ -17,7 +18,7 @@
"0.1-alpha": "This first release provides tons of features: states, conditions, expressions, emitter block, trigger block, region block, crafting tables, quests, NPCs, factions, events, scripts, dialogues, quest chains, many commands, custom sound events, target selectors, global triggers, and much more."
},
"promos": {
"1.12.2-latest": "0.4",
"1.12.2-recommended": "0.4"
"1.12.2-latest": "0.5",
"1.12.2-recommended": "0.5"
}
}

0 comments on commit 3886dd9

Please sign in to comment.