use of com.teamresourceful.resourcefulbees.item.BeeSpawnEggItem in project ResourcefulBees by Resourceful-Bees.
the class ItemMutationPage method mouseClick.
@Override
public boolean mouseClick(int xPos, int yPos, int mouseX, int mouseY) {
if (super.mouseClick(xPos, yPos, mouseX, mouseY))
return true;
Item output = outputs.get(outputCounter).getRight().getItem();
if (output instanceof BeeSpawnEggItem) {
BeeSpawnEggItem beeEgg = (BeeSpawnEggItem) output;
if (BeepediaScreen.mouseHovering((float) xPos + 112, (float) yPos + 27, 30, 30, mouseX, mouseY)) {
if (BeepediaScreen.currScreenState.getPageID().equals((beeEgg.getBeeData().toString())))
return false;
// // THESE TO STRING CALLS NEED TO BE FIXED AFTER TESTING - DONT FORGET!
BeepediaScreen.saveScreenState();
beepedia.setActive(BeepediaScreen.PageType.BEE, beeEgg.getBeeData().toString());
return true;
}
}
return false;
}
use of com.teamresourceful.resourcefulbees.item.BeeSpawnEggItem in project ResourcefulBees by Resourceful-Bees.
the class RegistryHandler method registerBee.
private static void registerBee(String name, float sizeModifier) {
final RegistryObject<EntityType<? extends CustomBeeEntity>> customBeeEntity = ENTITY_TYPES.register(name + "_bee", () -> EntityType.Builder.<ResourcefulBee>of((type, world) -> new ResourcefulBee(type, world, name), ModConstants.BEE_MOB_CATEGORY).sized(0.7F * sizeModifier, 0.6F * sizeModifier).build(name + "_bee"));
ModItems.ITEMS.register(name + "_bee_spawn_egg", () -> new BeeSpawnEggItem(customBeeEntity, 0xffcc33, 0x303030, name, new Item.Properties().tab(ItemGroupResourcefulBees.RESOURCEFUL_BEES)));
ModEntities.getModBees().put(name, customBeeEntity);
}
Aggregations