same as last
This commit is contained in:
parent
44d59abac5
commit
e35eb3ab30
2 changed files with 29 additions and 7 deletions
|
@ -21,6 +21,7 @@ import assemblyline.common.machine.BlockManipulator;
|
|||
import assemblyline.common.machine.BlockRejector;
|
||||
import assemblyline.common.machine.armbot.BlockArmbot;
|
||||
import assemblyline.common.machine.belt.BlockConveyorBelt;
|
||||
import assemblyline.common.machine.command.GrabDictionary;
|
||||
import assemblyline.common.machine.crane.BlockCraneController;
|
||||
import assemblyline.common.machine.crane.BlockCraneFrame;
|
||||
import assemblyline.common.machine.detector.BlockDetector;
|
||||
|
@ -142,7 +143,7 @@ public class AssemblyLine
|
|||
{
|
||||
FMLog.info("Loading...");
|
||||
proxy.init();
|
||||
|
||||
GrabDictionary.registerList();
|
||||
System.out.println(NAME + " Loaded: " + TranslationHelper.loadLanguages(LANGUAGE_PATH, LANGUAGES_SUPPORTED) + " languages.");
|
||||
|
||||
// Crane Controller
|
||||
|
|
|
@ -4,7 +4,17 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.monster.EntityCreeper;
|
||||
import net.minecraft.entity.monster.EntityMob;
|
||||
import net.minecraft.entity.monster.EntitySkeleton;
|
||||
import net.minecraft.entity.monster.EntitySlime;
|
||||
import net.minecraft.entity.monster.EntitySpider;
|
||||
import net.minecraft.entity.monster.EntityZombie;
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
import net.minecraft.entity.passive.EntityChicken;
|
||||
import net.minecraft.entity.passive.EntityCow;
|
||||
import net.minecraft.entity.passive.EntitySheep;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
public class GrabDictionary
|
||||
{
|
||||
|
@ -40,8 +50,7 @@ public class GrabDictionary
|
|||
*/
|
||||
public String getName()
|
||||
{
|
||||
if (name != null)
|
||||
return this.name;
|
||||
if (name != null) { return this.name; }
|
||||
return "";
|
||||
}
|
||||
|
||||
|
@ -52,13 +61,12 @@ public class GrabDictionary
|
|||
*/
|
||||
public Class<? extends Entity> getEntityClass()
|
||||
{
|
||||
if (this.entityClass != null)
|
||||
return this.entityClass;
|
||||
if (this.entityClass != null) { return this.entityClass; }
|
||||
return Entity.class;
|
||||
}
|
||||
|
||||
/**
|
||||
* registers an entity by a name to its class allowing it to be
|
||||
* called by the grab command to be picked up
|
||||
* registers an entity by a name to its class allowing it to be called by the grab command to be picked up
|
||||
*/
|
||||
public static void registerGrabableEntity(String name, Class<? extends Entity> eClass)
|
||||
{
|
||||
|
@ -76,5 +84,18 @@ public class GrabDictionary
|
|||
public static void registerList()
|
||||
{
|
||||
registerGrabableEntity("chicken", EntityChicken.class);
|
||||
registerGrabableEntity("cow", EntityCow.class);
|
||||
registerGrabableEntity("sheep", EntitySheep.class);
|
||||
registerGrabableEntity("player", EntityPlayer.class);
|
||||
registerGrabableEntity("zombie", EntityZombie.class);
|
||||
registerGrabableEntity("zomb", EntityZombie.class);
|
||||
registerGrabableEntity("skeleton", EntitySkeleton.class);
|
||||
registerGrabableEntity("skel", EntitySkeleton.class);
|
||||
registerGrabableEntity("animal", EntityAnimal.class);
|
||||
registerGrabableEntity("monster", EntityMob.class);
|
||||
registerGrabableEntity("mob", EntityMob.class);
|
||||
registerGrabableEntity("creeper", EntityCreeper.class);
|
||||
registerGrabableEntity("spider", EntitySpider.class);
|
||||
registerGrabableEntity("slime", EntitySlime.class);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue