This file contains hidden or 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
public class FlameShield extends Skill { | |
public FlameShield(Attribute attribute) { | |
super(attribute); | |
id(0x02); | |
name("Flame Shield"); | |
description("For 10...45 seconds (linear), anything that harms you is set ablaze for 2...5 seconds (linear)."); | |
} |
This file contains hidden or 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
@SpellInfo(id = "thunderstorm", | |
name = "ThunderStorm") | |
public class SpellThunderStorm implements Spell { | |
public Map<String, Integer> taskID = new HashMap<String, Integer>(); | |
private MagicRPG mr; | |
public SpellThunderStorm(MagicRPG mr) { | |
this.mr = mr; | |
} |
This file contains hidden or 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
package org.getspout.api.entity; | |
import org.getspout.api.entity.ai.AI; | |
import org.getspout.api.plugin.Plugin; | |
/** | |
* Represents an entity that can have AI. | |
*/ | |
public interface AIable<T extends Entity> { | |
/** |
This file contains hidden or 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
/** | |
* Stores the ItemStack at the given index. Notifies all attached | |
* InventoryViewers of the change. | |
* | |
* @param index The index where to put the ItemStack | |
* @param item The ItemStack to set | |
*/ | |
@Override | |
public void setItem(int index, SpoutItemStack item) { | |
super.setItem(index, item); |
This file contains hidden or 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
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package org.opencraft.render; | |
import org.lwjgl.opengl.GL11; | |
import org.lwjgl.util.vector.Vector3f; | |
import org.opencraft.Opencraft; | |
import org.royawesome.renderer.BatchVertexRenderer; |
This file contains hidden or 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
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package com.crimsonrpg.core.citizens; | |
import com.crimsonrpg.api.citizen.MessageLevel; | |
import org.bukkit.ChatColor; | |
import org.bukkit.Location; |
This file contains hidden or 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
public static boolean checkCollision(BoundingBox a, Plane b) { | |
boolean pos = (a.min.dot(b.normal) > 0); | |
return pos != (a.max.dot(b.normal) > 0) //Planes that are axis-aligned. most cases | |
//X N N | |
|| pos != (new Vector3(a.max.getX(), a.min.getY(), a.min.getZ()).dot(b.normal) > 0) | |
//N X N | |
|| pos != (new Vector3(a.min.getX(), a.max.getY(), a.min.getZ()).dot(b.normal) > 0) | |
//N N X | |
|| pos != (new Vector3(a.min.getX(), a.min.getY(), a.max.getZ()).dot(b.normal) > 0) | |
This file contains hidden or 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
a = Vector3.Up; | |
b = Vector3.Right; | |
boolean result = a.equals(b); | |
assertFalse(result); |
This file contains hidden or 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
return (((c.getY() - a.getY()) * (b.getX() - a.getX())) | |
< ((b.getY() - a.getY()) * (c.getX() - a.getX()))) | |
&& ((c.getY() - a.getY()) * (b.getZ() - a.getZ()) | |
< ((b.getY() - a.getY()) * (c.getZ() - a.getZ()))); |
This file contains hidden or 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
var mod = mm.defineMod("My Mod", { | |
description: "An awesome mod.", | |
author: "AlbireoX", | |
revision: 1, | |
url: "http://simplyian.com" | |
}); | |
var ore = mod.addOre("main-ore", { | |
texture: "http://example.com/sampletexture.png", | |
itemtexture: "http://example.com/sampletexture-item.png" |