Compare commits
8 commits
445c1be8af
...
0d8f7ea1c9
Author | SHA1 | Date | |
---|---|---|---|
0d8f7ea1c9 | |||
5bd5fe6d34 | |||
401c355d2d | |||
8fc08b50ab | |||
113951b48c | |||
f5bf95ad69 | |||
ad6d6c12ca | |||
3a1679f0e9 |
5 changed files with 1097 additions and 303 deletions
|
@ -349,8 +349,11 @@ public class BlockBrewingStand extends BlockContainer
|
|||
brewing_stand_empty, brewing_stand_bottles_1, brewing_stand_bottles_2, brewing_stand_bottles_12,
|
||||
brewing_stand_bottles_3, brewing_stand_bottles_13, brewing_stand_bottles_23, brewing_stand_bottles_123
|
||||
};
|
||||
|
||||
public static final PropertyBool[] HAS_BOTTLE = new PropertyBool[] {PropertyBool.create("has_bottle_0"), PropertyBool.create("has_bottle_1"), PropertyBool.create("has_bottle_2")};
|
||||
|
||||
public static final PropertyBool HAS_BOTTLE_0 = PropertyBool.create("has_bottle_0");
|
||||
public static final PropertyBool HAS_BOTTLE_1 = PropertyBool.create("has_bottle_1");
|
||||
public static final PropertyBool HAS_BOTTLE_2 = PropertyBool.create("has_bottle_2");
|
||||
public static final PropertyBool[] HAS_BOTTLE = new PropertyBool[] {HAS_BOTTLE_0, HAS_BOTTLE_1, HAS_BOTTLE_2};
|
||||
|
||||
public BlockBrewingStand()
|
||||
{
|
||||
|
|
|
@ -1033,7 +1033,7 @@ public class BlockRedstoneWire extends Block
|
|||
return new ItemRedstone(Blocks.redstone).setDisplay("Redstone").setPotionEffect(PotionHelper.redstoneEffect).setMaxAmount(256);
|
||||
}
|
||||
|
||||
static enum EnumAttachPosition implements Identifyable
|
||||
public static enum EnumAttachPosition implements Identifyable
|
||||
{
|
||||
UP("up"),
|
||||
SIDE("side"),
|
||||
|
|
|
@ -58,7 +58,6 @@ public abstract class EntityRegistry {
|
|||
private static final Map<Class<? extends Entity>, String> CLASS_TO_STRING = Maps.<Class<? extends Entity>, String>newHashMap();
|
||||
private static final Map<Integer, Class<? extends Entity>> ID_TO_CLASS = Maps.<Integer, Class<? extends Entity>>newHashMap();
|
||||
private static final Map<Class<? extends Entity>, Integer> CLASS_TO_ID = Maps.<Class<? extends Entity>, Integer>newHashMap();
|
||||
// private static final Map<String, Integer> STRING_TO_ID = Maps.<String, Integer>newHashMap();
|
||||
public static final Map<String, EntityInfo> SPAWN_EGGS = Maps.<String, EntityInfo>newLinkedHashMap();
|
||||
private static final Map<String, String> STRING_TO_NAME = Maps.<String, String>newHashMap();
|
||||
|
||||
|
@ -68,10 +67,6 @@ public abstract class EntityRegistry {
|
|||
private static int registerEntity(String name, Class<? extends Entity> clazz, String typename) {
|
||||
if(clazz == null)
|
||||
throw new IllegalArgumentException("Kann keine null-Klasse registrieren");
|
||||
// String name = clazz.getSimpleName();
|
||||
// if(!name.startsWith("Entity"))
|
||||
// throw new IllegalArgumentException("Fehlerhafter Klassenname: " + name);
|
||||
// name = name.substring(6);
|
||||
if(STRING_TO_CLASS.containsKey(name))
|
||||
throw new IllegalArgumentException("Klasse ist bereits registriert: " + name);
|
||||
int id = ++nextNetId;
|
||||
|
@ -79,7 +74,6 @@ public abstract class EntityRegistry {
|
|||
CLASS_TO_STRING.put(clazz, name);
|
||||
ID_TO_CLASS.put(id, clazz);
|
||||
CLASS_TO_ID.put(clazz, id);
|
||||
// STRING_TO_ID.put(name, id);
|
||||
STRING_TO_NAME.put(name, typename);
|
||||
return id;
|
||||
}
|
||||
|
@ -89,18 +83,10 @@ public abstract class EntityRegistry {
|
|||
registerEntity(name, clazz, typename);
|
||||
}
|
||||
else {
|
||||
// String name = clazz.getSimpleName().substring(6);
|
||||
SPAWN_EGGS.put(name, new EntityInfo(name, origin, eggColor, spotColor));
|
||||
}
|
||||
}
|
||||
|
||||
// private static void registerEntity(Class<? extends EntityLiving> clazz, String origin, String typename, int eggColor, int spotColor) {
|
||||
// SpeciesInfo species = SpeciesRegistry.CLASSES.get(clazz);
|
||||
// if(species == null)
|
||||
// throw new IllegalArgumentException("'" + typename + "' ist keine NPC-Klasse");
|
||||
// registerEntity(species.sname, clazz, origin, typename, eggColor, spotColor);
|
||||
// }
|
||||
|
||||
public static Entity createEntityByName(String entityName, World worldIn) {
|
||||
Entity entity = null;
|
||||
|
||||
|
@ -171,15 +157,9 @@ public abstract class EntityRegistry {
|
|||
|
||||
if(oclass != null) {
|
||||
if(IObjectData.class.isAssignableFrom(oclass)) {
|
||||
// Constructor<? extends Entity> cn;
|
||||
// try {
|
||||
entity = oclass.getConstructor(World.class, double.class, double.class, double.class, int.class)
|
||||
.newInstance(worldIn, x, y, z, data);
|
||||
// }
|
||||
// catch(NoSuchMethodException e) {
|
||||
// }
|
||||
}
|
||||
// if(entity == null)
|
||||
else {
|
||||
entity = oclass.getConstructor(World.class, double.class, double.class, double.class)
|
||||
.newInstance(worldIn, x, y, z);
|
||||
|
@ -228,23 +208,6 @@ public abstract class EntityRegistry {
|
|||
return STRING_TO_CLASS.get(id);
|
||||
}
|
||||
|
||||
|
||||
// public static List<String> getEntityNameList(boolean lower) {
|
||||
// Set<String> set = STRING_TO_CLASS.keySet();
|
||||
// List<String> list = Lists.<String>newArrayList();
|
||||
//
|
||||
// for(String s : set) {
|
||||
// Class<? extends Entity> oclass = (Class)STRING_TO_CLASS.get(s);
|
||||
//
|
||||
// if((oclass.getModifiers() & Modifier.ABSTRACT) != Modifier.ABSTRACT) {
|
||||
// list.add(lower ? s.toLowerCase() : s);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// list.add(lower ? "lightning" : "Lightning");
|
||||
// return list;
|
||||
// }
|
||||
|
||||
public static Set<Class<? extends Entity>> getAllClasses() {
|
||||
return CLASS_TO_STRING.keySet();
|
||||
}
|
||||
|
@ -278,7 +241,6 @@ public abstract class EntityRegistry {
|
|||
registerEntity("Xp", EntityXp.class, "Erfahrungskugel");
|
||||
registerEntity("Egg", EntityEgg.class, "Ei");
|
||||
registerEntity("LeashKnot", EntityLeashKnot.class, "Leinenknoten");
|
||||
// registerEntity("Painting", EntityPainting.class, "Gemälde");
|
||||
registerEntity("Arrow", EntityArrow.class, "Pfeil");
|
||||
registerEntity("Snowball", EntitySnowball.class, "Schneeball");
|
||||
registerEntity("Fireball", EntityFireball.class, "Feuerball");
|
||||
|
@ -286,7 +248,6 @@ public abstract class EntityRegistry {
|
|||
registerEntity("Orb", EntityOrb.class, "Geladene Kugel");
|
||||
registerEntity("Potion", EntityPotion.class, "Trank");
|
||||
registerEntity("XpBottle", EntityXpBottle.class, "Erfahrungsfläschchen");
|
||||
// registerEntity("Frame", EntityFrame.class, "Rahmen");
|
||||
registerEntity("Box", EntityBox.class, "Eisenwürfel");
|
||||
registerEntity("Tnt", EntityTnt.class, "TNT");
|
||||
registerEntity("Falling", EntityFalling.class, "Fallender Block");
|
||||
|
@ -304,26 +265,6 @@ public abstract class EntityRegistry {
|
|||
registerEntity("Crystal", EntityCrystal.class, "Kristall");
|
||||
registerEntity("Bullet", EntityBullet.class, "Kugel");
|
||||
|
||||
//// nextNetId = 255;
|
||||
// registerEntity("Dragon", EntityDragon.class, 0x000000, 0x580094);
|
||||
// registerEntity("Bat", EntityBat.class, 4996656, 986895);
|
||||
// registerEntity("Pig", EntityPig.class, 15771042, 14377823);
|
||||
// registerEntity("Sheep", EntitySheep.class, 15198183, 16758197);
|
||||
// registerEntity("Cow", EntityCow.class, 4470310, 10592673);
|
||||
// registerEntity("Chicken", EntityChicken.class, 10592673, 16711680);
|
||||
// registerEntity("Squid", EntitySquid.class, 2243405, 7375001);
|
||||
// registerEntity("Wolf", EntityWolf.class, 14144467, 13545366);
|
||||
// registerEntity("Mooshroom", EntityMooshroom.class, 10489616, 12040119);
|
||||
// registerEntity("Ocelot", EntityOcelot.class, 15720061, 5653556);
|
||||
// registerEntity("Horse", EntityHorse.class, 12623485, 15656192);
|
||||
// registerEntity("Rabbit", EntityRabbit.class, 10051392, 7555121);
|
||||
// registerEntity("Mouse", EntityMouse.class, 0x606060, 0xb0b0b0);
|
||||
//
|
||||
//// nextNetId = 511;
|
||||
// for(int z = 0; z < SpeciesRegistry.SPECIMEN.size(); z++) {
|
||||
// SpeciesInfo info = SpeciesRegistry.SPECIMEN.get(z);
|
||||
// registerEntity(info.clazz, info.color1, info.color2);
|
||||
// }
|
||||
registerEggs();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -405,7 +405,7 @@ public final class Server implements IThreadListener, Executor {
|
|||
|
||||
public void run(long time) {
|
||||
Region.loadMap();
|
||||
Converter.convert(this);
|
||||
Converter.convert();
|
||||
long wtime = this.loadServerConfig();
|
||||
if(this.keyPair == null) {
|
||||
Log.SYSTEM.info("Generiere neues Schlüsselpaar");
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue