@@ -0,0 +1,1958 @@
+/*%0A * Copyright 2015 CrystalCraftMC%0A *%0A *    Licensed under the Apache License, Version 2.0 (the %22License%22);%0A *    you may not use this file except in compliance with the License.%0A *    You may obtain a copy of the License at%0A *%0A *        http://www.apache.org/licenses/LICENSE-2.0%0A *%0A *    Unless required by applicable law or agreed to in writing, software%0A *    distributed under the License is distributed on an %22AS IS%22 BASIS,%0A *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A *    See the License for the specific language governing permissions and%0A *    limitations under the License.%0A */%0A%0Apackage com.crystalcraftmc.crystaleggfactory;%0A%0Aimport java.awt.event.ActionEvent;%0Aimport java.awt.event.ActionListener;%0A%0Aimport javax.swing.Timer;%0A%0Aimport org.bukkit.Location;%0Aimport org.bukkit.Material;%0Aimport org.bukkit.block.Block;%0A%0Apublic class CakeAnimation %7B%0A%09private Block globalB;%0A%09private Timer tim;%0A%09private int accumulator;%0A%09public final int NUMCAKES = 5; //MAY CHANGE NUMBER - will also automatically check NUMCAKES blocks%0A%09%09%09%09%09%09%09%09%09//above the PlayerInteractEvent to make sure clear before proceeding%0A%09%0A%09private final int CAKEFRAMERATE = 153; //cakes show up CAKEFRAMERATE milliseconds inbetween eachother%0A%09%0A//####################################################################%0A%09public CakeAnimation(Block b) %7B%0A%09%09globalB = b;%0A%09%09accumulator = 0;%0A%09%09tim = new Timer(CAKEFRAMERATE, new CakeUpdateListener());%0A%09%09tim.start();%0A%09%7D%0A%09public CakeAnimation() %7B%0A%09%09//to create a low-resource accessFields object in EggThrowListener class%0A%09%7D%0A%09private class CakeUpdateListener implements ActionListener %7B%0A%09%09public void actionPerformed(ActionEvent e) %7B%0A%09%09%09accumulator++;%0A%09%09%09Location loc = globalB.getLocation();%0A%09%09%09loc.setY(globalB.getLocation().getY()+accumulator);%0A%09%09%09Block bbb = loc.getBlock();%0A%09%09%09bbb.setType(Material.CAKE_BLOCK);%0A%09%09%09%0A%09%09%09if(accumulator %3E= NUMCAKES)%0A%09%09%09%09stopTim();%0A%09%09%7D%0A%09%7D%0A%09public void stopTim() %7B%0A%09%09tim.stop();%0A%09%7D%0A%7D%0A

Create CakeAnimation.java