Skip to content

Instantly share code, notes, and snippets.

package tc.oc.pgm.utils;
/**
* Direct port of the JavaScript LiquidMetal.
* https://github.com/rmm5t/liquidmetal
*
* @author Steve Anton
*/
public class LiquidMetal {
public static final double SCORE_NO_MATCH = 0.0;

Primer on the New Filter System

Filters are have results they will return: ALLOW, DENY, and ABSTAIN.

  • ALLOW means that the filter specifically allows the query
  • DENY means that the filter specifically denies the query
  • ABSTAIN means none of the filters queried have any opinion on the subject. Abstain is usually interpreted as ALLOW when casting to a single boolean.

Most consumers of filters will cast the query result to a boolean, where ALLOW and ABSTAIN are both interpreted as ALLOW.

@steveanton
steveanton / gist:3843766
Created October 6, 2012 04:07
PGM Map Specification Protocol Manual

PGM Map Specification Protocol

This manual will provide you with enough information to compose your own map specification file (commonly referred to as the map.xml file or "the xml"). It includes examples and descriptions of each module / feature. You are expected to understand the basics of XML before reading this document.

High level concepts

Understanding the following high level concepts will help you write a better map specification file.

Modules

@steveanton
steveanton / CHANGELOG.txt
Created September 4, 2012 16:40
Maps Proto Changelog
Changelog
=========
Specifies changes introduced in versions of the map.xml specification.
v1.1.0
------
* Attributes will be copied from parent elemnts to child elements for ```<cores>``` and ```<wools>```.
* Added the Mobs module for determining which types of mobs will spawn and how they can spawn.
@steveanton
steveanton / gist:3102835
Created July 13, 2012 05:04
Essential CraftBukkit Modifications
AffectsSpawning API: https://github.com/Bukkit/CraftBukkit/pull/775
Player Collision API: https://github.com/Bukkit/CraftBukkit/pull/776
ExplosionPrimeEvent fix: https://github.com/Bukkit/CraftBukkit/pull/806
Bed spawn set fix: https://github.com/Bukkit/CraftBukkit/pull/818
Kick and quit messages in one: https://github.com/Bukkit/CraftBukkit-Bleeding/tree/mbax/KickAndQuitMessage
PGM changes:
https://github.com/mrapple/PGM-CraftBukkit/commit/3e7119086cc6d90f196234f7c51d6355f4391d47
https://github.com/mrapple/PGM-CraftBukkit/commit/1a43f1e1ce39b006435dbfd8bbba0e9052932f29
https://github.com/mrapple/PGM-CraftBukkit/commit/9f982a3c55e10df326da7410e40ad215e2ec5f8b
@steveanton
steveanton / spawns-draft.xml
Created July 3, 2012 15:57
Draft for a cleaner version of spawns for map.xml
Sand Wars like:
<spawns>
<spawns safe="true" kit="spawn">
<spawn team="blue" yaw="180">
<cuboid min="x,y,z" max="x,y,z"/>
<cuboid min="x,y,z" max="x,y,z"/>
<point>x,y,z</point>
</spawn>
<spawn team="red" yaw="0">