@Override public boolean isValidMobType(String type) { return EntityList.isRegistered(new ResourceLocation(type)); }
@Nullable @Override public String getName(BlockType blockType) { return Block.REGISTRY.getObject(new ResourceLocation(blockType.getId())).getLocalizedName(); }
@Override public void drawScreen(int mouseX, int mouseY, float par3) { int x = (this.width - this.backgroundWidth) / 2; int y = (this.height - this.backgroundHeight) / 2 - this.closeButton.height; GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.mc.renderEngine.bindTexture(new ResourceLocation(ForgeWorldEdit.MOD_ID, "textures/gui/reference.png")); this.drawTexturedModalRect(x, y, 0, 0, this.backgroundWidth, this.backgroundHeight); super.drawScreen(mouseX, mouseY, par3); }
@Nonnull @Override protected ResourceLocation getEntityTexture(@Nonnull EntityPixie entity) { return new ResourceLocation(LibResources.MODEL_PIXIE); }
@Nullable @Override public Entity createEntity(Location location, BaseEntity entity) { World world = getWorld(); net.minecraft.entity.Entity createdEntity = EntityList.createEntityByIDFromName(new ResourceLocation(entity.getType().getId()), world); if (createdEntity != null) { CompoundTag nativeTag = entity.getNbtData(); if (nativeTag != null) { NBTTagCompound tag = NBTConverter.toNative(entity.getNbtData()); for (String name : Constants.NO_COPY_ENTITY_NBT_FIELDS) { tag.removeTag(name); } createdEntity.readFromNBT(tag); } createdEntity.setLocationAndAngles(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch()); world.spawnEntity(createdEntity); return new ForgeEntity(createdEntity); } else { return null; } }
public ItemMagnetRing(String name, int range) { super(name); this.range = range; addPropertyOverride(new ResourceLocation("botania", "on"), (stack, worldIn, entityIn) -> ItemMagnetRing.getCooldown(stack) <= 0 ? 1 : 0); }
public BreweryRecipeCategory(IGuiHelper guiHelper) { ResourceLocation location = new ResourceLocation("botania", "textures/gui/neiBrewery.png"); background = guiHelper.createDrawable(location, 0, 0, 166, 65, 0, 0, 0, 0); localizedName = I18n.format("botania.nei.brewery"); }
@Nullable private static SoundEvent getSound(ItemStack stack) { if(isDOIT(stack)) return ModSounds.doit; else return SoundEvent.REGISTRY.getObject(new ResourceLocation(ItemNBTHelper.getString(stack, TAG_SOUND, ""))); }
public ItemGrassHorn() { super(LibItemNames.GRASS_HORN); setMaxStackSize(1); setHasSubtypes(true); addPropertyOverride(new ResourceLocation(LibMisc.MOD_ID, "vuvuzela"), (stack, worldIn, entityIn) -> stack.getDisplayName().toLowerCase(Locale.ROOT).contains("vuvuzela") ? 1 : 0); }
public static void initTC() { Item salisMundus = Item.REGISTRY.getObject(new ResourceLocation("thaumcraft", "salis_mundus")); Item bathSalts = Item.REGISTRY.getObject(new ResourceLocation("thaumcraft", "bath_salts")); Item amber = Item.REGISTRY.getObject(new ResourceLocation("thaumcraft", "amber")); warpWardBrew = BotaniaAPI.registerBrewRecipe(ModBrews.warpWard, new ItemStack(Items.NETHER_WART), new ItemStack(salisMundus), new ItemStack(bathSalts), new ItemStack(amber)); }
public PetalApothecaryRecipeCategory(IGuiHelper guiHelper) { background = guiHelper.createBlankDrawable(150, 110); localizedName = I18n.format("botania.nei.petalApothecary"); overlay = guiHelper.createDrawable(new ResourceLocation("botania", "textures/gui/petalOverlay.png"), 0, 0, 150, 110); }
public BlockModStairs(IBlockState state, String name) { super(state); setRegistryName(new ResourceLocation(LibMisc.MOD_ID, name)); setTranslationKey(name); setCreativeTab(BotaniaCreativeTab.INSTANCE); useNeighborBrightness = true; }
public ItemSpawnerMover() { super(LibItemNames.SPAWNER_MOVER); setMaxStackSize(1); addPropertyOverride(new ResourceLocation("botania", "full"), (stack, worldIn, entityIn) -> hasData(stack) ? 1 : 0); }
public PureDaisyRecipeCategory(IGuiHelper guiHelper) { background = guiHelper.createBlankDrawable(168, 64); localizedName = I18n.format("botania.nei.pureDaisy"); overlay = guiHelper.createDrawable(new ResourceLocation("botania", "textures/gui/pureDaisyOverlay.png"), 0, 0, 64, 46); }
public OrechidIgnemRecipeCategory(IGuiHelper guiHelper) { background = guiHelper.createBlankDrawable(168, 64); localizedName = I18n.format("botania.nei.orechidIgnem"); overlay = guiHelper.createDrawable(new ResourceLocation("botania", "textures/gui/pureDaisyOverlay.png"), 0, 0, 64, 46); }
@Override public void readFromPacketNBT(NBTTagCompound cmp) { super.readFromPacketNBT(cmp); if (cmp.hasKey(TAG_LOOT_TABLE)) lootTable = new ResourceLocation(cmp.getString(TAG_LOOT_TABLE)); }
public OrechidRecipeCategory(IGuiHelper guiHelper) { background = guiHelper.createBlankDrawable(168, 64); localizedName = I18n.format("botania.nei.orechid"); overlay = guiHelper.createDrawable(new ResourceLocation("botania", "textures/gui/pureDaisyOverlay.png"), 0, 0, 64, 46); }
public ManaPoolRecipeCategory(IGuiHelper guiHelper) { background = guiHelper.createBlankDrawable(168, 64); localizedName = I18n.format("botania.nei.manaPool"); overlay = guiHelper.createDrawable(new ResourceLocation("botania", "textures/gui/pureDaisyOverlay.png"), 0, 0, 64, 46); ItemNBTHelper.setBoolean(renderStack, "RenderFull", true); }
public BlockSolidVines() { setRegistryName(new ResourceLocation(LibMisc.MOD_ID, LibBlockNames.SOLID_VINE)); setTranslationKey(LibBlockNames.SOLID_VINE); setHardness(0.5F); setSoundType(SoundType.PLANT); setCreativeTab(null); }
public BlockModMushroom() { setRegistryName(new ResourceLocation(LibMisc.MOD_ID, LibBlockNames.MUSHROOM)); setTranslationKey(LibBlockNames.MUSHROOM); setLightLevel(0.2F); setHardness(0F); setSoundType(SoundType.PLANT); setTickRandomly(false); setCreativeTab(BotaniaCreativeTab.INSTANCE); setDefaultState(blockState.getBaseState().withProperty(BotaniaStateProps.COLOR, EnumDyeColor.WHITE)); }